Code Monkey home page Code Monkey logo

freerouting's Introduction

Freerouting

Freerouting

Freerouting is an advanced autorouter for all PCB programs that support the standard Specctra or Electra DSN interface.

Release version Downloads Downloads License

👉 This project needs JAVA and UI/UX volunteers! Contact @andrasfuchs for details! 👈



Installers for Windows and Linux can be downloaded here.

Introduction

This software can be used together with all host PCB design software systems containing a standard Specctra or Electra DSN interface. It imports .DSN files generated by the Specctra interface of the host system and exports .SES Specctra session files.

Although the software can be used for manual routing in 90 degree, 45 degree and free angle modes, it's main focus is on autorouting.

Getting started

You can run Freerouting as a standalone application.

  1. After launching freerouting.jar, a window appears prompting you to select your exported .DSN design file. image

  2. After opening a design you can start the autorouter with the button in the toolbar on top of the board window. image

  3. While autorouter is running you can follow the progress both visually in the board editor and numerically in the footer. image

  4. You are going to have a short summary when it is finished. image

  5. You can now save your routed board as a .SES file in the File / Export Specctra Session File menu. image

If you use KiCad, Autodesk EAGLE, Target3001! or pcb-rnd, click here for their integrations.

Using the command line arguments

Freerouter was designed as a GUI program, but it also can function as a command line tool. Typically you would have an input file (e.g. Specctra DSN) that you exported from you EDA (e.g. KiCad). If this file has unconnected routes, you would want to wire those with autorouter, and save the result in a format that you can then import back into your EDA.

The following command line arguments are supported by freerouter:

  • -de [design input file]: loads up a Specctra .dsn file at startup.
  • -di [design input directory]: if the GUI is used, this sets the default folder for the open design dialogs.
  • -dr [design rules file]: reads the rules from a previously saved .rules file.
  • -do [design output file]: saves a Specctra board (.dsn), a Specctra session file (.ses) or Eagle session script file (.scr) when the routing is finished.
  • -mp [number of passes]: sets the upper limit of the number of auto-router passes that will be performed.
  • -l [language]: "en" for English, "de" for German, "zh" for Simplified Chinese, otherwise it's the system default. English is set by default for unsupported languages.
  • -host [host_name host_version]: sets the name of the host process, if it was run as an external library or plugin.
  • -mt [number of threads]: sets thread pool size for route optimization. The default is one less than the number of logical processors in the system. Set it to 0 to disable route optimization.
  • -oit [percentage]: stops the route optimizer if the improvement drops below a certain percentage threshold per pass. Default is 0.1%, and -oit 0 means to continue improving until it is interrupted by the user or it runs out of options to test.
  • -us [greedy | global | hybrid]: sets board updating strategy for route optimization: greedy, global optimal or hybrid. The default is greedy. When hybrid is selected, another option "hr" specifies hybrid ratio.
  • -hr [m:n]: sets hybrid ratio in the format of #_global_optiomal_passes:#_prioritized_passes. The default is 1:1. It's only effective when hybrid strategy is selected.
  • -is [sequential | random | prioritized]: sets item selection strategy for route optimization: sequential, random, prioritized. The default is prioritized. Prioritied strategy selects items based on scores calculated in previous round.
  • -inc [net class names, separated by commas]: auto-router ignores the listed net classes, eg. -inc GND,VCC will not try to wire components that are either in the "GND" or in the "VCC" net class.
  • -im: saves intermediate steps in version-specific binary format. This allows to user to resume the interrupted optimization from the last checkpoint. Turned off by default.
  • -dct [seconds]: dialog confirmation timeout. Sets the timeout of the dialogs that start a default action in x seconds. 20 seconds by default.
  • -da: disable anonymous analytics.
  • -dl: disable logging.
  • -help: shows help.

A complete command line looks something like this if your are using PowerShell on Windows:

java.exe -jar freerouting-1.9.0.jar -de MyBoard.dsn -do MyBoard.ses -mp 100 -dr MyBoard.rules

This would read the MyBoard.dsn file, do the auto-routing with the parameters defined in MyBoard.rules for the maximum of 100 passes, and then save the result into the MyBoard.ses file.

Running Freerouting using Java JRE

There are only installers for Windows x64 and Linux x64. Fortunatelly though the platform independent .JAR files can be run on the other systems, if the matching Java runtime is installed.

You will need the following steps to make it work:

  1. Get the current JAR release from our Releases page
  2. Install Java JRE
    • Select your operating system and architecture
    • Select JRE as package type
    • Select 21 as version
  3. Run the downloaded JAR file using the installed java
java -jar freerouting-1.9.0.jar

(macOS: please note that you can't start Freerouting from the Mac Finder, you must use the Mac Terminal instead!)

Contributing

We ❤️ all our contributors; this project wouldn’t be what it is without you!

If you want to help out, please consider replying to issues, creating new ones, or even send your fixes and improvements as pull requests. Our developer documentation can help you with the technicalities.

freerouting's People

Contributors

abelom avatar andrasfuchs avatar daniel-theia avatar dependabot[bot] avatar djzhan0207 avatar erichvk5 avatar geminiserver avatar kikaitachi avatar leoheck avatar maksz42 avatar miho avatar nirmalchauhan avatar rezer avatar riesi avatar rusefillc avatar sliedes avatar snack-x avatar taotieren avatar vicsanrope avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

freerouting's Issues

Question/Feature: Script for deeper EAGLE integration

When i use Freeroute, i have alway the same workflow
-remove the GND Polygons
-Run the ULP for creating the DSN File
-undo the removal of the GND Polygon
-Open Freeroouter
-Search the ULP / start the autorouting
-Save the EAGLE-Script
-Run the script in EAGLE

I have not really experiance with EAGLE scripts. But i tsounds for me much easier only run a script for all of this (except of the GND Polygons thing...):

The EAGLE script could:

  • run the ULP which creates the DSN File
  • run freerouter with command-line parameters to the ULP file
  • maybe runs the created session-script directly in EAGLE

Does somebody know if such an script exists ?

  • What version of freerouting are you using? 1.4.4
  • On what platform did you run it? Windows 64-bit

short traces

I was not able to reroute a board that has been previously routed by FreeRouter because it seems to leave a lot of zero-length traces laying around that cause the FreeRouter to be unable to load the DSN file. So if I needed to reroute a board, I always had to remove all the traces and start again from scratch or revert to pre-autorouted version of the board.

The future of freerouting with deep learning

Hi guys,

I just wanted to start a discussion about the vision of freerouting.

Yesterday I watched Lex Fridman's interview with David Silver. It's absolutely mind blowing what potential deep learning and AI has.

They got me inspired, and I would be interested in your feedback.

Very simply put, we could use state of the art, open-source AI to do the routing in freerouting.
In order to do that we would need many steps (meaning many developer-hours of work), but it's not a totally unrealistic goal, and I think it would significantly better the end result.

We would need to design a very good reward function (board evaluation scoring system), define the rules of the "game of routing", and build at least some prediction model.
The first two of these are somewhat present already in freerouting, but we would need to separate these modules from each other.

If we could pull this off, we could train our AI on GPUs by letting it play against the current algorithm, and learn from it in a natural way and then compete with itself to further improve its results.
If we could build a good model this way, the end user wouldn't need too much computing power to get good results.

I'm not sure how much time I can put into this project in the future, because one of my project just won a sponsorship a few days ago, and it needs my full attention now, but I would be glad if someone with more experience with deep learning would join our discussion and efforts here, so please don't hesitate to give some feedback, if you feel exited like I do!

Add

First of all, thank you for taking the time to report an issue.

To make our work easier, please provide as many details as you can:

  • What version of freerouting are you using?
  • On what platform did you run it? Windows, Linux, MacOS? 32-bit or 64-bit?
  • What type of file are you working with? Can you attach the actual (DSN) file?
  • Did you use any command line arguments?
  • Can you post a screenshot of the problem?
  • Can you include the latest, related log entries from the .log file?
  • Please list the detailed steps to reproduce the problem
  • What would you expect freerouting to do in this situation?
  • Is fixing this issue critical for your work?

Need better way to handle open outline issue

I was using this tool on a KiCAD PCB and I was frustrated as I could be that the tool was completely ignoring my outline and just substituting some generic roundrect for it. I didn't understand that the outline wasn't closed (I SWEAR it had been at some point, maybe one of the curves got "rounded off" as a side effect of changing the grid size or something) but this behavior in my opinion is unacceptable because even the KiCAD support forum was clueless for a long time about what the source of the problem was. If the tool is going to be THIS "picky" then 1) there needs to be documentation that the user HAS to use DRC or an equivalent tool before starting routing because the tool will require that the outline HAS to be ABSOLUTELY closed, and 2) if the tool is run on an outline that is NOT closed then an error message needs to be offered about the situation and warned that if the user still wants to proceed then the outline as presented will not be used but a "generic roundrect" of approximately the correct size will be substituted.

Autorouter refuses to use 45 degree traces on pins

First of all, thank you for taking the time to report an issue.

To make our work easier, please provide as many details as you can:

  • What version of freerouting are you using?
    v1.4.4
  • On what platform did you run it? Windows, Linux, MacOS? 32-bit or 64-bit?
    Windows 10, 64-bit
  • What type of file are you working with? Can you attach the actual (DSN) file?
    DSN,
    SBC.zip
  • Did you use any command line arguments?
    No, I used the GUI
  • Can you post a screenshot of the problem?
    freeroutingissue
    The issue can be seen on all of the red traces and most blue traces. It occurs directly next to the pins.
  • Can you include the latest, related log entries from the .log file?
  • Please list the detailed steps to reproduce the problem
    Open a DSN file and run the autorouter
  • What would you expect freerouting to do in this situation?
    Make a single, 45-degree trace instead of a 90-degree angle leading into a 45-degree trace.
  • Is fixing this issue critical for your work?
    I can manually fix it afterwards, but it takes a very long time. Therefore, it's not critical, but important.

Hi,
I've just started using FreeRouting, and while it works well, if the autorouter tries to route a trace and hits a pin next to it, it will insert a 90-degree angle. As you can see in the photo, the 90-degree angle then leads to a 45-degree trace. This is particularly bad with traces coming from pins on two-row pin headers. It would be more efficient and better looking if it could come directly out of the pin at 45 degrees, and would improve signal integrity on high-speed boards.
Is there an option to allow this? If not, is it possible that such an option could be added to a future release?
Thanks.

Damaged Mac .DMG file for current version.

First of all, thank you for taking the time to report an issue.

To make our work easier, please provide as many details as you can:

  • On what platform did you run it?
    MacOS
    Running Big Sir 15.2
    Cannot download due to a damaged file error. Have downloaded many times with same result.

freerouting0.pdf

freerouting 1.4.4 does not display anything from KiCad 5.1.6 DSN file

  • What version of freerouting are you using? 1.4.4 - I have tested with freerouting-1.4.4-executable.jar and freerouting-1.4.4-windows-x64.msi

  • On what platform did you run it? Windows, Linux, MacOS? 32-bit or 64-bit? Windows 10 x64 1909

c:\Data\DEV>C:\Data\DEV\OpenJDK11\bin\java.exe --version
openjdk 11 2018-09-25
OpenJDK Runtime Environment 18.9 (build 11+28)
OpenJDK 64-Bit Server VM 18.9 (build 11+28, mixed mode)

  • What type of file are you working with? Can you attach the actual (DSN) file? Specctra DSN export from KiCad 5.1.6 (tried to attach, but attachment is unsupported type)

  • Did you use any command line arguments?
    c:\Data\DEV\OpenJDK11\bin>java -jar c:\data\dev\freeRouting\freerouting-1.4.4-executable.jar

  • Can you post a screenshot of the problem?
    Empty gray screen with blue rectangle.
    image

Unrouted design in KiCad PCBnew:
image

  • Can you include the latest, related log entries from the .log file?
2020-07-02 07:59:10.397 [main] INFO  eu.mihosoft.freerouting.FreeRouting - Freerouting application is started.
2020-07-02 07:59:34.942 [AWT-EventQueue-0] INFO  eu.mihosoft.freerouting.FreeRouting - Opening 'Green14SegLED.dsn'...
2020-07-02 07:59:35.542 [AWT-EventQueue-0] INFO  eu.mihosoft.freerouting.FreeRouting - Opening 'Green14SegLED.rules'...
2020-07-02 07:59:35.544 [AWT-EventQueue-0] ERROR eu.mihosoft.freerouting.FreeRouting - File 'Green14SegLED.rules' was not found.
  • Please list the detailed steps to reproduce the problem
  1. Export Specctra DSN from KiCad
  2. Open freerouting with commandline above
  3. Open the DSN file in freeRouting dialog "Open Your Own Design"
  • What would you expect freerouting to do in this situation?
    Display the PCB design
  • Is fixing this issue critical for your work?
    Yes

Please see this thread for further information:

Exclude pins from autoroute.

First of all, thank you for taking the time to report an issue.

To make our work easier, please provide as many details as you can:

  • What version of freerouting are you using? 1.4.5-SNAPSHOT
  • On what platform did you run it? Windows, Linux, MacOS? 32-bit or 64-bit? MacOS
  • What type of file are you working with? Can you attach the actual (DSN) file? Kicad files
  • Did you use any command line arguments? No
  • Can you post a screenshot of the problem? No
  • Can you include the latest, related log entries from the .log file? Not important
  • Please list the detailed steps to reproduce the problem
  • What would you expect freerouting to do in this situation?
  • Is fixing this issue critical for your work?

I would like to have feature to exclude some pins from autorouter.
I have a lot of pins on my board and I want few of them to be not routed automatically.

Refactoring: exception handling

Exception handling needs to be improved.

The worst example currently in the code base would be:
} catch (Exception e)
{
}

Yes, just "catch any exception and totally ignore it". That's wrong.

First of all, there are very little cases when you should be catching general 'Exception' - it should be more specific what exactly you are catching and why.

        try
        {
            result = this.file_contents.getInputStream();
        } catch (Exception e)
        {
            result = null;
        }

Should probably be IOException?

Another issue - with a Swing GUI users do not see the console by default, so writing to stdout is not best useability. Actually, most of the runtimes - the unexpected exceptions - should be taken care by a global exception handling FRAME, probably alongside with writing to a log.

Cannot Open FreeRouter 1.4.4 on MacOS

Feerouting Version: 1.4.4
Platform: OSX Mojave, OSX El Capitan
Did you use any command line arguments? -> No
Can you post a screenshot of the problem? -> Yes
freerouter-damaged

Please list the detailed steps to reproduce the problem
Just trying to open FreeRouter

Running the following command from the terminal solves the issue:
sudo xattr -cr <<path>>/Freerouting.app

Best Regards,

Pierre Molinaro

Failed to route a pre-routed board with vias

Hi,

I'm using version 1.4.4 on Windows 10 64-bit to route a 4-layers small board (4"x1.6") made by Kicad version 5.1.5. I manually pre-route some critical paths with vias. The autorouting process won't route the pre-routed portion with via to the rest of associated net: it route 99% of the board with few pass and go in a dead-lock loop of retries routing passes to solve 6 unrouted items. To work around this, I remove vias and retry autorouting with success.

Regards,

Refactoring: logging

Currently the code writes to standard console

        System.out.print("AutorouteEngine.complete_expansion_room: ");
        System.out.println(e);

First of all users do not have access to stdout by default, second this should be written to a file so that further troubleshooting could be possible, this should also be encapsulated.

Looks like there is already a class related to logging - it should be used wider.

Cannot Run Autorouter on MacOS

Freerouting version: 1.4.4
Platform: MacOS Mojave, MacOS ElCapitan, other MacOS ?
Can you attach the actual (DSN) file? Yes, see below. I have tried different files, always the same behaviour.
Did you use any command line arguments -> No
Please list the detailed steps to reproduce the problem
Open the design.dsn file with Open Your Own Design button. Ok.
Click on Autorouter button. Immediately, it displays Autoroute interrupted, 15 connections not found. Autorouting is not performed.

DSN file (I have appended the txt extension in order to be able to attach the file) :

design.dsn.txt

AutoRouter Interrupted does not route.

This file was routed, then changed, then traces deleted, and now again auto-routed. However this second route is failing to route.

  • What version of freerouting are you using?
    freerouting-1.4.4-executable.jar
  • On what platform did you run it? Windows, Linux, MacOS? 32-bit or 64-bit?
    Win10 64 bit prof.
  • What type of file are you working with? Can you attach the actual (DSN) file?
    zMRETestFixture.zip
  • Did you use any command line arguments?
    No I did not.
  • Can you post a screenshot of the problem?
    image
  • Can you include the latest, related log entries from the .log file?
    freerouter.log
  • Please list the detailed steps to reproduce the problem
    Open DSN, click OK on warning about rules, click autoroute button.
  • What would you expect freerouting to do in this situation?
    I would hope it routes the traces like it normally does on a new file.
  • Is fixing this issue critical for your work?
    I can hand route, it would be really helpful to autoroute. I have deadlines, this will require lots of work for me to obtain the dead lines.

freerouting autorouter without graphical interface ! I want to run freerouting on a dokcer container, I only need the autorouter and i run it with commande line. is it possible to run it without using graphical interface ?

First of all, thank you for taking the time to report an issue.

To make our work easier, please provide as many details as you can:

  • What version of freerouting are you using?
  • On what platform did you run it? Windows, Linux, MacOS? 32-bit or 64-bit?
  • What type of file are you working with? Can you attach the actual (DSN) file?
  • Did you use any command line arguments?
  • Can you post a screenshot of the problem?
  • Can you include the latest, related log entries from the .log file?
  • Please list the detailed steps to reproduce the problem
  • What would you expect freerouting to do in this situation?
  • Is fixing this issue critical for your work?

Error Message When Installing on OSX Mojave 10.14.6

Hi, I am trying to install Freerouting on OSX Mojave 10.14.6 for use with KiCad (5.1.2). I downloaded the installer from the following source: https://github.com/freerouting/freerouting/releases/tag/v1.4.4

When I open the downloaded dmg I get a folder with the freerouting program inside. When I try to open this program I get an error message saying that it's "damaged and can't be opened" (see attached image). Same thing happens when I try moving the application elsewhere on my computer.

FreeRouting_Error

Anything you can think of that might be causing this? I am currently working on a board with several hundred low hz signals to route and this option would be much preferable to doing it by hand. Thanks!

Autoroute interrupted, connections not found

Hello,

I'm using freerouting 1.4.4 and I had successfully autoroute my small design exported from Kicad 5 with freerouting. However, after rotating one of the component in the same design, freerouting does not continue to autoroute and says: "Autoroute interrupted, xx connections not found" :

Autoroute_interrupted_33_connections_not_found

I wonder where is the problem, please ?
Thanks and best regards,
Pascal.

AutoRouter Interrupted does not route. (perhaps continued from #27)

I thought issue #27 was good, but I'm having trouble again.

This file was routed, then changed, then traces deleted, and now again auto-routed. However this second route is failing to route. This appears to be a .rules file issue.

  • What version of freerouting are you using?
    freerouting-1.4.4-executable.jar
  • On what platform did you run it? Windows, Linux, MacOS? 32-bit or 64-bit?
    Win10 64 bit prof.
  • What type of file are you working with? Can you attach the actual (DSN) file?
    See attached DSN and .rules file. Source Kicad 5.1.5 files found here. https://github.com/rusefi/hw_48_na
    hw_48_na.zip
  • Did you use any command line arguments?
    No I did not.
  • Can you post a screenshot of the problem?
    image
  • Can you include the latest, related log entries from the .log file?
    freerouter.log
  • Please list the detailed steps to reproduce the problem
    Open DSN, click OK on warning about rules, click autoroute button.
  • What would you expect freerouting to do in this situation?
    I would hope it routes the traces like it normally does on a new file.
  • Is fixing this issue critical for your work?
    I can manually route, so not exactly critical, but really helpful.

Improve the routing algorithm by investigating the fork "1.2.43 Extra"

I've tried to run a few boards without messing with any parameters, just hitting "autorouter".
1.2.43 Extra always seem to produce much more optimal (in terms of via count and length) and overall nicer looking boards.
It would be nice to have an option to use the old algorithm.

Old version:
ver_1 2 43 _Extra

New version:
ver_1 4 4

Autorouter aborts with "This board was already evaluated, so we stop autorouter to avoid the endless loop."

I've been trying to run freerouting on the keyboard I'm working on, but it always fails at pass 5 (or somewhere around that). I can't say that there are no issues with the PCB, but Kicad DRC reports nothing except unconnected elements. Due to being a mirrored PCB there are a lot of traces to be made, but I don't think it should be impossible.

When I import the session file in Kicad, only these two pads are not connected:

grafik

Looks like it fails here for some reason? When I route those pads manually in Kicad the DRC reports no errors left, so I'm a bit confused why freerouting simply stops there.

tairakb.dsn.txt

  • Did you use any command line arguments?

java -jar .../freerouting-executable.jar -mp 100 -de ~/tmp/tairakb.dsn -do ~/tmp/tairakb.ses

  • Can you post a screenshot of the problem?

grafik

  • Can you include the latest, related log entries from the .log file?
2021-08-10 08:45:40.383 [main] INFO  eu.mihosoft.freerouting.FreeRouting - Freerouting application is started.
2021-08-10 08:45:40.392 [main] INFO  eu.mihosoft.freerouting.FreeRouting - Opening '/Users/strayer/tmp/tairakb.dsn'...
2021-08-10 08:45:44.180 [main] INFO  eu.mihosoft.freerouting.FreeRouting - Opening 'tairakb.rules'...
2021-08-10 08:45:44.184 [main] ERROR eu.mihosoft.freerouting.FreeRouting - File 'tairakb.rules' was not found.
2021-08-10 08:45:45.031 [main] INFO  eu.mihosoft.freerouting.FreeRouting - Generating snapshot
2021-08-10 08:46:17.860 [Thread-0] WARN  eu.mihosoft.freerouting.FreeRouting - This board was already evaluated, so we stop autorouter to avoid the endless loop.
2021-08-10 08:46:17.888 [Thread-0] INFO  eu.mihosoft.freerouting.FreeRouting - Saving '/Users/strayer/tmp/tairakb.ses'...
  • Please list the detailed steps to reproduce the problem

Run the above command line or open the dsn in UI and click on autoroute.

Release files usability

Typically an end-users of any tool has to download one most important for end user file.

In our case we have freerouting.exe and what else? Which jar(s)? I would suggest packaging all the files needed to the end user into one .zip for a release.

To be honest I am a java developer yet I had to google the difference between freerouting.jar and freerouting-executable.jar myself - that's a gradle naming convention for "-with-dependencies" vs "-no-dependencies".

What is the workflow to create freerouting.exe since we no longer have it in repository?

Auto-router Interrupted error and failed to auto-route.

When I click the auto-router button, I get the below, and the auto-router simply fails to try and work.
image

This DSN was created by inserting several footprints on a layout. Then auto-route, then desire to make changes. The changes needed to delete several traces and moved components. Then this DSN was created and used to attempt a re-auto-route.

I'm doing this by launching freerouting-executable.jar which notes 1.4.0 in the top left of the dialog box. However this is a special build which was provided to me via Andrey (rusEFI). This version allows opening the file. The official builds fail with a stack overflow error.

I tried the official builds posted at the below link including 1.4.0, 1.4.1 and 1.4.2. All of the official builds simply say stack overflow. This only opens with the .jar that Andrey provided to me.
https://dl.bintray.com/miho/Freerouting/eu/mihosoft/freerouting/freerouting/

This is Win10 64bit,
C:>java -version
java version "13.0.2" 2020-01-14
Java(TM) SE Runtime Environment (build 13.0.2+8)
Java HotSpot(TM) 64-Bit Server VM (build 13.0.2+8, mixed mode, sharing)

Issue_AutoRouter_interupted.zip
freerouter.zip

Feature request: fully batched routing

It should be possible to autoroute a board without launching any GUI.

Implementation problem: currently the processing code is too coupled with GUI code, see class BoardHandling. Refactoring would be needed in order to decouple processing from GUI.

Use Oracle JDK

Buids and runs fine with Oracle JDK, but had problems under Ubuntu using openjdk (both 8 and 9)

Component border tears

Info as per #46

image

  • Can you include the latest, related log entries from the .log file? No log started
  • Please list the detailed steps to reproduce the problem
  • Tried to grab pad of component.
  • Dragged diagonally down to right.
  • The component border tore in two cleanly and diagonally.
  • The component would never drag farther than a few pixels, so the picture above represents a number of drag attempts. That is, the border did not drag as far relative as the drag stroke with the mouse.
  • Not in the picture is, if I grab the same pad and drag diagonally up to the left, yes the tear previously left behind drags a few pixel at a time.
  • What would you expect freerouting to do in this situation? Component borders not to tear and to stay with pads. Components should drag with mouse to the extent possible given the likely constraints applied due to routing layout.
  • Is fixing this issue critical for your work? Depends on whether one wants components to move when gragged, and whether component borders tearing has any knock on effects.

java.lang.ArrayIndexOutOfBoundsException: Index -1 out of bounds for length 8

First of all, thank you for taking the time to report an issue.

To make our work easier, please provide as many details as you can:

  • What version of freerouting are you using? Latest HEAD (6f2855c), code slightly modified as described below.
  • On what platform did you run it? Windows, Linux, MacOS? 32-bit or 64-bit? 64-bit Arch Linux.
  • What type of file are you working with? Can you attach the actual (DSN) file? I'll see if I can come up with a reproducible case. Anyway, DSN file attached.
  • Did you use any command line arguments? -de test.dsn
  • Can you post a screenshot of the problem?
  • Can you include the latest, related log entries from the .log file? See below.
  • Please list the detailed steps to reproduce the problem
  • What would you expect freerouting to do in this situation?
  • Is fixing this issue critical for your work? No.

First, I have made some modifications to the code:

  • Since I noticed that restarting Autorouter after it has stopped (after a pass without improvements) often leads to further improvement, I modified the code to do that without manual intervention. Incidentally, do you think this would be a bad change to integrate? Does the stopping have a useful function? If it does, perhaps provide some kind of optional "infinite mode". (sliedes@2e12b30)
  • Added a log message when an improvement happens in the Batch Optimizer stage. (also in that commit)
  • Silenced a log message about snapshotting, since it was flooding everything else. (sliedes@e13818c)
  • Modified to seed the random generator from time. Sorry, I know this makes reproducing difficult :( My motivation here was the observation that affecting the RNG can lead to vastly different results in different runs, and I wanted to do several non-deterministic runs in parallel and choose the best result. I think the better way to go here would be to add a -seed command line argument. (sliedes@e637396)

The issue:

I frequently see crashes like this, stopping the batch optimizer.

java.lang.ArrayIndexOutOfBoundsException: Index -1 out of bounds for length 8
	at eu.mihosoft.freerouting.geometry.planar.Polyline.remove_overlaps(Polyline.java:1146) ~[freerouting-executable.jar:unspecified]
	at eu.mihosoft.freerouting.geometry.planar.Polyline.<init>(Polyline.java:110) ~[freerouting-executable.jar:unspecified]
	at eu.mihosoft.freerouting.board.PullTightAlgo.skip_segments_of_length_0(PullTightAlgo.java:398) ~[freerouting-executable.jar:unspecified]
	at eu.mihosoft.freerouting.board.PullTightAlgo.reposition_lines(PullTightAlgo.java:231) ~[freerouting-executable.jar:unspecified]
	at eu.mihosoft.freerouting.board.PullTightAlgo45.pull_tight(PullTightAlgo45.java:66) ~[freerouting-executable.jar:unspecified]
	at eu.mihosoft.freerouting.board.PullTightAlgo.pull_tight(PullTightAlgo.java:189) ~[freerouting-executable.jar:unspecified]
	at eu.mihosoft.freerouting.board.PolylineTrace.pull_tight(PolylineTrace.java:878) ~[freerouting-executable.jar:unspecified]
	at eu.mihosoft.freerouting.board.PullTightAlgo.opt_changed_area(PullTightAlgo.java:148) ~[freerouting-executable.jar:unspecified]
	at eu.mihosoft.freerouting.board.RoutingBoard.opt_changed_area(RoutingBoard.java:247) ~[freerouting-executable.jar:unspecified]
	at eu.mihosoft.freerouting.board.RoutingBoard.opt_changed_area(RoutingBoard.java:221) ~[freerouting-executable.jar:unspecified]
	at eu.mihosoft.freerouting.autoroute.BatchAutorouter.remove_tails(BatchAutorouter.java:300) ~[freerouting-executable.jar:unspecified]
	at eu.mihosoft.freerouting.autoroute.BatchAutorouter.autoroute_passes_for_optimizing_item(BatchAutorouter.java:68) ~[freerouting-executable.jar:unspecified]
	at eu.mihosoft.freerouting.autoroute.BatchOptRoute.opt_route_item(BatchOptRoute.java:174) ~[freerouting-executable.jar:unspecified]
	at eu.mihosoft.freerouting.autoroute.BatchOptRoute.opt_route_pass(BatchOptRoute.java:103) ~[freerouting-executable.jar:unspecified]
	at eu.mihosoft.freerouting.autoroute.BatchOptRoute.optimize_board(BatchOptRoute.java:74) ~[freerouting-executable.jar:unspecified]
	at eu.mihosoft.freerouting.interactive.BatchAutorouterThread.thread_action(BatchAutorouterThread.java:90) [freerouting-executable.jar:unspecified]
	at eu.mihosoft.freerouting.interactive.InteractiveActionThread.run(InteractiveActionThread.java:80) [freerouting-executable.jar:unspecified]

My gut feeling is that this happens more in cases where the initial routing has lead to a worse solution (more vias and track), but that might be completely wrong.

FWIW, I also see backtraces and other suspicious messages which do not seem to stop the progress (probably separate issues), like this:

2020-11-24 21:56:57.695 [Thread-2] ERROR eu.mihosoft.freerouting.FreeRouting - AutorouteEngine.complete_expansion_room: 
java.lang.NullPointerException: null
	at eu.mihosoft.freerouting.board.ShapeSearchTree45Degree.restrain_shape(ShapeSearchTree45Degree.java:249) ~[freerouting-executable.jar:unspecified]
	at eu.mihosoft.freerouting.board.ShapeSearchTree45Degree.complete_shape(ShapeSearchTree45Degree.java:138) ~[freerouting-executable.jar:unspecified]
	at eu.mihosoft.freerouting.autoroute.AutorouteEngine.complete_expansion_room(AutorouteEngine.java:404) [freerouting-executable.jar:unspecified]
	at eu.mihosoft.freerouting.autoroute.MazeSearchAlgo.init(MazeSearchAlgo.java:966) [freerouting-executable.jar:unspecified]
	at eu.mihosoft.freerouting.autoroute.MazeSearchAlgo.get_instance(MazeSearchAlgo.java:70) [freerouting-executable.jar:unspecified]
	at eu.mihosoft.freerouting.autoroute.AutorouteEngine.autoroute_connection(AutorouteEngine.java:121) [freerouting-executable.jar:unspecified]
	at eu.mihosoft.freerouting.autoroute.BatchAutorouter.autoroute_item(BatchAutorouter.java:366) [freerouting-executable.jar:unspecified]
	at eu.mihosoft.freerouting.autoroute.BatchAutorouter.autoroute_pass(BatchAutorouter.java:257) [freerouting-executable.jar:unspecified]
	at eu.mihosoft.freerouting.autoroute.BatchAutorouter.autoroute_passes_for_optimizing_item(BatchAutorouter.java:61) [freerouting-executable.jar:unspecified]
	at eu.mihosoft.freerouting.autoroute.BatchOptRoute.opt_route_item(BatchOptRoute.java:174) [freerouting-executable.jar:unspecified]
	at eu.mihosoft.freerouting.autoroute.BatchOptRoute.opt_route_pass(BatchOptRoute.java:103) [freerouting-executable.jar:unspecified]
	at eu.mihosoft.freerouting.autoroute.BatchOptRoute.optimize_board(BatchOptRoute.java:74) [freerouting-executable.jar:unspecified]
	at eu.mihosoft.freerouting.interactive.BatchAutorouterThread.thread_action(BatchAutorouterThread.java:90) [freerouting-executable.jar:unspecified]
	at eu.mihosoft.freerouting.interactive.InteractiveActionThread.run(InteractiveActionThread.java:80) [freerouting-executable.jar:unspecified]

and

2020-11-25 01:30:20.647 [Thread-5] ERROR eu.mihosoft.freerouting.FreeRouting - AutorouteEngine.complete_expansion_room: 
java.lang.NullPointerException: null

I have attached couple of full logs from different runs which show stack traces like this (run 1 crashed with Index out of bounds; run 2 did not crash, but did print out a different set of warnings, which might be interesting.

Steps to reproduce:

  1. Start freerouting with -de bug-design.dsn
  2. Start the autorouter
  3. (Optional) possibly stop the autorouter and restart it to muck with the RNG state (this seems to make more difference to the result than the RNG seeding patch above).
  4. ... with luck, you will see the crash.

freerouting-run1-crash.log
freerouting-run2-no-crash.log
bug-design.dsn

.github workflows

This project could use .github workflows feature

One of the usages could be to to compile by different versions of java just to make sure that both 8 and latest are compiling.

I believe newer DSN files don't work

When using the binary I see the message "unable to read .dsl-file" in first open dialog GUI.
This is the file:
http://diyhpl.us/~nmz787/LPC18XX_43XX_SCH.DSN

When I tried it in NetBeans, I got this:
java.lang.Error: Illegal character <�>
at designformats.specctra.SpecctraFileScanner.next_token(SpecctraFileScanner.java:1407)
at designformats.specctra.DsnFile.read(DsnFile.java:59)
at interactive.BoardHandling.import_design(BoardHandling.java:1045)
at gui.BoardFrame.read(BoardFrame.java:180)
at gui.MainApplication.create_board_frame(MainApplication.java:301)
at gui.MainApplication.open_board_design_action(MainApplication.java:236)
at gui.MainApplication.access$200(MainApplication.java:31)
at gui.MainApplication$4.actionPerformed(MainApplication.java:171)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2346)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:252)
at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:289)
at java.awt.Component.processMouseEvent(Component.java:6525)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3321)
at java.awt.Component.processEvent(Component.java:6290)
at java.awt.Container.processEvent(Container.java:2234)
at java.awt.Component.dispatchEventImpl(Component.java:4881)
at java.awt.Container.dispatchEventImpl(Container.java:2292)
at java.awt.Component.dispatchEvent(Component.java:4703)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4898)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4533)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4462)
at java.awt.Container.dispatchEventImpl(Container.java:2278)
at java.awt.Window.dispatchEventImpl(Window.java:2739)
at java.awt.Component.dispatchEvent(Component.java:4703)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:746)
at java.awt.EventQueue.access$400(EventQueue.java:97)
at java.awt.EventQueue$3.run(EventQueue.java:697)
at java.awt.EventQueue$3.run(EventQueue.java:691)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:75)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:86)
at java.awt.EventQueue$4.run(EventQueue.java:719)
at java.awt.EventQueue$4.run(EventQueue.java:717)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:75)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:716)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)

Component Border dislodges from pads.

First of all, thank you for taking the time to report an issue.

To make our work easier, please provide as many details as you can:

  • What version of freerouting are you using? 1.3.1 from Layout Editor so apparently 1.2.43 from Wirtz
  • On what platform did you run it? Windows, Linux, MacOS? 32-bit or 64-bit? Windows 10
  • What type of file are you working with? Can you attach the actual (DSN) file? Specctra DSN out of KiCad (5.1.5)-2
  • Did you use any command line arguments? no
  • Can you post a screenshot of the problem?
    image
  • Can you include the latest, related log entries from the .log file? No, I did not start a log
  • Please list the detailed steps to reproduce the problem
  • Sucked DSN file in.
  • Let auto router run.
  • Once auto router ran, I tried moving components around to get a better board layout.
  • The auto router seemed to behave as I expected. It would re-route as I re-arranged the board.
  • The problem seemed to occur when I was trying to move a component that was obviously constrained for some undisclosed reason.
  • When I dropped the component I was dragging, the component would snap back to the start of the drag position, or at least the pads would. The component boundary was left behind.
  • The board and pads subsequently would move as one, but the border would remain out of place with respect to the component.
  • What would you expect freerouting to do in this situation? I would not expect the component border to dislodge from the pads.
  • Is fixing this issue critical for your work? Depends, once laid out, how would you recentre the borders on the pads in FreeRouter? Who knows what effect it would have outside the tool?

freerouting without graphical interface

First of all, thank you for taking the time to report an issue.

To make our work easier, please provide as many details as you can:

  • What version of freerouting are you using?
  • On what platform did you run it? Windows, Linux, MacOS? 32-bit or 64-bit?
  • What type of file are you working with? Can you attach the actual (DSN) file?
  • Did you use any command line arguments?
  • Can you post a screenshot of the problem?
  • Can you include the latest, related log entries from the .log file?
  • Please list the detailed steps to reproduce the problem
  • What would you expect freerouting to do in this situation?
  • Is fixing this issue critical for your work?

Add "Discussions" tab to freerouting/freerouting

First of all, thank you for taking the time to report an issue.

To make our work easier, please provide as many details as you can:

  • What version of freerouting are you using? 1.2.43 Extra
  • On what platform did you run it? Windows, Linux, MacOS? 32-bit or 64-bit? Windows 10, 32 bit
  • What type of file are you working with? Can you attach the actual (DSN) file? N/A
  • Did you use any command line arguments? N/A
  • Can you post a screenshot of the problem? N/A
  • Can you include the latest, related log entries from the .log file? N/A
  • Please list the detailed steps to reproduce the problem N/A
  • What would you expect freerouting to do in this situation? Add "Discussions" tab to freerouting/freerouting
  • Is fixing this issue critical for your work? No

Hi

Please add a "Discussions" tab to the github.com/freerouting/freerouting page. I am a huge fan and regular user of FreeRouting since 2007 and very interested in its development. Would like to discuss with other FreeRouting users in forum without bothering the devs with my questions and thoughts.

Some other github projects have a discussions forum and I think it would be helpful here as well. At least I could speak with other people like myself without bugging devs with silly, repetitive questions and bounce ideas around in the appropriate forum. If there is a FreeRouting forum somewhere else please let me know because I am not aware of any.

Please consider, thanks! Andrew Lynch

Windows dpi scaling goes wrong

I hope this is the correct repo for issues!

After starting freerouter it looks normal but as soon as I click on "Open your own desgin", everything is twice the size it should be. Possibly something to do with having a 4k high dpi screen but the same thing happens on my second screen (1080p).

image

After clicking:
image

This leaves a lot of text invisble or hard to read:

image

Cheers to all who keep working on this!

Can't open file. Stuck at "Loading desing..." in Windows 10 64 bits.

Whenever I try to open a .dsn file, it gets stuck at Loading design F:\[path to design]\Freerouting Issue.dsn.
The logs say eu.mihosoft.freerouting.FreeRouting - Component.read_place_scope: ) expected.

  • What version of freerouting are you using?
    Freerouting version 1.4.4
  • On what platform did you run it? Windows, Linux, MacOS? 32-bit or 64-bit?
    I am running Windows 10 64 Bit.
$ D:\Java\jdk-11.0.8\bin\java.exe --version
java 11.0.8 2020-07-14 LTS
Java(TM) SE Runtime Environment 18.9 (build 11.0.8+10-LTS)
Java HotSpot(TM) 64-Bit Server VM 18.9 (build 11.0.8+10-LTS, mixed mode)
  • What type of file are you working with? Can you attach the actual (DSN) file?
    I am working with a KiCad generated file:
    FreeRouting Issue.zip

  • Did you use any command line arguments?
    I tried using the GUI and passing the file to the executable using -de.

  • Can you post a screenshot of the problem?
    Freerouter

  • Can you include the latest, related log entries from the .log file?

2020-07-21 20:45:23.244 [main] INFO  eu.mihosoft.freerouting.FreeRouting - Freerouting application is started.
2020-07-21 20:45:23.678 [main] TRACE eu.mihosoft.freerouting.FreeRouting - Method 'MainApplication.main()' was performed in 0,55 seconds.
2020-07-21 20:45:45.819 [AWT-EventQueue-0] INFO  eu.mihosoft.freerouting.FreeRouting - Opening 'Freerouting Issue.dsn'...
2020-07-21 20:45:46.111 [AWT-EventQueue-0] WARN  eu.mihosoft.freerouting.FreeRouting - Component.read_place_scope: ) expected
  • Please list the detailed steps to reproduce the problem
    Just try to open a .dsn file.
  • What would you expect freerouting to do in this situation?
    Show the tracer GUI
  • Is fixing this issue critical for your work?
    Yes as I can't use the software at all.

Request Windows 32 bit version

First of all, thank you for taking the time to report an issue.

To make our work easier, please provide as many details as you can:

  • What version of freerouting are you using? old Java based 1.2.43 (confirmed)
  • On what platform did you run it? Windows, Linux, MacOS? 32-bit or 64-bit? Windows10, 32 bit with Java
  • What type of file are you working with? Can you attach the actual (DSN) file? Multiple DSN files
  • Did you use any command line arguments? No
  • Can you post a screenshot of the problem? N/A, 64 bit Windows installer gives an error message and refuses to install
  • Can you include the latest, related log entries from the .log file? N/A
  • Please list the detailed steps to reproduce the problem N/A
  • What would you expect freerouting to do in this situation? Please post a Windows 32 bit build along side the 64 bit build or include dual 64 bit and 32 bit binaries in the Windows distribution package
  • Is fixing this issue critical for your work? No, but would be nice to use updated version of FreeRouting with updates

Making code compatible with java 8

Java 8 vs java 11 is a bit controversial - the fact that the industry choice to back-port fixes into 8 and provide support of java 8 speaks volume, also there is some licencing drama.

As long as it's trivial to do so I believe that it would be nicer to compile code with java 8 (as long as it does not use removed API) - this case all users from 8 to 13 would be able to run the code.

This could absolutely be revisited once/if there are additional arguments for java 9+.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.