refactoring
This commit is contained in:
parent
5d6f032b1a
commit
fbe9a2ecde
|
@ -1,2 +1,8 @@
|
||||||
build
|
build
|
||||||
out
|
out
|
||||||
|
/.nb-gradle/
|
||||||
|
.gradle/
|
||||||
|
.idea/
|
||||||
|
freerouting.iml
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,147 @@
|
||||||
|
buildscript {
|
||||||
|
repositories {
|
||||||
|
mavenCentral()
|
||||||
|
jcenter()
|
||||||
|
}
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
//
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
plugins {
|
||||||
|
id "com.github.hierynomus.license" version "0.13.1"
|
||||||
|
id 'maven-publish'
|
||||||
|
id 'net.nemerosa.versioning' version '2.4.0'
|
||||||
|
id 'com.jfrog.bintray' version '1.7.3'
|
||||||
|
id 'com.github.ben-manes.versions' version '0.13.0'
|
||||||
|
|
||||||
|
// jigsaw:
|
||||||
|
// id 'org.gradle.java.experimental-jigsaw' version '0.1.1'
|
||||||
|
}
|
||||||
|
|
||||||
|
apply plugin: 'java'
|
||||||
|
apply from: 'gradle/publishing.gradle'
|
||||||
|
|
||||||
|
task wrapper(type: Wrapper) {
|
||||||
|
gradleVersion = '4.2.1'
|
||||||
|
distributionUrl = "https://services.gradle.org/distributions/gradle-$gradleVersion-all.zip"
|
||||||
|
}
|
||||||
|
|
||||||
|
sourceCompatibility = '1.9'
|
||||||
|
[compileJava, compileTestJava]*.options*.encoding = 'UTF-8'
|
||||||
|
|
||||||
|
gradle.projectsEvaluated {
|
||||||
|
tasks.withType(JavaCompile) {
|
||||||
|
options.compilerArgs << "-Xlint:unchecked" << "-Xlint:deprecation"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// javadoc is way too strict for my taste.
|
||||||
|
if (JavaVersion.current().isJava8Compatible()) {
|
||||||
|
allprojects {
|
||||||
|
tasks.withType(Javadoc) {
|
||||||
|
options.addStringOption("encoding", "UTF-8")
|
||||||
|
options.addStringOption('Xdoclint:none', '-quiet')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!hasProperty('mainClass')) {
|
||||||
|
ext.mainClass = 'eu.mihosoft.freerouting.gui.MainApplication'
|
||||||
|
}
|
||||||
|
|
||||||
|
repositories {
|
||||||
|
mavenCentral()
|
||||||
|
jcenter()
|
||||||
|
}
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
testCompile group: 'junit', name: 'junit', version: '4.10'
|
||||||
|
|
||||||
|
// https://mvnrepository.com/artifact/javax.help/javahelp
|
||||||
|
// compile group: 'javax.help', name: 'javahelp', version: '2.0.05'
|
||||||
|
|
||||||
|
compile files("./lib/eu.mihosoft.freerouting.deps.jh.jar")
|
||||||
|
}
|
||||||
|
|
||||||
|
//ext.moduleName = 'eu.mihosoft.freerouting'
|
||||||
|
//javaModule.name = 'eu.mihosoft.freerouting'
|
||||||
|
//
|
||||||
|
//compileJava {
|
||||||
|
// inputs.property("moduleName", moduleName)
|
||||||
|
// doFirst {
|
||||||
|
//
|
||||||
|
// System.err.println(": modulepath-jar: " + classpath.asPath)
|
||||||
|
//
|
||||||
|
// options.compilerArgs = [
|
||||||
|
// '--module-path', classpath.asPath,
|
||||||
|
// ]
|
||||||
|
// classpath = files()
|
||||||
|
// }
|
||||||
|
//}
|
||||||
|
|
||||||
|
Date buildTimeAndDate = new Date()
|
||||||
|
ext {
|
||||||
|
buildDate = new java.text.SimpleDateFormat('yyyy-MM-dd').format(buildTimeAndDate)
|
||||||
|
buildTime = new java.text.SimpleDateFormat('HH:mm:ss.SSSZ').format(buildTimeAndDate)
|
||||||
|
}
|
||||||
|
|
||||||
|
// create a fat-jar (class files plus dependencies
|
||||||
|
// excludes VRL.jar (plugin jar files must not start with 'vrl-\\d+')
|
||||||
|
jar {
|
||||||
|
|
||||||
|
|
||||||
|
// TODO add switch for fat-jar generation
|
||||||
|
// dependencies except VRL
|
||||||
|
// from configurations.runtime.asFileTree.
|
||||||
|
// filter({file->return !file.name.startsWith("vrl-0")}).
|
||||||
|
// files.collect { zipTree(it) }
|
||||||
|
//
|
||||||
|
// from configurations.runtime.asFileTree.files.collect { zipTree(it) }
|
||||||
|
|
||||||
|
// // project class files compiled from source
|
||||||
|
from files(sourceSets.main.output)
|
||||||
|
|
||||||
|
manifest {
|
||||||
|
|
||||||
|
attributes(
|
||||||
|
'Built-By': System.properties['user.name'],
|
||||||
|
'Created-By': System.properties['java.version'] + " (" + System.properties['java.vendor'] + " " + System.properties['java.vm.version'] + ")",
|
||||||
|
'Build-Date': project.buildDate,
|
||||||
|
'Build-Time': project.buildTime,
|
||||||
|
'Build-Revision': versioning.info.commit,
|
||||||
|
'Specification-Title': project.name,
|
||||||
|
'Specification-Version': project.version,
|
||||||
|
'Implementation-Title': project.name,
|
||||||
|
'Implementation-Version': project.version,
|
||||||
|
'Main-Class': mainClass
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//license {
|
||||||
|
// header = rootProject.file('config/HEADER')
|
||||||
|
// strictCheck = true
|
||||||
|
// ignoreFailures = true
|
||||||
|
// mapping {
|
||||||
|
// java = 'SLASHSTAR_STYLE'
|
||||||
|
// groovy = 'SLASHSTAR_STYLE'
|
||||||
|
// fxml = 'XML_STYLE'
|
||||||
|
// }
|
||||||
|
// ext.yearSince1 = '2017'
|
||||||
|
// ext.yearCurrent = new java.text.SimpleDateFormat("yyyy").format(new Date())
|
||||||
|
// ext.author1 = 'Michael Hoffer <info@michaelhoffer.de>'
|
||||||
|
// exclude '**/*.svg'
|
||||||
|
//}
|
||||||
|
|
||||||
|
task run(type: JavaExec) {
|
||||||
|
classpath = sourceSets.main.runtimeClasspath
|
||||||
|
|
||||||
|
main = mainClass
|
||||||
|
|
||||||
|
// arguments to pass to the application
|
||||||
|
// args 'appArg1'
|
||||||
|
// jvmArgs 'arg1'
|
||||||
|
}
|
32
build.xml
32
build.xml
|
@ -1,32 +0,0 @@
|
||||||
<project default="jar">
|
|
||||||
<target name="clean">
|
|
||||||
<delete dir="build"/>
|
|
||||||
</target>
|
|
||||||
|
|
||||||
<target name="compile">
|
|
||||||
<mkdir dir="build/classes"/>
|
|
||||||
<javac destdir="build/classes" classpath="lib/jh.jar:lib/javaws.jar" target="1.5" source="1.5" debug="yes">
|
|
||||||
<src path="src"/>
|
|
||||||
</javac>
|
|
||||||
</target>
|
|
||||||
|
|
||||||
<target name="jar" depends="compile">
|
|
||||||
|
|
||||||
<!-- TODO: zip files right into the jar? -->
|
|
||||||
<copy todir="build/classes/">
|
|
||||||
<fileset dir="src" includes="**/*.properties"/>
|
|
||||||
</copy>
|
|
||||||
|
|
||||||
<jar destfile="build/FreeRouting.jar" basedir="build/classes">
|
|
||||||
<manifest>
|
|
||||||
<attribute name="Main-Class" value="gui.MainApplication"/>
|
|
||||||
</manifest>
|
|
||||||
|
|
||||||
<fileset dir="build/classes" includes="**/*.class **/*.properties"/>
|
|
||||||
<zipfileset src="lib/jh.jar" includes="**/*.class"/>
|
|
||||||
<zipfileset src="lib/javaws.jar" includes="**/*.class"/>
|
|
||||||
</jar>
|
|
||||||
</target>
|
|
||||||
|
|
||||||
|
|
||||||
</project>
|
|
|
@ -0,0 +1,25 @@
|
||||||
|
// -----------------------------------------------------------------------------
|
||||||
|
// publishing information
|
||||||
|
// -----------------------------------------------------------------------------
|
||||||
|
ext.publishing.artifactId = project.name.toLowerCase()
|
||||||
|
ext.publishing.groupId = 'eu.mihosoft.jcapture'
|
||||||
|
ext.publishing.versionId = '0.1.2'
|
||||||
|
|
||||||
|
ext.publishing.developerName = 'Michael Hoffer'
|
||||||
|
ext.publishing.developerAlias = 'miho'
|
||||||
|
ext.publishing.developerEmail = 'info@michaelhoffer.de'
|
||||||
|
ext.publishing.inceptionYear = '2017'
|
||||||
|
|
||||||
|
ext.publishing.bintray.repo = 'JCapture'
|
||||||
|
ext.publishing.bintray.userOrg = 'miho'
|
||||||
|
ext.publishing.bintray.name = project.name
|
||||||
|
|
||||||
|
ext.publishing.desc = 'Simple API for capturing video devices'
|
||||||
|
ext.publishing.license = 'Apache-2.0'
|
||||||
|
ext.publishing.licenseUrl = 'https://github.com/miho/JCapture/blob/master/LICENSE.txt'
|
||||||
|
ext.publishing.labels = ['video', 'webcam', 'capture']
|
||||||
|
ext.publishing.websiteUrl = 'https://github.com/miho/JCapture'
|
||||||
|
ext.publishing.issueTrackerUrl = 'https://github.com/miho/JCapture/issues'
|
||||||
|
ext.publishing.vcsUrl = 'https://github.com/miho/JCapture.git'
|
||||||
|
|
||||||
|
ext.publishing.pomName = ext.publishing.artifactId
|
|
@ -0,0 +1,122 @@
|
||||||
|
// -----------------------------------------------------------------------------
|
||||||
|
// Collect publishing information
|
||||||
|
// -----------------------------------------------------------------------------
|
||||||
|
ext.publishing = [:]
|
||||||
|
ext.publishing.bintray = [:]
|
||||||
|
|
||||||
|
ext.publishing.pomName = ext.publishing.artifactId
|
||||||
|
|
||||||
|
apply from: "gradle/project-info.gradle"
|
||||||
|
|
||||||
|
// -----------------------------------------------------------------------------
|
||||||
|
// Performs publishing
|
||||||
|
// -----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
task javadocJar(type: Jar, dependsOn: javadoc) {
|
||||||
|
classifier = 'javadoc'
|
||||||
|
from javadoc.destinationDir
|
||||||
|
}
|
||||||
|
|
||||||
|
// create one jar for the source files
|
||||||
|
task sourcesJar(type: Jar, dependsOn: classes) {
|
||||||
|
classifier = 'sources'
|
||||||
|
from sourceSets.main.allSource
|
||||||
|
}
|
||||||
|
|
||||||
|
artifacts {
|
||||||
|
archives jar
|
||||||
|
archives javadocJar
|
||||||
|
archives sourcesJar
|
||||||
|
}
|
||||||
|
Date buildTimeAndDate = new Date()
|
||||||
|
ext {
|
||||||
|
buildDate = new java.text.SimpleDateFormat('yyyy-MM-dd').format(buildTimeAndDate)
|
||||||
|
buildTime = new java.text.SimpleDateFormat('HH:mm:ss.SSSZ').format(buildTimeAndDate)
|
||||||
|
}
|
||||||
|
|
||||||
|
jar {
|
||||||
|
manifest {
|
||||||
|
attributes(
|
||||||
|
'Built-By': System.properties['user.name'],
|
||||||
|
'Created-By': System.properties['java.version'] + " (" + System.properties['java.vendor'] + " " + System.properties['java.vm.version'] + ")",
|
||||||
|
'Build-Date': project.buildDate,
|
||||||
|
'Build-Time': project.buildTime,
|
||||||
|
'Build-Revision': versioning.info.commit,
|
||||||
|
'Specification-Title': project.name,
|
||||||
|
'Specification-Version': project.version,
|
||||||
|
'Implementation-Title': project.name,
|
||||||
|
'Implementation-Version': project.version
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
def pomConfig = {
|
||||||
|
name ext.publishing.pomName
|
||||||
|
description ext.publishing.desc
|
||||||
|
url ext.publishing.websiteUrl
|
||||||
|
inceptionYear ext.publishing.inceptionYear
|
||||||
|
licenses {
|
||||||
|
license([:]) {
|
||||||
|
name ext.publishing.license
|
||||||
|
url ext.publishing.licenseUrl
|
||||||
|
distribution 'repo'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
scm {
|
||||||
|
url ext.publishing.vcsUrl
|
||||||
|
connection ext.publishing.vcsUrl
|
||||||
|
developerConnection ext.publishing.vcsUrl
|
||||||
|
}
|
||||||
|
developers {
|
||||||
|
developer {
|
||||||
|
id ext.publishing.developerNameAlias
|
||||||
|
name ext.publishing.developerName
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
publishing {
|
||||||
|
publications {
|
||||||
|
mavenCustom(MavenPublication) {
|
||||||
|
groupId publishing.groupId
|
||||||
|
artifactId publishing.artifactId
|
||||||
|
version publishing.versionId
|
||||||
|
from components.java
|
||||||
|
artifact sourcesJar
|
||||||
|
artifact javadocJar
|
||||||
|
|
||||||
|
pom.withXml {
|
||||||
|
def root = asNode()
|
||||||
|
root.appendNode 'description', publishing.desc
|
||||||
|
root.children().last() + pomConfig
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!project.hasProperty('bintrayUsername')) ext.bintrayUsername = ''
|
||||||
|
if (!project.hasProperty('bintrayApiKey')) ext.bintrayApiKey = ''
|
||||||
|
|
||||||
|
bintray {
|
||||||
|
user = project.bintrayUsername
|
||||||
|
key = project.bintrayApiKey
|
||||||
|
publications = ['mavenCustom']
|
||||||
|
pkg {
|
||||||
|
repo = publishing.bintray.repo
|
||||||
|
userOrg = publishing.bintray.userOrg
|
||||||
|
name = publishing.bintray.name
|
||||||
|
desc = publishing.desc
|
||||||
|
licenses = [publishing.license]
|
||||||
|
labels = publishing.labels
|
||||||
|
websiteUrl = publishing.websiteUrl
|
||||||
|
issueTrackerUrl = publishing.issueTrackerUrl
|
||||||
|
vcsUrl = publishing.vcsUrl
|
||||||
|
publicDownloadNumbers = true
|
||||||
|
|
||||||
|
version {
|
||||||
|
name = publishing.versionId
|
||||||
|
vcsTag = 'v' + publishing.versionId
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Binary file not shown.
|
@ -0,0 +1,5 @@
|
||||||
|
distributionUrl=https\://services.gradle.org/distributions/gradle-4.2.1-all.zip
|
||||||
|
distributionBase=GRADLE_USER_HOME
|
||||||
|
distributionPath=wrapper/dists
|
||||||
|
zipStorePath=wrapper/dists
|
||||||
|
zipStoreBase=GRADLE_USER_HOME
|
|
@ -0,0 +1,172 @@
|
||||||
|
#!/usr/bin/env sh
|
||||||
|
|
||||||
|
##############################################################################
|
||||||
|
##
|
||||||
|
## Gradle start up script for UN*X
|
||||||
|
##
|
||||||
|
##############################################################################
|
||||||
|
|
||||||
|
# Attempt to set APP_HOME
|
||||||
|
# Resolve links: $0 may be a link
|
||||||
|
PRG="$0"
|
||||||
|
# Need this for relative symlinks.
|
||||||
|
while [ -h "$PRG" ] ; do
|
||||||
|
ls=`ls -ld "$PRG"`
|
||||||
|
link=`expr "$ls" : '.*-> \(.*\)$'`
|
||||||
|
if expr "$link" : '/.*' > /dev/null; then
|
||||||
|
PRG="$link"
|
||||||
|
else
|
||||||
|
PRG=`dirname "$PRG"`"/$link"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
SAVED="`pwd`"
|
||||||
|
cd "`dirname \"$PRG\"`/" >/dev/null
|
||||||
|
APP_HOME="`pwd -P`"
|
||||||
|
cd "$SAVED" >/dev/null
|
||||||
|
|
||||||
|
APP_NAME="Gradle"
|
||||||
|
APP_BASE_NAME=`basename "$0"`
|
||||||
|
|
||||||
|
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||||
|
DEFAULT_JVM_OPTS=""
|
||||||
|
|
||||||
|
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
||||||
|
MAX_FD="maximum"
|
||||||
|
|
||||||
|
warn () {
|
||||||
|
echo "$*"
|
||||||
|
}
|
||||||
|
|
||||||
|
die () {
|
||||||
|
echo
|
||||||
|
echo "$*"
|
||||||
|
echo
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
# OS specific support (must be 'true' or 'false').
|
||||||
|
cygwin=false
|
||||||
|
msys=false
|
||||||
|
darwin=false
|
||||||
|
nonstop=false
|
||||||
|
case "`uname`" in
|
||||||
|
CYGWIN* )
|
||||||
|
cygwin=true
|
||||||
|
;;
|
||||||
|
Darwin* )
|
||||||
|
darwin=true
|
||||||
|
;;
|
||||||
|
MINGW* )
|
||||||
|
msys=true
|
||||||
|
;;
|
||||||
|
NONSTOP* )
|
||||||
|
nonstop=true
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
|
||||||
|
|
||||||
|
# Determine the Java command to use to start the JVM.
|
||||||
|
if [ -n "$JAVA_HOME" ] ; then
|
||||||
|
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
|
||||||
|
# IBM's JDK on AIX uses strange locations for the executables
|
||||||
|
JAVACMD="$JAVA_HOME/jre/sh/java"
|
||||||
|
else
|
||||||
|
JAVACMD="$JAVA_HOME/bin/java"
|
||||||
|
fi
|
||||||
|
if [ ! -x "$JAVACMD" ] ; then
|
||||||
|
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
|
||||||
|
|
||||||
|
Please set the JAVA_HOME variable in your environment to match the
|
||||||
|
location of your Java installation."
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
JAVACMD="java"
|
||||||
|
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||||
|
|
||||||
|
Please set the JAVA_HOME variable in your environment to match the
|
||||||
|
location of your Java installation."
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Increase the maximum file descriptors if we can.
|
||||||
|
if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
|
||||||
|
MAX_FD_LIMIT=`ulimit -H -n`
|
||||||
|
if [ $? -eq 0 ] ; then
|
||||||
|
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
|
||||||
|
MAX_FD="$MAX_FD_LIMIT"
|
||||||
|
fi
|
||||||
|
ulimit -n $MAX_FD
|
||||||
|
if [ $? -ne 0 ] ; then
|
||||||
|
warn "Could not set maximum file descriptor limit: $MAX_FD"
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
# For Darwin, add options to specify how the application appears in the dock
|
||||||
|
if $darwin; then
|
||||||
|
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
|
||||||
|
fi
|
||||||
|
|
||||||
|
# For Cygwin, switch paths to Windows format before running java
|
||||||
|
if $cygwin ; then
|
||||||
|
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
|
||||||
|
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
|
||||||
|
JAVACMD=`cygpath --unix "$JAVACMD"`
|
||||||
|
|
||||||
|
# We build the pattern for arguments to be converted via cygpath
|
||||||
|
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
|
||||||
|
SEP=""
|
||||||
|
for dir in $ROOTDIRSRAW ; do
|
||||||
|
ROOTDIRS="$ROOTDIRS$SEP$dir"
|
||||||
|
SEP="|"
|
||||||
|
done
|
||||||
|
OURCYGPATTERN="(^($ROOTDIRS))"
|
||||||
|
# Add a user-defined pattern to the cygpath arguments
|
||||||
|
if [ "$GRADLE_CYGPATTERN" != "" ] ; then
|
||||||
|
OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
|
||||||
|
fi
|
||||||
|
# Now convert the arguments - kludge to limit ourselves to /bin/sh
|
||||||
|
i=0
|
||||||
|
for arg in "$@" ; do
|
||||||
|
CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
|
||||||
|
CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
|
||||||
|
|
||||||
|
if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
|
||||||
|
eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
|
||||||
|
else
|
||||||
|
eval `echo args$i`="\"$arg\""
|
||||||
|
fi
|
||||||
|
i=$((i+1))
|
||||||
|
done
|
||||||
|
case $i in
|
||||||
|
(0) set -- ;;
|
||||||
|
(1) set -- "$args0" ;;
|
||||||
|
(2) set -- "$args0" "$args1" ;;
|
||||||
|
(3) set -- "$args0" "$args1" "$args2" ;;
|
||||||
|
(4) set -- "$args0" "$args1" "$args2" "$args3" ;;
|
||||||
|
(5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
|
||||||
|
(6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
|
||||||
|
(7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
|
||||||
|
(8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
|
||||||
|
(9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Escape application args
|
||||||
|
save () {
|
||||||
|
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
|
||||||
|
echo " "
|
||||||
|
}
|
||||||
|
APP_ARGS=$(save "$@")
|
||||||
|
|
||||||
|
# Collect all arguments for the java command, following the shell quoting and substitution rules
|
||||||
|
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
|
||||||
|
|
||||||
|
# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
|
||||||
|
if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
|
||||||
|
cd "$(dirname "$0")"
|
||||||
|
fi
|
||||||
|
|
||||||
|
exec "$JAVACMD" "$@"
|
|
@ -0,0 +1,84 @@
|
||||||
|
@if "%DEBUG%" == "" @echo off
|
||||||
|
@rem ##########################################################################
|
||||||
|
@rem
|
||||||
|
@rem Gradle startup script for Windows
|
||||||
|
@rem
|
||||||
|
@rem ##########################################################################
|
||||||
|
|
||||||
|
@rem Set local scope for the variables with windows NT shell
|
||||||
|
if "%OS%"=="Windows_NT" setlocal
|
||||||
|
|
||||||
|
set DIRNAME=%~dp0
|
||||||
|
if "%DIRNAME%" == "" set DIRNAME=.
|
||||||
|
set APP_BASE_NAME=%~n0
|
||||||
|
set APP_HOME=%DIRNAME%
|
||||||
|
|
||||||
|
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||||
|
set DEFAULT_JVM_OPTS=
|
||||||
|
|
||||||
|
@rem Find java.exe
|
||||||
|
if defined JAVA_HOME goto findJavaFromJavaHome
|
||||||
|
|
||||||
|
set JAVA_EXE=java.exe
|
||||||
|
%JAVA_EXE% -version >NUL 2>&1
|
||||||
|
if "%ERRORLEVEL%" == "0" goto init
|
||||||
|
|
||||||
|
echo.
|
||||||
|
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||||
|
echo.
|
||||||
|
echo Please set the JAVA_HOME variable in your environment to match the
|
||||||
|
echo location of your Java installation.
|
||||||
|
|
||||||
|
goto fail
|
||||||
|
|
||||||
|
:findJavaFromJavaHome
|
||||||
|
set JAVA_HOME=%JAVA_HOME:"=%
|
||||||
|
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
|
||||||
|
|
||||||
|
if exist "%JAVA_EXE%" goto init
|
||||||
|
|
||||||
|
echo.
|
||||||
|
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
|
||||||
|
echo.
|
||||||
|
echo Please set the JAVA_HOME variable in your environment to match the
|
||||||
|
echo location of your Java installation.
|
||||||
|
|
||||||
|
goto fail
|
||||||
|
|
||||||
|
:init
|
||||||
|
@rem Get command-line arguments, handling Windows variants
|
||||||
|
|
||||||
|
if not "%OS%" == "Windows_NT" goto win9xME_args
|
||||||
|
|
||||||
|
:win9xME_args
|
||||||
|
@rem Slurp the command line arguments.
|
||||||
|
set CMD_LINE_ARGS=
|
||||||
|
set _SKIP=2
|
||||||
|
|
||||||
|
:win9xME_args_slurp
|
||||||
|
if "x%~1" == "x" goto execute
|
||||||
|
|
||||||
|
set CMD_LINE_ARGS=%*
|
||||||
|
|
||||||
|
:execute
|
||||||
|
@rem Setup the command line
|
||||||
|
|
||||||
|
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
|
||||||
|
|
||||||
|
@rem Execute Gradle
|
||||||
|
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
|
||||||
|
|
||||||
|
:end
|
||||||
|
@rem End local scope for the variables with windows NT shell
|
||||||
|
if "%ERRORLEVEL%"=="0" goto mainEnd
|
||||||
|
|
||||||
|
:fail
|
||||||
|
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
|
||||||
|
rem the _cmd.exe /c_ return code!
|
||||||
|
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
|
||||||
|
exit /b 1
|
||||||
|
|
||||||
|
:mainEnd
|
||||||
|
if "%OS%"=="Windows_NT" endlocal
|
||||||
|
|
||||||
|
:omega
|
Binary file not shown.
|
@ -0,0 +1,2 @@
|
||||||
|
rootProject.name = 'freerouting'
|
||||||
|
|
|
@ -17,17 +17,17 @@
|
||||||
*
|
*
|
||||||
* Created on 25. Januar 2004, 09:38
|
* Created on 25. Januar 2004, 09:38
|
||||||
*/
|
*/
|
||||||
package autoroute;
|
package eu.mihosoft.freerouting.autoroute;
|
||||||
|
|
||||||
import geometry.planar.ConvexShape;
|
import eu.mihosoft.freerouting.geometry.planar.ConvexShape;
|
||||||
|
|
||||||
import rules.ViaInfo;
|
import eu.mihosoft.freerouting.rules.ViaInfo;
|
||||||
import rules.ViaRule;
|
import eu.mihosoft.freerouting.rules.ViaRule;
|
||||||
|
|
||||||
import board.RoutingBoard;
|
import eu.mihosoft.freerouting.board.RoutingBoard;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Structure for controlling the autoroute algorithm.
|
* Structure for controlling the eu.mihosoft.freerouting.autoroute algorithm.
|
||||||
*
|
*
|
||||||
* @author Alfons Wirtz
|
* @author Alfons Wirtz
|
||||||
*/
|
*/
|
||||||
|
@ -35,21 +35,21 @@ public class AutorouteControl
|
||||||
{
|
{
|
||||||
|
|
||||||
/** Creates a new instance of AutorouteControl for the input net */
|
/** Creates a new instance of AutorouteControl for the input net */
|
||||||
public AutorouteControl(RoutingBoard p_board, int p_net_no, interactive.Settings p_settings)
|
public AutorouteControl(RoutingBoard p_board, int p_net_no, eu.mihosoft.freerouting.interactive.Settings p_settings)
|
||||||
{
|
{
|
||||||
this(p_board, p_settings, p_settings.autoroute_settings.get_trace_cost_arr());
|
this(p_board, p_settings, p_settings.autoroute_settings.get_trace_cost_arr());
|
||||||
init_net(p_net_no, p_board, p_settings.autoroute_settings.get_via_costs());
|
init_net(p_net_no, p_board, p_settings.autoroute_settings.get_via_costs());
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Creates a new instance of AutorouteControl for the input net */
|
/** Creates a new instance of AutorouteControl for the input net */
|
||||||
public AutorouteControl(RoutingBoard p_board, int p_net_no, interactive.Settings p_settings, int p_via_costs, ExpansionCostFactor[] p_trace_cost_arr)
|
public AutorouteControl(RoutingBoard p_board, int p_net_no, eu.mihosoft.freerouting.interactive.Settings p_settings, int p_via_costs, ExpansionCostFactor[] p_trace_cost_arr)
|
||||||
{
|
{
|
||||||
this(p_board, p_settings, p_trace_cost_arr);
|
this(p_board, p_settings, p_trace_cost_arr);
|
||||||
init_net(p_net_no, p_board, p_via_costs);
|
init_net(p_net_no, p_board, p_via_costs);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Creates a new instance of AutorouteControl */
|
/** Creates a new instance of AutorouteControl */
|
||||||
private AutorouteControl(RoutingBoard p_board, interactive.Settings p_settings,
|
private AutorouteControl(RoutingBoard p_board, eu.mihosoft.freerouting.interactive.Settings p_settings,
|
||||||
ExpansionCostFactor[] p_trace_costs_arr)
|
ExpansionCostFactor[] p_trace_costs_arr)
|
||||||
{
|
{
|
||||||
layer_count = p_board.get_layer_count();
|
layer_count = p_board.get_layer_count();
|
||||||
|
@ -93,8 +93,8 @@ public class AutorouteControl
|
||||||
private void init_net(int p_net_no, RoutingBoard p_board, int p_via_costs)
|
private void init_net(int p_net_no, RoutingBoard p_board, int p_via_costs)
|
||||||
{
|
{
|
||||||
net_no = p_net_no;
|
net_no = p_net_no;
|
||||||
rules.Net curr_net = p_board.rules.nets.get(p_net_no);
|
eu.mihosoft.freerouting.rules.Net curr_net = p_board.rules.nets.get(p_net_no);
|
||||||
rules.NetClass curr_net_class;
|
eu.mihosoft.freerouting.rules.NetClass curr_net_class;
|
||||||
if (curr_net != null)
|
if (curr_net != null)
|
||||||
{
|
{
|
||||||
curr_net_class = curr_net.get_class();
|
curr_net_class = curr_net.get_class();
|
||||||
|
@ -139,7 +139,7 @@ public class AutorouteControl
|
||||||
{
|
{
|
||||||
this.attach_smd_allowed = true;
|
this.attach_smd_allowed = true;
|
||||||
}
|
}
|
||||||
library.Padstack curr_via_padstack = curr_via.get_padstack();
|
eu.mihosoft.freerouting.library.Padstack curr_via_padstack = curr_via.get_padstack();
|
||||||
int from_layer = curr_via_padstack.from_layer();
|
int from_layer = curr_via_padstack.from_layer();
|
||||||
int to_layer = curr_via_padstack.to_layer();
|
int to_layer = curr_via_padstack.to_layer();
|
||||||
for (int j = from_layer; j <= to_layer; ++j)
|
for (int j = from_layer; j <= to_layer; ++j)
|
||||||
|
@ -173,18 +173,18 @@ public class AutorouteControl
|
||||||
public final ExpansionCostFactor[] trace_costs;
|
public final ExpansionCostFactor[] trace_costs;
|
||||||
/** Defines for each layer, if it may used for routing. */
|
/** Defines for each layer, if it may used for routing. */
|
||||||
final boolean[] layer_active;
|
final boolean[] layer_active;
|
||||||
/** The currently used net number in the autoroute algorithm */
|
/** The currently used net number in the eu.mihosoft.freerouting.autoroute algorithm */
|
||||||
int net_no;
|
int net_no;
|
||||||
/** The currently used trace half widths in the autoroute algorithm on each layer */
|
/** The currently used trace half widths in the eu.mihosoft.freerouting.autoroute algorithm on each layer */
|
||||||
final int[] trace_half_width;
|
final int[] trace_half_width;
|
||||||
/**
|
/**
|
||||||
* The currently used compensated trace half widths in the autoroute algorithm on each layer.
|
* The currently used compensated trace half widths in the eu.mihosoft.freerouting.autoroute algorithm on each layer.
|
||||||
* Equal to trace_half_width if no clearance compensation is used.
|
* Equal to trace_half_width if no clearance compensation is used.
|
||||||
*/
|
*/
|
||||||
final int[] compensated_trace_half_width;
|
final int[] compensated_trace_half_width;
|
||||||
/** The currently used clearance class for traces in the autoroute algorithm */
|
/** The currently used clearance class for traces in the eu.mihosoft.freerouting.autoroute algorithm */
|
||||||
public int trace_clearance_class_no;
|
public int trace_clearance_class_no;
|
||||||
/** The currently used clearance class for vias in the autoroute algorithm */
|
/** The currently used clearance class for vias in the eu.mihosoft.freerouting.autoroute algorithm */
|
||||||
int via_clearance_class;
|
int via_clearance_class;
|
||||||
/** The possible (partial) vias, which can be used by the autorouter */
|
/** The possible (partial) vias, which can be used by the autorouter */
|
||||||
ViaRule via_rule;
|
ViaRule via_rule;
|
||||||
|
@ -220,14 +220,14 @@ public class AutorouteControl
|
||||||
public int ripup_costs;
|
public int ripup_costs;
|
||||||
public int ripup_pass_no;
|
public int ripup_pass_no;
|
||||||
public final boolean with_neckdown;
|
public final boolean with_neckdown;
|
||||||
/** If true, the autoroute algorithm completes after the first drill */
|
/** If true, the eu.mihosoft.freerouting.autoroute algorithm completes after the first drill */
|
||||||
public boolean is_fanout;
|
public boolean is_fanout;
|
||||||
/**
|
/**
|
||||||
* Normally true, if the autorouter contains no fanout pass
|
* Normally true, if the autorouter contains no fanout pass
|
||||||
*/
|
*/
|
||||||
public boolean remove_unconnected_vias;
|
public boolean remove_unconnected_vias;
|
||||||
|
|
||||||
/** horizontal and vertical costs for traces on a board layer */
|
/** horizontal and vertical costs for traces on a eu.mihosoft.freerouting.board layer */
|
||||||
public static class ExpansionCostFactor
|
public static class ExpansionCostFactor
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -236,9 +236,9 @@ public class AutorouteControl
|
||||||
horizontal = p_horizontal;
|
horizontal = p_horizontal;
|
||||||
vertical = p_vertical;
|
vertical = p_vertical;
|
||||||
}
|
}
|
||||||
/** The horizontal expansion cost factor on a layer of the board */
|
/** The horizontal expansion cost factor on a layer of the eu.mihosoft.freerouting.board */
|
||||||
public final double horizontal;
|
public final double horizontal;
|
||||||
/** The verical expansion cost factor on a layer of the board */
|
/** The verical expansion cost factor on a layer of the eu.mihosoft.freerouting.board */
|
||||||
public final double vertical;
|
public final double vertical;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -17,11 +17,11 @@
|
||||||
*
|
*
|
||||||
* Created on 11. Januar 2004, 11:14
|
* Created on 11. Januar 2004, 11:14
|
||||||
*/
|
*/
|
||||||
package autoroute;
|
package eu.mihosoft.freerouting.autoroute;
|
||||||
|
|
||||||
import geometry.planar.Line;
|
import eu.mihosoft.freerouting.geometry.planar.Line;
|
||||||
import geometry.planar.Simplex;
|
import eu.mihosoft.freerouting.geometry.planar.Simplex;
|
||||||
import geometry.planar.TileShape;
|
import eu.mihosoft.freerouting.geometry.planar.TileShape;
|
||||||
|
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
|
@ -31,19 +31,19 @@ import java.util.TreeSet;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import java.util.SortedSet;
|
import java.util.SortedSet;
|
||||||
|
|
||||||
import datastructures.Stoppable;
|
import eu.mihosoft.freerouting.datastructures.Stoppable;
|
||||||
import datastructures.TimeLimit;
|
import eu.mihosoft.freerouting.datastructures.TimeLimit;
|
||||||
|
|
||||||
import board.SearchTreeObject;
|
import eu.mihosoft.freerouting.board.SearchTreeObject;
|
||||||
import board.Item;
|
import eu.mihosoft.freerouting.board.Item;
|
||||||
import board.RoutingBoard;
|
import eu.mihosoft.freerouting.board.RoutingBoard;
|
||||||
import board.ShapeSearchTree;
|
import eu.mihosoft.freerouting.board.ShapeSearchTree;
|
||||||
import board.ShapeSearchTree90Degree;
|
import eu.mihosoft.freerouting.board.ShapeSearchTree90Degree;
|
||||||
import board.ShapeSearchTree45Degree;
|
import eu.mihosoft.freerouting.board.ShapeSearchTree45Degree;
|
||||||
import board.TestLevel;
|
import eu.mihosoft.freerouting.board.TestLevel;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Temporary autoroute data stored on the RoutingBoard.
|
* Temporary eu.mihosoft.freerouting.autoroute data stored on the RoutingBoard.
|
||||||
*
|
*
|
||||||
* @author Alfons Wirtz
|
* @author Alfons Wirtz
|
||||||
*/
|
*/
|
||||||
|
@ -186,7 +186,7 @@ public class AutorouteEngine
|
||||||
changed_nets.add(curr_ripped_item.get_net_no(i));
|
changed_nets.add(curr_ripped_item.get_net_no(i));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// let the observers know the changes in the board database.
|
// let the observers know the changes in the eu.mihosoft.freerouting.board database.
|
||||||
boolean observers_activated = !this.board.observers_active();
|
boolean observers_activated = !this.board.observers_active();
|
||||||
if (observers_activated)
|
if (observers_activated)
|
||||||
{
|
{
|
||||||
|
@ -261,7 +261,7 @@ public class AutorouteEngine
|
||||||
/**
|
/**
|
||||||
* Draws the shapes of the expansion rooms created so far.
|
* Draws the shapes of the expansion rooms created so far.
|
||||||
*/
|
*/
|
||||||
public void draw(java.awt.Graphics p_graphics, boardgraphics.GraphicsContext p_graphics_context, double p_intensity)
|
public void draw(java.awt.Graphics p_graphics, eu.mihosoft.freerouting.boardgraphics.GraphicsContext p_graphics_context, double p_intensity)
|
||||||
{
|
{
|
||||||
if (complete_expansion_rooms == null)
|
if (complete_expansion_rooms == null)
|
||||||
{
|
{
|
||||||
|
@ -640,7 +640,7 @@ public class AutorouteEngine
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* The current search tree used in autorouting.
|
* The current search tree used in autorouting.
|
||||||
* It depends on the trac clearance class used in the autoroute algorithm.
|
* It depends on the trac clearance class used in the eu.mihosoft.freerouting.autoroute algorithm.
|
||||||
*/
|
*/
|
||||||
public final ShapeSearchTree autoroute_search_tree;
|
public final ShapeSearchTree autoroute_search_tree;
|
||||||
/** If maintain_database, the autorouter database is maintained after a connection is
|
/** If maintain_database, the autorouter database is maintained after a connection is
|
||||||
|
@ -649,7 +649,7 @@ public class AutorouteEngine
|
||||||
public final boolean maintain_database;
|
public final boolean maintain_database;
|
||||||
static final int TRACE_WIDTH_TOLERANCE = 2;
|
static final int TRACE_WIDTH_TOLERANCE = 2;
|
||||||
/**
|
/**
|
||||||
* The net number used for routing in this autoroute algorithm.
|
* The net number used for routing in this eu.mihosoft.freerouting.autoroute algorithm.
|
||||||
*/
|
*/
|
||||||
private int net_no;
|
private int net_no;
|
||||||
/**
|
/**
|
||||||
|
@ -664,11 +664,11 @@ public class AutorouteEngine
|
||||||
* To stop the expansion algorithm after a time limit is exceeded.
|
* To stop the expansion algorithm after a time limit is exceeded.
|
||||||
*/
|
*/
|
||||||
private TimeLimit time_limit;
|
private TimeLimit time_limit;
|
||||||
/** The PCB-board of this autoroute algorithm. */
|
/** The PCB-eu.mihosoft.freerouting.board of this eu.mihosoft.freerouting.autoroute algorithm. */
|
||||||
final RoutingBoard board;
|
final RoutingBoard board;
|
||||||
/** The list of incomplete expansion rooms on the routing board */
|
/** The list of incomplete expansion rooms on the routing eu.mihosoft.freerouting.board */
|
||||||
private List<IncompleteFreeSpaceExpansionRoom> incomplete_expansion_rooms = null;
|
private List<IncompleteFreeSpaceExpansionRoom> incomplete_expansion_rooms = null;
|
||||||
/** The list of complete expansion rooms on the routing board */
|
/** The list of complete expansion rooms on the routing eu.mihosoft.freerouting.board */
|
||||||
private List<CompleteFreeSpaceExpansionRoom> complete_expansion_rooms = null;
|
private List<CompleteFreeSpaceExpansionRoom> complete_expansion_rooms = null;
|
||||||
/** The count of expansion rooms created so far */
|
/** The count of expansion rooms created so far */
|
||||||
private int expansion_room_instance_count = 0;
|
private int expansion_room_instance_count = 0;
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
* GNU General Public License at <http://www.gnu.org/licenses/>
|
* GNU General Public License at <http://www.gnu.org/licenses/>
|
||||||
* for more details.
|
* for more details.
|
||||||
*/
|
*/
|
||||||
package autoroute;
|
package eu.mihosoft.freerouting.autoroute;
|
||||||
|
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
|
@ -21,22 +21,22 @@ import java.util.Set;
|
||||||
import java.util.SortedSet;
|
import java.util.SortedSet;
|
||||||
import java.util.TreeSet;
|
import java.util.TreeSet;
|
||||||
|
|
||||||
import datastructures.TimeLimit;
|
import eu.mihosoft.freerouting.datastructures.TimeLimit;
|
||||||
import datastructures.UndoableObjects;
|
import eu.mihosoft.freerouting.datastructures.UndoableObjects;
|
||||||
|
|
||||||
import geometry.planar.FloatPoint;
|
import eu.mihosoft.freerouting.geometry.planar.FloatPoint;
|
||||||
import geometry.planar.FloatLine;
|
import eu.mihosoft.freerouting.geometry.planar.FloatLine;
|
||||||
|
|
||||||
import board.Connectable;
|
import eu.mihosoft.freerouting.board.Connectable;
|
||||||
import board.Item;
|
import eu.mihosoft.freerouting.board.Item;
|
||||||
import board.DrillItem;
|
import eu.mihosoft.freerouting.board.DrillItem;
|
||||||
import board.RoutingBoard;
|
import eu.mihosoft.freerouting.board.RoutingBoard;
|
||||||
|
|
||||||
import interactive.BoardHandling;
|
import eu.mihosoft.freerouting.interactive.BoardHandling;
|
||||||
import interactive.InteractiveActionThread;
|
import eu.mihosoft.freerouting.interactive.InteractiveActionThread;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Handles the sequencing of the batch autoroute passes.
|
* Handles the sequencing of the batch eu.mihosoft.freerouting.autoroute passes.
|
||||||
*
|
*
|
||||||
* @author Alfons Wirtz
|
* @author Alfons Wirtz
|
||||||
*/
|
*/
|
||||||
|
@ -44,10 +44,10 @@ public class BatchAutorouter
|
||||||
{
|
{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Autoroutes ripup passes until the board is completed or the autorouter is stopped by the user,
|
* Autoroutes ripup passes until the eu.mihosoft.freerouting.board is completed or the autorouter is stopped by the user,
|
||||||
* or if p_max_pass_count is exceeded. Is currently used in the optimize via batch pass.
|
* or if p_max_pass_count is exceeded. Is currently used in the optimize via batch pass.
|
||||||
* Returns the number of oasses to complete the board or p_max_pass_count + 1,
|
* Returns the number of oasses to complete the eu.mihosoft.freerouting.board or p_max_pass_count + 1,
|
||||||
* if the board is not completed.
|
* if the eu.mihosoft.freerouting.board is not completed.
|
||||||
*/
|
*/
|
||||||
public static int autoroute_passes_for_optimizing_item(InteractiveActionThread p_thread,
|
public static int autoroute_passes_for_optimizing_item(InteractiveActionThread p_thread,
|
||||||
int p_max_pass_count, int p_ripup_costs, boolean p_with_prefered_directions)
|
int p_max_pass_count, int p_ripup_costs, boolean p_with_prefered_directions)
|
||||||
|
@ -106,13 +106,13 @@ public class BatchAutorouter
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Autoroutes ripup passes until the board is completed or the autorouter is stopped by the user.
|
* Autoroutes ripup passes until the eu.mihosoft.freerouting.board is completed or the autorouter is stopped by the user.
|
||||||
* Returns true if the board is completed.
|
* Returns true if the eu.mihosoft.freerouting.board is completed.
|
||||||
*/
|
*/
|
||||||
public boolean autoroute_passes()
|
public boolean autoroute_passes()
|
||||||
{
|
{
|
||||||
java.util.ResourceBundle resources =
|
java.util.ResourceBundle resources =
|
||||||
java.util.ResourceBundle.getBundle("interactive.resources.InteractiveState", hdlg.get_locale());
|
java.util.ResourceBundle.getBundle("eu.mihosoft.freerouting.interactive.resources.InteractiveState", hdlg.get_locale());
|
||||||
boolean still_unrouted_items = true;
|
boolean still_unrouted_items = true;
|
||||||
while (still_unrouted_items && !this.is_interrupted)
|
while (still_unrouted_items && !this.is_interrupted)
|
||||||
{
|
{
|
||||||
|
@ -131,15 +131,15 @@ public class BatchAutorouter
|
||||||
}
|
}
|
||||||
if (!(this.remove_unconnected_vias || still_unrouted_items || this.is_interrupted))
|
if (!(this.remove_unconnected_vias || still_unrouted_items || this.is_interrupted))
|
||||||
{
|
{
|
||||||
// clean up the route if the board is completed and if fanout is used.
|
// clean up the route if the eu.mihosoft.freerouting.board is completed and if fanout is used.
|
||||||
remove_tails(Item.StopConnectionOption.NONE);
|
remove_tails(Item.StopConnectionOption.NONE);
|
||||||
}
|
}
|
||||||
return !this.is_interrupted;
|
return !this.is_interrupted;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Autoroutes one ripup pass of all items of the board.
|
* Autoroutes one ripup pass of all items of the eu.mihosoft.freerouting.board.
|
||||||
* Returns false, if the board is already completely routed.
|
* Returns false, if the eu.mihosoft.freerouting.board is already completely routed.
|
||||||
*/
|
*/
|
||||||
private boolean autoroute_pass(int p_pass_no, boolean p_with_screen_message)
|
private boolean autoroute_pass(int p_pass_no, boolean p_with_screen_message)
|
||||||
{
|
{
|
||||||
|
@ -228,7 +228,7 @@ public class BatchAutorouter
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (routing_board.get_test_level() != board.TestLevel.ALL_DEBUGGING_OUTPUT)
|
if (routing_board.get_test_level() != eu.mihosoft.freerouting.board.TestLevel.ALL_DEBUGGING_OUTPUT)
|
||||||
{
|
{
|
||||||
Item.StopConnectionOption stop_connection_option;
|
Item.StopConnectionOption stop_connection_option;
|
||||||
if (this.remove_unconnected_vias)
|
if (this.remove_unconnected_vias)
|
||||||
|
@ -263,7 +263,7 @@ public class BatchAutorouter
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
boolean contains_plane = false;
|
boolean contains_plane = false;
|
||||||
rules.Net route_net = routing_board.rules.nets.get(p_route_net_no);
|
eu.mihosoft.freerouting.rules.Net route_net = routing_board.rules.nets.get(p_route_net_no);
|
||||||
if (route_net != null)
|
if (route_net != null)
|
||||||
{
|
{
|
||||||
contains_plane = route_net.contains_plane();
|
contains_plane = route_net.contains_plane();
|
||||||
|
@ -296,7 +296,7 @@ public class BatchAutorouter
|
||||||
{
|
{
|
||||||
for (Item curr_item : connected_set)
|
for (Item curr_item : connected_set)
|
||||||
{
|
{
|
||||||
if (curr_item instanceof board.ConductionArea)
|
if (curr_item instanceof eu.mihosoft.freerouting.board.ConductionArea)
|
||||||
{
|
{
|
||||||
return true; // already connected to plane
|
return true; // already connected to plane
|
||||||
|
|
||||||
|
@ -326,7 +326,7 @@ public class BatchAutorouter
|
||||||
{
|
{
|
||||||
routing_board.opt_changed_area(new int[0], null, this.hdlg.get_settings().get_trace_pull_tight_accuracy(), autoroute_control.trace_costs, this.thread, TIME_LIMIT_TO_PREVENT_ENDLESS_LOOP);
|
routing_board.opt_changed_area(new int[0], null, this.hdlg.get_settings().get_trace_pull_tight_accuracy(), autoroute_control.trace_costs, this.thread, TIME_LIMIT_TO_PREVENT_ENDLESS_LOOP);
|
||||||
}
|
}
|
||||||
// tests.Validate.check("Autoroute ", hdlg.get_routing_board());
|
// eu.mihosoft.freerouting.tests.Validate.check("Autoroute ", hdlg.get_routing_board());
|
||||||
boolean result = autoroute_result == AutorouteEngine.AutorouteResult.ROUTED || autoroute_result == AutorouteEngine.AutorouteResult.ALREADY_CONNECTED;
|
boolean result = autoroute_result == AutorouteEngine.AutorouteResult.ROUTED || autoroute_result == AutorouteEngine.AutorouteResult.ALREADY_CONNECTED;
|
||||||
return result;
|
return result;
|
||||||
} catch (Exception e)
|
} catch (Exception e)
|
||||||
|
|
|
@ -13,18 +13,18 @@
|
||||||
* GNU General Public License at <http://www.gnu.org/licenses/>
|
* GNU General Public License at <http://www.gnu.org/licenses/>
|
||||||
* for more details.
|
* for more details.
|
||||||
*/
|
*/
|
||||||
package autoroute;
|
package eu.mihosoft.freerouting.autoroute;
|
||||||
|
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.SortedSet;
|
import java.util.SortedSet;
|
||||||
|
|
||||||
import datastructures.TimeLimit;
|
import eu.mihosoft.freerouting.datastructures.TimeLimit;
|
||||||
|
|
||||||
import geometry.planar.FloatPoint;
|
import eu.mihosoft.freerouting.geometry.planar.FloatPoint;
|
||||||
|
|
||||||
import board.RoutingBoard;
|
import eu.mihosoft.freerouting.board.RoutingBoard;
|
||||||
|
|
||||||
import interactive.InteractiveActionThread;
|
import eu.mihosoft.freerouting.interactive.InteractiveActionThread;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Handles the sequencing of the fanout inside the batch autorouter.
|
* Handles the sequencing of the fanout inside the batch autorouter.
|
||||||
|
@ -52,11 +52,11 @@ public class BatchFanout
|
||||||
{
|
{
|
||||||
this.thread = p_thread;
|
this.thread = p_thread;
|
||||||
this.routing_board = p_thread.hdlg.get_routing_board();
|
this.routing_board = p_thread.hdlg.get_routing_board();
|
||||||
Collection<board.Pin> board_smd_pin_list = routing_board.get_smd_pins();
|
Collection<eu.mihosoft.freerouting.board.Pin> board_smd_pin_list = routing_board.get_smd_pins();
|
||||||
this.sorted_components = new java.util.TreeSet<Component>();
|
this.sorted_components = new java.util.TreeSet<Component>();
|
||||||
for (int i = 1; i <= routing_board.components.count(); ++i)
|
for (int i = 1; i <= routing_board.components.count(); ++i)
|
||||||
{
|
{
|
||||||
board.Component curr_board_component = routing_board.components.get(i);
|
eu.mihosoft.freerouting.board.Component curr_board_component = routing_board.components.get(i);
|
||||||
Component curr_component = new Component(curr_board_component, board_smd_pin_list);
|
Component curr_component = new Component(curr_board_component, board_smd_pin_list);
|
||||||
if (curr_component.smd_pin_count > 0)
|
if (curr_component.smd_pin_count > 0)
|
||||||
{
|
{
|
||||||
|
@ -109,7 +109,7 @@ public class BatchFanout
|
||||||
}
|
}
|
||||||
--components_to_go;
|
--components_to_go;
|
||||||
}
|
}
|
||||||
if (this.routing_board.get_test_level() != board.TestLevel.RELEASE_VERSION)
|
if (this.routing_board.get_test_level() != eu.mihosoft.freerouting.board.TestLevel.RELEASE_VERSION)
|
||||||
{
|
{
|
||||||
System.out.println("fanout pass: " + (p_pass_no + 1) + ", routed: " + routed_count
|
System.out.println("fanout pass: " + (p_pass_no + 1) + ", routed: " + routed_count
|
||||||
+ ", not routed: " + not_routed_count + ", errors: " + insert_error_count);
|
+ ", not routed: " + not_routed_count + ", errors: " + insert_error_count);
|
||||||
|
@ -123,14 +123,14 @@ public class BatchFanout
|
||||||
private static class Component implements Comparable<Component>
|
private static class Component implements Comparable<Component>
|
||||||
{
|
{
|
||||||
|
|
||||||
Component(board.Component p_board_component, Collection<board.Pin> p_board_smd_pin_list)
|
Component(eu.mihosoft.freerouting.board.Component p_board_component, Collection<eu.mihosoft.freerouting.board.Pin> p_board_smd_pin_list)
|
||||||
{
|
{
|
||||||
this.board_component = p_board_component;
|
this.board_component = p_board_component;
|
||||||
|
|
||||||
// calcoulate the center of gravity of all SMD pins of this component.
|
// calcoulate the center of gravity of all SMD pins of this component.
|
||||||
Collection<board.Pin> curr_pin_list = new java.util.LinkedList<board.Pin>();
|
Collection<eu.mihosoft.freerouting.board.Pin> curr_pin_list = new java.util.LinkedList<eu.mihosoft.freerouting.board.Pin>();
|
||||||
int cmp_no = p_board_component.no;
|
int cmp_no = p_board_component.no;
|
||||||
for (board.Pin curr_board_pin : p_board_smd_pin_list)
|
for (eu.mihosoft.freerouting.board.Pin curr_board_pin : p_board_smd_pin_list)
|
||||||
{
|
{
|
||||||
if (curr_board_pin.get_component_no() == cmp_no)
|
if (curr_board_pin.get_component_no() == cmp_no)
|
||||||
{
|
{
|
||||||
|
@ -139,7 +139,7 @@ public class BatchFanout
|
||||||
}
|
}
|
||||||
double x = 0;
|
double x = 0;
|
||||||
double y = 0;
|
double y = 0;
|
||||||
for (board.Pin curr_pin : curr_pin_list)
|
for (eu.mihosoft.freerouting.board.Pin curr_pin : curr_pin_list)
|
||||||
{
|
{
|
||||||
FloatPoint curr_point = curr_pin.get_center().to_float();
|
FloatPoint curr_point = curr_pin.get_center().to_float();
|
||||||
x += curr_point.x;
|
x += curr_point.x;
|
||||||
|
@ -153,7 +153,7 @@ public class BatchFanout
|
||||||
// calculate the sorted SMD pins of this component
|
// calculate the sorted SMD pins of this component
|
||||||
this.smd_pins = new java.util.TreeSet<Pin>();
|
this.smd_pins = new java.util.TreeSet<Pin>();
|
||||||
|
|
||||||
for (board.Pin curr_board_pin : curr_pin_list)
|
for (eu.mihosoft.freerouting.board.Pin curr_board_pin : curr_pin_list)
|
||||||
{
|
{
|
||||||
this.smd_pins.add(new Pin(curr_board_pin));
|
this.smd_pins.add(new Pin(curr_board_pin));
|
||||||
}
|
}
|
||||||
|
@ -181,7 +181,7 @@ public class BatchFanout
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
final board.Component board_component;
|
final eu.mihosoft.freerouting.board.Component board_component;
|
||||||
final int smd_pin_count;
|
final int smd_pin_count;
|
||||||
final SortedSet<Pin> smd_pins;
|
final SortedSet<Pin> smd_pins;
|
||||||
/** The center of gravity of all SMD pins of this component. */
|
/** The center of gravity of all SMD pins of this component. */
|
||||||
|
@ -190,7 +190,7 @@ public class BatchFanout
|
||||||
class Pin implements Comparable<Pin>
|
class Pin implements Comparable<Pin>
|
||||||
{
|
{
|
||||||
|
|
||||||
Pin(board.Pin p_board_pin)
|
Pin(eu.mihosoft.freerouting.board.Pin p_board_pin)
|
||||||
{
|
{
|
||||||
this.board_pin = p_board_pin;
|
this.board_pin = p_board_pin;
|
||||||
FloatPoint pin_location = p_board_pin.get_center().to_float();
|
FloatPoint pin_location = p_board_pin.get_center().to_float();
|
||||||
|
@ -215,7 +215,7 @@ public class BatchFanout
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
final board.Pin board_pin;
|
final eu.mihosoft.freerouting.board.Pin board_pin;
|
||||||
final double distance_to_component_center;
|
final double distance_to_component_center;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,27 +13,27 @@
|
||||||
* GNU General Public License at <http://www.gnu.org/licenses/>
|
* GNU General Public License at <http://www.gnu.org/licenses/>
|
||||||
* for more details.
|
* for more details.
|
||||||
*/
|
*/
|
||||||
package autoroute;
|
package eu.mihosoft.freerouting.autoroute;
|
||||||
|
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
import datastructures.UndoableObjects;
|
import eu.mihosoft.freerouting.datastructures.UndoableObjects;
|
||||||
|
|
||||||
import geometry.planar.FloatPoint;
|
import eu.mihosoft.freerouting.geometry.planar.FloatPoint;
|
||||||
|
|
||||||
import board.Item;
|
import eu.mihosoft.freerouting.board.Item;
|
||||||
import board.Via;
|
import eu.mihosoft.freerouting.board.Via;
|
||||||
import board.Trace;
|
import eu.mihosoft.freerouting.board.Trace;
|
||||||
import board.RoutingBoard;
|
import eu.mihosoft.freerouting.board.RoutingBoard;
|
||||||
import board.FixedState;
|
import eu.mihosoft.freerouting.board.FixedState;
|
||||||
import board.TestLevel;
|
import eu.mihosoft.freerouting.board.TestLevel;
|
||||||
|
|
||||||
import interactive.InteractiveActionThread;
|
import eu.mihosoft.freerouting.interactive.InteractiveActionThread;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* To optimize the vias and traces after the batch autorouter has completed the board.
|
* To optimize the vias and traces after the batch autorouter has completed the eu.mihosoft.freerouting.board.
|
||||||
*
|
*
|
||||||
* @author Alfons Wirtz
|
* @author Alfons Wirtz
|
||||||
*/
|
*/
|
||||||
|
@ -41,7 +41,7 @@ public class BatchOptRoute
|
||||||
{
|
{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* To optimize the route on the board after the autoroute task is finished.
|
* To optimize the route on the eu.mihosoft.freerouting.board after the eu.mihosoft.freerouting.autoroute task is finished.
|
||||||
*/
|
*/
|
||||||
public BatchOptRoute(InteractiveActionThread p_thread)
|
public BatchOptRoute(InteractiveActionThread p_thread)
|
||||||
{
|
{
|
||||||
|
@ -51,7 +51,7 @@ public class BatchOptRoute
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Optimize the route on the board.
|
* Optimize the route on the eu.mihosoft.freerouting.board.
|
||||||
*/
|
*/
|
||||||
public void optimize_board()
|
public void optimize_board()
|
||||||
{
|
{
|
||||||
|
@ -72,7 +72,7 @@ public class BatchOptRoute
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Pass to reduce the number of vias an to shorten the trace lengthon a completely routed board.
|
* Pass to reduce the number of vias an to shorten the trace lengthon a completely routed eu.mihosoft.freerouting.board.
|
||||||
* Returns true, if the route was improved.
|
* Returns true, if the route was improved.
|
||||||
*/
|
*/
|
||||||
private boolean opt_route_pass(int p_pass_no, boolean p_with_prefered_directions)
|
private boolean opt_route_pass(int p_pass_no, boolean p_with_prefered_directions)
|
||||||
|
@ -114,7 +114,7 @@ public class BatchOptRoute
|
||||||
private boolean opt_route_item(Item p_item, int p_pass_no, boolean p_with_prefered_directions)
|
private boolean opt_route_item(Item p_item, int p_pass_no, boolean p_with_prefered_directions)
|
||||||
{
|
{
|
||||||
java.util.ResourceBundle resources =
|
java.util.ResourceBundle resources =
|
||||||
java.util.ResourceBundle.getBundle("interactive.resources.InteractiveState", this.thread.hdlg.get_locale());
|
java.util.ResourceBundle.getBundle("eu.mihosoft.freerouting.interactive.resources.InteractiveState", this.thread.hdlg.get_locale());
|
||||||
String start_message = resources.getString("batch_optimizer") + " " + resources.getString("stop_message") + " " + resources.getString("pass") + " " + (new Integer(p_pass_no)).toString() + ": ";
|
String start_message = resources.getString("batch_optimizer") + " " + resources.getString("stop_message") + " " + resources.getString("pass") + " " + (new Integer(p_pass_no)).toString() + ": ";
|
||||||
this.thread.hdlg.screen_messages.set_status_message(start_message);
|
this.thread.hdlg.screen_messages.set_status_message(start_message);
|
||||||
this.thread.hdlg.remove_ratsnest();
|
this.thread.hdlg.remove_ratsnest();
|
||||||
|
@ -214,12 +214,12 @@ public class BatchOptRoute
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Calculates the cumulative trace lengths multiplied by the trace radius of all traces
|
* Calculates the cumulative trace lengths multiplied by the trace radius of all traces
|
||||||
* on the board, which are not shove_fixed.
|
* on the eu.mihosoft.freerouting.board, which are not shove_fixed.
|
||||||
*/
|
*/
|
||||||
private static double calc_weighted_trace_length(RoutingBoard p_board)
|
private static double calc_weighted_trace_length(RoutingBoard p_board)
|
||||||
{
|
{
|
||||||
double result = 0;
|
double result = 0;
|
||||||
int default_clearance_class = rules.BoardRules.default_clearance_class();
|
int default_clearance_class = eu.mihosoft.freerouting.rules.BoardRules.default_clearance_class();
|
||||||
Iterator<UndoableObjects.UndoableObjectNode> it = p_board.item_list.start_read_object();
|
Iterator<UndoableObjects.UndoableObjectNode> it = p_board.item_list.start_read_object();
|
||||||
for (;;)
|
for (;;)
|
||||||
{
|
{
|
||||||
|
@ -267,9 +267,9 @@ public class BatchOptRoute
|
||||||
private static int ADDITIONAL_RIPUP_COST_FACTOR_AT_START = 10;
|
private static int ADDITIONAL_RIPUP_COST_FACTOR_AT_START = 10;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Reads the vias and traces on the board in ascending x order.
|
* Reads the vias and traces on the eu.mihosoft.freerouting.board in ascending x order.
|
||||||
* Because the vias and traces on the board change while optimizing the item list
|
* Because the vias and traces on the eu.mihosoft.freerouting.board change while optimizing the item list
|
||||||
* of the board is read from scratch each time the next route item is returned.
|
* of the eu.mihosoft.freerouting.board is read from scratch each time the next route item is returned.
|
||||||
*/
|
*/
|
||||||
private class ReadSortedRouteItems
|
private class ReadSortedRouteItems
|
||||||
{
|
{
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package autoroute;
|
package eu.mihosoft.freerouting.autoroute;
|
||||||
|
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
|
|
||||||
|
@ -38,10 +38,10 @@ public interface CompleteExpansionRoom extends ExpansionRoom
|
||||||
/**
|
/**
|
||||||
* Returns the object of tthis complete_expansion_rooom.
|
* Returns the object of tthis complete_expansion_rooom.
|
||||||
*/
|
*/
|
||||||
board.SearchTreeObject get_object();
|
eu.mihosoft.freerouting.board.SearchTreeObject get_object();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Draws the shape of this room for test purposes
|
* Draws the shape of this room for test purposes
|
||||||
*/
|
*/
|
||||||
void draw(java.awt.Graphics p_graphics, boardgraphics.GraphicsContext p_graphics_context, double p_intensity);
|
void draw(java.awt.Graphics p_graphics, eu.mihosoft.freerouting.boardgraphics.GraphicsContext p_graphics_context, double p_intensity);
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,20 +18,20 @@
|
||||||
* Created on 10. Februar 2004, 10:12
|
* Created on 10. Februar 2004, 10:12
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package autoroute;
|
package eu.mihosoft.freerouting.autoroute;
|
||||||
|
|
||||||
import geometry.planar.TileShape;
|
import eu.mihosoft.freerouting.geometry.planar.TileShape;
|
||||||
|
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
import java.util.LinkedList;
|
import java.util.LinkedList;
|
||||||
|
|
||||||
import datastructures.ShapeTree;
|
import eu.mihosoft.freerouting.datastructures.ShapeTree;
|
||||||
|
|
||||||
import board.SearchTreeObject;
|
import eu.mihosoft.freerouting.board.SearchTreeObject;
|
||||||
import board.ShapeSearchTree;
|
import eu.mihosoft.freerouting.board.ShapeSearchTree;
|
||||||
import board.Connectable;
|
import eu.mihosoft.freerouting.board.Connectable;
|
||||||
import board.Item;
|
import eu.mihosoft.freerouting.board.Item;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -158,7 +158,7 @@ public class CompleteFreeSpaceExpansionRoom extends FreeSpaceExpansionRoom imple
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Calculates the doors to the start and destination items of the autoroute algorithm.
|
* Calculates the doors to the start and destination items of the eu.mihosoft.freerouting.autoroute algorithm.
|
||||||
*/
|
*/
|
||||||
public void calculate_target_doors(ShapeTree.TreeEntry p_own_net_object, int p_net_no, ShapeSearchTree p_autoroute_search_tree)
|
public void calculate_target_doors(ShapeTree.TreeEntry p_own_net_object, int p_net_no, ShapeSearchTree p_autoroute_search_tree)
|
||||||
{
|
{
|
||||||
|
@ -186,7 +186,7 @@ public class CompleteFreeSpaceExpansionRoom extends FreeSpaceExpansionRoom imple
|
||||||
/**
|
/**
|
||||||
* Draws the shape of this room.
|
* Draws the shape of this room.
|
||||||
*/
|
*/
|
||||||
public void draw(java.awt.Graphics p_graphics, boardgraphics.GraphicsContext p_graphics_context, double p_intensity)
|
public void draw(java.awt.Graphics p_graphics, eu.mihosoft.freerouting.boardgraphics.GraphicsContext p_graphics_context, double p_intensity)
|
||||||
{
|
{
|
||||||
java.awt.Color draw_color = p_graphics_context.get_trace_colors(false)[this.get_layer()];
|
java.awt.Color draw_color = p_graphics_context.get_trace_colors(false)[this.get_layer()];
|
||||||
double layer_visibility = p_graphics_context.get_layer_visibility(this.get_layer());
|
double layer_visibility = p_graphics_context.get_layer_visibility(this.get_layer());
|
||||||
|
|
|
@ -19,16 +19,16 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package autoroute;
|
package eu.mihosoft.freerouting.autoroute;
|
||||||
|
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import java.util.TreeSet;
|
import java.util.TreeSet;
|
||||||
|
|
||||||
import geometry.planar.Point;
|
import eu.mihosoft.freerouting.geometry.planar.Point;
|
||||||
|
|
||||||
import board.Item;
|
import eu.mihosoft.freerouting.board.Item;
|
||||||
import board.Trace;
|
import eu.mihosoft.freerouting.board.Trace;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Describes a routing connection ending at the next fork or terminal item.
|
* Describes a routing connection ending at the next fork or terminal item.
|
||||||
|
|
|
@ -18,11 +18,11 @@
|
||||||
* Created on 26. Januar 2004, 10:08
|
* Created on 26. Januar 2004, 10:08
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package autoroute;
|
package eu.mihosoft.freerouting.autoroute;
|
||||||
|
|
||||||
import geometry.planar.FloatPoint;
|
import eu.mihosoft.freerouting.geometry.planar.FloatPoint;
|
||||||
import geometry.planar.IntBox;
|
import eu.mihosoft.freerouting.geometry.planar.IntBox;
|
||||||
import autoroute.AutorouteControl.ExpansionCostFactor;
|
import eu.mihosoft.freerouting.autoroute.AutorouteControl.ExpansionCostFactor;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -19,22 +19,22 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package autoroute;
|
package eu.mihosoft.freerouting.autoroute;
|
||||||
|
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.LinkedList;
|
import java.util.LinkedList;
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
|
|
||||||
import geometry.planar.Point;
|
import eu.mihosoft.freerouting.geometry.planar.Point;
|
||||||
import geometry.planar.IntBox;
|
import eu.mihosoft.freerouting.geometry.planar.IntBox;
|
||||||
import geometry.planar.TileShape;
|
import eu.mihosoft.freerouting.geometry.planar.TileShape;
|
||||||
import geometry.planar.PolylineArea;
|
import eu.mihosoft.freerouting.geometry.planar.PolylineArea;
|
||||||
|
|
||||||
import datastructures.ShapeTree.TreeEntry;
|
import eu.mihosoft.freerouting.datastructures.ShapeTree.TreeEntry;
|
||||||
|
|
||||||
import board.RoutingBoard;
|
import eu.mihosoft.freerouting.board.RoutingBoard;
|
||||||
import board.ShapeSearchTree;
|
import eu.mihosoft.freerouting.board.ShapeSearchTree;
|
||||||
import board.Item;
|
import eu.mihosoft.freerouting.board.Item;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
@ -82,9 +82,9 @@ class DrillPage implements ExpandableObject
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (curr_item instanceof board.Pin)
|
if (curr_item instanceof eu.mihosoft.freerouting.board.Pin)
|
||||||
{
|
{
|
||||||
if (p_attach_smd && ((board.Pin) curr_item).drill_allowed())
|
if (p_attach_smd && ((eu.mihosoft.freerouting.board.Pin) curr_item).drill_allowed())
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
@ -193,7 +193,7 @@ class DrillPage implements ExpandableObject
|
||||||
* Test draw of the drills on this page.
|
* Test draw of the drills on this page.
|
||||||
*/
|
*/
|
||||||
public void draw(java.awt.Graphics p_graphics,
|
public void draw(java.awt.Graphics p_graphics,
|
||||||
boardgraphics.GraphicsContext p_graphics_context, double p_intensity)
|
eu.mihosoft.freerouting.boardgraphics.GraphicsContext p_graphics_context, double p_intensity)
|
||||||
{
|
{
|
||||||
if (true || drills == null)
|
if (true || drills == null)
|
||||||
{
|
{
|
||||||
|
@ -220,9 +220,9 @@ class DrillPage implements ExpandableObject
|
||||||
Point result = null;
|
Point result = null;
|
||||||
for (Item curr_item : overlapping_items)
|
for (Item curr_item : overlapping_items)
|
||||||
{
|
{
|
||||||
if (curr_item instanceof board.Pin)
|
if (curr_item instanceof eu.mihosoft.freerouting.board.Pin)
|
||||||
{
|
{
|
||||||
board.Pin curr_pin = (board.Pin) curr_item;
|
eu.mihosoft.freerouting.board.Pin curr_pin = (eu.mihosoft.freerouting.board.Pin) curr_item;
|
||||||
if (curr_pin.drill_allowed() && p_drill_shape.contains_inside(curr_pin.get_center()))
|
if (curr_pin.drill_allowed() && p_drill_shape.contains_inside(curr_pin.get_center()))
|
||||||
{
|
{
|
||||||
result = curr_pin.get_center();
|
result = curr_pin.get_center();
|
||||||
|
|
|
@ -19,19 +19,19 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package autoroute;
|
package eu.mihosoft.freerouting.autoroute;
|
||||||
|
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.LinkedList;
|
import java.util.LinkedList;
|
||||||
|
|
||||||
import geometry.planar.IntBox;
|
import eu.mihosoft.freerouting.geometry.planar.IntBox;
|
||||||
import geometry.planar.TileShape;
|
import eu.mihosoft.freerouting.geometry.planar.TileShape;
|
||||||
|
|
||||||
import board.RoutingBoard;
|
import eu.mihosoft.freerouting.board.RoutingBoard;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Describes the 2 dimensional array of pages of ExpansionDrill`s used in the maze search algorithm.
|
* Describes the 2 dimensional array of pages of ExpansionDrill`s used in the maze search algorithm.
|
||||||
* The pages are rectangles of about equal width and height covering covering the bounding box of the board area.
|
* The pages are rectangles of about equal width and height covering covering the bounding box of the eu.mihosoft.freerouting.board area.
|
||||||
*
|
*
|
||||||
* @author Alfons Wirtz
|
* @author Alfons Wirtz
|
||||||
*/
|
*/
|
||||||
|
@ -139,7 +139,7 @@ public class DrillPageArray
|
||||||
/*
|
/*
|
||||||
* Test draw of the all drills
|
* Test draw of the all drills
|
||||||
*/
|
*/
|
||||||
public void draw(java.awt.Graphics p_graphics, boardgraphics.GraphicsContext p_graphics_context, double p_intensity)
|
public void draw(java.awt.Graphics p_graphics, eu.mihosoft.freerouting.boardgraphics.GraphicsContext p_graphics_context, double p_intensity)
|
||||||
{
|
{
|
||||||
for (int j = 0; j < page_arr.length; ++j)
|
for (int j = 0; j < page_arr.length; ++j)
|
||||||
{
|
{
|
||||||
|
|
|
@ -17,9 +17,9 @@
|
||||||
*
|
*
|
||||||
* Created on 6. April 2004, 07:30
|
* Created on 6. April 2004, 07:30
|
||||||
*/
|
*/
|
||||||
package autoroute;
|
package eu.mihosoft.freerouting.autoroute;
|
||||||
|
|
||||||
import geometry.planar.TileShape;
|
import eu.mihosoft.freerouting.geometry.planar.TileShape;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* An object, which can be expanded by the maze expansion algorithm.
|
* An object, which can be expanded by the maze expansion algorithm.
|
||||||
|
|
|
@ -17,12 +17,12 @@
|
||||||
*
|
*
|
||||||
* Created on 6. Januar 2004, 07:23
|
* Created on 6. Januar 2004, 07:23
|
||||||
*/
|
*/
|
||||||
package autoroute;
|
package eu.mihosoft.freerouting.autoroute;
|
||||||
|
|
||||||
import geometry.planar.TileShape;
|
import eu.mihosoft.freerouting.geometry.planar.TileShape;
|
||||||
import geometry.planar.FloatPoint;
|
import eu.mihosoft.freerouting.geometry.planar.FloatPoint;
|
||||||
import geometry.planar.FloatLine;
|
import eu.mihosoft.freerouting.geometry.planar.FloatLine;
|
||||||
import geometry.planar.Point;
|
import eu.mihosoft.freerouting.geometry.planar.Point;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* An ExpansionDoor is a common edge between two ExpansionRooms
|
* An ExpansionDoor is a common edge between two ExpansionRooms
|
||||||
|
@ -52,6 +52,7 @@ public class ExpansionDoor implements ExpandableObject
|
||||||
/**
|
/**
|
||||||
* Calculates the intersection of the shapes of the 2 rooms belonging to this door.
|
* Calculates the intersection of the shapes of the 2 rooms belonging to this door.
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public TileShape get_shape()
|
public TileShape get_shape()
|
||||||
{
|
{
|
||||||
TileShape first_shape = first_room.get_shape();
|
TileShape first_shape = first_room.get_shape();
|
||||||
|
@ -63,6 +64,7 @@ public class ExpansionDoor implements ExpandableObject
|
||||||
* The dimension of a door may be 1 or 2.
|
* The dimension of a door may be 1 or 2.
|
||||||
* 2-dimensional doors can only exist between ObstacleExpansionRooms
|
* 2-dimensional doors can only exist between ObstacleExpansionRooms
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public int get_dimension()
|
public int get_dimension()
|
||||||
{
|
{
|
||||||
return this.dimension;
|
return this.dimension;
|
||||||
|
|
|
@ -17,10 +17,10 @@
|
||||||
*
|
*
|
||||||
* Created on 19. April 2004, 08:00
|
* Created on 19. April 2004, 08:00
|
||||||
*/
|
*/
|
||||||
package autoroute;
|
package eu.mihosoft.freerouting.autoroute;
|
||||||
|
|
||||||
import geometry.planar.Point;
|
import eu.mihosoft.freerouting.geometry.planar.Point;
|
||||||
import geometry.planar.TileShape;
|
import eu.mihosoft.freerouting.geometry.planar.TileShape;
|
||||||
|
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
|
@ -58,15 +58,15 @@ public class ExpansionDrill implements ExpandableObject
|
||||||
public boolean calculate_expansion_rooms(AutorouteEngine p_autoroute_engine)
|
public boolean calculate_expansion_rooms(AutorouteEngine p_autoroute_engine)
|
||||||
{
|
{
|
||||||
TileShape search_shape = TileShape.get_instance(location);
|
TileShape search_shape = TileShape.get_instance(location);
|
||||||
Collection<board.SearchTreeObject> overlaps =
|
Collection<eu.mihosoft.freerouting.board.SearchTreeObject> overlaps =
|
||||||
p_autoroute_engine.autoroute_search_tree.overlapping_objects(search_shape, -1);
|
p_autoroute_engine.autoroute_search_tree.overlapping_objects(search_shape, -1);
|
||||||
for (int i = this.first_layer; i <= this.last_layer; ++i)
|
for (int i = this.first_layer; i <= this.last_layer; ++i)
|
||||||
{
|
{
|
||||||
CompleteExpansionRoom found_room = null;
|
CompleteExpansionRoom found_room = null;
|
||||||
Iterator<board.SearchTreeObject> it = overlaps.iterator();
|
Iterator<eu.mihosoft.freerouting.board.SearchTreeObject> it = overlaps.iterator();
|
||||||
while (it.hasNext())
|
while (it.hasNext())
|
||||||
{
|
{
|
||||||
board.SearchTreeObject curr_ob = it.next();
|
eu.mihosoft.freerouting.board.SearchTreeObject curr_ob = it.next();
|
||||||
if (!(curr_ob instanceof CompleteExpansionRoom))
|
if (!(curr_ob instanceof CompleteExpansionRoom))
|
||||||
{
|
{
|
||||||
it.remove();
|
it.remove();
|
||||||
|
@ -139,7 +139,7 @@ public class ExpansionDrill implements ExpandableObject
|
||||||
* Test draw of the the shape of this drill.
|
* Test draw of the the shape of this drill.
|
||||||
*/
|
*/
|
||||||
public void draw(java.awt.Graphics p_graphics,
|
public void draw(java.awt.Graphics p_graphics,
|
||||||
boardgraphics.GraphicsContext p_graphics_context, double p_intensity)
|
eu.mihosoft.freerouting.boardgraphics.GraphicsContext p_graphics_context, double p_intensity)
|
||||||
{
|
{
|
||||||
java.awt.Color draw_color = p_graphics_context.get_hilight_color();
|
java.awt.Color draw_color = p_graphics_context.get_hilight_color();
|
||||||
p_graphics_context.fill_area(this.shape, p_graphics, draw_color, p_intensity);
|
p_graphics_context.fill_area(this.shape, p_graphics, draw_color, p_intensity);
|
||||||
|
|
|
@ -19,11 +19,11 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package autoroute;
|
package eu.mihosoft.freerouting.autoroute;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import geometry.planar.TileShape;
|
import eu.mihosoft.freerouting.geometry.planar.TileShape;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
|
|
@ -18,9 +18,9 @@
|
||||||
* Created on 29. Dezember 2003, 08:37
|
* Created on 29. Dezember 2003, 08:37
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package autoroute;
|
package eu.mihosoft.freerouting.autoroute;
|
||||||
|
|
||||||
import geometry.planar.TileShape;
|
import eu.mihosoft.freerouting.geometry.planar.TileShape;
|
||||||
|
|
||||||
|
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
|
|
|
@ -18,11 +18,11 @@
|
||||||
* Created on 10. Februar 2004, 10:13
|
* Created on 10. Februar 2004, 10:13
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package autoroute;
|
package eu.mihosoft.freerouting.autoroute;
|
||||||
|
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
|
|
||||||
import geometry.planar.TileShape;
|
import eu.mihosoft.freerouting.geometry.planar.TileShape;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -17,29 +17,29 @@
|
||||||
*
|
*
|
||||||
* Created on 23. Februar 2004, 08:18
|
* Created on 23. Februar 2004, 08:18
|
||||||
*/
|
*/
|
||||||
package autoroute;
|
package eu.mihosoft.freerouting.autoroute;
|
||||||
|
|
||||||
import geometry.planar.IntPoint;
|
import eu.mihosoft.freerouting.geometry.planar.IntPoint;
|
||||||
import geometry.planar.Point;
|
import eu.mihosoft.freerouting.geometry.planar.Point;
|
||||||
import geometry.planar.FloatPoint;
|
import eu.mihosoft.freerouting.geometry.planar.FloatPoint;
|
||||||
import geometry.planar.Polyline;
|
import eu.mihosoft.freerouting.geometry.planar.Polyline;
|
||||||
|
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
import library.Padstack;
|
import eu.mihosoft.freerouting.library.Padstack;
|
||||||
import rules.ViaInfo;
|
import eu.mihosoft.freerouting.rules.ViaInfo;
|
||||||
|
|
||||||
import board.ForcedViaAlgo;
|
import eu.mihosoft.freerouting.board.ForcedViaAlgo;
|
||||||
import board.PolylineTrace;
|
import eu.mihosoft.freerouting.board.PolylineTrace;
|
||||||
import board.Trace;
|
import eu.mihosoft.freerouting.board.Trace;
|
||||||
import board.Item;
|
import eu.mihosoft.freerouting.board.Item;
|
||||||
import board.RoutingBoard;
|
import eu.mihosoft.freerouting.board.RoutingBoard;
|
||||||
import board.ItemSelectionFilter;
|
import eu.mihosoft.freerouting.board.ItemSelectionFilter;
|
||||||
import board.TestLevel;
|
import eu.mihosoft.freerouting.board.TestLevel;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Inserts the traces and vias of the connection found by the autoroute algorithm.
|
* Inserts the traces and vias of the connection found by the eu.mihosoft.freerouting.autoroute algorithm.
|
||||||
*
|
*
|
||||||
* @author Alfons Wirtz
|
* @author Alfons Wirtz
|
||||||
*/
|
*/
|
||||||
|
@ -121,8 +121,8 @@ public class InsertFoundConnectionAlgo
|
||||||
board.rules.set_pin_edge_to_turn_dist(-1);
|
board.rules.set_pin_edge_to_turn_dist(-1);
|
||||||
|
|
||||||
// Look for pins att the start and the end of p_trace in case that neckdown is necessecary.
|
// Look for pins att the start and the end of p_trace in case that neckdown is necessecary.
|
||||||
board.Pin start_pin = null;
|
eu.mihosoft.freerouting.board.Pin start_pin = null;
|
||||||
board.Pin end_pin = null;
|
eu.mihosoft.freerouting.board.Pin end_pin = null;
|
||||||
if (ctrl.with_neckdown)
|
if (ctrl.with_neckdown)
|
||||||
{
|
{
|
||||||
ItemSelectionFilter item_filter = new ItemSelectionFilter(ItemSelectionFilter.SelectableChoices.PINS);
|
ItemSelectionFilter item_filter = new ItemSelectionFilter(ItemSelectionFilter.SelectableChoices.PINS);
|
||||||
|
@ -132,7 +132,7 @@ public class InsertFoundConnectionAlgo
|
||||||
Set<Item> picked_items = this.board.pick_items(curr_end_corner, p_trace.layer, item_filter);
|
Set<Item> picked_items = this.board.pick_items(curr_end_corner, p_trace.layer, item_filter);
|
||||||
for (Item curr_item : picked_items)
|
for (Item curr_item : picked_items)
|
||||||
{
|
{
|
||||||
board.Pin curr_pin = (board.Pin) curr_item;
|
eu.mihosoft.freerouting.board.Pin curr_pin = (eu.mihosoft.freerouting.board.Pin) curr_item;
|
||||||
if (curr_pin.contains_net(ctrl.net_no) && curr_pin.get_center().equals(curr_end_corner))
|
if (curr_pin.contains_net(ctrl.net_no) && curr_pin.get_center().equals(curr_end_corner))
|
||||||
{
|
{
|
||||||
if (i == 0)
|
if (i == 0)
|
||||||
|
@ -220,7 +220,7 @@ public class InsertFoundConnectionAlgo
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
boolean insert_neckdown(Point p_from_corner, Point p_to_corner, int p_layer, board.Pin p_start_pin, board.Pin p_end_pin)
|
boolean insert_neckdown(Point p_from_corner, Point p_to_corner, int p_layer, eu.mihosoft.freerouting.board.Pin p_start_pin, eu.mihosoft.freerouting.board.Pin p_end_pin)
|
||||||
{
|
{
|
||||||
if (p_start_pin != null)
|
if (p_start_pin != null)
|
||||||
{
|
{
|
||||||
|
@ -241,7 +241,7 @@ public class InsertFoundConnectionAlgo
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
private Point try_neck_down(Point p_from_corner, Point p_to_corner, int p_layer, board.Pin p_pin, boolean p_at_start)
|
private Point try_neck_down(Point p_from_corner, Point p_to_corner, int p_layer, eu.mihosoft.freerouting.board.Pin p_pin, boolean p_at_start)
|
||||||
{
|
{
|
||||||
if (!p_pin.is_on_layer(p_layer))
|
if (!p_pin.is_on_layer(p_layer))
|
||||||
{
|
{
|
||||||
|
|
|
@ -18,15 +18,15 @@
|
||||||
* Created on 22. Februar 2004, 12:09
|
* Created on 22. Februar 2004, 12:09
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package autoroute;
|
package eu.mihosoft.freerouting.autoroute;
|
||||||
|
|
||||||
import board.ShapeSearchTree;
|
import eu.mihosoft.freerouting.board.ShapeSearchTree;
|
||||||
|
|
||||||
import board.Item;
|
import eu.mihosoft.freerouting.board.Item;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Temporary data stored in board Items used in the autoroute algorithm
|
* Temporary data stored in eu.mihosoft.freerouting.board Items used in the eu.mihosoft.freerouting.autoroute algorithm
|
||||||
*
|
*
|
||||||
* @author Alfons Wirtz
|
* @author Alfons Wirtz
|
||||||
*/
|
*/
|
||||||
|
@ -38,7 +38,7 @@ public class ItemAutorouteInfo
|
||||||
this.item = p_item;
|
this.item = p_item;
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Looks, if the corresponding item belongs to the start or destination set of the autoroute algorithm.
|
* Looks, if the corresponding item belongs to the start or destination set of the eu.mihosoft.freerouting.autoroute algorithm.
|
||||||
* Only used, if the item belongs to the net, which will be currently routed.
|
* Only used, if the item belongs to the net, which will be currently routed.
|
||||||
*/
|
*/
|
||||||
public boolean is_start_info()
|
public boolean is_start_info()
|
||||||
|
@ -47,7 +47,7 @@ public class ItemAutorouteInfo
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets, if the corresponding item belongs to the start or destination set of the autoroute algorithm.
|
* Sets, if the corresponding item belongs to the start or destination set of the eu.mihosoft.freerouting.autoroute algorithm.
|
||||||
* Only used, if the item belongs to the net, which will be currently routed.
|
* Only used, if the item belongs to the net, which will be currently routed.
|
||||||
*/
|
*/
|
||||||
public void set_start_info(boolean p_value)
|
public void set_start_info(boolean p_value)
|
||||||
|
@ -114,7 +114,7 @@ public class ItemAutorouteInfo
|
||||||
/**
|
/**
|
||||||
* Draws the shapes of the expansion rooms of this info for testing purposes.
|
* Draws the shapes of the expansion rooms of this info for testing purposes.
|
||||||
*/
|
*/
|
||||||
public void draw(java.awt.Graphics p_graphics, boardgraphics.GraphicsContext p_graphics_context, double p_intensity)
|
public void draw(java.awt.Graphics p_graphics, eu.mihosoft.freerouting.boardgraphics.GraphicsContext p_graphics_context, double p_intensity)
|
||||||
{
|
{
|
||||||
if (expansion_room_arr == null)
|
if (expansion_room_arr == null)
|
||||||
{
|
{
|
||||||
|
|
|
@ -18,22 +18,22 @@
|
||||||
* Created on 31. Januar 2006, 08:20
|
* Created on 31. Januar 2006, 08:20
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
package autoroute;
|
package eu.mihosoft.freerouting.autoroute;
|
||||||
|
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.SortedSet;
|
import java.util.SortedSet;
|
||||||
import java.util.LinkedList;
|
import java.util.LinkedList;
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
|
|
||||||
import geometry.planar.IntPoint;
|
import eu.mihosoft.freerouting.geometry.planar.IntPoint;
|
||||||
import geometry.planar.FloatPoint;
|
import eu.mihosoft.freerouting.geometry.planar.FloatPoint;
|
||||||
import geometry.planar.TileShape;
|
import eu.mihosoft.freerouting.geometry.planar.TileShape;
|
||||||
|
|
||||||
import board.Connectable;
|
import eu.mihosoft.freerouting.board.Connectable;
|
||||||
import board.Item;
|
import eu.mihosoft.freerouting.board.Item;
|
||||||
import board.AngleRestriction;
|
import eu.mihosoft.freerouting.board.AngleRestriction;
|
||||||
import board.ShapeSearchTree;
|
import eu.mihosoft.freerouting.board.ShapeSearchTree;
|
||||||
import board.TestLevel;
|
import eu.mihosoft.freerouting.board.TestLevel;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
@ -269,7 +269,7 @@ public abstract class LocateFoundConnectionAlgo
|
||||||
protected abstract Collection<FloatPoint> calculate_next_trace_corners();
|
protected abstract Collection<FloatPoint> calculate_next_trace_corners();
|
||||||
|
|
||||||
/** Test display of the baktrack rooms. */
|
/** Test display of the baktrack rooms. */
|
||||||
public void draw(java.awt.Graphics p_graphics, boardgraphics.GraphicsContext p_graphics_context)
|
public void draw(java.awt.Graphics p_graphics, eu.mihosoft.freerouting.boardgraphics.GraphicsContext p_graphics_context)
|
||||||
{
|
{
|
||||||
for (int i = 0; i < backtrack_array.length; ++i)
|
for (int i = 0; i < backtrack_array.length; ++i)
|
||||||
{
|
{
|
||||||
|
|
|
@ -19,24 +19,24 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package autoroute;
|
package eu.mihosoft.freerouting.autoroute;
|
||||||
|
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.LinkedList;
|
import java.util.LinkedList;
|
||||||
import java.util.SortedSet;
|
import java.util.SortedSet;
|
||||||
|
|
||||||
import datastructures.Signum;
|
import eu.mihosoft.freerouting.datastructures.Signum;
|
||||||
|
|
||||||
import geometry.planar.FloatPoint;
|
import eu.mihosoft.freerouting.geometry.planar.FloatPoint;
|
||||||
import geometry.planar.FloatLine;
|
import eu.mihosoft.freerouting.geometry.planar.FloatLine;
|
||||||
import geometry.planar.TileShape;
|
import eu.mihosoft.freerouting.geometry.planar.TileShape;
|
||||||
import geometry.planar.IntBox;
|
import eu.mihosoft.freerouting.geometry.planar.IntBox;
|
||||||
import geometry.planar.Simplex;
|
import eu.mihosoft.freerouting.geometry.planar.Simplex;
|
||||||
|
|
||||||
import board.ShapeSearchTree;
|
import eu.mihosoft.freerouting.board.ShapeSearchTree;
|
||||||
import board.AngleRestriction;
|
import eu.mihosoft.freerouting.board.AngleRestriction;
|
||||||
import board.Item;
|
import eu.mihosoft.freerouting.board.Item;
|
||||||
import board.TestLevel;
|
import eu.mihosoft.freerouting.board.TestLevel;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
|
|
@ -18,21 +18,21 @@
|
||||||
* Created on 14. Februar 2004, 07:55
|
* Created on 14. Februar 2004, 07:55
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package autoroute;
|
package eu.mihosoft.freerouting.autoroute;
|
||||||
|
|
||||||
import geometry.planar.FloatLine;
|
import eu.mihosoft.freerouting.geometry.planar.FloatLine;
|
||||||
import geometry.planar.FloatPoint;
|
import eu.mihosoft.freerouting.geometry.planar.FloatPoint;
|
||||||
import geometry.planar.Side;
|
import eu.mihosoft.freerouting.geometry.planar.Side;
|
||||||
import geometry.planar.TileShape;
|
import eu.mihosoft.freerouting.geometry.planar.TileShape;
|
||||||
|
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.SortedSet;
|
import java.util.SortedSet;
|
||||||
import java.util.LinkedList;
|
import java.util.LinkedList;
|
||||||
|
|
||||||
import board.ShapeSearchTree;
|
import eu.mihosoft.freerouting.board.ShapeSearchTree;
|
||||||
import board.AngleRestriction;
|
import eu.mihosoft.freerouting.board.AngleRestriction;
|
||||||
import board.Item;
|
import eu.mihosoft.freerouting.board.Item;
|
||||||
import board.TestLevel;
|
import eu.mihosoft.freerouting.board.TestLevel;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -18,9 +18,9 @@
|
||||||
* Created on 25. Januar 2004, 08:21
|
* Created on 25. Januar 2004, 08:21
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package autoroute;
|
package eu.mihosoft.freerouting.autoroute;
|
||||||
|
|
||||||
import geometry.planar.FloatLine;
|
import eu.mihosoft.freerouting.geometry.planar.FloatLine;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Information for the maze expand Algorithm contained in expansion doors and drills
|
* Information for the maze expand Algorithm contained in expansion doors and drills
|
||||||
|
|
|
@ -17,18 +17,18 @@
|
||||||
*
|
*
|
||||||
* Created on 25. Januar 2004, 13:24
|
* Created on 25. Januar 2004, 13:24
|
||||||
*/
|
*/
|
||||||
package autoroute;
|
package eu.mihosoft.freerouting.autoroute;
|
||||||
|
|
||||||
import geometry.planar.ConvexShape;
|
import eu.mihosoft.freerouting.geometry.planar.ConvexShape;
|
||||||
import geometry.planar.FloatLine;
|
import eu.mihosoft.freerouting.geometry.planar.FloatLine;
|
||||||
import geometry.planar.FloatPoint;
|
import eu.mihosoft.freerouting.geometry.planar.FloatPoint;
|
||||||
import geometry.planar.IntPoint;
|
import eu.mihosoft.freerouting.geometry.planar.IntPoint;
|
||||||
import geometry.planar.Point;
|
import eu.mihosoft.freerouting.geometry.planar.Point;
|
||||||
import geometry.planar.Polyline;
|
import eu.mihosoft.freerouting.geometry.planar.Polyline;
|
||||||
import geometry.planar.TileShape;
|
import eu.mihosoft.freerouting.geometry.planar.TileShape;
|
||||||
import geometry.planar.IntBox;
|
import eu.mihosoft.freerouting.geometry.planar.IntBox;
|
||||||
import geometry.planar.IntOctagon;
|
import eu.mihosoft.freerouting.geometry.planar.IntOctagon;
|
||||||
import geometry.planar.Line;
|
import eu.mihosoft.freerouting.geometry.planar.Line;
|
||||||
|
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
|
@ -36,14 +36,14 @@ import java.util.LinkedList;
|
||||||
import java.util.TreeSet;
|
import java.util.TreeSet;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
import board.Connectable;
|
import eu.mihosoft.freerouting.board.Connectable;
|
||||||
import board.ForcedViaAlgo;
|
import eu.mihosoft.freerouting.board.ForcedViaAlgo;
|
||||||
import board.Item;
|
import eu.mihosoft.freerouting.board.Item;
|
||||||
import board.PolylineTrace;
|
import eu.mihosoft.freerouting.board.PolylineTrace;
|
||||||
import board.ShapeSearchTree;
|
import eu.mihosoft.freerouting.board.ShapeSearchTree;
|
||||||
import board.AngleRestriction;
|
import eu.mihosoft.freerouting.board.AngleRestriction;
|
||||||
import board.SearchTreeObject;
|
import eu.mihosoft.freerouting.board.SearchTreeObject;
|
||||||
import board.ItemSelectionFilter;
|
import eu.mihosoft.freerouting.board.ItemSelectionFilter;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class for autorouting an incomplete connection via a maze search algorithm.
|
* Class for autorouting an incomplete connection via a maze search algorithm.
|
||||||
|
@ -236,9 +236,9 @@ public class MazeSearchAlgo
|
||||||
{
|
{
|
||||||
// try evtl. neckdown at a start pin
|
// try evtl. neckdown at a start pin
|
||||||
Item start_item = ((TargetItemExpansionDoor) p_list_element.door).item;
|
Item start_item = ((TargetItemExpansionDoor) p_list_element.door).item;
|
||||||
if (start_item instanceof board.Pin)
|
if (start_item instanceof eu.mihosoft.freerouting.board.Pin)
|
||||||
{
|
{
|
||||||
double neckdown_half_width = ((board.Pin) start_item).get_trace_neckdown_halfwidth(layer_no);
|
double neckdown_half_width = ((eu.mihosoft.freerouting.board.Pin) start_item).get_trace_neckdown_halfwidth(layer_no);
|
||||||
if (neckdown_half_width > 0)
|
if (neckdown_half_width > 0)
|
||||||
{
|
{
|
||||||
half_width = Math.min(half_width, neckdown_half_width);
|
half_width = Math.min(half_width, neckdown_half_width);
|
||||||
|
@ -341,7 +341,7 @@ public class MazeSearchAlgo
|
||||||
if (ripup_costs != ALREADY_RIPPED_COSTS && next_room_is_thick)
|
if (ripup_costs != ALREADY_RIPPED_COSTS && next_room_is_thick)
|
||||||
{
|
{
|
||||||
Item obstacle_item = obstacle_room.get_item();
|
Item obstacle_item = obstacle_room.get_item();
|
||||||
if (!curr_door_is_small && this.ctrl.max_shove_trace_recursion_depth > 0 && obstacle_item instanceof board.PolylineTrace)
|
if (!curr_door_is_small && this.ctrl.max_shove_trace_recursion_depth > 0 && obstacle_item instanceof eu.mihosoft.freerouting.board.PolylineTrace)
|
||||||
{
|
{
|
||||||
if (!shove_trace_room(p_list_element, obstacle_room))
|
if (!shove_trace_room(p_list_element, obstacle_room))
|
||||||
{
|
{
|
||||||
|
@ -398,9 +398,9 @@ public class MazeSearchAlgo
|
||||||
else if (p_list_element.next_room instanceof ObstacleExpansionRoom)
|
else if (p_list_element.next_room instanceof ObstacleExpansionRoom)
|
||||||
{
|
{
|
||||||
Item curr_obstacle_item = ((ObstacleExpansionRoom) p_list_element.next_room).get_item();
|
Item curr_obstacle_item = ((ObstacleExpansionRoom) p_list_element.next_room).get_item();
|
||||||
if (curr_obstacle_item instanceof board.Via)
|
if (curr_obstacle_item instanceof eu.mihosoft.freerouting.board.Via)
|
||||||
{
|
{
|
||||||
board.Via curr_via = (board.Via) curr_obstacle_item;
|
eu.mihosoft.freerouting.board.Via curr_via = (eu.mihosoft.freerouting.board.Via) curr_obstacle_item;
|
||||||
ExpansionDrill via_drill_info = curr_via.get_autoroute_drill_info(this.autoroute_engine.autoroute_search_tree);
|
ExpansionDrill via_drill_info = curr_via.get_autoroute_drill_info(this.autoroute_engine.autoroute_search_tree);
|
||||||
expand_to_drill(via_drill_info, p_list_element, ripup_costs);
|
expand_to_drill(via_drill_info, p_list_element, ripup_costs);
|
||||||
}
|
}
|
||||||
|
@ -545,7 +545,7 @@ public class MazeSearchAlgo
|
||||||
TileShape door_shape = p_door.get_shape();
|
TileShape door_shape = p_door.get_shape();
|
||||||
if (door_shape.is_empty())
|
if (door_shape.is_empty())
|
||||||
{
|
{
|
||||||
if (this.autoroute_engine.board.get_test_level().ordinal() >= board.TestLevel.ALL_DEBUGGING_OUTPUT.ordinal())
|
if (this.autoroute_engine.board.get_test_level().ordinal() >= eu.mihosoft.freerouting.board.TestLevel.ALL_DEBUGGING_OUTPUT.ordinal())
|
||||||
{
|
{
|
||||||
System.out.println("MazeSearchAlgo:check_door_width door_shape is empty");
|
System.out.println("MazeSearchAlgo:check_door_width door_shape is empty");
|
||||||
}
|
}
|
||||||
|
@ -628,9 +628,9 @@ public class MazeSearchAlgo
|
||||||
// If expansion comes from a pin with trace exit directions the eapansion_value is calculated
|
// If expansion comes from a pin with trace exit directions the eapansion_value is calculated
|
||||||
// from the nearest trace exit point instead from the center olf the pin.
|
// from the nearest trace exit point instead from the center olf the pin.
|
||||||
Item from_item = ((TargetItemExpansionDoor) p_from_element.backtrack_door).item;
|
Item from_item = ((TargetItemExpansionDoor) p_from_element.backtrack_door).item;
|
||||||
if (from_item instanceof board.Pin)
|
if (from_item instanceof eu.mihosoft.freerouting.board.Pin)
|
||||||
{
|
{
|
||||||
FloatPoint nearest_exit_corner = ((board.Pin) from_item).nearest_trace_exit_corner(p_drill.location.to_float(), trace_half_width, layer);
|
FloatPoint nearest_exit_corner = ((eu.mihosoft.freerouting.board.Pin) from_item).nearest_trace_exit_corner(p_drill.location.to_float(), trace_half_width, layer);
|
||||||
if (nearest_exit_corner != null)
|
if (nearest_exit_corner != null)
|
||||||
{
|
{
|
||||||
compare_corner = nearest_exit_corner;
|
compare_corner = nearest_exit_corner;
|
||||||
|
@ -729,11 +729,11 @@ public class MazeSearchAlgo
|
||||||
}
|
}
|
||||||
Item curr_obstacle_item =
|
Item curr_obstacle_item =
|
||||||
((ObstacleExpansionRoom) curr_drill.room_arr[p_list_element.section_no_of_door]).get_item();
|
((ObstacleExpansionRoom) curr_drill.room_arr[p_list_element.section_no_of_door]).get_item();
|
||||||
if (!(curr_obstacle_item instanceof board.Via))
|
if (!(curr_obstacle_item instanceof eu.mihosoft.freerouting.board.Via))
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
library.Padstack curr_obstacle_padstack = ((board.Via) curr_obstacle_item).get_padstack();
|
eu.mihosoft.freerouting.library.Padstack curr_obstacle_padstack = ((eu.mihosoft.freerouting.board.Via) curr_obstacle_item).get_padstack();
|
||||||
if (!this.ctrl.via_rule.contains_padstack(curr_obstacle_padstack) || curr_obstacle_item.clearance_class_no() != this.ctrl.via_clearance_class)
|
if (!this.ctrl.via_rule.contains_padstack(curr_obstacle_padstack) || curr_obstacle_item.clearance_class_no() != this.ctrl.via_clearance_class)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
|
@ -755,16 +755,16 @@ public class MazeSearchAlgo
|
||||||
for (;;)
|
for (;;)
|
||||||
{
|
{
|
||||||
TileShape curr_room_shape = curr_drill.room_arr[curr_layer - curr_drill.first_layer].get_shape();
|
TileShape curr_room_shape = curr_drill.room_arr[curr_layer - curr_drill.first_layer].get_shape();
|
||||||
board.ForcedPadAlgo.CheckDrillResult drill_result =
|
eu.mihosoft.freerouting.board.ForcedPadAlgo.CheckDrillResult drill_result =
|
||||||
ForcedViaAlgo.check_layer(ctrl.via_radius_arr[curr_layer], ctrl.via_clearance_class,
|
ForcedViaAlgo.check_layer(ctrl.via_radius_arr[curr_layer], ctrl.via_clearance_class,
|
||||||
ctrl.attach_smd_allowed, curr_room_shape, curr_drill.location, curr_layer, net_no_arr,
|
ctrl.attach_smd_allowed, curr_room_shape, curr_drill.location, curr_layer, net_no_arr,
|
||||||
ctrl.max_shove_trace_recursion_depth, 0, autoroute_engine.board);
|
ctrl.max_shove_trace_recursion_depth, 0, autoroute_engine.board);
|
||||||
if (drill_result == board.ForcedPadAlgo.CheckDrillResult.NOT_DRILLABLE)
|
if (drill_result == eu.mihosoft.freerouting.board.ForcedPadAlgo.CheckDrillResult.NOT_DRILLABLE)
|
||||||
{
|
{
|
||||||
via_lower_bound = curr_layer + 1;
|
via_lower_bound = curr_layer + 1;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
else if (drill_result == board.ForcedPadAlgo.CheckDrillResult.DRILLABLE_WITH_ATTACH_SMD)
|
else if (drill_result == eu.mihosoft.freerouting.board.ForcedPadAlgo.CheckDrillResult.DRILLABLE_WITH_ATTACH_SMD)
|
||||||
{
|
{
|
||||||
if (curr_layer == 0)
|
if (curr_layer == 0)
|
||||||
{
|
{
|
||||||
|
@ -795,16 +795,16 @@ public class MazeSearchAlgo
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
TileShape curr_room_shape = curr_drill.room_arr[curr_layer - curr_drill.first_layer].get_shape();
|
TileShape curr_room_shape = curr_drill.room_arr[curr_layer - curr_drill.first_layer].get_shape();
|
||||||
board.ForcedPadAlgo.CheckDrillResult drill_result =
|
eu.mihosoft.freerouting.board.ForcedPadAlgo.CheckDrillResult drill_result =
|
||||||
ForcedViaAlgo.check_layer(ctrl.via_radius_arr[curr_layer], ctrl.via_clearance_class, ctrl.attach_smd_allowed,
|
ForcedViaAlgo.check_layer(ctrl.via_radius_arr[curr_layer], ctrl.via_clearance_class, ctrl.attach_smd_allowed,
|
||||||
curr_room_shape, curr_drill.location, curr_layer, net_no_arr,
|
curr_room_shape, curr_drill.location, curr_layer, net_no_arr,
|
||||||
ctrl.max_shove_trace_recursion_depth, 0, autoroute_engine.board);
|
ctrl.max_shove_trace_recursion_depth, 0, autoroute_engine.board);
|
||||||
if (drill_result == board.ForcedPadAlgo.CheckDrillResult.NOT_DRILLABLE)
|
if (drill_result == eu.mihosoft.freerouting.board.ForcedPadAlgo.CheckDrillResult.NOT_DRILLABLE)
|
||||||
{
|
{
|
||||||
via_upper_bound = curr_layer - 1;
|
via_upper_bound = curr_layer - 1;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
else if (drill_result == board.ForcedPadAlgo.CheckDrillResult.DRILLABLE_WITH_ATTACH_SMD)
|
else if (drill_result == eu.mihosoft.freerouting.board.ForcedPadAlgo.CheckDrillResult.DRILLABLE_WITH_ATTACH_SMD)
|
||||||
{
|
{
|
||||||
if (curr_layer == ctrl.layer_count - 1)
|
if (curr_layer == ctrl.layer_count - 1)
|
||||||
{
|
{
|
||||||
|
@ -950,7 +950,7 @@ public class MazeSearchAlgo
|
||||||
|
|
||||||
if (this.autoroute_engine.maintain_database)
|
if (this.autoroute_engine.maintain_database)
|
||||||
{
|
{
|
||||||
// add the completed start rooms carried over from the last autoroute to the start rooms.
|
// add the completed start rooms carried over from the last eu.mihosoft.freerouting.autoroute to the start rooms.
|
||||||
completed_start_rooms.addAll(this.autoroute_engine.get_rooms_with_target_items(p_start_items));
|
completed_start_rooms.addAll(this.autoroute_engine.get_rooms_with_target_items(p_start_items));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1005,17 +1005,17 @@ public class MazeSearchAlgo
|
||||||
{
|
{
|
||||||
for (Item curr_item : p_item_list)
|
for (Item curr_item : p_item_list)
|
||||||
{
|
{
|
||||||
if ((curr_item instanceof board.Pin) && curr_item.net_count() > 1)
|
if ((curr_item instanceof eu.mihosoft.freerouting.board.Pin) && curr_item.net_count() > 1)
|
||||||
{
|
{
|
||||||
Collection<Item> pin_contacts = curr_item.get_normal_contacts();
|
Collection<Item> pin_contacts = curr_item.get_normal_contacts();
|
||||||
board.Pin curr_tie_pin = (board.Pin) curr_item;
|
eu.mihosoft.freerouting.board.Pin curr_tie_pin = (eu.mihosoft.freerouting.board.Pin) curr_item;
|
||||||
for (Item curr_contact : pin_contacts)
|
for (Item curr_contact : pin_contacts)
|
||||||
{
|
{
|
||||||
if (!(curr_contact instanceof board.PolylineTrace) || curr_contact.contains_net(p_own_net_no))
|
if (!(curr_contact instanceof eu.mihosoft.freerouting.board.PolylineTrace) || curr_contact.contains_net(p_own_net_no))
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
p_autoroute_tree.reduce_trace_shape_at_tie_pin(curr_tie_pin, (board.PolylineTrace) curr_contact);
|
p_autoroute_tree.reduce_trace_shape_at_tie_pin(curr_tie_pin, (eu.mihosoft.freerouting.board.PolylineTrace) curr_contact);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1026,15 +1026,15 @@ public class MazeSearchAlgo
|
||||||
Item obstacle_item = p_obstacle_room.get_item();
|
Item obstacle_item = p_obstacle_room.get_item();
|
||||||
int layer = p_obstacle_room.get_layer();
|
int layer = p_obstacle_room.get_layer();
|
||||||
double obstacle_half_width;
|
double obstacle_half_width;
|
||||||
if (obstacle_item instanceof board.Trace)
|
if (obstacle_item instanceof eu.mihosoft.freerouting.board.Trace)
|
||||||
{
|
{
|
||||||
obstacle_half_width = ((board.Trace) obstacle_item).get_half_width()
|
obstacle_half_width = ((eu.mihosoft.freerouting.board.Trace) obstacle_item).get_half_width()
|
||||||
+ this.search_tree.clearance_compensation_value(obstacle_item.clearance_class_no(), layer);
|
+ this.search_tree.clearance_compensation_value(obstacle_item.clearance_class_no(), layer);
|
||||||
|
|
||||||
}
|
}
|
||||||
else if (obstacle_item instanceof board.Via)
|
else if (obstacle_item instanceof eu.mihosoft.freerouting.board.Via)
|
||||||
{
|
{
|
||||||
TileShape via_shape = ((board.Via) obstacle_item).get_tree_shape_on_layer(this.search_tree, layer);
|
TileShape via_shape = ((eu.mihosoft.freerouting.board.Via) obstacle_item).get_tree_shape_on_layer(this.search_tree, layer);
|
||||||
obstacle_half_width = 0.5 * via_shape.max_width();
|
obstacle_half_width = 0.5 * via_shape.max_width();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -1089,9 +1089,9 @@ public class MazeSearchAlgo
|
||||||
|
|
||||||
double fanout_via_cost_factor = 1.0;
|
double fanout_via_cost_factor = 1.0;
|
||||||
double cost_factor = 1;
|
double cost_factor = 1;
|
||||||
if (p_obstacle_item instanceof board.Trace)
|
if (p_obstacle_item instanceof eu.mihosoft.freerouting.board.Trace)
|
||||||
{
|
{
|
||||||
board.Trace obstacle_trace = (board.Trace) p_obstacle_item;
|
eu.mihosoft.freerouting.board.Trace obstacle_trace = (eu.mihosoft.freerouting.board.Trace) p_obstacle_item;
|
||||||
cost_factor = obstacle_trace.get_half_width();
|
cost_factor = obstacle_trace.get_half_width();
|
||||||
if (!this.ctrl.remove_unconnected_vias)
|
if (!this.ctrl.remove_unconnected_vias)
|
||||||
{
|
{
|
||||||
|
@ -1099,19 +1099,19 @@ public class MazeSearchAlgo
|
||||||
fanout_via_cost_factor = calc_fanout_via_ripup_cost_factor(obstacle_trace);
|
fanout_via_cost_factor = calc_fanout_via_ripup_cost_factor(obstacle_trace);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (p_obstacle_item instanceof board.Via)
|
else if (p_obstacle_item instanceof eu.mihosoft.freerouting.board.Via)
|
||||||
{
|
{
|
||||||
boolean look_if_fanout_via = !this.ctrl.remove_unconnected_vias;
|
boolean look_if_fanout_via = !this.ctrl.remove_unconnected_vias;
|
||||||
Collection<Item> contact_list = p_obstacle_item.get_normal_contacts();
|
Collection<Item> contact_list = p_obstacle_item.get_normal_contacts();
|
||||||
int contact_count = 0;
|
int contact_count = 0;
|
||||||
for (Item curr_contact : contact_list)
|
for (Item curr_contact : contact_list)
|
||||||
{
|
{
|
||||||
if (!(curr_contact instanceof board.Trace) || curr_contact.is_user_fixed())
|
if (!(curr_contact instanceof eu.mihosoft.freerouting.board.Trace) || curr_contact.is_user_fixed())
|
||||||
{
|
{
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
++contact_count;
|
++contact_count;
|
||||||
board.Trace obstacle_trace = (board.Trace) curr_contact;
|
eu.mihosoft.freerouting.board.Trace obstacle_trace = (eu.mihosoft.freerouting.board.Trace) curr_contact;
|
||||||
cost_factor = Math.max(cost_factor, obstacle_trace.get_half_width());
|
cost_factor = Math.max(cost_factor, obstacle_trace.get_half_width());
|
||||||
if (look_if_fanout_via)
|
if (look_if_fanout_via)
|
||||||
{
|
{
|
||||||
|
@ -1160,7 +1160,7 @@ public class MazeSearchAlgo
|
||||||
* Return the addditional cost factor for ripping the trace, if it is connected to a fanout via
|
* Return the addditional cost factor for ripping the trace, if it is connected to a fanout via
|
||||||
* or 1, if no fanout via was found.
|
* or 1, if no fanout via was found.
|
||||||
*/
|
*/
|
||||||
private static double calc_fanout_via_ripup_cost_factor(board.Trace p_trace)
|
private static double calc_fanout_via_ripup_cost_factor(eu.mihosoft.freerouting.board.Trace p_trace)
|
||||||
{
|
{
|
||||||
final double FANOUT_COST_CONST = 20000;
|
final double FANOUT_COST_CONST = 20000;
|
||||||
Collection<Item> curr_end_contacts;
|
Collection<Item> curr_end_contacts;
|
||||||
|
@ -1180,11 +1180,11 @@ public class MazeSearchAlgo
|
||||||
}
|
}
|
||||||
Item curr_trace_contact = curr_end_contacts.iterator().next();
|
Item curr_trace_contact = curr_end_contacts.iterator().next();
|
||||||
boolean protect_fanout_via = false;
|
boolean protect_fanout_via = false;
|
||||||
if (curr_trace_contact instanceof board.Pin && curr_trace_contact.first_layer() == curr_trace_contact.last_layer())
|
if (curr_trace_contact instanceof eu.mihosoft.freerouting.board.Pin && curr_trace_contact.first_layer() == curr_trace_contact.last_layer())
|
||||||
{
|
{
|
||||||
protect_fanout_via = true;
|
protect_fanout_via = true;
|
||||||
}
|
}
|
||||||
else if (curr_trace_contact instanceof PolylineTrace && curr_trace_contact.get_fixed_state() == board.FixedState.SHOVE_FIXED)
|
else if (curr_trace_contact instanceof PolylineTrace && curr_trace_contact.get_fixed_state() == eu.mihosoft.freerouting.board.FixedState.SHOVE_FIXED)
|
||||||
{
|
{
|
||||||
// look for shove fixed exit traces of SMD-pins
|
// look for shove fixed exit traces of SMD-pins
|
||||||
PolylineTrace contact_trace = (PolylineTrace) curr_trace_contact;
|
PolylineTrace contact_trace = (PolylineTrace) curr_trace_contact;
|
||||||
|
@ -1288,9 +1288,9 @@ public class MazeSearchAlgo
|
||||||
Collection<TargetItemExpansionDoor> target_doors = p_room.get_target_doors();
|
Collection<TargetItemExpansionDoor> target_doors = p_room.get_target_doors();
|
||||||
for (TargetItemExpansionDoor curr_target_door : target_doors)
|
for (TargetItemExpansionDoor curr_target_door : target_doors)
|
||||||
{
|
{
|
||||||
if (curr_target_door.item instanceof board.Pin)
|
if (curr_target_door.item instanceof eu.mihosoft.freerouting.board.Pin)
|
||||||
{
|
{
|
||||||
return ((board.Pin) curr_target_door.item).get_trace_neckdown_halfwidth(p_room.get_layer());
|
return ((eu.mihosoft.freerouting.board.Pin) curr_target_door.item).get_trace_neckdown_halfwidth(p_room.get_layer());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -1439,7 +1439,7 @@ public class MazeSearchAlgo
|
||||||
return enter_through_small_door(p_list_element, curr_item);
|
return enter_through_small_door(p_list_element, curr_item);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* The autoroute engine of this expansion algorithm.
|
* The eu.mihosoft.freerouting.autoroute engine of this expansion algorithm.
|
||||||
*/
|
*/
|
||||||
public final AutorouteEngine autoroute_engine;
|
public final AutorouteEngine autoroute_engine;
|
||||||
final AutorouteControl ctrl;
|
final AutorouteControl ctrl;
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
* Created on 31. Januar 2004, 07:46
|
* Created on 31. Januar 2004, 07:46
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package autoroute;
|
package eu.mihosoft.freerouting.autoroute;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Describes the structure of a section of an ExpandebleObject.
|
* Describes the structure of a section of an ExpandebleObject.
|
||||||
|
|
|
@ -19,23 +19,23 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package autoroute;
|
package eu.mihosoft.freerouting.autoroute;
|
||||||
|
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
|
|
||||||
import geometry.planar.TileShape;
|
import eu.mihosoft.freerouting.geometry.planar.TileShape;
|
||||||
import geometry.planar.Line;
|
import eu.mihosoft.freerouting.geometry.planar.Line;
|
||||||
import geometry.planar.Polyline;
|
import eu.mihosoft.freerouting.geometry.planar.Polyline;
|
||||||
import geometry.planar.Point;
|
import eu.mihosoft.freerouting.geometry.planar.Point;
|
||||||
import geometry.planar.FloatPoint;
|
import eu.mihosoft.freerouting.geometry.planar.FloatPoint;
|
||||||
import geometry.planar.FloatLine;
|
import eu.mihosoft.freerouting.geometry.planar.FloatLine;
|
||||||
import geometry.planar.Side;
|
import eu.mihosoft.freerouting.geometry.planar.Side;
|
||||||
import geometry.planar.Direction;
|
import eu.mihosoft.freerouting.geometry.planar.Direction;
|
||||||
import geometry.planar.LineSegment;
|
import eu.mihosoft.freerouting.geometry.planar.LineSegment;
|
||||||
|
|
||||||
import board.Item;
|
import eu.mihosoft.freerouting.board.Item;
|
||||||
import board.RoutingBoard;
|
import eu.mihosoft.freerouting.board.RoutingBoard;
|
||||||
import board.ShoveTraceAlgo;
|
import eu.mihosoft.freerouting.board.ShoveTraceAlgo;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Auxiliary functions used in MazeSearchAlgo.
|
* Auxiliary functions used in MazeSearchAlgo.
|
||||||
|
@ -58,11 +58,11 @@ public class MazeShoveTraceAlgo
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
ExpansionDoor from_door = (ExpansionDoor) p_list_element.door;
|
ExpansionDoor from_door = (ExpansionDoor) p_list_element.door;
|
||||||
if (!(p_obstacle_room.get_item() instanceof board.PolylineTrace))
|
if (!(p_obstacle_room.get_item() instanceof eu.mihosoft.freerouting.board.PolylineTrace))
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
board.PolylineTrace obstacle_trace = (board.PolylineTrace)p_obstacle_room.get_item();
|
eu.mihosoft.freerouting.board.PolylineTrace obstacle_trace = (eu.mihosoft.freerouting.board.PolylineTrace)p_obstacle_room.get_item();
|
||||||
int trace_layer = p_obstacle_room.get_layer();
|
int trace_layer = p_obstacle_room.get_layer();
|
||||||
// only traces with the same halfwidth and the same clearance class can be shoved.
|
// only traces with the same halfwidth and the same clearance class can be shoved.
|
||||||
if (obstacle_trace.get_half_width() != p_ctrl.trace_half_width[trace_layer]
|
if (obstacle_trace.get_half_width() != p_ctrl.trace_half_width[trace_layer]
|
||||||
|
@ -291,7 +291,7 @@ public class MazeShoveTraceAlgo
|
||||||
FloatLine curr_door_segment = curr_door_shape.diagonal_corner_segment();
|
FloatLine curr_door_segment = curr_door_shape.diagonal_corner_segment();
|
||||||
if (curr_door_segment == null)
|
if (curr_door_segment == null)
|
||||||
{
|
{
|
||||||
if (p_board.get_test_level() == board.TestLevel.ALL_DEBUGGING_OUTPUT)
|
if (p_board.get_test_level() == eu.mihosoft.freerouting.board.TestLevel.ALL_DEBUGGING_OUTPUT)
|
||||||
{
|
{
|
||||||
System.out.println("MazeShoveTraceAlgo.check_shove_trace_line: door shape is empty");
|
System.out.println("MazeShoveTraceAlgo.check_shove_trace_line: door shape is empty");
|
||||||
}
|
}
|
||||||
|
@ -361,7 +361,7 @@ public class MazeShoveTraceAlgo
|
||||||
* Check if the endpoints of p_trace and p_from_item are maching, so that the
|
* Check if the endpoints of p_trace and p_from_item are maching, so that the
|
||||||
* shove can continue through a link door.
|
* shove can continue through a link door.
|
||||||
*/
|
*/
|
||||||
private static boolean end_points_matching(board.PolylineTrace p_trace, Item p_from_item)
|
private static boolean end_points_matching(eu.mihosoft.freerouting.board.PolylineTrace p_trace, Item p_from_item)
|
||||||
{
|
{
|
||||||
if (p_from_item == p_trace)
|
if (p_from_item == p_trace)
|
||||||
{
|
{
|
||||||
|
@ -372,14 +372,14 @@ public class MazeShoveTraceAlgo
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
boolean points_matching;
|
boolean points_matching;
|
||||||
if (p_from_item instanceof board.DrillItem)
|
if (p_from_item instanceof eu.mihosoft.freerouting.board.DrillItem)
|
||||||
{
|
{
|
||||||
Point from_center = ((board.DrillItem) p_from_item).get_center();
|
Point from_center = ((eu.mihosoft.freerouting.board.DrillItem) p_from_item).get_center();
|
||||||
points_matching = from_center.equals(p_trace.first_corner()) || from_center.equals(p_trace.last_corner());
|
points_matching = from_center.equals(p_trace.first_corner()) || from_center.equals(p_trace.last_corner());
|
||||||
}
|
}
|
||||||
else if (p_from_item instanceof board.PolylineTrace)
|
else if (p_from_item instanceof eu.mihosoft.freerouting.board.PolylineTrace)
|
||||||
{
|
{
|
||||||
board.PolylineTrace from_trace = (board.PolylineTrace) p_from_item;
|
eu.mihosoft.freerouting.board.PolylineTrace from_trace = (eu.mihosoft.freerouting.board.PolylineTrace) p_from_item;
|
||||||
points_matching = p_trace.first_corner().equals(from_trace.first_corner()) ||
|
points_matching = p_trace.first_corner().equals(from_trace.first_corner()) ||
|
||||||
p_trace.first_corner().equals(from_trace.last_corner()) ||
|
p_trace.first_corner().equals(from_trace.last_corner()) ||
|
||||||
p_trace.last_corner().equals(from_trace.first_corner()) ||
|
p_trace.last_corner().equals(from_trace.first_corner()) ||
|
||||||
|
|
|
@ -19,21 +19,21 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package autoroute;
|
package eu.mihosoft.freerouting.autoroute;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
|
|
||||||
import board.ShapeSearchTree;
|
import eu.mihosoft.freerouting.board.ShapeSearchTree;
|
||||||
import board.SearchTreeObject;
|
import eu.mihosoft.freerouting.board.SearchTreeObject;
|
||||||
import board.PolylineTrace;
|
import eu.mihosoft.freerouting.board.PolylineTrace;
|
||||||
|
|
||||||
import geometry.planar.TileShape;
|
import eu.mihosoft.freerouting.geometry.planar.TileShape;
|
||||||
|
|
||||||
import board.Item;
|
import eu.mihosoft.freerouting.board.Item;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Expansion Room used for pushing and ripping obstacles in the autoroute algorithm.
|
* Expansion Room used for pushing and ripping obstacles in the eu.mihosoft.freerouting.autoroute algorithm.
|
||||||
*
|
*
|
||||||
* @author Alfons Wirtz
|
* @author Alfons Wirtz
|
||||||
*/
|
*/
|
||||||
|
@ -91,7 +91,7 @@ public class ObstacleExpansionRoom implements CompleteExpansionRoom
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a 2-dim door with the other obstacle room, if that is useful for the autoroute algorithm.
|
* Creates a 2-dim door with the other obstacle room, if that is useful for the eu.mihosoft.freerouting.autoroute algorithm.
|
||||||
* It is assumed that this room and p_other have a 2-dimensional overlap.
|
* It is assumed that this room and p_other have a 2-dimensional overlap.
|
||||||
* Returns false, if no door was created.
|
* Returns false, if no door was created.
|
||||||
*/
|
*/
|
||||||
|
@ -188,7 +188,7 @@ public class ObstacleExpansionRoom implements CompleteExpansionRoom
|
||||||
/**
|
/**
|
||||||
* Draws the shape of this room.
|
* Draws the shape of this room.
|
||||||
*/
|
*/
|
||||||
public void draw(java.awt.Graphics p_graphics, boardgraphics.GraphicsContext p_graphics_context, double p_intensity)
|
public void draw(java.awt.Graphics p_graphics, eu.mihosoft.freerouting.boardgraphics.GraphicsContext p_graphics_context, double p_intensity)
|
||||||
{
|
{
|
||||||
java.awt.Color draw_color = java.awt.Color.WHITE;
|
java.awt.Color draw_color = java.awt.Color.WHITE;
|
||||||
double layer_visibility = p_graphics_context.get_layer_visibility(this.get_layer());
|
double layer_visibility = p_graphics_context.get_layer_visibility(this.get_layer());
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package autoroute;
|
package eu.mihosoft.freerouting.autoroute;
|
||||||
|
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
|
@ -27,17 +27,17 @@ import java.util.LinkedList;
|
||||||
import java.util.SortedSet;
|
import java.util.SortedSet;
|
||||||
import java.util.TreeSet;
|
import java.util.TreeSet;
|
||||||
|
|
||||||
import datastructures.ShapeTree;
|
import eu.mihosoft.freerouting.datastructures.ShapeTree;
|
||||||
|
|
||||||
import geometry.planar.Limits;
|
import eu.mihosoft.freerouting.geometry.planar.Limits;
|
||||||
import geometry.planar.IntOctagon;
|
import eu.mihosoft.freerouting.geometry.planar.IntOctagon;
|
||||||
import geometry.planar.IntPoint;
|
import eu.mihosoft.freerouting.geometry.planar.IntPoint;
|
||||||
import geometry.planar.TileShape;
|
import eu.mihosoft.freerouting.geometry.planar.TileShape;
|
||||||
import geometry.planar.FloatPoint;
|
import eu.mihosoft.freerouting.geometry.planar.FloatPoint;
|
||||||
|
|
||||||
import board.ShapeSearchTree;
|
import eu.mihosoft.freerouting.board.ShapeSearchTree;
|
||||||
import board.SearchTreeObject;
|
import eu.mihosoft.freerouting.board.SearchTreeObject;
|
||||||
import board.Item;
|
import eu.mihosoft.freerouting.board.Item;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package autoroute;
|
package eu.mihosoft.freerouting.autoroute;
|
||||||
|
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
|
@ -27,15 +27,15 @@ import java.util.LinkedList;
|
||||||
import java.util.SortedSet;
|
import java.util.SortedSet;
|
||||||
import java.util.TreeSet;
|
import java.util.TreeSet;
|
||||||
|
|
||||||
import datastructures.ShapeTree;
|
import eu.mihosoft.freerouting.datastructures.ShapeTree;
|
||||||
|
|
||||||
import geometry.planar.IntBox;
|
import eu.mihosoft.freerouting.geometry.planar.IntBox;
|
||||||
import geometry.planar.TileShape;
|
import eu.mihosoft.freerouting.geometry.planar.TileShape;
|
||||||
import geometry.planar.Limits;
|
import eu.mihosoft.freerouting.geometry.planar.Limits;
|
||||||
|
|
||||||
import board.SearchTreeObject;
|
import eu.mihosoft.freerouting.board.SearchTreeObject;
|
||||||
import board.ShapeSearchTree;
|
import eu.mihosoft.freerouting.board.ShapeSearchTree;
|
||||||
import board.Item;
|
import eu.mihosoft.freerouting.board.Item;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package autoroute;
|
package eu.mihosoft.freerouting.autoroute;
|
||||||
|
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.LinkedList;
|
import java.util.LinkedList;
|
||||||
|
@ -27,24 +27,24 @@ import java.util.TreeSet;
|
||||||
import java.util.SortedSet;
|
import java.util.SortedSet;
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
|
|
||||||
import datastructures.Signum;
|
import eu.mihosoft.freerouting.datastructures.Signum;
|
||||||
import datastructures.ShapeTree;
|
import eu.mihosoft.freerouting.datastructures.ShapeTree;
|
||||||
|
|
||||||
import geometry.planar.Side;
|
import eu.mihosoft.freerouting.geometry.planar.Side;
|
||||||
import geometry.planar.Direction;
|
import eu.mihosoft.freerouting.geometry.planar.Direction;
|
||||||
import geometry.planar.Point;
|
import eu.mihosoft.freerouting.geometry.planar.Point;
|
||||||
import geometry.planar.IntPoint;
|
import eu.mihosoft.freerouting.geometry.planar.IntPoint;
|
||||||
import geometry.planar.FloatPoint;
|
import eu.mihosoft.freerouting.geometry.planar.FloatPoint;
|
||||||
import geometry.planar.Line;
|
import eu.mihosoft.freerouting.geometry.planar.Line;
|
||||||
import geometry.planar.TileShape;
|
import eu.mihosoft.freerouting.geometry.planar.TileShape;
|
||||||
import geometry.planar.Simplex;
|
import eu.mihosoft.freerouting.geometry.planar.Simplex;
|
||||||
|
|
||||||
import board.ShapeSearchTree;
|
import eu.mihosoft.freerouting.board.ShapeSearchTree;
|
||||||
import board.SearchTreeObject;
|
import eu.mihosoft.freerouting.board.SearchTreeObject;
|
||||||
import board.Connectable;
|
import eu.mihosoft.freerouting.board.Connectable;
|
||||||
import board.Item;
|
import eu.mihosoft.freerouting.board.Item;
|
||||||
import board.PolylineTrace;
|
import eu.mihosoft.freerouting.board.PolylineTrace;
|
||||||
import board.TestLevel;
|
import eu.mihosoft.freerouting.board.TestLevel;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* To calculate the neigbour rooms of an expansion room.
|
* To calculate the neigbour rooms of an expansion room.
|
||||||
|
|
|
@ -17,15 +17,15 @@
|
||||||
*
|
*
|
||||||
* Created on 2. Februar 2004, 12:59
|
* Created on 2. Februar 2004, 12:59
|
||||||
*/
|
*/
|
||||||
package autoroute;
|
package eu.mihosoft.freerouting.autoroute;
|
||||||
|
|
||||||
import geometry.planar.Simplex;
|
import eu.mihosoft.freerouting.geometry.planar.Simplex;
|
||||||
import geometry.planar.TileShape;
|
import eu.mihosoft.freerouting.geometry.planar.TileShape;
|
||||||
import board.Item;
|
import eu.mihosoft.freerouting.board.Item;
|
||||||
import board.ShapeSearchTree;
|
import eu.mihosoft.freerouting.board.ShapeSearchTree;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* An expansion door leading to a start or destination item of the autoroute algorithm.
|
* An expansion door leading to a start or destination item of the eu.mihosoft.freerouting.autoroute algorithm.
|
||||||
*
|
*
|
||||||
* @author Alfons Wirtz
|
* @author Alfons Wirtz
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -16,4 +16,4 @@
|
||||||
|
|
||||||
--></head>
|
--></head>
|
||||||
|
|
||||||
<body bgcolor="white">Contains functionality of the autoroute algorithm. </body></html>
|
<body bgcolor="white">Contains functionality of the eu.mihosoft.freerouting.autoroute algorithm. </body></html>
|
|
@ -18,7 +18,7 @@
|
||||||
* Created on 14. Juli 2003, 07:40
|
* Created on 14. Juli 2003, 07:40
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package board;
|
package eu.mihosoft.freerouting.board;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Enum for angle restrictions none, fortyfive degree and ninety degree.
|
* Enum for angle restrictions none, fortyfive degree and ninety degree.
|
||||||
|
|
|
@ -13,17 +13,17 @@
|
||||||
* GNU General Public License at <http://www.gnu.org/licenses/>
|
* GNU General Public License at <http://www.gnu.org/licenses/>
|
||||||
* for more details.
|
* for more details.
|
||||||
*/
|
*/
|
||||||
package board;
|
package eu.mihosoft.freerouting.board;
|
||||||
|
|
||||||
import geometry.planar.Area;
|
import eu.mihosoft.freerouting.geometry.planar.Area;
|
||||||
import geometry.planar.ConvexShape;
|
import eu.mihosoft.freerouting.geometry.planar.ConvexShape;
|
||||||
import geometry.planar.IntBox;
|
import eu.mihosoft.freerouting.geometry.planar.IntBox;
|
||||||
import geometry.planar.IntOctagon;
|
import eu.mihosoft.freerouting.geometry.planar.IntOctagon;
|
||||||
import geometry.planar.Point;
|
import eu.mihosoft.freerouting.geometry.planar.Point;
|
||||||
import geometry.planar.Vector;
|
import eu.mihosoft.freerouting.geometry.planar.Vector;
|
||||||
import geometry.planar.Polyline;
|
import eu.mihosoft.freerouting.geometry.planar.Polyline;
|
||||||
import geometry.planar.PolylineShape;
|
import eu.mihosoft.freerouting.geometry.planar.PolylineShape;
|
||||||
import geometry.planar.TileShape;
|
import eu.mihosoft.freerouting.geometry.planar.TileShape;
|
||||||
|
|
||||||
import java.awt.Graphics;
|
import java.awt.Graphics;
|
||||||
|
|
||||||
|
@ -34,21 +34,21 @@ import java.util.Set;
|
||||||
import java.util.SortedSet;
|
import java.util.SortedSet;
|
||||||
import java.util.TreeSet;
|
import java.util.TreeSet;
|
||||||
|
|
||||||
import datastructures.ShapeTree.TreeEntry;
|
import eu.mihosoft.freerouting.datastructures.ShapeTree.TreeEntry;
|
||||||
|
|
||||||
import library.BoardLibrary;
|
import eu.mihosoft.freerouting.library.BoardLibrary;
|
||||||
import library.Padstack;
|
import eu.mihosoft.freerouting.library.Padstack;
|
||||||
import rules.BoardRules;
|
import eu.mihosoft.freerouting.rules.BoardRules;
|
||||||
import boardgraphics.GraphicsContext;
|
import eu.mihosoft.freerouting.boardgraphics.GraphicsContext;
|
||||||
import boardgraphics.Drawable;
|
import eu.mihosoft.freerouting.boardgraphics.Drawable;
|
||||||
import datastructures.UndoableObjects;
|
import eu.mihosoft.freerouting.datastructures.UndoableObjects;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* Provides basic functionality of a board with geometric items.
|
* Provides basic functionality of a eu.mihosoft.freerouting.board with geometric items.
|
||||||
* Contains functions such as inserting, deleting, modifying
|
* Contains functions such as inserting, deleting, modifying
|
||||||
* and picking items and elementary checking functions.
|
* and picking items and elementary checking functions.
|
||||||
* A board may have 1 or several layers.
|
* A eu.mihosoft.freerouting.board may have 1 or several layers.
|
||||||
*
|
*
|
||||||
* @author Alfons Wirtz
|
* @author Alfons Wirtz
|
||||||
*/
|
*/
|
||||||
|
@ -60,7 +60,7 @@ public class BasicBoard implements java.io.Serializable
|
||||||
* p_bounding_box
|
* p_bounding_box
|
||||||
* Rules contains the restrictions to obey when inserting items.
|
* Rules contains the restrictions to obey when inserting items.
|
||||||
* Among other things it may contain a clearance matrix.
|
* Among other things it may contain a clearance matrix.
|
||||||
* p_observers is used for syncronisation, if the board is generated
|
* p_observers is used for syncronisation, if the eu.mihosoft.freerouting.board is generated
|
||||||
* by a host database. Otherwise it is null.
|
* by a host database. Otherwise it is null.
|
||||||
* If p_test_level != RELEASE_VERSION,, some features may be used, which are still in experimental state.
|
* If p_test_level != RELEASE_VERSION,, some features may be used, which are still in experimental state.
|
||||||
* Also warnings for debugging may be printed depending on the size of p_test_level.
|
* Also warnings for debugging may be printed depending on the size of p_test_level.
|
||||||
|
@ -82,7 +82,7 @@ public class BasicBoard implements java.io.Serializable
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Inserts a trace into the board, whose geometry is described by
|
* Inserts a trace into the eu.mihosoft.freerouting.board, whose geometry is described by
|
||||||
* a Polyline. p_clearance_class is the index in the clearance_matix,
|
* a Polyline. p_clearance_class is the index in the clearance_matix,
|
||||||
* which describes the required clearance restrictions to other items.
|
* which describes the required clearance restrictions to other items.
|
||||||
* Because no internal cleaning of items is done, the new inserted
|
* Because no internal cleaning of items is done, the new inserted
|
||||||
|
@ -114,7 +114,7 @@ public class BasicBoard implements java.io.Serializable
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Inserts a trace into the board, whose geometry is described by
|
* Inserts a trace into the eu.mihosoft.freerouting.board, whose geometry is described by
|
||||||
* a Polyline. p_clearance_class is the index in the clearance_matix,
|
* a Polyline. p_clearance_class is the index in the clearance_matix,
|
||||||
* which describes the required clearance restrictions to other items.
|
* which describes the required clearance restrictions to other items.
|
||||||
*/
|
*/
|
||||||
|
@ -141,7 +141,7 @@ public class BasicBoard implements java.io.Serializable
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Inserts a trace into the board, whose geometry is described by
|
* Inserts a trace into the eu.mihosoft.freerouting.board, whose geometry is described by
|
||||||
* an array of points, and cleans up the net.
|
* an array of points, and cleans up the net.
|
||||||
*/
|
*/
|
||||||
public void insert_trace(Point[] p_points, int p_layer,
|
public void insert_trace(Point[] p_points, int p_layer,
|
||||||
|
@ -159,7 +159,7 @@ public class BasicBoard implements java.io.Serializable
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Inserts a via into the board. p_attach_allowed indicates, if the via may overlap with smd pins
|
* Inserts a via into the eu.mihosoft.freerouting.board. p_attach_allowed indicates, if the via may overlap with smd pins
|
||||||
* of the same net.
|
* of the same net.
|
||||||
*/
|
*/
|
||||||
public Via insert_via(Padstack p_padstack, Point p_center, int[] p_net_no_arr, int p_clearance_class,
|
public Via insert_via(Padstack p_padstack, Point p_center, int[] p_net_no_arr, int p_clearance_class,
|
||||||
|
@ -181,8 +181,8 @@ public class BasicBoard implements java.io.Serializable
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Inserts a pin into the board.
|
* Inserts a pin into the eu.mihosoft.freerouting.board.
|
||||||
* p_pin_no is the number of this pin in the library package of its component (starting with 0).
|
* p_pin_no is the number of this pin in the eu.mihosoft.freerouting.library package of its component (starting with 0).
|
||||||
*/
|
*/
|
||||||
public Pin insert_pin(int p_component_no, int p_pin_no, int[] p_net_no_arr, int p_clearance_class, FixedState p_fixed_state)
|
public Pin insert_pin(int p_component_no, int p_pin_no, int[] p_net_no_arr, int p_clearance_class, FixedState p_fixed_state)
|
||||||
{
|
{
|
||||||
|
@ -192,7 +192,7 @@ public class BasicBoard implements java.io.Serializable
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Inserts an obstacle into the board , whose geometry is described
|
* Inserts an obstacle into the eu.mihosoft.freerouting.board , whose geometry is described
|
||||||
* by a polygonyal shape, which may have holes.
|
* by a polygonyal shape, which may have holes.
|
||||||
* If p_component_no != 0, the obstacle belongs to a component.
|
* If p_component_no != 0, the obstacle belongs to a component.
|
||||||
*/
|
*/
|
||||||
|
@ -209,7 +209,7 @@ public class BasicBoard implements java.io.Serializable
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Inserts an obstacle belonging to a component into the board
|
* Inserts an obstacle belonging to a component into the eu.mihosoft.freerouting.board
|
||||||
* p_name is to identify the corresponding ObstacstacleArea in the component package.
|
* p_name is to identify the corresponding ObstacstacleArea in the component package.
|
||||||
*/
|
*/
|
||||||
public ObstacleArea insert_obstacle(Area p_area, int p_layer, Vector p_translation, double p_rotation_in_degree,
|
public ObstacleArea insert_obstacle(Area p_area, int p_layer, Vector p_translation, double p_rotation_in_degree,
|
||||||
|
@ -227,7 +227,7 @@ public class BasicBoard implements java.io.Serializable
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Inserts an via obstacle area into the board , whose geometry is described
|
* Inserts an via obstacle area into the eu.mihosoft.freerouting.board , whose geometry is described
|
||||||
* by a polygonyal shape, which may have holes.
|
* by a polygonyal shape, which may have holes.
|
||||||
*/
|
*/
|
||||||
public ViaObstacleArea insert_via_obstacle(Area p_area, int p_layer, int p_clearance_class,
|
public ViaObstacleArea insert_via_obstacle(Area p_area, int p_layer, int p_clearance_class,
|
||||||
|
@ -245,7 +245,7 @@ public class BasicBoard implements java.io.Serializable
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Inserts an via obstacle belonging to a component into the board
|
* Inserts an via obstacle belonging to a component into the eu.mihosoft.freerouting.board
|
||||||
* p_name is to identify the corresponding ObstacstacleArea in the component package.
|
* p_name is to identify the corresponding ObstacstacleArea in the component package.
|
||||||
*/
|
*/
|
||||||
public ViaObstacleArea insert_via_obstacle(Area p_area, int p_layer, Vector p_translation, double p_rotation_in_degree,
|
public ViaObstacleArea insert_via_obstacle(Area p_area, int p_layer, Vector p_translation, double p_rotation_in_degree,
|
||||||
|
@ -264,7 +264,7 @@ public class BasicBoard implements java.io.Serializable
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Inserts a component obstacle area into the board , whose geometry is described
|
* Inserts a component obstacle area into the eu.mihosoft.freerouting.board , whose geometry is described
|
||||||
* by a polygonyal shape, which may have holes.
|
* by a polygonyal shape, which may have holes.
|
||||||
*/
|
*/
|
||||||
public ComponentObstacleArea insert_component_obstacle(Area p_area, int p_layer,
|
public ComponentObstacleArea insert_component_obstacle(Area p_area, int p_layer,
|
||||||
|
@ -282,7 +282,7 @@ public class BasicBoard implements java.io.Serializable
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Inserts a component obstacle belonging to a component into the board.
|
* Inserts a component obstacle belonging to a component into the eu.mihosoft.freerouting.board.
|
||||||
* p_name is to identify the corresponding ObstacstacleArea in the component package.
|
* p_name is to identify the corresponding ObstacstacleArea in the component package.
|
||||||
*/
|
*/
|
||||||
public ComponentObstacleArea insert_component_obstacle(Area p_area, int p_layer, Vector p_translation, double p_rotation_in_degree,
|
public ComponentObstacleArea insert_component_obstacle(Area p_area, int p_layer, Vector p_translation, double p_rotation_in_degree,
|
||||||
|
@ -300,7 +300,7 @@ public class BasicBoard implements java.io.Serializable
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Inserts a component ouline into the board.
|
* Inserts a component ouline into the eu.mihosoft.freerouting.board.
|
||||||
*/
|
*/
|
||||||
public ComponentOutline insert_component_outline(Area p_area, boolean p_is_front, Vector p_translation, double p_rotation_in_degree,
|
public ComponentOutline insert_component_outline(Area p_area, boolean p_is_front, Vector p_translation, double p_rotation_in_degree,
|
||||||
int p_component_no, FixedState p_fixed_state)
|
int p_component_no, FixedState p_fixed_state)
|
||||||
|
@ -322,7 +322,7 @@ public class BasicBoard implements java.io.Serializable
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Inserts a condution area into the board , whose geometry is described
|
* Inserts a condution area into the eu.mihosoft.freerouting.board , whose geometry is described
|
||||||
* by a polygonyal shape, which may have holes.
|
* by a polygonyal shape, which may have holes.
|
||||||
* If p_is_obstacle is false, it is possible to route through the conduction area
|
* If p_is_obstacle is false, it is possible to route through the conduction area
|
||||||
* with traces and vias of foreign nets.
|
* with traces and vias of foreign nets.
|
||||||
|
@ -342,7 +342,7 @@ public class BasicBoard implements java.io.Serializable
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Inserts an Outline into the board.
|
* Inserts an Outline into the eu.mihosoft.freerouting.board.
|
||||||
*/
|
*/
|
||||||
public BoardOutline insert_outline(PolylineShape[] p_outline_shapes, int p_clearance_class_no)
|
public BoardOutline insert_outline(PolylineShape[] p_outline_shapes, int p_clearance_class_no)
|
||||||
{
|
{
|
||||||
|
@ -352,7 +352,7 @@ public class BasicBoard implements java.io.Serializable
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the outline of the board.
|
* Returns the outline of the eu.mihosoft.freerouting.board.
|
||||||
*/
|
*/
|
||||||
public BoardOutline get_outline()
|
public BoardOutline get_outline()
|
||||||
{
|
{
|
||||||
|
@ -373,7 +373,7 @@ public class BasicBoard implements java.io.Serializable
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Removes an item from the board
|
* Removes an item from the eu.mihosoft.freerouting.board
|
||||||
*/
|
*/
|
||||||
public void remove_item(Item p_item)
|
public void remove_item(Item p_item)
|
||||||
{
|
{
|
||||||
|
@ -390,7 +390,7 @@ public class BasicBoard implements java.io.Serializable
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* looks, if an item with id_no p_id_no is on the board.
|
* looks, if an item with id_no p_id_no is on the eu.mihosoft.freerouting.board.
|
||||||
* Returns the found item or null, if no such item is found.
|
* Returns the found item or null, if no such item is found.
|
||||||
*/
|
*/
|
||||||
public Item get_item(int p_id_no)
|
public Item get_item(int p_id_no)
|
||||||
|
@ -412,7 +412,7 @@ public class BasicBoard implements java.io.Serializable
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the list of all items on the board
|
* Returns the list of all items on the eu.mihosoft.freerouting.board
|
||||||
*/
|
*/
|
||||||
public Collection<Item> get_items()
|
public Collection<Item> get_items()
|
||||||
{
|
{
|
||||||
|
@ -431,7 +431,7 @@ public class BasicBoard implements java.io.Serializable
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns all connectable items on the board containing p_net_no
|
* Returns all connectable items on the eu.mihosoft.freerouting.board containing p_net_no
|
||||||
*/
|
*/
|
||||||
public Collection<Item> get_connectable_items(int p_net_no)
|
public Collection<Item> get_connectable_items(int p_net_no)
|
||||||
{
|
{
|
||||||
|
@ -567,7 +567,7 @@ public class BasicBoard implements java.io.Serializable
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the list of all conduction areas on the board
|
* Returns the list of all conduction areas on the eu.mihosoft.freerouting.board
|
||||||
*/
|
*/
|
||||||
public Collection<ConductionArea> get_conduction_areas()
|
public Collection<ConductionArea> get_conduction_areas()
|
||||||
{
|
{
|
||||||
|
@ -589,7 +589,7 @@ public class BasicBoard implements java.io.Serializable
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the list of all pins on the board
|
* Returns the list of all pins on the eu.mihosoft.freerouting.board
|
||||||
*/
|
*/
|
||||||
public Collection<Pin> get_pins()
|
public Collection<Pin> get_pins()
|
||||||
{
|
{
|
||||||
|
@ -611,7 +611,7 @@ public class BasicBoard implements java.io.Serializable
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the list of all pins on the board with only 1 layer
|
* Returns the list of all pins on the eu.mihosoft.freerouting.board with only 1 layer
|
||||||
*/
|
*/
|
||||||
public Collection<Pin> get_smd_pins()
|
public Collection<Pin> get_smd_pins()
|
||||||
{
|
{
|
||||||
|
@ -637,7 +637,7 @@ public class BasicBoard implements java.io.Serializable
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the list of all vias on the board
|
* Returns the list of all vias on the eu.mihosoft.freerouting.board
|
||||||
*/
|
*/
|
||||||
public Collection<Via> get_vias()
|
public Collection<Via> get_vias()
|
||||||
{
|
{
|
||||||
|
@ -659,7 +659,7 @@ public class BasicBoard implements java.io.Serializable
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the list of all traces on the board
|
* Returns the list of all traces on the eu.mihosoft.freerouting.board
|
||||||
*/
|
*/
|
||||||
public Collection<Trace> get_traces()
|
public Collection<Trace> get_traces()
|
||||||
{
|
{
|
||||||
|
@ -681,7 +681,7 @@ public class BasicBoard implements java.io.Serializable
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the cumulative length of all traces on the board
|
* Returns the cumulative length of all traces on the eu.mihosoft.freerouting.board
|
||||||
*/
|
*/
|
||||||
public double cumulative_trace_length()
|
public double cumulative_trace_length()
|
||||||
{
|
{
|
||||||
|
@ -1034,7 +1034,7 @@ public class BasicBoard implements java.io.Serializable
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the layer count of this board.
|
* Returns the layer count of this eu.mihosoft.freerouting.board.
|
||||||
*/
|
*/
|
||||||
public int get_layer_count()
|
public int get_layer_count()
|
||||||
{
|
{
|
||||||
|
@ -1042,7 +1042,7 @@ public class BasicBoard implements java.io.Serializable
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Draws all items of the board on their visible layers. Called in the overwritten
|
* Draws all items of the eu.mihosoft.freerouting.board on their visible layers. Called in the overwritten
|
||||||
* paintComponent method of a class derived from JPanel.
|
* paintComponent method of a class derived from JPanel.
|
||||||
* The value of p_layer_visibility is expected between 0 and 1 for each layer.
|
* The value of p_layer_visibility is expected between 0 and 1 for each layer.
|
||||||
*/
|
*/
|
||||||
|
@ -1053,7 +1053,7 @@ public class BasicBoard implements java.io.Serializable
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// draw all items on the board
|
// draw all items on the eu.mihosoft.freerouting.board
|
||||||
for (int curr_priority = Drawable.MIN_DRAW_PRIORITY; curr_priority <= Drawable.MIDDLE_DRAW_PRIORITY; ++curr_priority)
|
for (int curr_priority = Drawable.MIN_DRAW_PRIORITY; curr_priority <= Drawable.MIDDLE_DRAW_PRIORITY; ++curr_priority)
|
||||||
{
|
{
|
||||||
Iterator<UndoableObjects.UndoableObjectNode> it = item_list.start_read_object();
|
Iterator<UndoableObjects.UndoableObjectNode> it = item_list.start_read_object();
|
||||||
|
@ -1081,7 +1081,7 @@ public class BasicBoard implements java.io.Serializable
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the list of items on the board, whose shape on layer p_layer contains the point at p_location.
|
* Returns the list of items on the eu.mihosoft.freerouting.board, whose shape on layer p_layer contains the point at p_location.
|
||||||
* If p_layer < 0, the layer is ignored.
|
* If p_layer < 0, the layer is ignored.
|
||||||
* If p_item_selection_filter != null, only items of types selected by the filter are picked.
|
* If p_item_selection_filter != null, only items of types selected by the filter are picked.
|
||||||
*/
|
*/
|
||||||
|
@ -1105,7 +1105,7 @@ public class BasicBoard implements java.io.Serializable
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* checks, if p_point is contained in the bounding box of this board.
|
* checks, if p_point is contained in the bounding box of this eu.mihosoft.freerouting.board.
|
||||||
*/
|
*/
|
||||||
public boolean contains(Point p_point)
|
public boolean contains(Point p_point)
|
||||||
{
|
{
|
||||||
|
@ -1127,7 +1127,7 @@ public class BasicBoard implements java.io.Serializable
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* returns the biggest half width of all traces on the board.
|
* returns the biggest half width of all traces on the eu.mihosoft.freerouting.board.
|
||||||
*/
|
*/
|
||||||
public int get_max_trace_half_width()
|
public int get_max_trace_half_width()
|
||||||
{
|
{
|
||||||
|
@ -1135,7 +1135,7 @@ public class BasicBoard implements java.io.Serializable
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* returns the smallest half width of all traces on the board.
|
* returns the smallest half width of all traces on the eu.mihosoft.freerouting.board.
|
||||||
*/
|
*/
|
||||||
public int get_min_trace_half_width()
|
public int get_min_trace_half_width()
|
||||||
{
|
{
|
||||||
|
@ -1143,7 +1143,7 @@ public class BasicBoard implements java.io.Serializable
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns a surrounding box of the geometry of this board
|
* Returns a surrounding box of the geometry of this eu.mihosoft.freerouting.board
|
||||||
*/
|
*/
|
||||||
public IntBox get_bounding_box()
|
public IntBox get_bounding_box()
|
||||||
{
|
{
|
||||||
|
@ -1214,7 +1214,7 @@ public class BasicBoard implements java.io.Serializable
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns, if the observer of the board items is activated.
|
* Returns, if the observer of the eu.mihosoft.freerouting.board items is activated.
|
||||||
*/
|
*/
|
||||||
public boolean observers_active()
|
public boolean observers_active()
|
||||||
{
|
{
|
||||||
|
@ -1254,7 +1254,7 @@ public class BasicBoard implements java.io.Serializable
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Inserts an item into the board data base
|
* Inserts an item into the eu.mihosoft.freerouting.board data base
|
||||||
*/
|
*/
|
||||||
public void insert_item(Item p_item)
|
public void insert_item(Item p_item)
|
||||||
{
|
{
|
||||||
|
@ -1379,7 +1379,7 @@ public class BasicBoard implements java.io.Serializable
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Makes the current board situation restorable by undo.
|
* Makes the current eu.mihosoft.freerouting.board situation restorable by undo.
|
||||||
*/
|
*/
|
||||||
public void generate_snapshot()
|
public void generate_snapshot()
|
||||||
{
|
{
|
||||||
|
@ -1505,7 +1505,7 @@ public class BasicBoard implements java.io.Serializable
|
||||||
throws java.io.IOException, java.lang.ClassNotFoundException
|
throws java.io.IOException, java.lang.ClassNotFoundException
|
||||||
{
|
{
|
||||||
p_stream.defaultReadObject();
|
p_stream.defaultReadObject();
|
||||||
// insert the items on the board into the search trees
|
// insert the items on the eu.mihosoft.freerouting.board into the search trees
|
||||||
search_tree_manager = new SearchTreeManager(this);
|
search_tree_manager = new SearchTreeManager(this);
|
||||||
Iterator<Item> it = this.get_items().iterator();
|
Iterator<Item> it = this.get_items().iterator();
|
||||||
while (it.hasNext())
|
while (it.hasNext())
|
||||||
|
@ -1516,27 +1516,27 @@ public class BasicBoard implements java.io.Serializable
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* List of items inserted into this board
|
* List of items inserted into this eu.mihosoft.freerouting.board
|
||||||
*/
|
*/
|
||||||
public final UndoableObjects item_list;
|
public final UndoableObjects item_list;
|
||||||
/** List of placed components on the board. */
|
/** List of placed components on the eu.mihosoft.freerouting.board. */
|
||||||
public final Components components;
|
public final Components components;
|
||||||
/**
|
/**
|
||||||
* Class defining the rules for items to be inserted into this board.
|
* Class defining the eu.mihosoft.freerouting.rules for items to be inserted into this eu.mihosoft.freerouting.board.
|
||||||
* Contains for example the clearance matrix.
|
* Contains for example the clearance matrix.
|
||||||
*/
|
*/
|
||||||
public final BoardRules rules;
|
public final BoardRules rules;
|
||||||
/**
|
/**
|
||||||
* The library containing pastack masks, packagages and other
|
* The eu.mihosoft.freerouting.library containing pastack masks, packagages and other
|
||||||
* templates used on the board.
|
* templates used on the eu.mihosoft.freerouting.board.
|
||||||
*/
|
*/
|
||||||
public final BoardLibrary library;
|
public final BoardLibrary library;
|
||||||
/**
|
/**
|
||||||
* The layer structure of this board.
|
* The layer structure of this eu.mihosoft.freerouting.board.
|
||||||
*/
|
*/
|
||||||
public final LayerStructure layer_structure;
|
public final LayerStructure layer_structure;
|
||||||
/**
|
/**
|
||||||
* Handels the search trees pointing into the items of this board
|
* Handels the search trees pointing into the items of this eu.mihosoft.freerouting.board
|
||||||
*/
|
*/
|
||||||
public transient SearchTreeManager search_tree_manager;
|
public transient SearchTreeManager search_tree_manager;
|
||||||
/**
|
/**
|
||||||
|
@ -1544,7 +1544,7 @@ public class BasicBoard implements java.io.Serializable
|
||||||
*/
|
*/
|
||||||
public final Communication communication;
|
public final Communication communication;
|
||||||
/**
|
/**
|
||||||
* bounding orthogonal rectangle of this board
|
* bounding orthogonal rectangle of this eu.mihosoft.freerouting.board
|
||||||
*/
|
*/
|
||||||
public final IntBox bounding_box;
|
public final IntBox bounding_box;
|
||||||
/**
|
/**
|
||||||
|
@ -1555,11 +1555,11 @@ public class BasicBoard implements java.io.Serializable
|
||||||
/** the rectangle, where the graphics may be not uptodate */
|
/** the rectangle, where the graphics may be not uptodate */
|
||||||
transient private IntBox update_box = IntBox.EMPTY;
|
transient private IntBox update_box = IntBox.EMPTY;
|
||||||
/**
|
/**
|
||||||
* the biggest half width of all traces on the board
|
* the biggest half width of all traces on the eu.mihosoft.freerouting.board
|
||||||
*/
|
*/
|
||||||
private int max_trace_half_width = 1000;
|
private int max_trace_half_width = 1000;
|
||||||
/**
|
/**
|
||||||
* the smallest half width of all traces on the board
|
* the smallest half width of all traces on the eu.mihosoft.freerouting.board
|
||||||
*/
|
*/
|
||||||
private int min_trace_half_width = 10000;
|
private int min_trace_half_width = 10000;
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package board;
|
package eu.mihosoft.freerouting.board;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Empty adaptor implementing the BoardObservers interface.
|
* Empty adaptor implementing the BoardObservers interface.
|
||||||
|
|
|
@ -19,9 +19,9 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package board;
|
package eu.mihosoft.freerouting.board;
|
||||||
|
|
||||||
import datastructures.Observers;
|
import eu.mihosoft.freerouting.datastructures.Observers;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
|
|
@ -17,22 +17,21 @@
|
||||||
*
|
*
|
||||||
* Created on 18. August 2004, 07:24
|
* Created on 18. August 2004, 07:24
|
||||||
*/
|
*/
|
||||||
package board;
|
package eu.mihosoft.freerouting.board;
|
||||||
|
|
||||||
import geometry.planar.IntBox;
|
import eu.mihosoft.freerouting.geometry.planar.IntBox;
|
||||||
import geometry.planar.IntPoint;
|
import eu.mihosoft.freerouting.geometry.planar.IntPoint;
|
||||||
import geometry.planar.LineSegment;
|
import eu.mihosoft.freerouting.geometry.planar.TileShape;
|
||||||
import geometry.planar.TileShape;
|
import eu.mihosoft.freerouting.geometry.planar.PolylineShape;
|
||||||
import geometry.planar.PolylineShape;
|
import eu.mihosoft.freerouting.geometry.planar.PolylineArea;
|
||||||
import geometry.planar.PolylineArea;
|
import eu.mihosoft.freerouting.geometry.planar.Area;
|
||||||
import geometry.planar.Area;
|
import eu.mihosoft.freerouting.geometry.planar.Vector;
|
||||||
import geometry.planar.Vector;
|
import eu.mihosoft.freerouting.geometry.planar.FloatPoint;
|
||||||
import geometry.planar.FloatPoint;
|
|
||||||
|
|
||||||
import boardgraphics.GraphicsContext;
|
import eu.mihosoft.freerouting.boardgraphics.GraphicsContext;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class describing a board outline.
|
* Class describing a eu.mihosoft.freerouting.board outline.
|
||||||
*
|
*
|
||||||
* @author alfons
|
* @author alfons
|
||||||
*/
|
*/
|
||||||
|
@ -179,7 +178,7 @@ public class BoardOutline extends Item implements java.io.Serializable
|
||||||
|
|
||||||
public int get_draw_priority()
|
public int get_draw_priority()
|
||||||
{
|
{
|
||||||
return boardgraphics.Drawable.MAX_DRAW_PRIORITY;
|
return eu.mihosoft.freerouting.boardgraphics.Drawable.MAX_DRAW_PRIORITY;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int shape_count()
|
public int shape_count()
|
||||||
|
@ -218,7 +217,7 @@ public class BoardOutline extends Item implements java.io.Serializable
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The board shape outside the outline curves, where a keepout will be generated
|
* The eu.mihosoft.freerouting.board shape outside the outline curves, where a keepout will be generated
|
||||||
* The outline curves are holes of the keepout_area.
|
* The outline curves are holes of the keepout_area.
|
||||||
*/
|
*/
|
||||||
Area get_keepout_area()
|
Area get_keepout_area()
|
||||||
|
@ -268,7 +267,7 @@ public class BoardOutline extends Item implements java.io.Serializable
|
||||||
public void print_info(ObjectInfoPanel p_window, java.util.Locale p_locale)
|
public void print_info(ObjectInfoPanel p_window, java.util.Locale p_locale)
|
||||||
{
|
{
|
||||||
java.util.ResourceBundle resources =
|
java.util.ResourceBundle resources =
|
||||||
java.util.ResourceBundle.getBundle("board.resources.ObjectInfoPanel", p_locale);
|
java.util.ResourceBundle.getBundle("eu.mihosoft.freerouting.board.resources.ObjectInfoPanel", p_locale);
|
||||||
p_window.append_bold(resources.getString("board_outline"));
|
p_window.append_bold(resources.getString("board_outline"));
|
||||||
print_clearance_info(p_window, p_locale);
|
print_clearance_info(p_window, p_locale);
|
||||||
p_window.newline();
|
p_window.newline();
|
||||||
|
@ -287,7 +286,7 @@ public class BoardOutline extends Item implements java.io.Serializable
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns, if keepout is generated outside the board outline.
|
* Returns, if keepout is generated outside the eu.mihosoft.freerouting.board outline.
|
||||||
* Otherwise only the line shapes of the outlines are inserted as keepout.
|
* Otherwise only the line shapes of the outlines are inserted as keepout.
|
||||||
*/
|
*/
|
||||||
public boolean keepout_outside_outline_generated()
|
public boolean keepout_outside_outline_generated()
|
||||||
|
@ -340,10 +339,10 @@ public class BoardOutline extends Item implements java.io.Serializable
|
||||||
{
|
{
|
||||||
return p_search_tree.calculate_tree_shapes(this);
|
return p_search_tree.calculate_tree_shapes(this);
|
||||||
}
|
}
|
||||||
/** The board shapes inside the outline curves. */
|
/** The eu.mihosoft.freerouting.board shapes inside the outline curves. */
|
||||||
private PolylineShape[] shapes;
|
private PolylineShape[] shapes;
|
||||||
/**
|
/**
|
||||||
* The board shape outside the outline curves, where a keepout will be generated
|
* The eu.mihosoft.freerouting.board shape outside the outline curves, where a keepout will be generated
|
||||||
* The outline curves are holes of the keepout_area.
|
* The outline curves are holes of the keepout_area.
|
||||||
*/
|
*/
|
||||||
private Area keepout_area = null;
|
private Area keepout_area = null;
|
||||||
|
|
|
@ -18,15 +18,15 @@
|
||||||
* Created on 17. August 2003, 07:36
|
* Created on 17. August 2003, 07:36
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package board;
|
package eu.mihosoft.freerouting.board;
|
||||||
|
|
||||||
import geometry.planar.FloatPoint;
|
import eu.mihosoft.freerouting.geometry.planar.FloatPoint;
|
||||||
import geometry.planar.Line;
|
import eu.mihosoft.freerouting.geometry.planar.Line;
|
||||||
import geometry.planar.LineSegment;
|
import eu.mihosoft.freerouting.geometry.planar.LineSegment;
|
||||||
import geometry.planar.Point;
|
import eu.mihosoft.freerouting.geometry.planar.Point;
|
||||||
import geometry.planar.Polyline;
|
import eu.mihosoft.freerouting.geometry.planar.Polyline;
|
||||||
import geometry.planar.TileShape;
|
import eu.mihosoft.freerouting.geometry.planar.TileShape;
|
||||||
import geometry.planar.Side;
|
import eu.mihosoft.freerouting.geometry.planar.Side;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
|
|
@ -16,13 +16,13 @@
|
||||||
* Created on 1. September 2003, 08:40
|
* Created on 1. September 2003, 08:40
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package board;
|
package eu.mihosoft.freerouting.board;
|
||||||
|
|
||||||
import geometry.planar.FloatPoint;
|
import eu.mihosoft.freerouting.geometry.planar.FloatPoint;
|
||||||
import geometry.planar.Line;
|
import eu.mihosoft.freerouting.geometry.planar.Line;
|
||||||
import geometry.planar.Polyline;
|
import eu.mihosoft.freerouting.geometry.planar.Polyline;
|
||||||
import geometry.planar.Side;
|
import eu.mihosoft.freerouting.geometry.planar.Side;
|
||||||
import geometry.planar.TileShape;
|
import eu.mihosoft.freerouting.geometry.planar.TileShape;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Used in the shove algorithm to calculate the fromside for pushing and
|
* Used in the shove algorithm to calculate the fromside for pushing and
|
||||||
|
|
|
@ -14,14 +14,14 @@
|
||||||
* for more details.
|
* for more details.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package board;
|
package eu.mihosoft.freerouting.board;
|
||||||
import geometry.planar.FloatPoint;
|
import eu.mihosoft.freerouting.geometry.planar.FloatPoint;
|
||||||
import geometry.planar.IntBox;
|
import eu.mihosoft.freerouting.geometry.planar.IntBox;
|
||||||
import geometry.planar.IntOctagon;
|
import eu.mihosoft.freerouting.geometry.planar.IntOctagon;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* Used internally for marking changed areas on the board
|
* Used internally for marking changed areas on the eu.mihosoft.freerouting.board
|
||||||
* after shoving and optimizing items.
|
* after shoving and optimizing items.
|
||||||
*
|
*
|
||||||
|
|
||||||
|
@ -66,7 +66,7 @@ class ChangedArea
|
||||||
/**
|
/**
|
||||||
* enlarges the octagon on p_layer, so that it contains p_shape
|
* enlarges the octagon on p_layer, so that it contains p_shape
|
||||||
*/
|
*/
|
||||||
public void join (geometry.planar.TileShape p_shape, int p_layer)
|
public void join (eu.mihosoft.freerouting.geometry.planar.TileShape p_shape, int p_layer)
|
||||||
{
|
{
|
||||||
if (p_shape == null)
|
if (p_shape == null)
|
||||||
{
|
{
|
||||||
|
@ -121,7 +121,7 @@ class ChangedArea
|
||||||
MutableOctagon [] arr;
|
MutableOctagon [] arr;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* mutable octagon with double coordinates (see geometry.planar.IntOctagon)
|
* mutable octagon with double coordinates (see eu.mihosoft.freerouting.geometry.planar.IntOctagon)
|
||||||
*/
|
*/
|
||||||
private static class MutableOctagon
|
private static class MutableOctagon
|
||||||
{
|
{
|
||||||
|
|
|
@ -18,9 +18,9 @@
|
||||||
* Created on 4. Oktober 2004, 08:56
|
* Created on 4. Oktober 2004, 08:56
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package board;
|
package eu.mihosoft.freerouting.board;
|
||||||
|
|
||||||
import geometry.planar.ConvexShape;
|
import eu.mihosoft.freerouting.geometry.planar.ConvexShape;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -43,7 +43,7 @@ public class ClearanceViolation implements ObjectInfoPanel.Printable
|
||||||
public void print_info(ObjectInfoPanel p_window, java.util.Locale p_locale)
|
public void print_info(ObjectInfoPanel p_window, java.util.Locale p_locale)
|
||||||
{
|
{
|
||||||
java.util.ResourceBundle resources =
|
java.util.ResourceBundle resources =
|
||||||
java.util.ResourceBundle.getBundle("board.resources.ObjectInfoPanel", p_locale);
|
java.util.ResourceBundle.getBundle("eu.mihosoft.freerouting.board.resources.ObjectInfoPanel", p_locale);
|
||||||
p_window.append_bold(resources.getString("clearance_violation_2"));
|
p_window.append_bold(resources.getString("clearance_violation_2"));
|
||||||
p_window.append(" " + resources.getString("at") + " ");
|
p_window.append(" " + resources.getString("at") + " ");
|
||||||
p_window.append(shape.centre_of_gravity());
|
p_window.append(shape.centre_of_gravity());
|
||||||
|
|
|
@ -18,10 +18,10 @@
|
||||||
* Created on 5. Juli 2004, 07:31
|
* Created on 5. Juli 2004, 07:31
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package board;
|
package eu.mihosoft.freerouting.board;
|
||||||
|
|
||||||
import datastructures.IdNoGenerator;
|
import eu.mihosoft.freerouting.datastructures.IdNoGenerator;
|
||||||
import designformats.specctra.CoordinateTransform;
|
import eu.mihosoft.freerouting.designforms.specctra.CoordinateTransform;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Communication information to host systems or host design formats.
|
* Communication information to host systems or host design formats.
|
||||||
|
@ -48,7 +48,7 @@ public class Communication implements java.io.Serializable
|
||||||
public Communication()
|
public Communication()
|
||||||
{
|
{
|
||||||
this(Unit.MIL, 1, new SpecctraParserInfo("\"", null, null, null, null, false),
|
this(Unit.MIL, 1, new SpecctraParserInfo("\"", null, null, null, null, false),
|
||||||
new CoordinateTransform(1, 0, 0), new board.ItemIdNoGenerator(), new BoardObserverAdaptor());
|
new CoordinateTransform(1, 0, 0), new eu.mihosoft.freerouting.board.ItemIdNoGenerator(), new BoardObserverAdaptor());
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean host_cad_is_eagle()
|
public boolean host_cad_is_eagle()
|
||||||
|
|
|
@ -18,20 +18,20 @@
|
||||||
* Created on 27. Mai 2004, 07:23
|
* Created on 27. Mai 2004, 07:23
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package board;
|
package eu.mihosoft.freerouting.board;
|
||||||
|
|
||||||
|
|
||||||
import datastructures.UndoableObjects;
|
import eu.mihosoft.freerouting.datastructures.UndoableObjects;
|
||||||
|
|
||||||
import geometry.planar.Point;
|
import eu.mihosoft.freerouting.geometry.planar.Point;
|
||||||
import geometry.planar.IntPoint;
|
import eu.mihosoft.freerouting.geometry.planar.IntPoint;
|
||||||
import geometry.planar.Vector;
|
import eu.mihosoft.freerouting.geometry.planar.Vector;
|
||||||
|
|
||||||
import library.Package;
|
import eu.mihosoft.freerouting.library.Package;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Describes board components consisting of an array of pins
|
* Describes eu.mihosoft.freerouting.board components consisting of an array of pins
|
||||||
* und other stuff like component keepouts.
|
* und other stuff like component keepouts.
|
||||||
*
|
*
|
||||||
* @author Alfons Wirtz
|
* @author Alfons Wirtz
|
||||||
|
@ -85,7 +85,7 @@ public class Component implements UndoableObjects.Storable, ObjectInfoPanel.Prin
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* If false, the component will be placed on the back side of the board.
|
* If false, the component will be placed on the back side of the eu.mihosoft.freerouting.board.
|
||||||
*/
|
*/
|
||||||
public boolean placed_on_front()
|
public boolean placed_on_front()
|
||||||
{
|
{
|
||||||
|
@ -94,7 +94,7 @@ public class Component implements UndoableObjects.Storable, ObjectInfoPanel.Prin
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Translates the location of this Component by p_p_vector.
|
* Translates the location of this Component by p_p_vector.
|
||||||
* The Pins in the board must be moved seperately.
|
* The Pins in the eu.mihosoft.freerouting.board must be moved seperately.
|
||||||
*/
|
*/
|
||||||
public void translate_by(Vector p_vector)
|
public void translate_by(Vector p_vector)
|
||||||
{
|
{
|
||||||
|
@ -139,7 +139,7 @@ public class Component implements UndoableObjects.Storable, ObjectInfoPanel.Prin
|
||||||
double turn_angle = p_angle_in_degree;
|
double turn_angle = p_angle_in_degree;
|
||||||
if (p_flip_style_rotate_first && !this.placed_on_front())
|
if (p_flip_style_rotate_first && !this.placed_on_front())
|
||||||
{
|
{
|
||||||
// take care of the order of mirroring and rotating on the back side of the board
|
// take care of the order of mirroring and rotating on the back side of the eu.mihosoft.freerouting.board
|
||||||
turn_angle = 360 - p_angle_in_degree;
|
turn_angle = 360 - p_angle_in_degree;
|
||||||
}
|
}
|
||||||
this.rotation_in_degree = this.rotation_in_degree + turn_angle;
|
this.rotation_in_degree = this.rotation_in_degree + turn_angle;
|
||||||
|
@ -199,7 +199,7 @@ public class Component implements UndoableObjects.Storable, ObjectInfoPanel.Prin
|
||||||
/**
|
/**
|
||||||
* Returns information for pin swap and gate swap, if != null.
|
* Returns information for pin swap and gate swap, if != null.
|
||||||
*/
|
*/
|
||||||
public library.LogicalPart get_logical_part()
|
public eu.mihosoft.freerouting.library.LogicalPart get_logical_part()
|
||||||
{
|
{
|
||||||
return this.logical_part;
|
return this.logical_part;
|
||||||
}
|
}
|
||||||
|
@ -207,7 +207,7 @@ public class Component implements UndoableObjects.Storable, ObjectInfoPanel.Prin
|
||||||
/**
|
/**
|
||||||
* Sets the infomation for pin swap and gate swap.
|
* Sets the infomation for pin swap and gate swap.
|
||||||
*/
|
*/
|
||||||
public void set_logical_part(library.LogicalPart p_logical_part)
|
public void set_logical_part(eu.mihosoft.freerouting.library.LogicalPart p_logical_part)
|
||||||
{
|
{
|
||||||
this.logical_part = p_logical_part;
|
this.logical_part = p_logical_part;
|
||||||
}
|
}
|
||||||
|
@ -215,7 +215,7 @@ public class Component implements UndoableObjects.Storable, ObjectInfoPanel.Prin
|
||||||
public void print_info(ObjectInfoPanel p_window, java.util.Locale p_locale)
|
public void print_info(ObjectInfoPanel p_window, java.util.Locale p_locale)
|
||||||
{
|
{
|
||||||
java.util.ResourceBundle resources =
|
java.util.ResourceBundle resources =
|
||||||
java.util.ResourceBundle.getBundle("board.resources.ObjectInfoPanel", p_locale);
|
java.util.ResourceBundle.getBundle("eu.mihosoft.freerouting.board.resources.ObjectInfoPanel", p_locale);
|
||||||
p_window.append_bold(resources.getString("component") + " ");
|
p_window.append_bold(resources.getString("component") + " ");
|
||||||
p_window.append_bold(this.name);
|
p_window.append_bold(this.name);
|
||||||
if (this.location != null)
|
if (this.location != null)
|
||||||
|
@ -251,7 +251,7 @@ public class Component implements UndoableObjects.Storable, ObjectInfoPanel.Prin
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the library package of this component.
|
* Returns the eu.mihosoft.freerouting.library package of this component.
|
||||||
*/
|
*/
|
||||||
public Package get_package()
|
public Package get_package()
|
||||||
{
|
{
|
||||||
|
@ -273,19 +273,19 @@ public class Component implements UndoableObjects.Storable, ObjectInfoPanel.Prin
|
||||||
/** The location of the component. */
|
/** The location of the component. */
|
||||||
private Point location;
|
private Point location;
|
||||||
|
|
||||||
/** The rotation of the library package of the component in degree */
|
/** The rotation of the eu.mihosoft.freerouting.library package of the component in degree */
|
||||||
private double rotation_in_degree;
|
private double rotation_in_degree;
|
||||||
|
|
||||||
/** Contains information for gate swapping and pin swapping, if != null */
|
/** Contains information for gate swapping and pin swapping, if != null */
|
||||||
private library.LogicalPart logical_part = null;
|
private eu.mihosoft.freerouting.library.LogicalPart logical_part = null;
|
||||||
|
|
||||||
/** If false, the component will be placed on the back side of the board. */
|
/** If false, the component will be placed on the back side of the eu.mihosoft.freerouting.board. */
|
||||||
private boolean on_front;
|
private boolean on_front;
|
||||||
|
|
||||||
/** The library package of the component if it is placed on the component side. */
|
/** The eu.mihosoft.freerouting.library package of the component if it is placed on the component side. */
|
||||||
private final Package lib_package_front;
|
private final Package lib_package_front;
|
||||||
|
|
||||||
/** The library package of the component if it is placed on the solder side. */
|
/** The eu.mihosoft.freerouting.library package of the component if it is placed on the solder side. */
|
||||||
private final Package lib_package_back;
|
private final Package lib_package_back;
|
||||||
|
|
||||||
/** Internal generated unique identification number. */
|
/** Internal generated unique identification number. */
|
||||||
|
|
|
@ -18,14 +18,14 @@
|
||||||
* Created on 8. Mai 2005, 07:28
|
* Created on 8. Mai 2005, 07:28
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package board;
|
package eu.mihosoft.freerouting.board;
|
||||||
|
|
||||||
|
|
||||||
import geometry.planar.Area;
|
import eu.mihosoft.freerouting.geometry.planar.Area;
|
||||||
import geometry.planar.Vector;
|
import eu.mihosoft.freerouting.geometry.planar.Vector;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Describes areas of the board, where components arre not allowed.
|
* Describes areas of the eu.mihosoft.freerouting.board, where components arre not allowed.
|
||||||
*
|
*
|
||||||
* @author alfons
|
* @author alfons
|
||||||
*/
|
*/
|
||||||
|
@ -71,12 +71,12 @@ public class ComponentObstacleArea extends ObstacleArea
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public java.awt.Color[] get_draw_colors(boardgraphics.GraphicsContext p_graphics_context)
|
public java.awt.Color[] get_draw_colors(eu.mihosoft.freerouting.boardgraphics.GraphicsContext p_graphics_context)
|
||||||
{
|
{
|
||||||
return p_graphics_context.get_place_obstacle_colors();
|
return p_graphics_context.get_place_obstacle_colors();
|
||||||
}
|
}
|
||||||
|
|
||||||
public double get_draw_intensity(boardgraphics.GraphicsContext p_graphics_context)
|
public double get_draw_intensity(eu.mihosoft.freerouting.boardgraphics.GraphicsContext p_graphics_context)
|
||||||
{
|
{
|
||||||
return p_graphics_context.get_place_obstacle_color_intensity();
|
return p_graphics_context.get_place_obstacle_color_intensity();
|
||||||
}
|
}
|
||||||
|
@ -93,7 +93,7 @@ public class ComponentObstacleArea extends ObstacleArea
|
||||||
public void print_info(ObjectInfoPanel p_window, java.util.Locale p_locale)
|
public void print_info(ObjectInfoPanel p_window, java.util.Locale p_locale)
|
||||||
{
|
{
|
||||||
java.util.ResourceBundle resources =
|
java.util.ResourceBundle resources =
|
||||||
java.util.ResourceBundle.getBundle("board.resources.ObjectInfoPanel", p_locale);
|
java.util.ResourceBundle.getBundle("eu.mihosoft.freerouting.board.resources.ObjectInfoPanel", p_locale);
|
||||||
p_window.append_bold(resources.getString("component_keepout"));
|
p_window.append_bold(resources.getString("component_keepout"));
|
||||||
this.print_shape_info(p_window, p_locale);
|
this.print_shape_info(p_window, p_locale);
|
||||||
this.print_clearance_info(p_window, p_locale);
|
this.print_clearance_info(p_window, p_locale);
|
||||||
|
|
|
@ -18,17 +18,17 @@
|
||||||
* Created on 28. November 2005, 06:42
|
* Created on 28. November 2005, 06:42
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
package board;
|
package eu.mihosoft.freerouting.board;
|
||||||
|
|
||||||
import java.awt.Color;
|
import java.awt.Color;
|
||||||
|
|
||||||
import geometry.planar.Area;
|
import eu.mihosoft.freerouting.geometry.planar.Area;
|
||||||
import geometry.planar.Vector;
|
import eu.mihosoft.freerouting.geometry.planar.Vector;
|
||||||
import geometry.planar.Point;
|
import eu.mihosoft.freerouting.geometry.planar.Point;
|
||||||
import geometry.planar.IntPoint;
|
import eu.mihosoft.freerouting.geometry.planar.IntPoint;
|
||||||
import geometry.planar.FloatPoint;
|
import eu.mihosoft.freerouting.geometry.planar.FloatPoint;
|
||||||
|
|
||||||
import boardgraphics.GraphicsContext;
|
import eu.mihosoft.freerouting.boardgraphics.GraphicsContext;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
@ -103,9 +103,9 @@ public class ComponentOutline extends Item implements java.io.Serializable
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected geometry.planar.TileShape[] calculate_tree_shapes(ShapeSearchTree p_search_tree)
|
protected eu.mihosoft.freerouting.geometry.planar.TileShape[] calculate_tree_shapes(ShapeSearchTree p_search_tree)
|
||||||
{
|
{
|
||||||
return new geometry.planar.TileShape[0];
|
return new eu.mihosoft.freerouting.geometry.planar.TileShape[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
public double get_draw_intensity(GraphicsContext p_graphics_context)
|
public double get_draw_intensity(GraphicsContext p_graphics_context)
|
||||||
|
@ -130,7 +130,7 @@ public class ComponentOutline extends Item implements java.io.Serializable
|
||||||
|
|
||||||
public int get_draw_priority()
|
public int get_draw_priority()
|
||||||
{
|
{
|
||||||
return boardgraphics.Drawable.MIDDLE_DRAW_PRIORITY;
|
return eu.mihosoft.freerouting.boardgraphics.Drawable.MIDDLE_DRAW_PRIORITY;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void draw(java.awt.Graphics p_g, GraphicsContext p_graphics_context, Color[] p_color_arr, double p_intensity)
|
public void draw(java.awt.Graphics p_g, GraphicsContext p_graphics_context, Color[] p_color_arr, double p_intensity)
|
||||||
|
@ -146,7 +146,7 @@ public class ComponentOutline extends Item implements java.io.Serializable
|
||||||
p_graphics_context.draw_boundary(this.get_area(), draw_width, color, p_g, intensity);
|
p_graphics_context.draw_boundary(this.get_area(), draw_width, color, p_g, intensity);
|
||||||
}
|
}
|
||||||
|
|
||||||
public geometry.planar.IntBox bounding_box()
|
public eu.mihosoft.freerouting.geometry.planar.IntBox bounding_box()
|
||||||
{
|
{
|
||||||
return get_area().bounding_box();
|
return get_area().bounding_box();
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,21 +19,21 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package board;
|
package eu.mihosoft.freerouting.board;
|
||||||
|
|
||||||
|
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
import java.util.Vector;
|
import java.util.Vector;
|
||||||
|
|
||||||
import datastructures.UndoableObjects;
|
import eu.mihosoft.freerouting.datastructures.UndoableObjects;
|
||||||
|
|
||||||
import geometry.planar.Point;
|
import eu.mihosoft.freerouting.geometry.planar.Point;
|
||||||
import geometry.planar.IntPoint;
|
import eu.mihosoft.freerouting.geometry.planar.IntPoint;
|
||||||
|
|
||||||
import library.Package;
|
import eu.mihosoft.freerouting.library.Package;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Contains the lists of components on the board.
|
* Contains the lists of components on the eu.mihosoft.freerouting.board.
|
||||||
*
|
*
|
||||||
* @author Alfons Wirtz
|
* @author Alfons Wirtz
|
||||||
*/
|
*/
|
||||||
|
@ -41,7 +41,7 @@ public class Components implements java.io.Serializable
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Inserts a component into the list.
|
* Inserts a component into the list.
|
||||||
* The items of the component have to be inserted seperately into the board.
|
* The items of the component have to be inserted seperately into the eu.mihosoft.freerouting.board.
|
||||||
* If p_on_front is false, the component will be placed on the back side,
|
* If p_on_front is false, the component will be placed on the back side,
|
||||||
* and p_package_back is used instead of p_package_front.
|
* and p_package_back is used instead of p_package_front.
|
||||||
*/
|
*/
|
||||||
|
@ -59,7 +59,7 @@ public class Components implements java.io.Serializable
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Adds a component to this object.
|
* Adds a component to this object.
|
||||||
* The items of the component have to be inserted seperately into the board.
|
* The items of the component have to be inserted seperately into the eu.mihosoft.freerouting.board.
|
||||||
* If p_on_front is false, the component will be placed on the back side.
|
* If p_on_front is false, the component will be placed on the back side.
|
||||||
* The component name is generated internally.
|
* The component name is generated internally.
|
||||||
*/
|
*/
|
||||||
|
@ -103,7 +103,7 @@ public class Components implements java.io.Serializable
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the number of components on the board.
|
* Returns the number of components on the eu.mihosoft.freerouting.board.
|
||||||
*/
|
*/
|
||||||
public int count()
|
public int count()
|
||||||
{
|
{
|
||||||
|
@ -166,9 +166,9 @@ public class Components implements java.io.Serializable
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Moves the component with number p_component_no.
|
* Moves the component with number p_component_no.
|
||||||
* Works contrary to Component.translate_by with the undo algorithm of the board.
|
* Works contrary to Component.translate_by with the undo algorithm of the eu.mihosoft.freerouting.board.
|
||||||
*/
|
*/
|
||||||
public void move(int p_component_no, geometry.planar.Vector p_vector )
|
public void move(int p_component_no, eu.mihosoft.freerouting.geometry.planar.Vector p_vector )
|
||||||
{
|
{
|
||||||
Component curr_component = this.get(p_component_no);
|
Component curr_component = this.get(p_component_no);
|
||||||
this.undo_list.save_for_undo(curr_component);
|
this.undo_list.save_for_undo(curr_component);
|
||||||
|
@ -177,7 +177,7 @@ public class Components implements java.io.Serializable
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Turns the component with number p_component_no by p_factor times 90 degree around p_pole.
|
* Turns the component with number p_component_no by p_factor times 90 degree around p_pole.
|
||||||
* Works contrary to Component.turn_90_degree with the undo algorithm of the board.
|
* Works contrary to Component.turn_90_degree with the undo algorithm of the eu.mihosoft.freerouting.board.
|
||||||
*/
|
*/
|
||||||
public void turn_90_degree(int p_component_no, int p_factor, IntPoint p_pole)
|
public void turn_90_degree(int p_component_no, int p_factor, IntPoint p_pole)
|
||||||
{
|
{
|
||||||
|
@ -188,7 +188,7 @@ public class Components implements java.io.Serializable
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Rotates the component with number p_component_no by p_rotation_in_degree around p_pole.
|
* Rotates the component with number p_component_no by p_rotation_in_degree around p_pole.
|
||||||
* Works contrary to Component.rotate with the undo algorithm of the board.
|
* Works contrary to Component.rotate with the undo algorithm of the eu.mihosoft.freerouting.board.
|
||||||
*/
|
*/
|
||||||
public void rotate (int p_component_no, double p_rotation_in_degree, IntPoint p_pole)
|
public void rotate (int p_component_no, double p_rotation_in_degree, IntPoint p_pole)
|
||||||
{
|
{
|
||||||
|
@ -200,7 +200,7 @@ public class Components implements java.io.Serializable
|
||||||
/**
|
/**
|
||||||
* Changes the placement side of the component the component with numberp_component_no and
|
* Changes the placement side of the component the component with numberp_component_no and
|
||||||
* mirrors it at the vertical line through p_pole.
|
* mirrors it at the vertical line through p_pole.
|
||||||
* Works contrary to Component.change_side the undo algorithm of the board.
|
* Works contrary to Component.change_side the undo algorithm of the eu.mihosoft.freerouting.board.
|
||||||
*/
|
*/
|
||||||
public void change_side(int p_component_no, IntPoint p_pole)
|
public void change_side(int p_component_no, IntPoint p_pole)
|
||||||
{
|
{
|
||||||
|
|
|
@ -18,15 +18,15 @@
|
||||||
* Created on 29. Juni 2003, 11:49
|
* Created on 29. Juni 2003, 11:49
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package board;
|
package eu.mihosoft.freerouting.board;
|
||||||
|
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
|
|
||||||
import geometry.planar.Area;
|
import eu.mihosoft.freerouting.geometry.planar.Area;
|
||||||
import geometry.planar.Point;
|
import eu.mihosoft.freerouting.geometry.planar.Point;
|
||||||
import geometry.planar.Vector;
|
import eu.mihosoft.freerouting.geometry.planar.Vector;
|
||||||
import geometry.planar.FloatPoint;
|
import eu.mihosoft.freerouting.geometry.planar.FloatPoint;
|
||||||
import geometry.planar.TileShape;
|
import eu.mihosoft.freerouting.geometry.planar.TileShape;
|
||||||
|
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import java.util.TreeSet;
|
import java.util.TreeSet;
|
||||||
|
@ -170,12 +170,12 @@ public class ConductionArea extends ObstacleArea implements Connectable
|
||||||
return p_filter.is_selected(ItemSelectionFilter.SelectableChoices.CONDUCTION);
|
return p_filter.is_selected(ItemSelectionFilter.SelectableChoices.CONDUCTION);
|
||||||
}
|
}
|
||||||
|
|
||||||
public java.awt.Color[] get_draw_colors(boardgraphics.GraphicsContext p_graphics_context)
|
public java.awt.Color[] get_draw_colors(eu.mihosoft.freerouting.boardgraphics.GraphicsContext p_graphics_context)
|
||||||
{
|
{
|
||||||
return p_graphics_context.get_conduction_colors();
|
return p_graphics_context.get_conduction_colors();
|
||||||
}
|
}
|
||||||
|
|
||||||
public double get_draw_intensity(boardgraphics.GraphicsContext p_graphics_context)
|
public double get_draw_intensity(eu.mihosoft.freerouting.boardgraphics.GraphicsContext p_graphics_context)
|
||||||
{
|
{
|
||||||
return p_graphics_context.get_conduction_color_intensity();
|
return p_graphics_context.get_conduction_color_intensity();
|
||||||
}
|
}
|
||||||
|
@ -183,7 +183,7 @@ public class ConductionArea extends ObstacleArea implements Connectable
|
||||||
public void print_info(ObjectInfoPanel p_window, java.util.Locale p_locale)
|
public void print_info(ObjectInfoPanel p_window, java.util.Locale p_locale)
|
||||||
{
|
{
|
||||||
java.util.ResourceBundle resources =
|
java.util.ResourceBundle resources =
|
||||||
java.util.ResourceBundle.getBundle("board.resources.ObjectInfoPanel", p_locale);
|
java.util.ResourceBundle.getBundle("eu.mihosoft.freerouting.board.resources.ObjectInfoPanel", p_locale);
|
||||||
p_window.append_bold(resources.getString("conduction_area"));
|
p_window.append_bold(resources.getString("conduction_area"));
|
||||||
this.print_shape_info(p_window, p_locale);
|
this.print_shape_info(p_window, p_locale);
|
||||||
this.print_connectable_item_info(p_window, p_locale);
|
this.print_connectable_item_info(p_window, p_locale);
|
||||||
|
|
|
@ -14,9 +14,9 @@
|
||||||
* for more details.
|
* for more details.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package board;
|
package eu.mihosoft.freerouting.board;
|
||||||
|
|
||||||
import geometry.planar.TileShape;
|
import eu.mihosoft.freerouting.geometry.planar.TileShape;
|
||||||
|
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
|
|
|
@ -18,12 +18,12 @@
|
||||||
* Created on 17. Dezember 2004, 07:34
|
* Created on 17. Dezember 2004, 07:34
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package board;
|
package eu.mihosoft.freerouting.board;
|
||||||
|
|
||||||
import geometry.planar.FloatPoint;
|
import eu.mihosoft.freerouting.geometry.planar.FloatPoint;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class for transforming objects between user coordinate space and board coordinate space.
|
* Class for transforming objects between user coordinate space and eu.mihosoft.freerouting.board coordinate space.
|
||||||
*
|
*
|
||||||
* @author Alfons Wirtz
|
* @author Alfons Wirtz
|
||||||
*/
|
*/
|
||||||
|
@ -42,7 +42,7 @@ public class CoordinateTransform implements java.io.Serializable
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Scale a value from the board to the user coordinate system.
|
* Scale a value from the eu.mihosoft.freerouting.board to the user coordinate system.
|
||||||
*/
|
*/
|
||||||
public double board_to_user(double p_value)
|
public double board_to_user(double p_value)
|
||||||
{
|
{
|
||||||
|
@ -50,7 +50,7 @@ public class CoordinateTransform implements java.io.Serializable
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Scale a value from the user to the board coordinate system.
|
* Scale a value from the user to the eu.mihosoft.freerouting.board coordinate system.
|
||||||
*/
|
*/
|
||||||
public double user_to_board(double p_value)
|
public double user_to_board(double p_value)
|
||||||
{
|
{
|
||||||
|
@ -59,7 +59,7 @@ public class CoordinateTransform implements java.io.Serializable
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Transforms a geometry.planar.FloatPoint from the board coordinate space
|
* Transforms a eu.mihosoft.freerouting.geometry.planar.FloatPoint from the eu.mihosoft.freerouting.board coordinate space
|
||||||
* to the user coordinate space.
|
* to the user coordinate space.
|
||||||
*/
|
*/
|
||||||
public FloatPoint board_to_user(FloatPoint p_point)
|
public FloatPoint board_to_user(FloatPoint p_point)
|
||||||
|
@ -68,28 +68,28 @@ public class CoordinateTransform implements java.io.Serializable
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Transforms a geometry.planar.FloatPoint from the user coordinate space.
|
* Transforms a eu.mihosoft.freerouting.geometry.planar.FloatPoint from the user coordinate space.
|
||||||
* to the board coordinate space.
|
* to the eu.mihosoft.freerouting.board coordinate space.
|
||||||
*/
|
*/
|
||||||
public FloatPoint user_to_board(FloatPoint p_point)
|
public FloatPoint user_to_board(FloatPoint p_point)
|
||||||
{
|
{
|
||||||
return new FloatPoint(user_to_board(p_point.x), user_to_board(p_point.y));
|
return new FloatPoint(user_to_board(p_point.x), user_to_board(p_point.y));
|
||||||
}
|
}
|
||||||
|
|
||||||
public PrintableShape board_to_user(geometry.planar.Shape p_shape, java.util.Locale p_locale)
|
public PrintableShape board_to_user(eu.mihosoft.freerouting.geometry.planar.Shape p_shape, java.util.Locale p_locale)
|
||||||
{
|
{
|
||||||
PrintableShape result;
|
PrintableShape result;
|
||||||
if (p_shape instanceof geometry.planar.Circle)
|
if (p_shape instanceof eu.mihosoft.freerouting.geometry.planar.Circle)
|
||||||
{
|
{
|
||||||
result = board_to_user((geometry.planar.Circle) p_shape, p_locale);
|
result = board_to_user((eu.mihosoft.freerouting.geometry.planar.Circle) p_shape, p_locale);
|
||||||
}
|
}
|
||||||
else if (p_shape instanceof geometry.planar.IntBox)
|
else if (p_shape instanceof eu.mihosoft.freerouting.geometry.planar.IntBox)
|
||||||
{
|
{
|
||||||
result = board_to_user((geometry.planar.IntBox) p_shape, p_locale);
|
result = board_to_user((eu.mihosoft.freerouting.geometry.planar.IntBox) p_shape, p_locale);
|
||||||
}
|
}
|
||||||
else if (p_shape instanceof geometry.planar.PolylineShape)
|
else if (p_shape instanceof eu.mihosoft.freerouting.geometry.planar.PolylineShape)
|
||||||
{
|
{
|
||||||
result = board_to_user((geometry.planar.PolylineShape) p_shape, p_locale);
|
result = board_to_user((eu.mihosoft.freerouting.geometry.planar.PolylineShape) p_shape, p_locale);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -99,19 +99,19 @@ public class CoordinateTransform implements java.io.Serializable
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
public PrintableShape.Circle board_to_user(geometry.planar.Circle p_circle, java.util.Locale p_locale)
|
public PrintableShape.Circle board_to_user(eu.mihosoft.freerouting.geometry.planar.Circle p_circle, java.util.Locale p_locale)
|
||||||
{
|
{
|
||||||
return new PrintableShape.Circle(board_to_user(p_circle.center.to_float()),
|
return new PrintableShape.Circle(board_to_user(p_circle.center.to_float()),
|
||||||
board_to_user(p_circle.radius), p_locale);
|
board_to_user(p_circle.radius), p_locale);
|
||||||
}
|
}
|
||||||
|
|
||||||
public PrintableShape.Rectangle board_to_user(geometry.planar.IntBox p_box, java.util.Locale p_locale)
|
public PrintableShape.Rectangle board_to_user(eu.mihosoft.freerouting.geometry.planar.IntBox p_box, java.util.Locale p_locale)
|
||||||
{
|
{
|
||||||
return new PrintableShape.Rectangle(board_to_user(p_box.ll.to_float()),
|
return new PrintableShape.Rectangle(board_to_user(p_box.ll.to_float()),
|
||||||
board_to_user(p_box.ur.to_float()), p_locale);
|
board_to_user(p_box.ur.to_float()), p_locale);
|
||||||
}
|
}
|
||||||
|
|
||||||
public PrintableShape.Polygon board_to_user(geometry.planar.PolylineShape p_shape, java.util.Locale p_locale)
|
public PrintableShape.Polygon board_to_user(eu.mihosoft.freerouting.geometry.planar.PolylineShape p_shape, java.util.Locale p_locale)
|
||||||
{
|
{
|
||||||
FloatPoint[] corners = p_shape.corner_approx_arr();
|
FloatPoint[] corners = p_shape.corner_approx_arr();
|
||||||
FloatPoint[] transformed_corners = new FloatPoint[corners.length];
|
FloatPoint[] transformed_corners = new FloatPoint[corners.length];
|
||||||
|
@ -129,13 +129,13 @@ public class CoordinateTransform implements java.io.Serializable
|
||||||
/** The factor of the user unit */
|
/** The factor of the user unit */
|
||||||
public final double user_unit_factor;
|
public final double user_unit_factor;
|
||||||
|
|
||||||
/** The unit used for board coordinates */
|
/** The unit used for eu.mihosoft.freerouting.board coordinates */
|
||||||
public final Unit board_unit;
|
public final Unit board_unit;
|
||||||
|
|
||||||
/** The factor of the board unit */
|
/** The factor of the eu.mihosoft.freerouting.board unit */
|
||||||
public final double board_unit_factor;
|
public final double board_unit_factor;
|
||||||
|
|
||||||
/** The factor used for transforming coordinates between user coordinate space and board coordinate space */
|
/** The factor used for transforming coordinates between user coordinate space and eu.mihosoft.freerouting.board coordinate space */
|
||||||
private final double scale_factor;
|
private final double scale_factor;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,23 +18,23 @@
|
||||||
* Created on 27. Juni 2003, 11:38
|
* Created on 27. Juni 2003, 11:38
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package board;
|
package eu.mihosoft.freerouting.board;
|
||||||
|
|
||||||
|
|
||||||
import geometry.planar.IntBox;
|
import eu.mihosoft.freerouting.geometry.planar.IntBox;
|
||||||
import geometry.planar.FloatPoint;
|
import eu.mihosoft.freerouting.geometry.planar.FloatPoint;
|
||||||
import geometry.planar.Point;
|
import eu.mihosoft.freerouting.geometry.planar.Point;
|
||||||
import geometry.planar.IntPoint;
|
import eu.mihosoft.freerouting.geometry.planar.IntPoint;
|
||||||
import geometry.planar.Shape;
|
import eu.mihosoft.freerouting.geometry.planar.Shape;
|
||||||
import geometry.planar.TileShape;
|
import eu.mihosoft.freerouting.geometry.planar.TileShape;
|
||||||
import geometry.planar.Vector;
|
import eu.mihosoft.freerouting.geometry.planar.Vector;
|
||||||
|
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import java.util.TreeSet;
|
import java.util.TreeSet;
|
||||||
|
|
||||||
import library.Padstack;
|
import eu.mihosoft.freerouting.library.Padstack;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Common superclass for Pins and Vias
|
* Common superclass for Pins and Vias
|
||||||
|
@ -387,7 +387,7 @@ public abstract class DrillItem extends Item implements Connectable, java.io.Ser
|
||||||
return TileShape.get_instance(this.get_center());
|
return TileShape.get_instance(this.get_center());
|
||||||
}
|
}
|
||||||
|
|
||||||
/** False, if this drillitem is places on the back side of the board */
|
/** False, if this drillitem is places on the back side of the eu.mihosoft.freerouting.board */
|
||||||
public boolean is_placed_on_front()
|
public boolean is_placed_on_front()
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
|
@ -431,10 +431,10 @@ public abstract class DrillItem extends Item implements Connectable, java.io.Ser
|
||||||
|
|
||||||
public int get_draw_priority()
|
public int get_draw_priority()
|
||||||
{
|
{
|
||||||
return boardgraphics.Drawable.MIDDLE_DRAW_PRIORITY;
|
return eu.mihosoft.freerouting.boardgraphics.Drawable.MIDDLE_DRAW_PRIORITY;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void draw(java.awt.Graphics p_g, boardgraphics.GraphicsContext p_graphics_context,
|
public void draw(java.awt.Graphics p_g, eu.mihosoft.freerouting.boardgraphics.GraphicsContext p_graphics_context,
|
||||||
java.awt.Color[] p_color_arr, double p_intensity)
|
java.awt.Color[] p_color_arr, double p_intensity)
|
||||||
{
|
{
|
||||||
if (p_graphics_context == null|| p_intensity <= 0)
|
if (p_graphics_context == null|| p_intensity <= 0)
|
||||||
|
|
|
@ -18,10 +18,10 @@
|
||||||
* Created on 15. Maerz 2005, 06:34
|
* Created on 15. Maerz 2005, 06:34
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package board;
|
package eu.mihosoft.freerouting.board;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sorted fixed states of board items. The strongest fixed states came last.
|
* Sorted fixed states of eu.mihosoft.freerouting.board items. The strongest fixed states came last.
|
||||||
*
|
*
|
||||||
* @author alfons
|
* @author alfons
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -18,20 +18,20 @@
|
||||||
* Created on 1. September 2003, 08:28
|
* Created on 1. September 2003, 08:28
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package board;
|
package eu.mihosoft.freerouting.board;
|
||||||
|
|
||||||
import datastructures.TimeLimit;
|
import eu.mihosoft.freerouting.datastructures.TimeLimit;
|
||||||
|
|
||||||
import geometry.planar.Direction;
|
import eu.mihosoft.freerouting.geometry.planar.Direction;
|
||||||
import geometry.planar.FloatPoint;
|
import eu.mihosoft.freerouting.geometry.planar.FloatPoint;
|
||||||
import geometry.planar.IntPoint;
|
import eu.mihosoft.freerouting.geometry.planar.IntPoint;
|
||||||
import geometry.planar.IntBox;
|
import eu.mihosoft.freerouting.geometry.planar.IntBox;
|
||||||
import geometry.planar.IntOctagon;
|
import eu.mihosoft.freerouting.geometry.planar.IntOctagon;
|
||||||
import geometry.planar.Point;
|
import eu.mihosoft.freerouting.geometry.planar.Point;
|
||||||
import geometry.planar.Vector;
|
import eu.mihosoft.freerouting.geometry.planar.Vector;
|
||||||
import geometry.planar.Line;
|
import eu.mihosoft.freerouting.geometry.planar.Line;
|
||||||
import geometry.planar.Polyline;
|
import eu.mihosoft.freerouting.geometry.planar.Polyline;
|
||||||
import geometry.planar.TileShape;
|
import eu.mihosoft.freerouting.geometry.planar.TileShape;
|
||||||
|
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
|
|
||||||
|
|
|
@ -18,21 +18,21 @@
|
||||||
* Created on 25. April 2004, 09:55
|
* Created on 25. April 2004, 09:55
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package board;
|
package eu.mihosoft.freerouting.board;
|
||||||
|
|
||||||
import geometry.planar.ConvexShape;
|
import eu.mihosoft.freerouting.geometry.planar.ConvexShape;
|
||||||
import geometry.planar.IntPoint;
|
import eu.mihosoft.freerouting.geometry.planar.IntPoint;
|
||||||
import geometry.planar.Point;
|
import eu.mihosoft.freerouting.geometry.planar.Point;
|
||||||
import geometry.planar.FloatPoint;
|
import eu.mihosoft.freerouting.geometry.planar.FloatPoint;
|
||||||
import geometry.planar.Shape;
|
import eu.mihosoft.freerouting.geometry.planar.Shape;
|
||||||
import geometry.planar.TileShape;
|
import eu.mihosoft.freerouting.geometry.planar.TileShape;
|
||||||
import geometry.planar.Simplex;
|
import eu.mihosoft.freerouting.geometry.planar.Simplex;
|
||||||
import geometry.planar.IntBox;
|
import eu.mihosoft.freerouting.geometry.planar.IntBox;
|
||||||
import geometry.planar.Circle;
|
import eu.mihosoft.freerouting.geometry.planar.Circle;
|
||||||
import geometry.planar.Vector;
|
import eu.mihosoft.freerouting.geometry.planar.Vector;
|
||||||
import geometry.planar.Limits;
|
import eu.mihosoft.freerouting.geometry.planar.Limits;
|
||||||
import rules.ViaInfo;
|
import eu.mihosoft.freerouting.rules.ViaInfo;
|
||||||
import library.Padstack;
|
import eu.mihosoft.freerouting.library.Padstack;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -13,17 +13,17 @@
|
||||||
* GNU General Public License at <http://www.gnu.org/licenses/>
|
* GNU General Public License at <http://www.gnu.org/licenses/>
|
||||||
* for more details.
|
* for more details.
|
||||||
*/
|
*/
|
||||||
package board;
|
package eu.mihosoft.freerouting.board;
|
||||||
|
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.LinkedList;
|
import java.util.LinkedList;
|
||||||
|
|
||||||
import geometry.planar.Point;
|
import eu.mihosoft.freerouting.geometry.planar.Point;
|
||||||
import geometry.planar.IntPoint;
|
import eu.mihosoft.freerouting.geometry.planar.IntPoint;
|
||||||
import geometry.planar.FloatPoint;
|
import eu.mihosoft.freerouting.geometry.planar.FloatPoint;
|
||||||
import geometry.planar.TileShape;
|
import eu.mihosoft.freerouting.geometry.planar.TileShape;
|
||||||
import geometry.planar.Vector;
|
import eu.mihosoft.freerouting.geometry.planar.Vector;
|
||||||
import geometry.planar.IntBox;
|
import eu.mihosoft.freerouting.geometry.planar.IntBox;
|
||||||
|
|
||||||
import java.awt.Color;
|
import java.awt.Color;
|
||||||
import java.awt.Graphics;
|
import java.awt.Graphics;
|
||||||
|
@ -32,16 +32,16 @@ import java.util.Iterator;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import java.util.TreeSet;
|
import java.util.TreeSet;
|
||||||
|
|
||||||
import rules.Nets;
|
import eu.mihosoft.freerouting.rules.Nets;
|
||||||
import boardgraphics.Drawable;
|
import eu.mihosoft.freerouting.boardgraphics.Drawable;
|
||||||
import boardgraphics.GraphicsContext;
|
import eu.mihosoft.freerouting.boardgraphics.GraphicsContext;
|
||||||
|
|
||||||
import datastructures.UndoableObjects;
|
import eu.mihosoft.freerouting.datastructures.UndoableObjects;
|
||||||
import datastructures.ShapeTree;
|
import eu.mihosoft.freerouting.datastructures.ShapeTree;
|
||||||
import datastructures.ShapeTree.TreeEntry;
|
import eu.mihosoft.freerouting.datastructures.ShapeTree.TreeEntry;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Basic class of the items on a board.
|
* Basic class of the items on a eu.mihosoft.freerouting.board.
|
||||||
*
|
*
|
||||||
* @author Alfons Wirtz
|
* @author Alfons Wirtz
|
||||||
*/
|
*/
|
||||||
|
@ -147,7 +147,7 @@ public abstract class Item implements Drawable, SearchTreeObject, ObjectInfoPane
|
||||||
{
|
{
|
||||||
if (this.board == null)
|
if (this.board == null)
|
||||||
{
|
{
|
||||||
System.out.println("Item.get_tile_shape: board is null");
|
System.out.println("Item.get_tile_shape: eu.mihosoft.freerouting.board is null");
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
return get_tree_shape(this.board.search_tree_manager.get_default_tree(), p_index);
|
return get_tree_shape(this.board.search_tree_manager.get_default_tree(), p_index);
|
||||||
|
@ -195,7 +195,7 @@ public abstract class Item implements Drawable, SearchTreeObject, ObjectInfoPane
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns false, if this item is deleted oor not inserted into
|
* Returns false, if this item is deleted oor not inserted into
|
||||||
* the board.
|
* the eu.mihosoft.freerouting.board.
|
||||||
*/
|
*/
|
||||||
public boolean is_on_the_board()
|
public boolean is_on_the_board()
|
||||||
{
|
{
|
||||||
|
@ -240,25 +240,25 @@ public abstract class Item implements Drawable, SearchTreeObject, ObjectInfoPane
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Translates the shapes of this item by p_vector.
|
* Translates the shapes of this item by p_vector.
|
||||||
* Does not move the item in the board.
|
* Does not move the item in the eu.mihosoft.freerouting.board.
|
||||||
*/
|
*/
|
||||||
public abstract void translate_by(Vector p_vector);
|
public abstract void translate_by(Vector p_vector);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Turns this Item by p_factor times 90 degree around p_pole.
|
* Turns this Item by p_factor times 90 degree around p_pole.
|
||||||
* Does not update the item in the board.
|
* Does not update the item in the eu.mihosoft.freerouting.board.
|
||||||
*/
|
*/
|
||||||
public abstract void turn_90_degree(int p_factor, IntPoint p_pole);
|
public abstract void turn_90_degree(int p_factor, IntPoint p_pole);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Rotates this Item by p_angle_in_degree around p_pole.
|
* Rotates this Item by p_angle_in_degree around p_pole.
|
||||||
* Does not update the item in the board.
|
* Does not update the item in the eu.mihosoft.freerouting.board.
|
||||||
*/
|
*/
|
||||||
public abstract void rotate_approx(double p_angle_in_degree, FloatPoint p_pole);
|
public abstract void rotate_approx(double p_angle_in_degree, FloatPoint p_pole);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Changes the placement side of this Item and mirrors it at the vertical line through p_pole.
|
* Changes the placement side of this Item and mirrors it at the vertical line through p_pole.
|
||||||
* Does not update the item in the board.
|
* Does not update the item in the eu.mihosoft.freerouting.board.
|
||||||
*/
|
*/
|
||||||
public abstract void change_placement_side(IntPoint p_pole);
|
public abstract void change_placement_side(IntPoint p_pole);
|
||||||
|
|
||||||
|
@ -268,7 +268,7 @@ public abstract class Item implements Drawable, SearchTreeObject, ObjectInfoPane
|
||||||
public abstract IntBox bounding_box();
|
public abstract IntBox bounding_box();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Translates this item by p_vector in the board.
|
* Translates this item by p_vector in the eu.mihosoft.freerouting.board.
|
||||||
*/
|
*/
|
||||||
public void move_by(Vector p_vector)
|
public void move_by(Vector p_vector)
|
||||||
{
|
{
|
||||||
|
@ -1209,28 +1209,28 @@ public abstract class Item implements Drawable, SearchTreeObject, ObjectInfoPane
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the information for the autoroute algorithm.
|
* Gets the information for the eu.mihosoft.freerouting.autoroute algorithm.
|
||||||
* Creates it, if it does not yet exist.
|
* Creates it, if it does not yet exist.
|
||||||
*/
|
*/
|
||||||
public autoroute.ItemAutorouteInfo get_autoroute_info()
|
public eu.mihosoft.freerouting.autoroute.ItemAutorouteInfo get_autoroute_info()
|
||||||
{
|
{
|
||||||
if (autoroute_info == null)
|
if (autoroute_info == null)
|
||||||
{
|
{
|
||||||
autoroute_info = new autoroute.ItemAutorouteInfo(this);
|
autoroute_info = new eu.mihosoft.freerouting.autoroute.ItemAutorouteInfo(this);
|
||||||
}
|
}
|
||||||
return autoroute_info;
|
return autoroute_info;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the information for the autoroute algorithm.
|
* Gets the information for the eu.mihosoft.freerouting.autoroute algorithm.
|
||||||
*/
|
*/
|
||||||
public autoroute.ItemAutorouteInfo get_autoroute_info_pur()
|
public eu.mihosoft.freerouting.autoroute.ItemAutorouteInfo get_autoroute_info_pur()
|
||||||
{
|
{
|
||||||
return autoroute_info;
|
return autoroute_info;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Clears the data allocated for the autoroute algorithm.
|
* Clears the data allocated for the eu.mihosoft.freerouting.autoroute algorithm.
|
||||||
*/
|
*/
|
||||||
public void clear_autoroute_info()
|
public void clear_autoroute_info()
|
||||||
{
|
{
|
||||||
|
@ -1256,11 +1256,11 @@ public abstract class Item implements Drawable, SearchTreeObject, ObjectInfoPane
|
||||||
protected void print_net_info(ObjectInfoPanel p_window, java.util.Locale p_locale)
|
protected void print_net_info(ObjectInfoPanel p_window, java.util.Locale p_locale)
|
||||||
{
|
{
|
||||||
java.util.ResourceBundle resources =
|
java.util.ResourceBundle resources =
|
||||||
java.util.ResourceBundle.getBundle("board.resources.ObjectInfoPanel", p_locale);
|
java.util.ResourceBundle.getBundle("eu.mihosoft.freerouting.board.resources.ObjectInfoPanel", p_locale);
|
||||||
for (int i = 0; i < this.net_count(); ++i)
|
for (int i = 0; i < this.net_count(); ++i)
|
||||||
{
|
{
|
||||||
p_window.append(", " + resources.getString("net") + " ");
|
p_window.append(", " + resources.getString("net") + " ");
|
||||||
rules.Net curr_net = board.rules.nets.get(this.get_net_no(i));
|
eu.mihosoft.freerouting.rules.Net curr_net = board.rules.nets.get(this.get_net_no(i));
|
||||||
p_window.append(curr_net.name, resources.getString("net_info"), curr_net);
|
p_window.append(curr_net.name, resources.getString("net_info"), curr_net);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1273,7 +1273,7 @@ public abstract class Item implements Drawable, SearchTreeObject, ObjectInfoPane
|
||||||
if (this.clearance_class > 0)
|
if (this.clearance_class > 0)
|
||||||
{
|
{
|
||||||
java.util.ResourceBundle resources =
|
java.util.ResourceBundle resources =
|
||||||
java.util.ResourceBundle.getBundle("board.resources.ObjectInfoPanel", p_locale);
|
java.util.ResourceBundle.getBundle("eu.mihosoft.freerouting.board.resources.ObjectInfoPanel", p_locale);
|
||||||
p_window.append(", " + resources.getString("clearance_class") + " ");
|
p_window.append(", " + resources.getString("clearance_class") + " ");
|
||||||
String name = board.rules.clearance_matrix.get_name(this.clearance_class);
|
String name = board.rules.clearance_matrix.get_name(this.clearance_class);
|
||||||
p_window.append(name, resources.getString("clearance_info"), board.rules.clearance_matrix.get_row(this.clearance_class));
|
p_window.append(name, resources.getString("clearance_info"), board.rules.clearance_matrix.get_row(this.clearance_class));
|
||||||
|
@ -1288,7 +1288,7 @@ public abstract class Item implements Drawable, SearchTreeObject, ObjectInfoPane
|
||||||
if (this.fixed_state != FixedState.UNFIXED)
|
if (this.fixed_state != FixedState.UNFIXED)
|
||||||
{
|
{
|
||||||
java.util.ResourceBundle resources =
|
java.util.ResourceBundle resources =
|
||||||
java.util.ResourceBundle.getBundle("board.resources.FixedState", p_locale);
|
java.util.ResourceBundle.getBundle("eu.mihosoft.freerouting.board.resources.FixedState", p_locale);
|
||||||
p_window.append(", ");
|
p_window.append(", ");
|
||||||
p_window.append(resources.getString(this.fixed_state.toString()));
|
p_window.append(resources.getString(this.fixed_state.toString()));
|
||||||
}
|
}
|
||||||
|
@ -1303,7 +1303,7 @@ public abstract class Item implements Drawable, SearchTreeObject, ObjectInfoPane
|
||||||
if (!contacts.isEmpty())
|
if (!contacts.isEmpty())
|
||||||
{
|
{
|
||||||
java.util.ResourceBundle resources =
|
java.util.ResourceBundle resources =
|
||||||
java.util.ResourceBundle.getBundle("board.resources.ObjectInfoPanel", p_locale);
|
java.util.ResourceBundle.getBundle("eu.mihosoft.freerouting.board.resources.ObjectInfoPanel", p_locale);
|
||||||
p_window.append(", " + resources.getString("contacts") + " ");
|
p_window.append(", " + resources.getString("contacts") + " ");
|
||||||
Integer contact_count = contacts.size();
|
Integer contact_count = contacts.size();
|
||||||
p_window.append_items(contact_count.toString(), resources.getString("contact_info"), contacts);
|
p_window.append_items(contact_count.toString(), resources.getString("contact_info"), contacts);
|
||||||
|
@ -1319,7 +1319,7 @@ public abstract class Item implements Drawable, SearchTreeObject, ObjectInfoPane
|
||||||
if (!clearance_violations.isEmpty())
|
if (!clearance_violations.isEmpty())
|
||||||
{
|
{
|
||||||
java.util.ResourceBundle resources =
|
java.util.ResourceBundle resources =
|
||||||
java.util.ResourceBundle.getBundle("board.resources.ObjectInfoPanel", p_locale);
|
java.util.ResourceBundle.getBundle("eu.mihosoft.freerouting.board.resources.ObjectInfoPanel", p_locale);
|
||||||
p_window.append(", ");
|
p_window.append(", ");
|
||||||
Integer violation_count = clearance_violations.size();
|
Integer violation_count = clearance_violations.size();
|
||||||
Collection<ObjectInfoPanel.Printable> violations = new java.util.LinkedList<ObjectInfoPanel.Printable>();
|
Collection<ObjectInfoPanel.Printable> violations = new java.util.LinkedList<ObjectInfoPanel.Printable>();
|
||||||
|
@ -1450,7 +1450,7 @@ public abstract class Item implements Drawable, SearchTreeObject, ObjectInfoPane
|
||||||
* to other items
|
* to other items
|
||||||
*/
|
*/
|
||||||
private int clearance_class;
|
private int clearance_class;
|
||||||
/** The board this Itewm is on */
|
/** The eu.mihosoft.freerouting.board this Itewm is on */
|
||||||
transient public BasicBoard board;
|
transient public BasicBoard board;
|
||||||
/** The nets, to which this item belongs */
|
/** The nets, to which this item belongs */
|
||||||
int[] net_no_arr;
|
int[] net_no_arr;
|
||||||
|
@ -1461,11 +1461,11 @@ public abstract class Item implements Drawable, SearchTreeObject, ObjectInfoPane
|
||||||
private int component_no = 0;
|
private int component_no = 0;
|
||||||
private final int id_no;
|
private final int id_no;
|
||||||
/**
|
/**
|
||||||
* Folse, if the item is deleted or not inserted into the board
|
* Folse, if the item is deleted or not inserted into the eu.mihosoft.freerouting.board
|
||||||
*/
|
*/
|
||||||
private boolean on_the_board = false;
|
private boolean on_the_board = false;
|
||||||
/** Temporary data used in the autoroute algorithm. */
|
/** Temporary data used in the eu.mihosoft.freerouting.autoroute algorithm. */
|
||||||
transient private autoroute.ItemAutorouteInfo autoroute_info = null;
|
transient private eu.mihosoft.freerouting.autoroute.ItemAutorouteInfo autoroute_info = null;
|
||||||
private static double PROTECT_FANOUT_LENGTH = 400;
|
private static double PROTECT_FANOUT_LENGTH = 400;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -18,14 +18,14 @@
|
||||||
* Created on 2. Juni 2003, 13:43
|
* Created on 2. Juni 2003, 13:43
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package board;
|
package eu.mihosoft.freerouting.board;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates unique Item identication nunbers.
|
* Creates unique Item identication nunbers.
|
||||||
*
|
*
|
||||||
* @author Alfons Wirtz
|
* @author Alfons Wirtz
|
||||||
*/
|
*/
|
||||||
public class ItemIdNoGenerator implements datastructures.IdNoGenerator, java.io.Serializable
|
public class ItemIdNoGenerator implements eu.mihosoft.freerouting.datastructures.IdNoGenerator, java.io.Serializable
|
||||||
{
|
{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -19,17 +19,17 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package board;
|
package eu.mihosoft.freerouting.board;
|
||||||
|
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.LinkedList;
|
import java.util.LinkedList;
|
||||||
|
|
||||||
import datastructures.ShapeTree;
|
import eu.mihosoft.freerouting.datastructures.ShapeTree;
|
||||||
|
|
||||||
import geometry.planar.TileShape;
|
import eu.mihosoft.freerouting.geometry.planar.TileShape;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Stores information about the search trees of the board items,
|
* Stores information about the search trees of the eu.mihosoft.freerouting.board items,
|
||||||
* which is precalculated for performance reasons.
|
* which is precalculated for performance reasons.
|
||||||
*
|
*
|
||||||
* @author Alfons Wirtz
|
* @author Alfons Wirtz
|
||||||
|
|
|
@ -18,13 +18,13 @@
|
||||||
* Created on 14. Dezember 2004, 10:57
|
* Created on 14. Dezember 2004, 10:57
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package board;
|
package eu.mihosoft.freerouting.board;
|
||||||
|
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import java.util.TreeSet;
|
import java.util.TreeSet;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Filter for selecting items on the board.
|
* Filter for selecting items on the eu.mihosoft.freerouting.board.
|
||||||
*
|
*
|
||||||
* @author Alfons Wirtz
|
* @author Alfons Wirtz
|
||||||
*/
|
*/
|
||||||
|
@ -118,10 +118,10 @@ public class ItemSelectionFilter implements java.io.Serializable
|
||||||
/**
|
/**
|
||||||
* Filters a collection of items with this filter.
|
* Filters a collection of items with this filter.
|
||||||
*/
|
*/
|
||||||
public Set<Item> filter(java.util.Set<board.Item> p_items)
|
public Set<Item> filter(java.util.Set<eu.mihosoft.freerouting.board.Item> p_items)
|
||||||
{
|
{
|
||||||
Set<Item> result = new TreeSet<Item>();
|
Set<Item> result = new TreeSet<Item>();
|
||||||
for (board.Item curr_item : p_items)
|
for (eu.mihosoft.freerouting.board.Item curr_item : p_items)
|
||||||
{
|
{
|
||||||
if (curr_item.is_selected_by_filter(this))
|
if (curr_item.is_selected_by_filter(this))
|
||||||
{
|
{
|
||||||
|
|
|
@ -18,10 +18,10 @@
|
||||||
* Created on 26. Mai 2004, 06:31
|
* Created on 26. Mai 2004, 06:31
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package board;
|
package eu.mihosoft.freerouting.board;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Describes the structure of a board layer.
|
* Describes the structure of a eu.mihosoft.freerouting.board layer.
|
||||||
*
|
*
|
||||||
* @author alfons
|
* @author alfons
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -18,10 +18,10 @@
|
||||||
* Created on 26. Mai 2004, 06:37
|
* Created on 26. Mai 2004, 06:37
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package board;
|
package eu.mihosoft.freerouting.board;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Describes the layer structure of the board.
|
* Describes the layer structure of the eu.mihosoft.freerouting.board.
|
||||||
*
|
*
|
||||||
* @author alfons
|
* @author alfons
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -17,23 +17,23 @@
|
||||||
*
|
*
|
||||||
* Created on 25. Oktober 2003, 09:03
|
* Created on 25. Oktober 2003, 09:03
|
||||||
*/
|
*/
|
||||||
package board;
|
package eu.mihosoft.freerouting.board;
|
||||||
|
|
||||||
import datastructures.TimeLimit;
|
import eu.mihosoft.freerouting.datastructures.TimeLimit;
|
||||||
|
|
||||||
import geometry.planar.FloatPoint;
|
import eu.mihosoft.freerouting.geometry.planar.FloatPoint;
|
||||||
import geometry.planar.IntPoint;
|
import eu.mihosoft.freerouting.geometry.planar.IntPoint;
|
||||||
import geometry.planar.Point;
|
import eu.mihosoft.freerouting.geometry.planar.Point;
|
||||||
import geometry.planar.Vector;
|
import eu.mihosoft.freerouting.geometry.planar.Vector;
|
||||||
|
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
import java.util.LinkedList;
|
import java.util.LinkedList;
|
||||||
|
|
||||||
import datastructures.Signum;
|
import eu.mihosoft.freerouting.datastructures.Signum;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class for moving a group of items on the board
|
* Class for moving a group of items on the eu.mihosoft.freerouting.board
|
||||||
* @author Alfons Wirtz
|
* @author Alfons Wirtz
|
||||||
*/
|
*/
|
||||||
public class MoveComponent
|
public class MoveComponent
|
||||||
|
|
|
@ -19,20 +19,20 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package board;
|
package eu.mihosoft.freerouting.board;
|
||||||
|
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
|
|
||||||
import datastructures.TimeLimit;
|
import eu.mihosoft.freerouting.datastructures.TimeLimit;
|
||||||
|
|
||||||
import geometry.planar.TileShape;
|
import eu.mihosoft.freerouting.geometry.planar.TileShape;
|
||||||
import geometry.planar.ConvexShape;
|
import eu.mihosoft.freerouting.geometry.planar.ConvexShape;
|
||||||
import geometry.planar.IntOctagon;
|
import eu.mihosoft.freerouting.geometry.planar.IntOctagon;
|
||||||
import geometry.planar.IntBox;
|
import eu.mihosoft.freerouting.geometry.planar.IntBox;
|
||||||
import geometry.planar.IntPoint;
|
import eu.mihosoft.freerouting.geometry.planar.IntPoint;
|
||||||
import geometry.planar.Point;
|
import eu.mihosoft.freerouting.geometry.planar.Point;
|
||||||
import geometry.planar.Vector;
|
import eu.mihosoft.freerouting.geometry.planar.Vector;
|
||||||
import geometry.planar.FloatPoint;
|
import eu.mihosoft.freerouting.geometry.planar.FloatPoint;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -18,10 +18,10 @@
|
||||||
* Created on 6. Januar 2005, 13:15
|
* Created on 6. Januar 2005, 13:15
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package board;
|
package eu.mihosoft.freerouting.board;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Output window for printing information about board objects.
|
* Output window for printing information about eu.mihosoft.freerouting.board objects.
|
||||||
*
|
*
|
||||||
* @author Alfons Wirtz
|
* @author Alfons Wirtz
|
||||||
*/
|
*/
|
||||||
|
@ -58,14 +58,14 @@ public interface ObjectInfoPanel
|
||||||
* after transforming to the user coordinate sytem.
|
* after transforming to the user coordinate sytem.
|
||||||
* Returns false, if that was not possible.
|
* Returns false, if that was not possible.
|
||||||
*/
|
*/
|
||||||
boolean append(geometry.planar.FloatPoint p_point);
|
boolean append(eu.mihosoft.freerouting.geometry.planar.FloatPoint p_point);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Appends p_shape to the window
|
* Appends p_shape to the window
|
||||||
* after transforming to the user coordinate sytem.
|
* after transforming to the user coordinate sytem.
|
||||||
* Returns false, if that was not possible.
|
* Returns false, if that was not possible.
|
||||||
*/
|
*/
|
||||||
boolean append(geometry.planar.Shape p_shape, java.util.Locale p_locale);
|
boolean append(eu.mihosoft.freerouting.geometry.planar.Shape p_shape, java.util.Locale p_locale);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Begins a new line in the window.
|
* Begins a new line in the window.
|
||||||
|
@ -88,7 +88,7 @@ public interface ObjectInfoPanel
|
||||||
* Appends a link for creating a new PrintInfoWindow with the information
|
* Appends a link for creating a new PrintInfoWindow with the information
|
||||||
* of p_items to the window. Returns false, if that was not possible.
|
* of p_items to the window. Returns false, if that was not possible.
|
||||||
*/
|
*/
|
||||||
boolean append_items( String p_link_name, String p_window_title, java.util.Collection<board.Item> p_items);
|
boolean append_items( String p_link_name, String p_window_title, java.util.Collection<eu.mihosoft.freerouting.board.Item> p_items);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Appends a link for creating a new PrintInfoWindow with the information
|
* Appends a link for creating a new PrintInfoWindow with the information
|
||||||
|
|
|
@ -14,23 +14,23 @@
|
||||||
* for more details.
|
* for more details.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package board;
|
package eu.mihosoft.freerouting.board;
|
||||||
|
|
||||||
import geometry.planar.IntBox;
|
import eu.mihosoft.freerouting.geometry.planar.IntBox;
|
||||||
import geometry.planar.IntPoint;
|
import eu.mihosoft.freerouting.geometry.planar.IntPoint;
|
||||||
import geometry.planar.Area;
|
import eu.mihosoft.freerouting.geometry.planar.Area;
|
||||||
import geometry.planar.TileShape;
|
import eu.mihosoft.freerouting.geometry.planar.TileShape;
|
||||||
import geometry.planar.Vector;
|
import eu.mihosoft.freerouting.geometry.planar.Vector;
|
||||||
import geometry.planar.Point;
|
import eu.mihosoft.freerouting.geometry.planar.Point;
|
||||||
import geometry.planar.FloatPoint;
|
import eu.mihosoft.freerouting.geometry.planar.FloatPoint;
|
||||||
|
|
||||||
import java.awt.Color;
|
import java.awt.Color;
|
||||||
|
|
||||||
import boardgraphics.GraphicsContext;
|
import eu.mihosoft.freerouting.boardgraphics.GraphicsContext;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* An item on the board with an relative_area shape, for example keepout, conduction relative_area
|
* An item on the eu.mihosoft.freerouting.board with an relative_area shape, for example keepout, conduction relative_area
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
|
@ -250,7 +250,7 @@ public class ObstacleArea extends Item implements java.io.Serializable
|
||||||
|
|
||||||
public int get_draw_priority()
|
public int get_draw_priority()
|
||||||
{
|
{
|
||||||
return boardgraphics.Drawable.MIN_DRAW_PRIORITY;
|
return eu.mihosoft.freerouting.boardgraphics.Drawable.MIN_DRAW_PRIORITY;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void draw(java.awt.Graphics p_g, GraphicsContext p_graphics_context, Color[] p_color_arr, double p_intensity)
|
public void draw(java.awt.Graphics p_g, GraphicsContext p_graphics_context, Color[] p_color_arr, double p_intensity)
|
||||||
|
@ -295,7 +295,7 @@ public class ObstacleArea extends Item implements java.io.Serializable
|
||||||
public void print_info(ObjectInfoPanel p_window, java.util.Locale p_locale)
|
public void print_info(ObjectInfoPanel p_window, java.util.Locale p_locale)
|
||||||
{
|
{
|
||||||
java.util.ResourceBundle resources =
|
java.util.ResourceBundle resources =
|
||||||
java.util.ResourceBundle.getBundle("board.resources.ObjectInfoPanel", p_locale);
|
java.util.ResourceBundle.getBundle("eu.mihosoft.freerouting.board.resources.ObjectInfoPanel", p_locale);
|
||||||
p_window.append_bold(resources.getString("keepout"));
|
p_window.append_bold(resources.getString("keepout"));
|
||||||
int cmp_no = this.get_component_no();
|
int cmp_no = this.get_component_no();
|
||||||
if (cmp_no > 0)
|
if (cmp_no > 0)
|
||||||
|
@ -315,9 +315,9 @@ public class ObstacleArea extends Item implements java.io.Serializable
|
||||||
protected final void print_shape_info(ObjectInfoPanel p_window, java.util.Locale p_locale)
|
protected final void print_shape_info(ObjectInfoPanel p_window, java.util.Locale p_locale)
|
||||||
{
|
{
|
||||||
java.util.ResourceBundle resources =
|
java.util.ResourceBundle resources =
|
||||||
java.util.ResourceBundle.getBundle("board.resources.ObjectInfoPanel", p_locale);
|
java.util.ResourceBundle.getBundle("eu.mihosoft.freerouting.board.resources.ObjectInfoPanel", p_locale);
|
||||||
p_window.append(" " + resources.getString("at") + " ");
|
p_window.append(" " + resources.getString("at") + " ");
|
||||||
geometry.planar.FloatPoint center = this.get_area().get_border().centre_of_gravity();
|
eu.mihosoft.freerouting.geometry.planar.FloatPoint center = this.get_area().get_border().centre_of_gravity();
|
||||||
p_window.append(center);
|
p_window.append(center);
|
||||||
Integer hole_count = this.relative_area.get_holes().length;
|
Integer hole_count = this.relative_area.get_holes().length;
|
||||||
if(hole_count > 0)
|
if(hole_count > 0)
|
||||||
|
|
|
@ -19,20 +19,20 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package board;
|
package eu.mihosoft.freerouting.board;
|
||||||
|
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
|
|
||||||
import geometry.planar.Point;
|
import eu.mihosoft.freerouting.geometry.planar.Point;
|
||||||
import geometry.planar.IntPoint;
|
import eu.mihosoft.freerouting.geometry.planar.IntPoint;
|
||||||
import geometry.planar.Vector;
|
import eu.mihosoft.freerouting.geometry.planar.Vector;
|
||||||
import geometry.planar.Polyline;
|
import eu.mihosoft.freerouting.geometry.planar.Polyline;
|
||||||
import geometry.planar.FloatPoint;
|
import eu.mihosoft.freerouting.geometry.planar.FloatPoint;
|
||||||
import geometry.planar.FloatLine;
|
import eu.mihosoft.freerouting.geometry.planar.FloatLine;
|
||||||
import geometry.planar.Side;
|
import eu.mihosoft.freerouting.geometry.planar.Side;
|
||||||
|
|
||||||
import autoroute.AutorouteControl.ExpansionCostFactor;
|
import eu.mihosoft.freerouting.autoroute.AutorouteControl.ExpansionCostFactor;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Contains functions for optimizing and improving via locations.
|
* Contains functions for optimizing and improving via locations.
|
||||||
|
|
|
@ -18,25 +18,25 @@
|
||||||
* Created on 6. Juni 2003, 08:04
|
* Created on 6. Juni 2003, 08:04
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package board;
|
package eu.mihosoft.freerouting.board;
|
||||||
|
|
||||||
|
|
||||||
import geometry.planar.Point;
|
import eu.mihosoft.freerouting.geometry.planar.Point;
|
||||||
import geometry.planar.IntPoint;
|
import eu.mihosoft.freerouting.geometry.planar.IntPoint;
|
||||||
import geometry.planar.Shape;
|
import eu.mihosoft.freerouting.geometry.planar.Shape;
|
||||||
import geometry.planar.ConvexShape;
|
import eu.mihosoft.freerouting.geometry.planar.ConvexShape;
|
||||||
import geometry.planar.TileShape;
|
import eu.mihosoft.freerouting.geometry.planar.TileShape;
|
||||||
import geometry.planar.Vector;
|
import eu.mihosoft.freerouting.geometry.planar.Vector;
|
||||||
import geometry.planar.Direction;
|
import eu.mihosoft.freerouting.geometry.planar.Direction;
|
||||||
import geometry.planar.Line;
|
import eu.mihosoft.freerouting.geometry.planar.Line;
|
||||||
import geometry.planar.Polyline;
|
import eu.mihosoft.freerouting.geometry.planar.Polyline;
|
||||||
import geometry.planar.FloatPoint;
|
import eu.mihosoft.freerouting.geometry.planar.FloatPoint;
|
||||||
|
|
||||||
import library.Package;
|
import eu.mihosoft.freerouting.library.Package;
|
||||||
import library.Padstack;
|
import eu.mihosoft.freerouting.library.Padstack;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class describing the functionality of an electrical Item on the board
|
* Class describing the functionality of an electrical Item on the eu.mihosoft.freerouting.board
|
||||||
* with a shape on 1 or several layers.
|
* with a shape on 1 or several layers.
|
||||||
*
|
*
|
||||||
* @author Alfons Wirtz
|
* @author Alfons Wirtz
|
||||||
|
@ -167,7 +167,7 @@ public class Pin extends DrillItem implements java.io.Serializable
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets index of this pin in the library package of the pins component.
|
* Gets index of this pin in the eu.mihosoft.freerouting.library package of the pins component.
|
||||||
*/
|
*/
|
||||||
public int get_index_in_package()
|
public int get_index_in_package()
|
||||||
{
|
{
|
||||||
|
@ -454,12 +454,12 @@ public class Pin extends DrillItem implements java.io.Serializable
|
||||||
{
|
{
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
library.LogicalPart logical_part = component.get_logical_part();
|
eu.mihosoft.freerouting.library.LogicalPart logical_part = component.get_logical_part();
|
||||||
if (logical_part == null)
|
if (logical_part == null)
|
||||||
{
|
{
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
library.LogicalPart.PartPin this_part_pin = logical_part.get_pin(this.pin_no);
|
eu.mihosoft.freerouting.library.LogicalPart.PartPin this_part_pin = logical_part.get_pin(this.pin_no);
|
||||||
if (this_part_pin == null)
|
if (this_part_pin == null)
|
||||||
{
|
{
|
||||||
return result;
|
return result;
|
||||||
|
@ -475,7 +475,7 @@ public class Pin extends DrillItem implements java.io.Serializable
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
library.LogicalPart.PartPin curr_part_pin = logical_part.get_pin(i);
|
eu.mihosoft.freerouting.library.LogicalPart.PartPin curr_part_pin = logical_part.get_pin(i);
|
||||||
if (curr_part_pin != null && curr_part_pin.gate_pin_swap_code == this_part_pin.gate_pin_swap_code
|
if (curr_part_pin != null && curr_part_pin.gate_pin_swap_code == this_part_pin.gate_pin_swap_code
|
||||||
&& curr_part_pin.gate_name.equals(this_part_pin.gate_name))
|
&& curr_part_pin.gate_name.equals(this_part_pin.gate_name))
|
||||||
{
|
{
|
||||||
|
@ -502,7 +502,7 @@ public class Pin extends DrillItem implements java.io.Serializable
|
||||||
return p_filter.is_selected(ItemSelectionFilter.SelectableChoices.PINS);
|
return p_filter.is_selected(ItemSelectionFilter.SelectableChoices.PINS);
|
||||||
}
|
}
|
||||||
|
|
||||||
public java.awt.Color[] get_draw_colors(boardgraphics.GraphicsContext p_graphics_context)
|
public java.awt.Color[] get_draw_colors(eu.mihosoft.freerouting.boardgraphics.GraphicsContext p_graphics_context)
|
||||||
{
|
{
|
||||||
java.awt.Color[] result;
|
java.awt.Color[] result;
|
||||||
if (this.net_count() > 0)
|
if (this.net_count() > 0)
|
||||||
|
@ -517,7 +517,7 @@ public class Pin extends DrillItem implements java.io.Serializable
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
public double get_draw_intensity(boardgraphics.GraphicsContext p_graphics_context)
|
public double get_draw_intensity(eu.mihosoft.freerouting.boardgraphics.GraphicsContext p_graphics_context)
|
||||||
{
|
{
|
||||||
return p_graphics_context.get_pin_color_intensity();
|
return p_graphics_context.get_pin_color_intensity();
|
||||||
}
|
}
|
||||||
|
@ -581,7 +581,7 @@ public class Pin extends DrillItem implements java.io.Serializable
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/** False, if this drillitem is places on the back side of the board */
|
/** False, if this drillitem is places on the back side of the eu.mihosoft.freerouting.board */
|
||||||
public boolean is_placed_on_front()
|
public boolean is_placed_on_front()
|
||||||
{
|
{
|
||||||
boolean result = true;
|
boolean result = true;
|
||||||
|
@ -605,7 +605,7 @@ public class Pin extends DrillItem implements java.io.Serializable
|
||||||
System.out.println("Pin.get_min_width: padstack_shape is null");
|
System.out.println("Pin.get_min_width: padstack_shape is null");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
geometry.planar.IntBox padstack_bounding_box = padstack_shape.bounding_box();
|
eu.mihosoft.freerouting.geometry.planar.IntBox padstack_bounding_box = padstack_shape.bounding_box();
|
||||||
if (padstack_bounding_box == null)
|
if (padstack_bounding_box == null)
|
||||||
{
|
{
|
||||||
System.out.println("Pin.get_min_width: padstack_bounding_box is null");
|
System.out.println("Pin.get_min_width: padstack_bounding_box is null");
|
||||||
|
@ -637,7 +637,7 @@ public class Pin extends DrillItem implements java.io.Serializable
|
||||||
System.out.println("Pin.get_max_width: padstack_shape is null");
|
System.out.println("Pin.get_max_width: padstack_shape is null");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
geometry.planar.IntBox padstack_bounding_box = padstack_shape.bounding_box();
|
eu.mihosoft.freerouting.geometry.planar.IntBox padstack_bounding_box = padstack_shape.bounding_box();
|
||||||
if (padstack_bounding_box == null)
|
if (padstack_bounding_box == null)
|
||||||
{
|
{
|
||||||
System.out.println("Pin.get_max_width: padstack_bounding_box is null");
|
System.out.println("Pin.get_max_width: padstack_bounding_box is null");
|
||||||
|
@ -649,7 +649,7 @@ public class Pin extends DrillItem implements java.io.Serializable
|
||||||
public void print_info(ObjectInfoPanel p_window, java.util.Locale p_locale)
|
public void print_info(ObjectInfoPanel p_window, java.util.Locale p_locale)
|
||||||
{
|
{
|
||||||
java.util.ResourceBundle resources =
|
java.util.ResourceBundle resources =
|
||||||
java.util.ResourceBundle.getBundle("board.resources.ObjectInfoPanel", p_locale);
|
java.util.ResourceBundle.getBundle("eu.mihosoft.freerouting.board.resources.ObjectInfoPanel", p_locale);
|
||||||
p_window.append_bold(resources.getString("pin") + ": ");
|
p_window.append_bold(resources.getString("pin") + ": ");
|
||||||
p_window.append(resources.getString("component_2") + " ");
|
p_window.append(resources.getString("component_2") + " ");
|
||||||
Component component = board.components.get(this.get_component_no());
|
Component component = board.components.get(this.get_component_no());
|
||||||
|
@ -657,7 +657,7 @@ public class Pin extends DrillItem implements java.io.Serializable
|
||||||
p_window.append(", " + resources.getString("pin_2") + " ");
|
p_window.append(", " + resources.getString("pin_2") + " ");
|
||||||
p_window.append(component.get_package().get_pin(this.pin_no).name);
|
p_window.append(component.get_package().get_pin(this.pin_no).name);
|
||||||
p_window.append(", " + resources.getString("padstack") + " ");
|
p_window.append(", " + resources.getString("padstack") + " ");
|
||||||
library.Padstack padstack = this.get_padstack();
|
eu.mihosoft.freerouting.library.Padstack padstack = this.get_padstack();
|
||||||
p_window.append(padstack.name, resources.getString("padstack_info"), padstack);
|
p_window.append(padstack.name, resources.getString("padstack_info"), padstack);
|
||||||
p_window.append(" " + resources.getString("at") + " ");
|
p_window.append(" " + resources.getString("at") + " ");
|
||||||
p_window.append(this.get_center().to_float());
|
p_window.append(this.get_center().to_float());
|
||||||
|
|
|
@ -13,23 +13,23 @@
|
||||||
* GNU General Public License at <http://www.gnu.org/licenses/>
|
* GNU General Public License at <http://www.gnu.org/licenses/>
|
||||||
* for more details.
|
* for more details.
|
||||||
*/
|
*/
|
||||||
package board;
|
package eu.mihosoft.freerouting.board;
|
||||||
|
|
||||||
import datastructures.Signum;
|
import eu.mihosoft.freerouting.datastructures.Signum;
|
||||||
import datastructures.Stoppable;
|
import eu.mihosoft.freerouting.datastructures.Stoppable;
|
||||||
|
|
||||||
import geometry.planar.IntBox;
|
import eu.mihosoft.freerouting.geometry.planar.IntBox;
|
||||||
import geometry.planar.IntOctagon;
|
import eu.mihosoft.freerouting.geometry.planar.IntOctagon;
|
||||||
import geometry.planar.Line;
|
import eu.mihosoft.freerouting.geometry.planar.Line;
|
||||||
import geometry.planar.LineSegment;
|
import eu.mihosoft.freerouting.geometry.planar.LineSegment;
|
||||||
import geometry.planar.Point;
|
import eu.mihosoft.freerouting.geometry.planar.Point;
|
||||||
import geometry.planar.IntPoint;
|
import eu.mihosoft.freerouting.geometry.planar.IntPoint;
|
||||||
import geometry.planar.FloatPoint;
|
import eu.mihosoft.freerouting.geometry.planar.FloatPoint;
|
||||||
import geometry.planar.Polyline;
|
import eu.mihosoft.freerouting.geometry.planar.Polyline;
|
||||||
import geometry.planar.Shape;
|
import eu.mihosoft.freerouting.geometry.planar.Shape;
|
||||||
import geometry.planar.TileShape;
|
import eu.mihosoft.freerouting.geometry.planar.TileShape;
|
||||||
import geometry.planar.Direction;
|
import eu.mihosoft.freerouting.geometry.planar.Direction;
|
||||||
import geometry.planar.Vector;
|
import eu.mihosoft.freerouting.geometry.planar.Vector;
|
||||||
|
|
||||||
import java.awt.Color;
|
import java.awt.Color;
|
||||||
import java.awt.Graphics;
|
import java.awt.Graphics;
|
||||||
|
@ -37,7 +37,7 @@ import java.util.Collection;
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
import java.util.LinkedList;
|
import java.util.LinkedList;
|
||||||
|
|
||||||
import boardgraphics.GraphicsContext;
|
import eu.mihosoft.freerouting.boardgraphics.GraphicsContext;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
@ -577,7 +577,7 @@ public class PolylineTrace extends Trace implements java.io.Serializable
|
||||||
if (found_trace_split)
|
if (found_trace_split)
|
||||||
{
|
{
|
||||||
// reread the overlapping tree entries and reset the iterator,
|
// reread the overlapping tree entries and reset the iterator,
|
||||||
// because the board has changed
|
// because the eu.mihosoft.freerouting.board has changed
|
||||||
default_tree.overlapping_tree_entries(curr_shape, get_layer(), overlapping_tree_entries);
|
default_tree.overlapping_tree_entries(curr_shape, get_layer(), overlapping_tree_entries);
|
||||||
it = overlapping_tree_entries.iterator();
|
it = overlapping_tree_entries.iterator();
|
||||||
break;
|
break;
|
||||||
|
@ -649,7 +649,7 @@ public class PolylineTrace extends Trace implements java.io.Serializable
|
||||||
boolean ignore_areas = false;
|
boolean ignore_areas = false;
|
||||||
if (this.net_no_arr.length > 0)
|
if (this.net_no_arr.length > 0)
|
||||||
{
|
{
|
||||||
rules.Net curr_net = this.board.rules.nets.get(this.net_no_arr[0]);
|
eu.mihosoft.freerouting.rules.Net curr_net = this.board.rules.nets.get(this.net_no_arr[0]);
|
||||||
if (curr_net != null && curr_net.get_class() != null)
|
if (curr_net != null && curr_net.get_class() != null)
|
||||||
{
|
{
|
||||||
ignore_areas = curr_net.get_class().get_ignore_cycles_with_areas();
|
ignore_areas = curr_net.get_class().get_ignore_cycles_with_areas();
|
||||||
|
|
|
@ -18,12 +18,12 @@
|
||||||
* Created on 5. Januar 2005, 08:02
|
* Created on 5. Januar 2005, 08:02
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package board;
|
package eu.mihosoft.freerouting.board;
|
||||||
|
|
||||||
import geometry.planar.FloatPoint;
|
import eu.mihosoft.freerouting.geometry.planar.FloatPoint;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Shape class used for printing a geometry.planar.Shape after transforming it to user coordinates.
|
* Shape class used for printing a eu.mihosoft.freerouting.geometry.planar.Shape after transforming it to user coordinates.
|
||||||
*
|
*
|
||||||
* @author Alfons Wirtz
|
* @author Alfons Wirtz
|
||||||
*/
|
*/
|
||||||
|
@ -56,7 +56,7 @@ public abstract class PrintableShape
|
||||||
public String toString()
|
public String toString()
|
||||||
{
|
{
|
||||||
java.util.ResourceBundle resources =
|
java.util.ResourceBundle resources =
|
||||||
java.util.ResourceBundle.getBundle("board.resources.ObjectInfoPanel", this.locale);
|
java.util.ResourceBundle.getBundle("eu.mihosoft.freerouting.board.resources.ObjectInfoPanel", this.locale);
|
||||||
String result = resources.getString("circle") + ": ";
|
String result = resources.getString("circle") + ": ";
|
||||||
if (center.x != 0 || center.y != 0)
|
if (center.x != 0 || center.y != 0)
|
||||||
{
|
{
|
||||||
|
@ -89,7 +89,7 @@ public abstract class PrintableShape
|
||||||
public String toString()
|
public String toString()
|
||||||
{
|
{
|
||||||
java.util.ResourceBundle resources =
|
java.util.ResourceBundle resources =
|
||||||
java.util.ResourceBundle.getBundle("board.resources.ObjectInfoPanel", this.locale);
|
java.util.ResourceBundle.getBundle("eu.mihosoft.freerouting.board.resources.ObjectInfoPanel", this.locale);
|
||||||
String result = resources.getString("rectangle") + ": " + resources.getString("lower_left") + " = "
|
String result = resources.getString("rectangle") + ": " + resources.getString("lower_left") + " = "
|
||||||
+ lower_left.to_string(this.locale) + ", " + resources.getString("upper_right") + " = "
|
+ lower_left.to_string(this.locale) + ", " + resources.getString("upper_right") + " = "
|
||||||
+ upper_right.to_string(this.locale) ;
|
+ upper_right.to_string(this.locale) ;
|
||||||
|
@ -112,7 +112,7 @@ public abstract class PrintableShape
|
||||||
public String toString()
|
public String toString()
|
||||||
{
|
{
|
||||||
java.util.ResourceBundle resources =
|
java.util.ResourceBundle resources =
|
||||||
java.util.ResourceBundle.getBundle("board.resources.ObjectInfoPanel", this.locale);
|
java.util.ResourceBundle.getBundle("eu.mihosoft.freerouting.board.resources.ObjectInfoPanel", this.locale);
|
||||||
String result = resources.getString("polygon") + ": ";
|
String result = resources.getString("polygon") + ": ";
|
||||||
for (int i = 0; i < corner_arr.length; ++i)
|
for (int i = 0; i < corner_arr.length; ++i)
|
||||||
{
|
{
|
||||||
|
|
|
@ -17,26 +17,26 @@
|
||||||
*
|
*
|
||||||
* Created on 19. Juli 2003, 12:42
|
* Created on 19. Juli 2003, 12:42
|
||||||
*/
|
*/
|
||||||
package board;
|
package eu.mihosoft.freerouting.board;
|
||||||
|
|
||||||
import geometry.planar.FloatPoint;
|
import eu.mihosoft.freerouting.geometry.planar.FloatPoint;
|
||||||
import geometry.planar.IntOctagon;
|
import eu.mihosoft.freerouting.geometry.planar.IntOctagon;
|
||||||
import geometry.planar.IntPoint;
|
import eu.mihosoft.freerouting.geometry.planar.IntPoint;
|
||||||
import geometry.planar.Line;
|
import eu.mihosoft.freerouting.geometry.planar.Line;
|
||||||
import geometry.planar.Point;
|
import eu.mihosoft.freerouting.geometry.planar.Point;
|
||||||
import geometry.planar.Polyline;
|
import eu.mihosoft.freerouting.geometry.planar.Polyline;
|
||||||
import geometry.planar.Side;
|
import eu.mihosoft.freerouting.geometry.planar.Side;
|
||||||
import geometry.planar.TileShape;
|
import eu.mihosoft.freerouting.geometry.planar.TileShape;
|
||||||
|
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
import datastructures.Signum;
|
import eu.mihosoft.freerouting.datastructures.Signum;
|
||||||
import datastructures.Stoppable;
|
import eu.mihosoft.freerouting.datastructures.Stoppable;
|
||||||
import datastructures.TimeLimit;
|
import eu.mihosoft.freerouting.datastructures.TimeLimit;
|
||||||
|
|
||||||
import autoroute.AutorouteControl.ExpansionCostFactor;
|
import eu.mihosoft.freerouting.autoroute.AutorouteControl.ExpansionCostFactor;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class with functionality for optimising traces and vias.
|
* Class with functionality for optimising traces and vias.
|
||||||
|
|
|
@ -17,21 +17,21 @@
|
||||||
*
|
*
|
||||||
* Created on 19. Juli 2003, 18:59
|
* Created on 19. Juli 2003, 18:59
|
||||||
*/
|
*/
|
||||||
package board;
|
package eu.mihosoft.freerouting.board;
|
||||||
|
|
||||||
import datastructures.Stoppable;
|
import eu.mihosoft.freerouting.datastructures.Stoppable;
|
||||||
|
|
||||||
import geometry.planar.Direction;
|
import eu.mihosoft.freerouting.geometry.planar.Direction;
|
||||||
import geometry.planar.FloatPoint;
|
import eu.mihosoft.freerouting.geometry.planar.FloatPoint;
|
||||||
import geometry.planar.IntPoint;
|
import eu.mihosoft.freerouting.geometry.planar.IntPoint;
|
||||||
import geometry.planar.Limits;
|
import eu.mihosoft.freerouting.geometry.planar.Limits;
|
||||||
import geometry.planar.Line;
|
import eu.mihosoft.freerouting.geometry.planar.Line;
|
||||||
import geometry.planar.Point;
|
import eu.mihosoft.freerouting.geometry.planar.Point;
|
||||||
import geometry.planar.Polyline;
|
import eu.mihosoft.freerouting.geometry.planar.Polyline;
|
||||||
import geometry.planar.Side;
|
import eu.mihosoft.freerouting.geometry.planar.Side;
|
||||||
import geometry.planar.TileShape;
|
import eu.mihosoft.freerouting.geometry.planar.TileShape;
|
||||||
import geometry.planar.Vector;
|
import eu.mihosoft.freerouting.geometry.planar.Vector;
|
||||||
import datastructures.Signum;
|
import eu.mihosoft.freerouting.datastructures.Signum;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
|
|
@ -18,15 +18,15 @@
|
||||||
* Created on 19. Juli 2003, 18:54
|
* Created on 19. Juli 2003, 18:54
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package board;
|
package eu.mihosoft.freerouting.board;
|
||||||
|
|
||||||
import datastructures.Stoppable;
|
import eu.mihosoft.freerouting.datastructures.Stoppable;
|
||||||
|
|
||||||
import geometry.planar.FloatPoint;
|
import eu.mihosoft.freerouting.geometry.planar.FloatPoint;
|
||||||
import geometry.planar.Point;
|
import eu.mihosoft.freerouting.geometry.planar.Point;
|
||||||
import geometry.planar.Line;
|
import eu.mihosoft.freerouting.geometry.planar.Line;
|
||||||
import geometry.planar.Polyline;
|
import eu.mihosoft.freerouting.geometry.planar.Polyline;
|
||||||
import geometry.planar.TileShape;
|
import eu.mihosoft.freerouting.geometry.planar.TileShape;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
|
|
@ -14,20 +14,20 @@
|
||||||
* for more details.
|
* for more details.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package board;
|
package eu.mihosoft.freerouting.board;
|
||||||
|
|
||||||
import datastructures.Stoppable;
|
import eu.mihosoft.freerouting.datastructures.Stoppable;
|
||||||
import geometry.planar.Limits;
|
import eu.mihosoft.freerouting.geometry.planar.Limits;
|
||||||
import datastructures.Signum;
|
import eu.mihosoft.freerouting.datastructures.Signum;
|
||||||
|
|
||||||
import geometry.planar.Direction;
|
import eu.mihosoft.freerouting.geometry.planar.Direction;
|
||||||
import geometry.planar.FloatPoint;
|
import eu.mihosoft.freerouting.geometry.planar.FloatPoint;
|
||||||
import geometry.planar.IntPoint;
|
import eu.mihosoft.freerouting.geometry.planar.IntPoint;
|
||||||
import geometry.planar.Point;
|
import eu.mihosoft.freerouting.geometry.planar.Point;
|
||||||
import geometry.planar.Line;
|
import eu.mihosoft.freerouting.geometry.planar.Line;
|
||||||
import geometry.planar.Polyline;
|
import eu.mihosoft.freerouting.geometry.planar.Polyline;
|
||||||
import geometry.planar.Side;
|
import eu.mihosoft.freerouting.geometry.planar.Side;
|
||||||
import geometry.planar.TileShape;
|
import eu.mihosoft.freerouting.geometry.planar.TileShape;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
|
|
@ -13,18 +13,18 @@
|
||||||
* GNU General Public License at <http://www.gnu.org/licenses/>
|
* GNU General Public License at <http://www.gnu.org/licenses/>
|
||||||
* for more details.
|
* for more details.
|
||||||
*/
|
*/
|
||||||
package board;
|
package eu.mihosoft.freerouting.board;
|
||||||
|
|
||||||
import geometry.planar.FloatPoint;
|
import eu.mihosoft.freerouting.geometry.planar.FloatPoint;
|
||||||
import geometry.planar.IntBox;
|
import eu.mihosoft.freerouting.geometry.planar.IntBox;
|
||||||
import geometry.planar.IntOctagon;
|
import eu.mihosoft.freerouting.geometry.planar.IntOctagon;
|
||||||
import geometry.planar.IntPoint;
|
import eu.mihosoft.freerouting.geometry.planar.IntPoint;
|
||||||
import geometry.planar.LineSegment;
|
import eu.mihosoft.freerouting.geometry.planar.LineSegment;
|
||||||
import geometry.planar.Point;
|
import eu.mihosoft.freerouting.geometry.planar.Point;
|
||||||
import geometry.planar.Polyline;
|
import eu.mihosoft.freerouting.geometry.planar.Polyline;
|
||||||
import geometry.planar.PolylineShape;
|
import eu.mihosoft.freerouting.geometry.planar.PolylineShape;
|
||||||
import geometry.planar.TileShape;
|
import eu.mihosoft.freerouting.geometry.planar.TileShape;
|
||||||
import geometry.planar.Vector;
|
import eu.mihosoft.freerouting.geometry.planar.Vector;
|
||||||
|
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
|
@ -32,22 +32,22 @@ import java.util.Set;
|
||||||
import java.util.SortedSet;
|
import java.util.SortedSet;
|
||||||
import java.util.TreeSet;
|
import java.util.TreeSet;
|
||||||
|
|
||||||
import datastructures.UndoableObjects;
|
import eu.mihosoft.freerouting.datastructures.UndoableObjects;
|
||||||
import datastructures.Stoppable;
|
import eu.mihosoft.freerouting.datastructures.Stoppable;
|
||||||
import datastructures.TimeLimit;
|
import eu.mihosoft.freerouting.datastructures.TimeLimit;
|
||||||
import datastructures.ShapeTree.TreeEntry;
|
import eu.mihosoft.freerouting.datastructures.ShapeTree.TreeEntry;
|
||||||
|
|
||||||
import rules.ViaInfo;
|
import eu.mihosoft.freerouting.rules.ViaInfo;
|
||||||
import rules.BoardRules;
|
import eu.mihosoft.freerouting.rules.BoardRules;
|
||||||
|
|
||||||
import autoroute.AutorouteControl;
|
import eu.mihosoft.freerouting.autoroute.AutorouteControl;
|
||||||
import autoroute.AutorouteEngine;
|
import eu.mihosoft.freerouting.autoroute.AutorouteEngine;
|
||||||
import autoroute.AutorouteControl.ExpansionCostFactor;
|
import eu.mihosoft.freerouting.autoroute.AutorouteControl.ExpansionCostFactor;
|
||||||
import autoroute.CompleteFreeSpaceExpansionRoom;
|
import eu.mihosoft.freerouting.autoroute.CompleteFreeSpaceExpansionRoom;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* Contains higher level functions of a board
|
* Contains higher level functions of a eu.mihosoft.freerouting.board
|
||||||
*
|
*
|
||||||
* @author Alfons Wirtz
|
* @author Alfons Wirtz
|
||||||
*/
|
*/
|
||||||
|
@ -183,7 +183,7 @@ public class RoutingBoard extends BasicBoard implements java.io.Serializable
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* marks the whole board as changed
|
* marks the whole eu.mihosoft.freerouting.board as changed
|
||||||
*/
|
*/
|
||||||
public void mark_all_changed_area()
|
public void mark_all_changed_area()
|
||||||
{
|
{
|
||||||
|
@ -902,8 +902,8 @@ public class RoutingBoard extends BasicBoard implements java.io.Serializable
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Initialises the autoroute database for routing a connection.
|
* Initialises the eu.mihosoft.freerouting.autoroute database for routing a connection.
|
||||||
* If p_retain_autoroute_database, the autoroute database is retained and maintained after
|
* If p_retain_autoroute_database, the eu.mihosoft.freerouting.autoroute database is retained and maintained after
|
||||||
* the algorithm for performance reasons.
|
* the algorithm for performance reasons.
|
||||||
*/
|
*/
|
||||||
public AutorouteEngine init_autoroute(int p_net_no, int p_trace_clearance_class_no,
|
public AutorouteEngine init_autoroute(int p_net_no, int p_trace_clearance_class_no,
|
||||||
|
@ -918,7 +918,7 @@ public class RoutingBoard extends BasicBoard implements java.io.Serializable
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Clears the autoroute database in case it was retained.
|
* Clears the eu.mihosoft.freerouting.autoroute database in case it was retained.
|
||||||
*/
|
*/
|
||||||
public void finish_autoroute()
|
public void finish_autoroute()
|
||||||
{
|
{
|
||||||
|
@ -934,7 +934,7 @@ public class RoutingBoard extends BasicBoard implements java.io.Serializable
|
||||||
* is not yet electrically connected.
|
* is not yet electrically connected.
|
||||||
* Returns an enum of type AutorouteEngine.AutorouteResult
|
* Returns an enum of type AutorouteEngine.AutorouteResult
|
||||||
*/
|
*/
|
||||||
public AutorouteEngine.AutorouteResult autoroute(Item p_item, interactive.Settings p_settings, int p_via_costs, Stoppable p_stoppable_thread, TimeLimit p_time_limit)
|
public AutorouteEngine.AutorouteResult autoroute(Item p_item, eu.mihosoft.freerouting.interactive.Settings p_settings, int p_via_costs, Stoppable p_stoppable_thread, TimeLimit p_time_limit)
|
||||||
{
|
{
|
||||||
if (!(p_item instanceof Connectable) || p_item.net_count() == 0)
|
if (!(p_item instanceof Connectable) || p_item.net_count() == 0)
|
||||||
{
|
{
|
||||||
|
@ -942,18 +942,18 @@ public class RoutingBoard extends BasicBoard implements java.io.Serializable
|
||||||
}
|
}
|
||||||
if (p_item.net_count() > 1)
|
if (p_item.net_count() > 1)
|
||||||
{
|
{
|
||||||
System.out.println("RoutingBoard.autoroute: net_count > 1 not yet implemented");
|
System.out.println("RoutingBoard.eu.mihosoft.freerouting.autoroute: net_count > 1 not yet implemented");
|
||||||
}
|
}
|
||||||
int route_net_no = p_item.get_net_no(0);
|
int route_net_no = p_item.get_net_no(0);
|
||||||
AutorouteControl ctrl_settings = new AutorouteControl(this, route_net_no, p_settings, p_via_costs, p_settings.autoroute_settings.get_trace_cost_arr());
|
AutorouteControl ctrl_settings = new AutorouteControl(this, route_net_no, p_settings, p_via_costs, p_settings.autoroute_settings.get_trace_cost_arr());
|
||||||
ctrl_settings.remove_unconnected_vias = false;
|
ctrl_settings.remove_unconnected_vias = false;
|
||||||
Set<Item> route_start_set = p_item.get_connected_set(route_net_no);
|
Set<Item> route_start_set = p_item.get_connected_set(route_net_no);
|
||||||
rules.Net route_net = rules.nets.get(route_net_no);
|
eu.mihosoft.freerouting.rules.Net route_net = rules.nets.get(route_net_no);
|
||||||
if (route_net != null && route_net.contains_plane())
|
if (route_net != null && route_net.contains_plane())
|
||||||
{
|
{
|
||||||
for (Item curr_item : route_start_set)
|
for (Item curr_item : route_start_set)
|
||||||
{
|
{
|
||||||
if (curr_item instanceof board.ConductionArea)
|
if (curr_item instanceof eu.mihosoft.freerouting.board.ConductionArea)
|
||||||
{
|
{
|
||||||
return AutorouteEngine.AutorouteResult.ALREADY_CONNECTED; // already connected to plane
|
return AutorouteEngine.AutorouteResult.ALREADY_CONNECTED; // already connected to plane
|
||||||
}
|
}
|
||||||
|
@ -982,8 +982,8 @@ public class RoutingBoard extends BasicBoard implements java.io.Serializable
|
||||||
* has only 1 layer. Ripup is allowed if p_ripup_costs is >= 0.
|
* has only 1 layer. Ripup is allowed if p_ripup_costs is >= 0.
|
||||||
* Returns an enum of type AutorouteEngine.AutorouteResult
|
* Returns an enum of type AutorouteEngine.AutorouteResult
|
||||||
*/
|
*/
|
||||||
public AutorouteEngine.AutorouteResult fanout(Pin p_pin, interactive.Settings p_settings, int p_ripup_costs,
|
public AutorouteEngine.AutorouteResult fanout(Pin p_pin, eu.mihosoft.freerouting.interactive.Settings p_settings, int p_ripup_costs,
|
||||||
Stoppable p_stoppable_thread, TimeLimit p_time_limit)
|
Stoppable p_stoppable_thread, TimeLimit p_time_limit)
|
||||||
{
|
{
|
||||||
if (p_pin.first_layer() != p_pin.last_layer() || p_pin.net_count() != 1)
|
if (p_pin.first_layer() != p_pin.last_layer() || p_pin.net_count() != 1)
|
||||||
{
|
{
|
||||||
|
@ -1200,7 +1200,7 @@ public class RoutingBoard extends BasicBoard implements java.io.Serializable
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets, if all conduction areas on the board are obstacles for route of foreign nets.
|
* Sets, if all conduction areas on the eu.mihosoft.freerouting.board are obstacles for route of foreign nets.
|
||||||
*/
|
*/
|
||||||
public void change_conduction_is_obstacle(boolean p_value)
|
public void change_conduction_is_obstacle(boolean p_value)
|
||||||
{
|
{
|
||||||
|
@ -1209,7 +1209,7 @@ public class RoutingBoard extends BasicBoard implements java.io.Serializable
|
||||||
return; // no muultiply
|
return; // no muultiply
|
||||||
}
|
}
|
||||||
boolean something_changed = false;
|
boolean something_changed = false;
|
||||||
// Change the is_obstacle property of all conduction areas of the board.
|
// Change the is_obstacle property of all conduction areas of the eu.mihosoft.freerouting.board.
|
||||||
Iterator<UndoableObjects.UndoableObjectNode> it = item_list.start_read_object();
|
Iterator<UndoableObjects.UndoableObjectNode> it = item_list.start_read_object();
|
||||||
for (;;)
|
for (;;)
|
||||||
{
|
{
|
||||||
|
@ -1367,8 +1367,8 @@ public class RoutingBoard extends BasicBoard implements java.io.Serializable
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets, if the autoroute database has to be maintained outside the outoroute algorithm
|
* Sets, if the eu.mihosoft.freerouting.autoroute database has to be maintained outside the outoroute algorithm
|
||||||
* while changing items on rhe board.
|
* while changing items on rhe eu.mihosoft.freerouting.board.
|
||||||
*/
|
*/
|
||||||
void set_maintaining_autoroute_database(boolean p_value)
|
void set_maintaining_autoroute_database(boolean p_value)
|
||||||
{
|
{
|
||||||
|
@ -1383,8 +1383,8 @@ public class RoutingBoard extends BasicBoard implements java.io.Serializable
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns, if the autoroute database is maintained outside the outoroute algorithm
|
* Returns, if the eu.mihosoft.freerouting.autoroute database is maintained outside the outoroute algorithm
|
||||||
* while changing items on rhe board.
|
* while changing items on rhe eu.mihosoft.freerouting.board.
|
||||||
*/
|
*/
|
||||||
boolean is_maintaining_autoroute_database()
|
boolean is_maintaining_autoroute_database()
|
||||||
{
|
{
|
||||||
|
|
|
@ -19,17 +19,17 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package board;
|
package eu.mihosoft.freerouting.board;
|
||||||
|
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.LinkedList;
|
import java.util.LinkedList;
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
|
|
||||||
import datastructures.UndoableObjects;
|
import eu.mihosoft.freerouting.datastructures.UndoableObjects;
|
||||||
import datastructures.ShapeTree;
|
import eu.mihosoft.freerouting.datastructures.ShapeTree;
|
||||||
|
|
||||||
import geometry.planar.FortyfiveDegreeBoundingDirections;
|
import eu.mihosoft.freerouting.geometry.planar.FortyfiveDegreeBoundingDirections;
|
||||||
import geometry.planar.Polyline;
|
import eu.mihosoft.freerouting.geometry.planar.Polyline;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
@ -85,7 +85,7 @@ public class SearchTreeManager
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the default tree used in interactive routing.
|
* Returns the default tree used in eu.mihosoft.freerouting.interactive routing.
|
||||||
*/
|
*/
|
||||||
public ShapeSearchTree get_default_tree()
|
public ShapeSearchTree get_default_tree()
|
||||||
{
|
{
|
||||||
|
@ -229,7 +229,7 @@ public class SearchTreeManager
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Clears all compensated trees used in the autoroute algorithm apart from the default tree.
|
* Clears all compensated trees used in the eu.mihosoft.freerouting.autoroute algorithm apart from the default tree.
|
||||||
*/
|
*/
|
||||||
public void reset_compensated_trees()
|
public void reset_compensated_trees()
|
||||||
{
|
{
|
||||||
|
@ -255,7 +255,7 @@ public class SearchTreeManager
|
||||||
{
|
{
|
||||||
if (this.board == null)
|
if (this.board == null)
|
||||||
{
|
{
|
||||||
System.out.println("SearchtreeManager.remove_all_board_items: board is null");
|
System.out.println("SearchtreeManager.remove_all_board_items: eu.mihosoft.freerouting.board is null");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
Iterator<UndoableObjects.UndoableObjectNode> it = this.board.item_list.start_read_object();
|
Iterator<UndoableObjects.UndoableObjectNode> it = this.board.item_list.start_read_object();
|
||||||
|
@ -274,7 +274,7 @@ public class SearchTreeManager
|
||||||
{
|
{
|
||||||
if (this.board == null)
|
if (this.board == null)
|
||||||
{
|
{
|
||||||
System.out.println("SearchtreeManager.insert_all_board_items: board is null");
|
System.out.println("SearchtreeManager.insert_all_board_items: eu.mihosoft.freerouting.board is null");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
Iterator<UndoableObjects.UndoableObjectNode> it = this.board.item_list.start_read_object();
|
Iterator<UndoableObjects.UndoableObjectNode> it = this.board.item_list.start_read_object();
|
||||||
|
|
|
@ -18,14 +18,14 @@
|
||||||
* Created on 10. Januar 2004, 10:08
|
* Created on 10. Januar 2004, 10:08
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package board;
|
package eu.mihosoft.freerouting.board;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Common ShapeSearchTree functionality for board.Items and autoroute.ExpansionRooms
|
* Common ShapeSearchTree functionality for eu.mihosoft.freerouting.board.Items and eu.mihosoft.freerouting.autoroute.ExpansionRooms
|
||||||
*
|
*
|
||||||
* @author Alfons Wirtz
|
* @author Alfons Wirtz
|
||||||
*/
|
*/
|
||||||
public interface SearchTreeObject extends datastructures.ShapeTree.Storable
|
public interface SearchTreeObject extends eu.mihosoft.freerouting.datastructures.ShapeTree.Storable
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Returns true if this object is an obstacle to objects containing
|
* Returns true if this object is an obstacle to objects containing
|
||||||
|
|
|
@ -17,22 +17,22 @@
|
||||||
*
|
*
|
||||||
* Created on 1. September 2004, 10:13
|
* Created on 1. September 2004, 10:13
|
||||||
*/
|
*/
|
||||||
package board;
|
package eu.mihosoft.freerouting.board;
|
||||||
|
|
||||||
import geometry.planar.ConvexShape;
|
import eu.mihosoft.freerouting.geometry.planar.ConvexShape;
|
||||||
import geometry.planar.ShapeBoundingDirections;
|
import eu.mihosoft.freerouting.geometry.planar.ShapeBoundingDirections;
|
||||||
import geometry.planar.IntOctagon;
|
import eu.mihosoft.freerouting.geometry.planar.IntOctagon;
|
||||||
import geometry.planar.Line;
|
import eu.mihosoft.freerouting.geometry.planar.Line;
|
||||||
import geometry.planar.LineSegment;
|
import eu.mihosoft.freerouting.geometry.planar.LineSegment;
|
||||||
import geometry.planar.Polyline;
|
import eu.mihosoft.freerouting.geometry.planar.Polyline;
|
||||||
import geometry.planar.PolylineShape;
|
import eu.mihosoft.freerouting.geometry.planar.PolylineShape;
|
||||||
import geometry.planar.RegularTileShape;
|
import eu.mihosoft.freerouting.geometry.planar.RegularTileShape;
|
||||||
import geometry.planar.Shape;
|
import eu.mihosoft.freerouting.geometry.planar.Shape;
|
||||||
import geometry.planar.Side;
|
import eu.mihosoft.freerouting.geometry.planar.Side;
|
||||||
import geometry.planar.Simplex;
|
import eu.mihosoft.freerouting.geometry.planar.Simplex;
|
||||||
import geometry.planar.TileShape;
|
import eu.mihosoft.freerouting.geometry.planar.TileShape;
|
||||||
import geometry.planar.IntBox;
|
import eu.mihosoft.freerouting.geometry.planar.IntBox;
|
||||||
import geometry.planar.FloatPoint;
|
import eu.mihosoft.freerouting.geometry.planar.FloatPoint;
|
||||||
|
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
|
@ -40,22 +40,22 @@ import java.util.LinkedList;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import java.util.TreeSet;
|
import java.util.TreeSet;
|
||||||
|
|
||||||
import rules.ClearanceMatrix;
|
import eu.mihosoft.freerouting.rules.ClearanceMatrix;
|
||||||
|
|
||||||
import datastructures.Signum;
|
import eu.mihosoft.freerouting.datastructures.Signum;
|
||||||
|
|
||||||
import autoroute.IncompleteFreeSpaceExpansionRoom;
|
import eu.mihosoft.freerouting.autoroute.IncompleteFreeSpaceExpansionRoom;
|
||||||
import autoroute.CompleteFreeSpaceExpansionRoom;
|
import eu.mihosoft.freerouting.autoroute.CompleteFreeSpaceExpansionRoom;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* Elementary geometric search functions making direct use
|
* Elementary geometric search functions making direct use
|
||||||
* of the MinAreaTree in the package datastructures.
|
* of the MinAreaTree in the package eu.mihosoft.freerouting.datastructures.
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* @author Alfons Wirtz
|
* @author Alfons Wirtz
|
||||||
*/
|
*/
|
||||||
public class ShapeSearchTree extends datastructures.MinAreaTree
|
public class ShapeSearchTree extends eu.mihosoft.freerouting.datastructures.MinAreaTree
|
||||||
{
|
{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -398,13 +398,13 @@ public class ShapeSearchTree extends datastructures.MinAreaTree
|
||||||
}
|
}
|
||||||
if (p_tree_entries == null)
|
if (p_tree_entries == null)
|
||||||
{
|
{
|
||||||
System.out.println("board.ShapeSearchTree.overlaps: p_obstacle_entries is null");
|
System.out.println("eu.mihosoft.freerouting.board.ShapeSearchTree.overlaps: p_obstacle_entries is null");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
RegularTileShape bounds = p_shape.bounding_shape(bounding_directions);
|
RegularTileShape bounds = p_shape.bounding_shape(bounding_directions);
|
||||||
if (bounds == null)
|
if (bounds == null)
|
||||||
{
|
{
|
||||||
System.out.println("board.ShapeSearchTree.overlaps: p_shape not bounded");
|
System.out.println("eu.mihosoft.freerouting.board.ShapeSearchTree.overlaps: p_shape not bounded");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
Collection<Leaf> tmp_list = this.overlaps(bounds);
|
Collection<Leaf> tmp_list = this.overlaps(bounds);
|
||||||
|
@ -472,14 +472,14 @@ public class ShapeSearchTree extends datastructures.MinAreaTree
|
||||||
}
|
}
|
||||||
if (p_obstacle_entries == null)
|
if (p_obstacle_entries == null)
|
||||||
{
|
{
|
||||||
System.out.println("board.ShapeSearchTree.overlaps_with_clearance: p_obstacle_entries is null");
|
System.out.println("eu.mihosoft.freerouting.board.ShapeSearchTree.overlaps_with_clearance: p_obstacle_entries is null");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
ClearanceMatrix cl_matrix = board.rules.clearance_matrix;
|
ClearanceMatrix cl_matrix = board.rules.clearance_matrix;
|
||||||
RegularTileShape bounds = p_shape.bounding_shape(bounding_directions);
|
RegularTileShape bounds = p_shape.bounding_shape(bounding_directions);
|
||||||
if (bounds == null)
|
if (bounds == null)
|
||||||
{
|
{
|
||||||
System.out.println("board.ShapeSearchTree.overlaps_with_clearance: p_shape is not bounded");
|
System.out.println("eu.mihosoft.freerouting.board.ShapeSearchTree.overlaps_with_clearance: p_shape is not bounded");
|
||||||
bounds = board.get_bounding_box();
|
bounds = board.get_bounding_box();
|
||||||
}
|
}
|
||||||
int max_clearance =
|
int max_clearance =
|
||||||
|
|
|
@ -18,21 +18,21 @@
|
||||||
* Created on 15. Juli 2007, 07:26
|
* Created on 15. Juli 2007, 07:26
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
package board;
|
package eu.mihosoft.freerouting.board;
|
||||||
|
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.LinkedList;
|
import java.util.LinkedList;
|
||||||
|
|
||||||
import geometry.planar.FortyfiveDegreeBoundingDirections;
|
import eu.mihosoft.freerouting.geometry.planar.FortyfiveDegreeBoundingDirections;
|
||||||
import geometry.planar.TileShape;
|
import eu.mihosoft.freerouting.geometry.planar.TileShape;
|
||||||
import geometry.planar.Shape;
|
import eu.mihosoft.freerouting.geometry.planar.Shape;
|
||||||
import geometry.planar.IntOctagon;
|
import eu.mihosoft.freerouting.geometry.planar.IntOctagon;
|
||||||
import geometry.planar.IntBox;
|
import eu.mihosoft.freerouting.geometry.planar.IntBox;
|
||||||
import geometry.planar.Side;
|
import eu.mihosoft.freerouting.geometry.planar.Side;
|
||||||
import geometry.planar.Line;
|
import eu.mihosoft.freerouting.geometry.planar.Line;
|
||||||
|
|
||||||
import autoroute.IncompleteFreeSpaceExpansionRoom;
|
import eu.mihosoft.freerouting.autoroute.IncompleteFreeSpaceExpansionRoom;
|
||||||
import autoroute.CompleteFreeSpaceExpansionRoom;
|
import eu.mihosoft.freerouting.autoroute.CompleteFreeSpaceExpansionRoom;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A special simple ShapeSearchtree, where the shapes are of class IntOctagon.
|
* A special simple ShapeSearchtree, where the shapes are of class IntOctagon.
|
||||||
|
|
|
@ -19,19 +19,19 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package board;
|
package eu.mihosoft.freerouting.board;
|
||||||
|
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.LinkedList;
|
import java.util.LinkedList;
|
||||||
|
|
||||||
import geometry.planar.OrthogonalBoundingDirections;
|
import eu.mihosoft.freerouting.geometry.planar.OrthogonalBoundingDirections;
|
||||||
import geometry.planar.TileShape;
|
import eu.mihosoft.freerouting.geometry.planar.TileShape;
|
||||||
import geometry.planar.Shape;
|
import eu.mihosoft.freerouting.geometry.planar.Shape;
|
||||||
import geometry.planar.IntBox;
|
import eu.mihosoft.freerouting.geometry.planar.IntBox;
|
||||||
import geometry.planar.Polyline;
|
import eu.mihosoft.freerouting.geometry.planar.Polyline;
|
||||||
|
|
||||||
import autoroute.IncompleteFreeSpaceExpansionRoom;
|
import eu.mihosoft.freerouting.autoroute.IncompleteFreeSpaceExpansionRoom;
|
||||||
import autoroute.CompleteFreeSpaceExpansionRoom;
|
import eu.mihosoft.freerouting.autoroute.CompleteFreeSpaceExpansionRoom;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A special simple ShapeSearchtree, where the shapes are of class IntBox.
|
* A special simple ShapeSearchtree, where the shapes are of class IntBox.
|
||||||
|
|
|
@ -14,14 +14,14 @@
|
||||||
* for more details.
|
* for more details.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package board;
|
package eu.mihosoft.freerouting.board;
|
||||||
|
|
||||||
import geometry.planar.ConvexShape;
|
import eu.mihosoft.freerouting.geometry.planar.ConvexShape;
|
||||||
import geometry.planar.FloatPoint;
|
import eu.mihosoft.freerouting.geometry.planar.FloatPoint;
|
||||||
import geometry.planar.Line;
|
import eu.mihosoft.freerouting.geometry.planar.Line;
|
||||||
import geometry.planar.Point;
|
import eu.mihosoft.freerouting.geometry.planar.Point;
|
||||||
import geometry.planar.Polyline;
|
import eu.mihosoft.freerouting.geometry.planar.Polyline;
|
||||||
import geometry.planar.TileShape;
|
import eu.mihosoft.freerouting.geometry.planar.TileShape;
|
||||||
|
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
|
|
|
@ -13,21 +13,21 @@
|
||||||
* GNU General Public License at <http://www.gnu.org/licenses/>
|
* GNU General Public License at <http://www.gnu.org/licenses/>
|
||||||
* for more details.
|
* for more details.
|
||||||
*/
|
*/
|
||||||
package board;
|
package eu.mihosoft.freerouting.board;
|
||||||
|
|
||||||
import datastructures.TimeLimit;
|
import eu.mihosoft.freerouting.datastructures.TimeLimit;
|
||||||
|
|
||||||
import geometry.planar.ConvexShape;
|
import eu.mihosoft.freerouting.geometry.planar.ConvexShape;
|
||||||
import geometry.planar.Direction;
|
import eu.mihosoft.freerouting.geometry.planar.Direction;
|
||||||
import geometry.planar.FloatPoint;
|
import eu.mihosoft.freerouting.geometry.planar.FloatPoint;
|
||||||
import geometry.planar.IntBox;
|
import eu.mihosoft.freerouting.geometry.planar.IntBox;
|
||||||
import geometry.planar.Line;
|
import eu.mihosoft.freerouting.geometry.planar.Line;
|
||||||
import geometry.planar.Point;
|
import eu.mihosoft.freerouting.geometry.planar.Point;
|
||||||
import geometry.planar.IntPoint;
|
import eu.mihosoft.freerouting.geometry.planar.IntPoint;
|
||||||
import geometry.planar.Vector;
|
import eu.mihosoft.freerouting.geometry.planar.Vector;
|
||||||
import geometry.planar.Polyline;
|
import eu.mihosoft.freerouting.geometry.planar.Polyline;
|
||||||
import geometry.planar.TileShape;
|
import eu.mihosoft.freerouting.geometry.planar.TileShape;
|
||||||
import geometry.planar.LineSegment;
|
import eu.mihosoft.freerouting.geometry.planar.LineSegment;
|
||||||
|
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
|
@ -244,7 +244,7 @@ public class ShoveTraceAlgo
|
||||||
FloatPoint end_corner_appprox = p_line_segment.end_point_approx();
|
FloatPoint end_corner_appprox = p_line_segment.end_point_approx();
|
||||||
double segment_length = end_corner_appprox.distance(start_corner_appprox);
|
double segment_length = end_corner_appprox.distance(start_corner_appprox);
|
||||||
|
|
||||||
rules.ClearanceMatrix cl_matrix = p_board.rules.clearance_matrix;
|
eu.mihosoft.freerouting.rules.ClearanceMatrix cl_matrix = p_board.rules.clearance_matrix;
|
||||||
|
|
||||||
double result = Integer.MAX_VALUE;
|
double result = Integer.MAX_VALUE;
|
||||||
|
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package board;
|
package eu.mihosoft.freerouting.board;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* If > RELEASE, some features may be used, which are still in experimental state.
|
* If > RELEASE, some features may be used, which are still in experimental state.
|
||||||
|
|
|
@ -14,12 +14,12 @@
|
||||||
* for more details.
|
* for more details.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package board;
|
package eu.mihosoft.freerouting.board;
|
||||||
|
|
||||||
import geometry.planar.FloatPoint;
|
import eu.mihosoft.freerouting.geometry.planar.FloatPoint;
|
||||||
import geometry.planar.IntOctagon;
|
import eu.mihosoft.freerouting.geometry.planar.IntOctagon;
|
||||||
import geometry.planar.Point;
|
import eu.mihosoft.freerouting.geometry.planar.Point;
|
||||||
import geometry.planar.TileShape;
|
import eu.mihosoft.freerouting.geometry.planar.TileShape;
|
||||||
|
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
|
@ -177,17 +177,17 @@ public abstract class Trace extends Item implements Connectable, java.io.Seriali
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public java.awt.Color[] get_draw_colors(boardgraphics.GraphicsContext p_graphics_context)
|
public java.awt.Color[] get_draw_colors(eu.mihosoft.freerouting.boardgraphics.GraphicsContext p_graphics_context)
|
||||||
{
|
{
|
||||||
return p_graphics_context.get_trace_colors(this.is_user_fixed());
|
return p_graphics_context.get_trace_colors(this.is_user_fixed());
|
||||||
}
|
}
|
||||||
|
|
||||||
public int get_draw_priority()
|
public int get_draw_priority()
|
||||||
{
|
{
|
||||||
return boardgraphics.Drawable.MAX_DRAW_PRIORITY;
|
return eu.mihosoft.freerouting.boardgraphics.Drawable.MAX_DRAW_PRIORITY;
|
||||||
}
|
}
|
||||||
|
|
||||||
public double get_draw_intensity(boardgraphics.GraphicsContext p_graphics_context)
|
public double get_draw_intensity(eu.mihosoft.freerouting.boardgraphics.GraphicsContext p_graphics_context)
|
||||||
{
|
{
|
||||||
return p_graphics_context.get_trace_color_intensity();
|
return p_graphics_context.get_trace_color_intensity();
|
||||||
}
|
}
|
||||||
|
@ -316,10 +316,10 @@ public abstract class Trace extends Item implements Connectable, java.io.Seriali
|
||||||
}
|
}
|
||||||
|
|
||||||
// check, if the trace belongs to a net, which is not shovable.
|
// check, if the trace belongs to a net, which is not shovable.
|
||||||
rules.Nets nets = this.board.rules.nets;
|
eu.mihosoft.freerouting.rules.Nets nets = this.board.rules.nets;
|
||||||
for (int curr_net_no : this.net_no_arr)
|
for (int curr_net_no : this.net_no_arr)
|
||||||
{
|
{
|
||||||
if (rules.Nets.is_normal_net_no(curr_net_no))
|
if (eu.mihosoft.freerouting.rules.Nets.is_normal_net_no(curr_net_no))
|
||||||
{
|
{
|
||||||
if (nets.get(curr_net_no).get_class().is_shove_fixed())
|
if (nets.get(curr_net_no).get_class().is_shove_fixed())
|
||||||
{
|
{
|
||||||
|
@ -376,7 +376,7 @@ public abstract class Trace extends Item implements Connectable, java.io.Seriali
|
||||||
boolean ignore_areas = false;
|
boolean ignore_areas = false;
|
||||||
if (this.net_no_arr.length > 0)
|
if (this.net_no_arr.length > 0)
|
||||||
{
|
{
|
||||||
rules.Net curr_net = this.board.rules.nets.get(this.net_no_arr[0]);
|
eu.mihosoft.freerouting.rules.Net curr_net = this.board.rules.nets.get(this.net_no_arr[0]);
|
||||||
if (curr_net != null && curr_net.get_class() != null)
|
if (curr_net != null && curr_net.get_class() != null)
|
||||||
{
|
{
|
||||||
ignore_areas = curr_net.get_class().get_ignore_cycles_with_areas();
|
ignore_areas = curr_net.get_class().get_ignore_cycles_with_areas();
|
||||||
|
@ -486,7 +486,7 @@ public abstract class Trace extends Item implements Connectable, java.io.Seriali
|
||||||
public void print_info(ObjectInfoPanel p_window, java.util.Locale p_locale)
|
public void print_info(ObjectInfoPanel p_window, java.util.Locale p_locale)
|
||||||
{
|
{
|
||||||
java.util.ResourceBundle resources =
|
java.util.ResourceBundle resources =
|
||||||
java.util.ResourceBundle.getBundle("board.resources.ObjectInfoPanel", p_locale);
|
java.util.ResourceBundle.getBundle("eu.mihosoft.freerouting.board.resources.ObjectInfoPanel", p_locale);
|
||||||
p_window.append_bold(resources.getString("trace"));
|
p_window.append_bold(resources.getString("trace"));
|
||||||
p_window.append(" " + resources.getString("from"));
|
p_window.append(" " + resources.getString("from"));
|
||||||
p_window.append(this.first_corner().to_float());
|
p_window.append(this.first_corner().to_float());
|
||||||
|
@ -545,5 +545,5 @@ public abstract class Trace extends Item implements Connectable, java.io.Seriali
|
||||||
|
|
||||||
|
|
||||||
private final int half_width ; // half width of the trace pen
|
private final int half_width ; // half width of the trace pen
|
||||||
private int layer ; // board layer of the trace
|
private int layer ; // eu.mihosoft.freerouting.board layer of the trace
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
* Created on 13. Dezember 2004, 08:01
|
* Created on 13. Dezember 2004, 08:01
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package board;
|
package eu.mihosoft.freerouting.board;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Enum for the userunits inch, mil or millimeter.
|
* Enum for the userunits inch, mil or millimeter.
|
||||||
|
|
|
@ -17,20 +17,20 @@
|
||||||
*
|
*
|
||||||
* Created on 5. Juni 2003, 10:36
|
* Created on 5. Juni 2003, 10:36
|
||||||
*/
|
*/
|
||||||
package board;
|
package eu.mihosoft.freerouting.board;
|
||||||
|
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
|
|
||||||
import geometry.planar.Point;
|
import eu.mihosoft.freerouting.geometry.planar.Point;
|
||||||
import geometry.planar.IntPoint;
|
import eu.mihosoft.freerouting.geometry.planar.IntPoint;
|
||||||
import geometry.planar.TileShape;
|
import eu.mihosoft.freerouting.geometry.planar.TileShape;
|
||||||
import geometry.planar.Shape;
|
import eu.mihosoft.freerouting.geometry.planar.Shape;
|
||||||
import geometry.planar.Vector;
|
import eu.mihosoft.freerouting.geometry.planar.Vector;
|
||||||
import library.Padstack;
|
import eu.mihosoft.freerouting.library.Padstack;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class describing the functionality of an electrical Item on the board,
|
* Class describing the functionality of an electrical Item on the eu.mihosoft.freerouting.board,
|
||||||
* which may have a shape on several layer, whose geometry is described by a
|
* which may have a shape on several layer, whose geometry is described by a
|
||||||
* padstack.
|
* padstack.
|
||||||
*
|
*
|
||||||
|
@ -164,14 +164,14 @@ public class Via extends DrillItem implements java.io.Serializable
|
||||||
clear_derived_data();
|
clear_derived_data();
|
||||||
}
|
}
|
||||||
|
|
||||||
public autoroute.ExpansionDrill get_autoroute_drill_info(ShapeSearchTree p_autoroute_tree)
|
public eu.mihosoft.freerouting.autoroute.ExpansionDrill get_autoroute_drill_info(ShapeSearchTree p_autoroute_tree)
|
||||||
{
|
{
|
||||||
if (this.autoroute_drill_info == null)
|
if (this.autoroute_drill_info == null)
|
||||||
{
|
{
|
||||||
autoroute.ItemAutorouteInfo via_autoroute_info = this.get_autoroute_info();
|
eu.mihosoft.freerouting.autoroute.ItemAutorouteInfo via_autoroute_info = this.get_autoroute_info();
|
||||||
TileShape curr_drill_shape = TileShape.get_instance(this.get_center());
|
TileShape curr_drill_shape = TileShape.get_instance(this.get_center());
|
||||||
this.autoroute_drill_info =
|
this.autoroute_drill_info =
|
||||||
new autoroute.ExpansionDrill(curr_drill_shape, this.get_center(), this.first_layer(), this.last_layer());
|
new eu.mihosoft.freerouting.autoroute.ExpansionDrill(curr_drill_shape, this.get_center(), this.first_layer(), this.last_layer());
|
||||||
int via_layer_count = this.last_layer() - this.first_layer() + 1;
|
int via_layer_count = this.last_layer() - this.first_layer() + 1;
|
||||||
for (int i = 0; i < via_layer_count; ++i)
|
for (int i = 0; i < via_layer_count; ++i)
|
||||||
{
|
{
|
||||||
|
@ -203,7 +203,7 @@ public class Via extends DrillItem implements java.io.Serializable
|
||||||
return p_filter.is_selected(ItemSelectionFilter.SelectableChoices.VIAS);
|
return p_filter.is_selected(ItemSelectionFilter.SelectableChoices.VIAS);
|
||||||
}
|
}
|
||||||
|
|
||||||
public java.awt.Color[] get_draw_colors(boardgraphics.GraphicsContext p_graphics_context)
|
public java.awt.Color[] get_draw_colors(eu.mihosoft.freerouting.boardgraphics.GraphicsContext p_graphics_context)
|
||||||
{
|
{
|
||||||
java.awt.Color[] result;
|
java.awt.Color[] result;
|
||||||
if (this.net_count() == 0)
|
if (this.net_count() == 0)
|
||||||
|
@ -224,7 +224,7 @@ public class Via extends DrillItem implements java.io.Serializable
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
public double get_draw_intensity(boardgraphics.GraphicsContext p_graphics_context)
|
public double get_draw_intensity(eu.mihosoft.freerouting.boardgraphics.GraphicsContext p_graphics_context)
|
||||||
{
|
{
|
||||||
double result;
|
double result;
|
||||||
if (this.net_count() == 0)
|
if (this.net_count() == 0)
|
||||||
|
@ -248,7 +248,7 @@ public class Via extends DrillItem implements java.io.Serializable
|
||||||
public void print_info(ObjectInfoPanel p_window, java.util.Locale p_locale)
|
public void print_info(ObjectInfoPanel p_window, java.util.Locale p_locale)
|
||||||
{
|
{
|
||||||
java.util.ResourceBundle resources =
|
java.util.ResourceBundle resources =
|
||||||
java.util.ResourceBundle.getBundle("board.resources.ObjectInfoPanel", p_locale);
|
java.util.ResourceBundle.getBundle("eu.mihosoft.freerouting.board.resources.ObjectInfoPanel", p_locale);
|
||||||
p_window.append_bold(resources.getString("via"));
|
p_window.append_bold(resources.getString("via"));
|
||||||
p_window.append(" " + resources.getString("at"));
|
p_window.append(" " + resources.getString("at"));
|
||||||
p_window.append(this.get_center().to_float());
|
p_window.append(this.get_center().to_float());
|
||||||
|
@ -273,6 +273,6 @@ public class Via extends DrillItem implements java.io.Serializable
|
||||||
/** True, if coppersharing of this via with smd pins of the same net is allowed. */
|
/** True, if coppersharing of this via with smd pins of the same net is allowed. */
|
||||||
public final boolean attach_allowed;
|
public final boolean attach_allowed;
|
||||||
transient private Shape[] precalculated_shapes = null;
|
transient private Shape[] precalculated_shapes = null;
|
||||||
/** Temporary data used in the autoroute algorithm. */
|
/** Temporary data used in the eu.mihosoft.freerouting.autoroute algorithm. */
|
||||||
transient private autoroute.ExpansionDrill autoroute_drill_info = null;
|
transient private eu.mihosoft.freerouting.autoroute.ExpansionDrill autoroute_drill_info = null;
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,13 +18,13 @@
|
||||||
* Created on 19. August 2004, 07:34
|
* Created on 19. August 2004, 07:34
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package board;
|
package eu.mihosoft.freerouting.board;
|
||||||
|
|
||||||
import geometry.planar.Area;
|
import eu.mihosoft.freerouting.geometry.planar.Area;
|
||||||
import geometry.planar.Vector;
|
import eu.mihosoft.freerouting.geometry.planar.Vector;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Describes Areas on the board, where vias are not allowed.
|
* Describes Areas on the eu.mihosoft.freerouting.board, where vias are not allowed.
|
||||||
*
|
*
|
||||||
* @author alfons
|
* @author alfons
|
||||||
*/
|
*/
|
||||||
|
@ -85,7 +85,7 @@ public class ViaObstacleArea extends ObstacleArea
|
||||||
public void print_info(ObjectInfoPanel p_window, java.util.Locale p_locale)
|
public void print_info(ObjectInfoPanel p_window, java.util.Locale p_locale)
|
||||||
{
|
{
|
||||||
java.util.ResourceBundle resources =
|
java.util.ResourceBundle resources =
|
||||||
java.util.ResourceBundle.getBundle("board.resources.ObjectInfoPanel", p_locale);
|
java.util.ResourceBundle.getBundle("eu.mihosoft.freerouting.board.resources.ObjectInfoPanel", p_locale);
|
||||||
p_window.append_bold(resources.getString("via_keepout"));
|
p_window.append_bold(resources.getString("via_keepout"));
|
||||||
this.print_shape_info(p_window, p_locale);
|
this.print_shape_info(p_window, p_locale);
|
||||||
this.print_clearance_info(p_window, p_locale);
|
this.print_clearance_info(p_window, p_locale);
|
||||||
|
@ -93,12 +93,12 @@ public class ViaObstacleArea extends ObstacleArea
|
||||||
p_window.newline();
|
p_window.newline();
|
||||||
}
|
}
|
||||||
|
|
||||||
public java.awt.Color[] get_draw_colors(boardgraphics.GraphicsContext p_graphics_context)
|
public java.awt.Color[] get_draw_colors(eu.mihosoft.freerouting.boardgraphics.GraphicsContext p_graphics_context)
|
||||||
{
|
{
|
||||||
return p_graphics_context.get_via_obstacle_colors();
|
return p_graphics_context.get_via_obstacle_colors();
|
||||||
}
|
}
|
||||||
|
|
||||||
public double get_draw_intensity(boardgraphics.GraphicsContext p_graphics_context)
|
public double get_draw_intensity(eu.mihosoft.freerouting.boardgraphics.GraphicsContext p_graphics_context)
|
||||||
{
|
{
|
||||||
return p_graphics_context.get_via_obstacle_color_intensity();
|
return p_graphics_context.get_via_obstacle_color_intensity();
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,17 +17,17 @@
|
||||||
--></head>
|
--></head>
|
||||||
|
|
||||||
<body bgcolor="white">
|
<body bgcolor="white">
|
||||||
Contains classes describing items on a printed circuit board and the board itself.
|
Contains classes describing items on a printed circuit eu.mihosoft.freerouting.board and the eu.mihosoft.freerouting.board itself.
|
||||||
<div class=Section1>
|
<div class=Section1>
|
||||||
<div class=Section1>
|
<div class=Section1>
|
||||||
<p class=MsoNormal><span lang=EN-US style="mso-ansi-language:EN-US">The class <span class=SpellE>LayeredBoard</span> implements elementary functionality for the layout of 2-dimensional items on a board. The board may have several layers.<span style="mso-spacerun:yes"> </span>It allows to insert, change, or delete items, or to check, if inserting would result in violations (overlaps) with other items. For fast checking, <span class=GramE>picking<span style="mso-spacerun:yes"> </span>and</span> changing <span class=SpellE>items</span><span style="mso-spacerun:yes"> </span>the class contains a 2-dimensional search tree, whose entries point into the list of items on the board.<span style="mso-spacerun:yes"> </span>The search <span class=GramE>tree<span style="mso-spacerun:yes"> </span>is</span> decoupled from the items it is pointing to and may even point into several different databases at the same time.</span></p>
|
<p class=MsoNormal><span lang=EN-US style="mso-ansi-language:EN-US">The class <span class=SpellE>LayeredBoard</span> implements elementary functionality for the layout of 2-dimensional items on a eu.mihosoft.freerouting.board. The eu.mihosoft.freerouting.board may have several layers.<span style="mso-spacerun:yes"> </span>It allows to insert, change, or delete items, or to check, if inserting would result in violations (overlaps) with other items. For fast checking, <span class=GramE>picking<span style="mso-spacerun:yes"> </span>and</span> changing <span class=SpellE>items</span><span style="mso-spacerun:yes"> </span>the class contains a 2-dimensional search tree, whose entries point into the list of items on the eu.mihosoft.freerouting.board.<span style="mso-spacerun:yes"> </span>The search <span class=GramE>tree<span style="mso-spacerun:yes"> </span>is</span> decoupled from the items it is pointing to and may even point into several different databases at the same time.</span></p>
|
||||||
<p class=MsoNormal><span class=SpellE><span lang=EN-US style="mso-ansi-language:
|
<p class=MsoNormal><span class=SpellE><span lang=EN-US style="mso-ansi-language:
|
||||||
EN-US">LayeredBoard</span></span><span lang=EN-US style="mso-ansi-language:
|
EN-US">LayeredBoard</span></span><span lang=EN-US style="mso-ansi-language:
|
||||||
EN-US"> contains also a list of components, a library of packages and padstacks, and a collection of rules and restrictions, which must be respected by the items on the board.</span><span lang=EN-US style="font-size:10.0pt;mso-ansi-language:EN-US"> </span></p>
|
EN-US"> contains also a list of components, a eu.mihosoft.freerouting.library of packages and padstacks, and a collection of rules and restrictions, which must be respected by the items on the eu.mihosoft.freerouting.board.</span><span lang=EN-US style="font-size:10.0pt;mso-ansi-language:EN-US"> </span></p>
|
||||||
<p class=MsoNormal><span lang=EN-US style="mso-ansi-language:EN-US">The class <span class=SpellE>RoutingBoard</span> derived from <span class=SpellE>BasicBoard</span> contains higher level functionality, such as shoving items and pulling tight <span class=SpellE>traces, and autorouting incomplete connections</span>.</span><span lang=EN-US style="font-size:10.0pt;
|
<p class=MsoNormal><span lang=EN-US style="mso-ansi-language:EN-US">The class <span class=SpellE>RoutingBoard</span> derived from <span class=SpellE>BasicBoard</span> contains higher level functionality, such as shoving items and pulling tight <span class=SpellE>traces, and autorouting incomplete connections</span>.</span><span lang=EN-US style="font-size:10.0pt;
|
||||||
mso-ansi-language:EN-US"> </span></p>
|
mso-ansi-language:EN-US"> </span></p>
|
||||||
<p class=MsoNormal><span lang=EN-US style="mso-ansi-language:EN-US">The base classes of all physical items on the board is the abstract <span class=GramE>class<span style="mso-spacerun:yes"> </span>Item</span>. Items must implement the interfaces <span class=SpellE>ShapeTree.Storable</span> and <span class=SpellE>Drawable</span>, so that they can be stored in a search <span class=SpellE>ree</span> and painted onto a graphics screen. Additionally an item contains a pointer to the physical board the item is on, an id number and a list of numbers of nets it belongs to, which may be empty. </span></p>
|
<p class=MsoNormal><span lang=EN-US style="mso-ansi-language:EN-US">The base classes of all physical items on the eu.mihosoft.freerouting.board is the abstract <span class=GramE>class<span style="mso-spacerun:yes"> </span>Item</span>. Items must implement the interfaces <span class=SpellE>ShapeTree.Storable</span> and <span class=SpellE>Drawable</span>, so that they can be stored in a search <span class=SpellE>ree</span> and painted onto a graphics screen. Additionally an item contains a pointer to the physical eu.mihosoft.freerouting.board the item is on, an id number and a list of numbers of nets it belongs to, which may be empty. </span></p>
|
||||||
<p class=MsoNormal><span lang=EN-US style="mso-ansi-language:EN-US">Classes derived from Item are currently Trace, <span class=SpellE><span class=GramE>DrillItem</span></span><span class=GramE> ,</span> <span class=SpellE>ObstacleArea</span> and <span class=SpellE>BoardOutline</span>. The <span class=GramE>class <span class=SpellE>ObstacleArea</span> describe</span> areas on the board, which may be conduction areas or obstacle areas for traces or <span class=SpellE>vias</span>. The <span class=SpellE>abstact</span> class <span class=SpellE>DrillItem</span> describes items with a layer range, a centre point and a (convex) shape on <span class=GramE>each<span style="mso-spacerun:yes"> </span>layer</span>. It has the two implementations Pin and <span class=GramE>Via</span>. Pins belong to a component, and its shapes are defined by the <span class=SpellE>padstack</span> of the corresponding pin of the components library package. The shapes of a <span class=GramE>Via</span> are defined directly by a library <span class=SpellE>padstack</span>. The class abstract Trace is used for paths <span class=GramE>connecting<span style="mso-spacerun:yes"> </span>drill</span> items and eventual conduction areas. The only implementation of the class Trace is currently the class <span class=SpellE>PolylineTrace</span>.<span style="mso-spacerun:yes"> </span>It adds the concrete description of the geometric path as a <span class=SpellE>Polyline</span> to the class Trace. The reason, why <span class=SpellE>Polylines</span> and not Polygons are used to implement the paths of non-curved tracess, has to do with numerical exactness and performance, as described in the package <span class=SpellE>geometry.planar</span>. </span></p>
|
<p class=MsoNormal><span lang=EN-US style="mso-ansi-language:EN-US">Classes derived from Item are currently Trace, <span class=SpellE><span class=GramE>DrillItem</span></span><span class=GramE> ,</span> <span class=SpellE>ObstacleArea</span> and <span class=SpellE>BoardOutline</span>. The <span class=GramE>class <span class=SpellE>ObstacleArea</span> describe</span> areas on the eu.mihosoft.freerouting.board, which may be conduction areas or obstacle areas for traces or <span class=SpellE>vias</span>. The <span class=SpellE>abstact</span> class <span class=SpellE>DrillItem</span> describes items with a layer range, a centre point and a (convex) shape on <span class=GramE>each<span style="mso-spacerun:yes"> </span>layer</span>. It has the two implementations Pin and <span class=GramE>Via</span>. Pins belong to a component, and its shapes are defined by the <span class=SpellE>padstack</span> of the corresponding pin of the components eu.mihosoft.freerouting.library package. The shapes of a <span class=GramE>Via</span> are defined directly by a eu.mihosoft.freerouting.library <span class=SpellE>padstack</span>. The class abstract Trace is used for paths <span class=GramE>connecting<span style="mso-spacerun:yes"> </span>drill</span> items and eventual conduction areas. The only implementation of the class Trace is currently the class <span class=SpellE>PolylineTrace</span>.<span style="mso-spacerun:yes"> </span>It adds the concrete description of the geometric path as a <span class=SpellE>Polyline</span> to the class Trace. The reason, why <span class=SpellE>Polylines</span> and not Polygons are used to implement the paths of non-curved tracess, has to do with numerical exactness and performance, as described in the package <span class=SpellE>eu.mihosoft.freerouting.geometry.planar</span>. </span></p>
|
||||||
<p class=MsoNormal><span lang=EN-US style="mso-ansi-language:EN-US">Items, which may be electrically <span class=GramE>connected</span> must implement the interface Connectable. Connectable Items are currently Pins, <span class=SpellE>Vias</span>, Traces and <span class=SpellE>ConductionAreas</span>. </span></p>
|
<p class=MsoNormal><span lang=EN-US style="mso-ansi-language:EN-US">Items, which may be electrically <span class=GramE>connected</span> must implement the interface Connectable. Connectable Items are currently Pins, <span class=SpellE>Vias</span>, Traces and <span class=SpellE>ConductionAreas</span>. </span></p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
* Created on 1. August 2004, 07:46
|
* Created on 1. August 2004, 07:46
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package boardgraphics;
|
package eu.mihosoft.freerouting.boardgraphics;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The color intensities for each item type.
|
* The color intensities for each item type.
|
||||||
|
|
|
@ -17,12 +17,12 @@
|
||||||
*
|
*
|
||||||
* Created on 5. August 2003, 10:18
|
* Created on 5. August 2003, 10:18
|
||||||
*/
|
*/
|
||||||
package boardgraphics;
|
package eu.mihosoft.freerouting.boardgraphics;
|
||||||
|
|
||||||
import javax.swing.table.AbstractTableModel;
|
import javax.swing.table.AbstractTableModel;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Abstract class to store colors used for drawing the board.
|
* Abstract class to store colors used for drawing the eu.mihosoft.freerouting.board.
|
||||||
*
|
*
|
||||||
* @author Alfons Wirtz
|
* @author Alfons Wirtz
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -14,17 +14,17 @@
|
||||||
* for more details.
|
* for more details.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package boardgraphics;
|
package eu.mihosoft.freerouting.boardgraphics;
|
||||||
|
|
||||||
import geometry.planar.FloatPoint;
|
import eu.mihosoft.freerouting.geometry.planar.FloatPoint;
|
||||||
import geometry.planar.IntBox;
|
import eu.mihosoft.freerouting.geometry.planar.IntBox;
|
||||||
import geometry.planar.Limits;
|
import eu.mihosoft.freerouting.geometry.planar.Limits;
|
||||||
|
|
||||||
import java.awt.Dimension;
|
import java.awt.Dimension;
|
||||||
import java.awt.geom.Point2D;
|
import java.awt.geom.Point2D;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Transformation function between the board and the screen coordinate systems.
|
* Transformation function between the eu.mihosoft.freerouting.board and the screen coordinate systems.
|
||||||
*
|
*
|
||||||
* @author Alfons Wirtz
|
* @author Alfons Wirtz
|
||||||
*/
|
*/
|
||||||
|
@ -76,7 +76,7 @@ public class CoordinateTransform implements java.io.Serializable
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* scale a value from the board to the screen coordinate system
|
* scale a value from the eu.mihosoft.freerouting.board to the screen coordinate system
|
||||||
*/
|
*/
|
||||||
public double board_to_screen(double p_val)
|
public double board_to_screen(double p_val)
|
||||||
{
|
{
|
||||||
|
@ -84,7 +84,7 @@ public class CoordinateTransform implements java.io.Serializable
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* scale a value the screen to the board coordinate system
|
* scale a value the screen to the eu.mihosoft.freerouting.board coordinate system
|
||||||
*/
|
*/
|
||||||
public double screen_to_board(double p_val)
|
public double screen_to_board(double p_val)
|
||||||
{
|
{
|
||||||
|
@ -93,7 +93,7 @@ public class CoordinateTransform implements java.io.Serializable
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* transform a geometry.planar.FloatPoint to a java.awt.geom.Point2D
|
* transform a eu.mihosoft.freerouting.geometry.planar.FloatPoint to a java.awt.geom.Point2D
|
||||||
*/
|
*/
|
||||||
public Point2D board_to_screen(FloatPoint p_point)
|
public Point2D board_to_screen(FloatPoint p_point)
|
||||||
{
|
{
|
||||||
|
@ -120,7 +120,7 @@ public class CoordinateTransform implements java.io.Serializable
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Transform a java.awt.geom.Point2D to a geometry.planar.FloatPoint
|
* Transform a java.awt.geom.Point2D to a eu.mihosoft.freerouting.geometry.planar.FloatPoint
|
||||||
*/
|
*/
|
||||||
public FloatPoint screen_to_board(Point2D p_point)
|
public FloatPoint screen_to_board(Point2D p_point)
|
||||||
{
|
{
|
||||||
|
@ -146,7 +146,7 @@ public class CoordinateTransform implements java.io.Serializable
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Transforms an angle in radian on the board to an angle on the screen.
|
* Transforms an angle in radian on the eu.mihosoft.freerouting.board to an angle on the screen.
|
||||||
*/
|
*/
|
||||||
public double board_to_screen_angle(double p_angle)
|
public double board_to_screen_angle(double p_angle)
|
||||||
{
|
{
|
||||||
|
@ -171,7 +171,7 @@ public class CoordinateTransform implements java.io.Serializable
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Transform a geometry.planar.IntBox to a java.awt.Rectangle
|
* Transform a eu.mihosoft.freerouting.geometry.planar.IntBox to a java.awt.Rectangle
|
||||||
* If the internal rotation is not a multiple of Pi/2, a bounding rectangle of the
|
* If the internal rotation is not a multiple of Pi/2, a bounding rectangle of the
|
||||||
* rotated rectangular shape is returned.
|
* rotated rectangular shape is returned.
|
||||||
*/
|
*/
|
||||||
|
@ -190,7 +190,7 @@ public class CoordinateTransform implements java.io.Serializable
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Transform a java.awt.Rectangle to a geometry.planar.IntBox
|
* Transform a java.awt.Rectangle to a eu.mihosoft.freerouting.geometry.planar.IntBox
|
||||||
* If the internal rotation is not a multiple of Pi/2, a bounding box of the
|
* If the internal rotation is not a multiple of Pi/2, a bounding box of the
|
||||||
* rotated rectangular shape is returned.
|
* rotated rectangular shape is returned.
|
||||||
*/
|
*/
|
||||||
|
@ -207,7 +207,7 @@ public class CoordinateTransform implements java.io.Serializable
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* If p_value is true, the left side and the right side of the board will be swapped.
|
* If p_value is true, the left side and the right side of the eu.mihosoft.freerouting.board will be swapped.
|
||||||
*/
|
*/
|
||||||
public void set_mirror_left_right(boolean p_value)
|
public void set_mirror_left_right(boolean p_value)
|
||||||
{
|
{
|
||||||
|
@ -215,7 +215,7 @@ public class CoordinateTransform implements java.io.Serializable
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns, if the left side and the right side of the board are swapped.
|
* Returns, if the left side and the right side of the eu.mihosoft.freerouting.board are swapped.
|
||||||
*/
|
*/
|
||||||
public boolean is_mirror_left_right()
|
public boolean is_mirror_left_right()
|
||||||
{
|
{
|
||||||
|
@ -223,7 +223,7 @@ public class CoordinateTransform implements java.io.Serializable
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* If p_value is true, the top side and the botton side of the board will be swapped.
|
* If p_value is true, the top side and the botton side of the eu.mihosoft.freerouting.board will be swapped.
|
||||||
*/
|
*/
|
||||||
public void set_mirror_top_bottom(boolean p_value)
|
public void set_mirror_top_bottom(boolean p_value)
|
||||||
{
|
{
|
||||||
|
@ -233,7 +233,7 @@ public class CoordinateTransform implements java.io.Serializable
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns, if the top side and the botton side of the board are swapped.
|
* Returns, if the top side and the botton side of the eu.mihosoft.freerouting.board are swapped.
|
||||||
*/
|
*/
|
||||||
public boolean is_mirror_top_bottom()
|
public boolean is_mirror_top_bottom()
|
||||||
{
|
{
|
||||||
|
@ -243,7 +243,7 @@ public class CoordinateTransform implements java.io.Serializable
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the rotation of the displayed board to p_value.
|
* Sets the rotation of the displayed eu.mihosoft.freerouting.board to p_value.
|
||||||
*/
|
*/
|
||||||
public void set_rotation(double p_value)
|
public void set_rotation(double p_value)
|
||||||
{
|
{
|
||||||
|
@ -251,7 +251,7 @@ public class CoordinateTransform implements java.io.Serializable
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the rotation of the displayed board.
|
* Returns the rotation of the displayed eu.mihosoft.freerouting.board.
|
||||||
*/
|
*/
|
||||||
public double get_rotation()
|
public double get_rotation()
|
||||||
{
|
{
|
||||||
|
@ -284,12 +284,12 @@ public class CoordinateTransform implements java.io.Serializable
|
||||||
private final double display_y_offset;
|
private final double display_y_offset;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Left side and right side of the board are swapped.
|
* Left side and right side of the eu.mihosoft.freerouting.board are swapped.
|
||||||
*/
|
*/
|
||||||
private boolean mirror_left_right = false;
|
private boolean mirror_left_right = false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Top side and bottom side of the board are swapped.
|
* Top side and bottom side of the eu.mihosoft.freerouting.board are swapped.
|
||||||
*/
|
*/
|
||||||
private boolean mirror_top_bottom = true;
|
private boolean mirror_top_bottom = true;
|
||||||
|
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
* for more details.
|
* for more details.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package boardgraphics;
|
package eu.mihosoft.freerouting.boardgraphics;
|
||||||
|
|
||||||
import java.awt.Color;
|
import java.awt.Color;
|
||||||
import java.awt.Graphics;
|
import java.awt.Graphics;
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue