element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet & Tria Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • About Us
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Autodesk EAGLE
  • Products
  • More
Autodesk EAGLE
EAGLE User Support (English) [SOLVED] Ratsnets desition make based on different layer
  • Blog
  • Forum
  • Documents
  • Events
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Autodesk EAGLE to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • Replies 10 replies
  • Subscribers 180 subscribers
  • Views 1286 views
  • Users 0 members are here
  • eagle 8
  • ratsnest
  • eagle 7.7
Related

[SOLVED] Ratsnets desition make based on different layer

truhlik_fredy
truhlik_fredy over 8 years ago

Hello everybody,

 

I'm wondering if following is possible. I need to have a ratsnets being made based on top layer, but the polygon itself needs to be stored in a different layer. I need to automate process with cam and I need to have it stored under different layer to apply different settings to the job. But the ratsnets needs to be decided on the top layer.

 

Thanks in advance for any hints or ideas.

 

PS: if it's possible in any specific version I don't mind upgrading/downgrading.

  • Sign in to reply
  • Cancel

Top Replies

  • autodeskguest
    autodeskguest over 7 years ago +3
    Anton Krug wrote: I'm wondering if following is possible. I need to have a ratsnets being made based on top layer, but the polygon itself needs to be stored in a different layer. I need to automate process…
  • truhlik_fredy
    truhlik_fredy over 7 years ago in reply to autodeskguest +2
    Hi Lorenz, Thank you very much, it's almost doing it perfectly. It's bit rough around the edges, which probably I could live with, or maybe is there a way to make the line much thiner? But there is an…
  • rachaelp
    rachaelp over 7 years ago in reply to autodeskguest +2
    Nice solution Lorenz! I've learned something, I did not know about the contour() and fillings() loop members in polygons. Thank you! Anton, if you set the line width of your polygon in your design thinner…
Parents
  • autodeskguest
    autodeskguest over 7 years ago

    Anton Krug wrote:

    I'm wondering if following is possible. I need to have a ratsnets

    being made based on top layer, but the polygon itself needs to be

    stored in a different layer. I need to automate process with cam and I

    need to have it stored under different layer to apply different

    settings to the job. But the ratsnets needs to be decided on the top

    layer.

     

    you could use an ulp to copy the polygons, redraw them in the target

    layer.

     

    Something like the following:

     

    |  board(BRD) {

    |    string s, cmd = "change layer 100;";

    |    BRD.signals(SIG) {

    |      if (SIG.name == "TEST") {

    |        SIG.polygons(POL) {

    |          if (POL.layer == 1) {

    |            sprintf(s, "change width %fmic;", u2mic(POL.width));

    |            cmd += s;

    | 

    |            POL.contours(FIL) {

    |              sprintf(s, "wire (%fmic %fmic) (%fmic %fmic);", u2mic(FIL.x1), u2mic(FIL.y1), u2mic(FIL.x2), u2mic(FIL.y2));

    |              cmd += s;

    |            }

    |            POL.fillings(FIL) {

    |              sprintf(s, "wire (%fmic %fmic) (%fmic %fmic);", u2mic(FIL.x1), u2mic(FIL.y1), u2mic(FIL.x2), u2mic(FIL.y2));

    |              cmd += s;

    |            }

    |          }

    |        }

    |      }

    |    }

    |    exit(cmd);

    |  }

     

    it redraws the polygons of signal "TEST" in the top layer into layer

    100 using wires.

     

    Thats quick and dirty 8-)  but seems to do the job

    --

     

    Lorenz

     

    • Cancel
    • Vote Up +3 Vote Down
    • Sign in to reply
    • Cancel
Reply
  • autodeskguest
    autodeskguest over 7 years ago

    Anton Krug wrote:

    I'm wondering if following is possible. I need to have a ratsnets

    being made based on top layer, but the polygon itself needs to be

    stored in a different layer. I need to automate process with cam and I

    need to have it stored under different layer to apply different

    settings to the job. But the ratsnets needs to be decided on the top

    layer.

     

    you could use an ulp to copy the polygons, redraw them in the target

    layer.

     

    Something like the following:

     

    |  board(BRD) {

    |    string s, cmd = "change layer 100;";

    |    BRD.signals(SIG) {

    |      if (SIG.name == "TEST") {

    |        SIG.polygons(POL) {

    |          if (POL.layer == 1) {

    |            sprintf(s, "change width %fmic;", u2mic(POL.width));

    |            cmd += s;

    | 

    |            POL.contours(FIL) {

    |              sprintf(s, "wire (%fmic %fmic) (%fmic %fmic);", u2mic(FIL.x1), u2mic(FIL.y1), u2mic(FIL.x2), u2mic(FIL.y2));

    |              cmd += s;

    |            }

    |            POL.fillings(FIL) {

    |              sprintf(s, "wire (%fmic %fmic) (%fmic %fmic);", u2mic(FIL.x1), u2mic(FIL.y1), u2mic(FIL.x2), u2mic(FIL.y2));

    |              cmd += s;

    |            }

    |          }

    |        }

    |      }

    |    }

    |    exit(cmd);

    |  }

     

    it redraws the polygons of signal "TEST" in the top layer into layer

    100 using wires.

     

    Thats quick and dirty 8-)  but seems to do the job

    --

     

    Lorenz

     

    • Cancel
    • Vote Up +3 Vote Down
    • Sign in to reply
    • Cancel
Children
  • truhlik_fredy
    truhlik_fredy over 7 years ago in reply to autodeskguest

    Hi Lorenz, Thank you very much,  it's almost doing it perfectly.

     

    It's bit rough around the edges, which probably I could live with, or maybe is there a way to make the line much thiner?

    But there is an issue and it's creating some artifacts where it is crossing traces (see attached picture), this layer will be fed into cam job to do isolation routing on a CNC so the artifacts would damage traces, while I need to remove only copper around the traces. The isolation routing is heavily time consuming, while there is an easier way to do it on the whole PCB, with a polygon fill / ratsnest I would have the freedom to select only desired parts where I really need to do it.

     

    When I was doing chemical process, everything worked fine I worked with output which described the traces which need to stay.

    While with mechanical CNC routing process I do the oposite, I concentrate not on traces, but on their outlines, because that needs to be removed, So the result looks like I would have polyfil on whole board enable. Which is problem if there is for example USB connector on a PCB or something where polyfill is undesired. And the polygon fill can be done in flatcam but it needs to know all the places to avoid already in the polygon, if I would leave the polygon there without conflict avoidance then the router would mill away whole polygon. So this way it will turn into an outline which then can be safely filled in flatcam into gcode which will mill away all the copper safely without damaging the traces.

    With chemical process the polyfill added more copper on the result, while now with the polyfil I want to remove copper in the mechanical process, because without anything the results look like this:

    https://i.ytimg.com/vi/g7A0pnUetRY/maxresdefault.jpg

    It just mills around the outlines of traces so it isolates the traces from each other and leaving large chunks of copper present.

     

    Here is the artifact of the script:

     

    image

     

    You think it could be fixed?  Thank you very much again, with this I could have the process automated, while now I waste lot of time doing it by hand on every single export image

     

    Best regards,

    Anton

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • Cancel
  • rachaelp
    rachaelp over 7 years ago in reply to autodeskguest

    Nice solution Lorenz! I've learned something, I did not know about the contour() and fillings() loop members in polygons. Thank you!

     

    Anton, if you set the line width of your polygon in your design thinner this should translate to a thinner line in your new polygons.

     

    If you see this line:

     

    sprintf(s, "change width %fmic;", u2mic(POL.width));

     

    This sets the line width based on the width specified for the polygon (which it needs to do). So you should just be able to reduce the polygon line width down and hopefully that will solve some of your remaining issues.

     

    Best Regards,

     

    Rachael

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • Cancel
  • autodeskguest
    autodeskguest over 7 years ago in reply to truhlik_fredy

    Anton Krug wrote:

    Hi Lorenz, Thank you very much,  it's almost doing it perfectly.

     

    It's bit rough around the edges, which probably I could live with, or maybe is there a way to make the line much thiner?

     

    change the line

     

    |  string s, cmd = "change layer 100;";

     

    into

     

    |  string s, cmd = "change layer 100; set wire_bend 2;";

     

    that should get rid of the rough edges on sloping lines. I didn't see

    this here because I had set the wire_bend beforehand.

    --

     

    happy new year

     

    Lorenz

     

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • Cancel
  • truhlik_fredy
    truhlik_fredy over 7 years ago in reply to autodeskguest

    Hi Lorenz,

     

    This is excellent, I made a handful of ULP scripts many years ago, but they were not close to your skill. How did you learn to be so brilliant at it? image

     

    The wire_bend fixed both issues the outline stroke was there to smooth the edges, but without bend it was forced to use perpendicular lines wich caused the second issue. If you will be in Dublin at some point, give me shout, I will take you for a lunch/dinner or few pints (whatever you prefer).

     

    Too bad this is not directly supported in the eagle (collisions referencing different layer than the original object), it would allow some interesting scripting in CAM. The ULP it looks bit heavy (maybe because the lines are hardcoded), but they are static so they can move around layers, which is excellent. I was hoping there would be bundled feature, or if not a brute force ULP script which will mimic the results, which this is exactly that image This will save me so much time, in practice I will use it on very small portions on PCB, but it was human labor heavy to create the polygons for every iteration of the board.

     

    I added the cleaning of the 100 layer so it's safe to re-run the script multiple times when the design changes and I will need to refresh the layer 100.

     

     

      string s, cmd = "change layer 100; set wire_bend 2;";

    cmd += "DISPLAY NONE 100; GROUP ALL; DELETE (C> 0 0);DISPLAY 1 16;";

      BRD.signals(SIG) {

     

    BTW: I edited the tile as solved, but is there a way to highlight your reply as the solution answer?

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Cancel
  • truhlik_fredy
    truhlik_fredy over 7 years ago in reply to rachaelp

    That didn't solve the second issue, while made the first issue less dominant (which was not that bad, the second issue was the real problem). Lorenz reply fixed both issues.

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube