Author Topic: Getting ground pours from dxf imports  (Read 1202 times)

0 Members and 1 Guest are viewing this topic.

Offline InfravioletTopic starter

  • Frequent Contributor
  • **
  • Posts: 991
  • Country: gb
Getting ground pours from dxf imports
« on: May 07, 2023, 06:32:18 pm »
This is for eagle <v9, I know the later versions have a "convert to polygon" button, but the version I use doesn't.

I've found dxf import really helpful for creating complex trace shapes, defining the traces in more mechanical CAD packages, then converting to dxf and importing as a series of lines with eagle thickens up in to traces of an appropriate width during the import process.

But now I want to do it for "polygon" areas too, so I can have large copper planes in specific shapes.

I don't see any way to convert a selected group of imported wire lines in to a polygon area, is there a trick applicable to eagle versions before the "convert to polygon" right click option was introduced in about v9.6 ish.

I've tried looking for alternative dxf import ULPs to the inbuilt one, but all of these either end up importing just like the inbuilt one, or importing nothing at all whilst not giving even an error message.

I've also tried converting dxfs to svg then using an svg importer ULP, this gives no result either and no error message.

I even thought of importing dxfs to the copper keepout layers, then defining large polygons to enclose them, but this would end up with usefully shaped ppour areas inside the dxf's outline, but also unwanted pour areas outside the outline with no practical means of erasing those outer pour regions.

The inbuilt dxf importer functionality always shows you the "script" it is about to run before it does so, this script can be edited with some find and replace, but none of the things I've tried there seem to work either. Each line shows the import of a "wire" segment and defines end points, but it doesn't work if I swap the word "wire" for "poly" on each line.

I did find some limited examples of polygon generating scripts online, manually created ones, can anyone explain if there is a way to convert the import script of a dxf so it comes in as a polygon instead?

DXF import example (partial):

# dxfimport generated script file.
Grid mic 1 off;
Set Wire_Bend 2;
CHANGE LAYER 1;
Change Font Vector;
Wire 200 (-6636.06 112.95) (-6600.52 87.09);
Wire 200 (-6600.52 87.09) (-6416.43 -42.77);
Wire 200 (-6416.43 -42.77) (-6382.17 -63.86);
Wire 200 (-6382.17 -63.86) (-6205.03 -169.46);
Wire 200 (-6205.03 -169.46) (-6173.68 -185.69);
Wire 200 (-6173.68 -185.69) (-6011.86 -266.52);

#various other wire lines here which I've cut out to keep the post short

Wire 200 (-1593.80 -427.10) (-1635.90 -215.40);
Wire 200 (-1635.90 -215.40) (-1650.00 0.00);
Window Fit;
# lines=960, arcs=0, circles=0, polylines=0
Grid last;


Polygon generation example:

Change Layer Top;

Change Pour Solid;

Poly .2 (0 -50) @-50 (0 50) (0 31.7) @+31.7 (0 -31.7) (0 -50);

Poly .2 (0 -50) @+50 (0 50) (0 31.7) @-31.7 (0 -31.7) (0 -50);



And even trying to edit that polygon script causes it to crash if some of the numbers get changed.

Any suggestions would be appreciated of ways to get polygon area pours from imported dxfs.

Thanks
« Last Edit: May 07, 2023, 06:34:04 pm by Infraviolet »
 

Offline jpanhalt

  • Super Contributor
  • ***
  • Posts: 3316
  • Country: us
Re: Getting ground pours from dxf imports
« Reply #1 on: May 07, 2023, 08:30:48 pm »
I did the round board with a pour years ago.  Unfortunately, I can't fine the .brd file.   Attached is a picture.

1) One option is to do a linear polygon pour, then put a circular dimension inside it.  Cost will the the same.

2) I you really insist on a circular pour.  Set the radius to what you want, then do the polygon in 4 3 steps. (attachment 2). That polygon fills just fine and behaves normally.

Eagle allows a lot of options.
« Last Edit: May 07, 2023, 08:49:49 pm by jpanhalt »
 

Offline InfravioletTopic starter

  • Frequent Contributor
  • **
  • Posts: 991
  • Country: gb
Re: Getting ground pours from dxf imports
« Reply #2 on: May 07, 2023, 11:50:44 pm »
My situation is rather nastier than a simple circle. I know the trick for using the curved line segment for quarter circles when drawing, but I'm in a situation here where the shape I need to make a copper plane is much more complex, it is an unusual form defined by a polar equation, a circle where the radius varies with the angle, I can't draw it practically within eagle, but I have a dxf of it produced in mechanical CAD software which i want to import.
 

Offline jpanhalt

  • Super Contributor
  • ***
  • Posts: 3316
  • Country: us
Re: Getting ground pours from dxf imports
« Reply #3 on: May 08, 2023, 12:10:53 am »
I thought your original question was for a circular pour.  (If you noticed, it is only 3, not four segments, just as rectangles are only 3.) Apparently, that has been edited.  I have NEVER had a problem creating any shaped pour.  It is a powerful tool.  All you need to remember is that in Eagle, geometry and signals are two separate entities.  If you want a signal, including a ground pour, use the proper tool.  If you want to import a DXF signal design, that may be possible.  I haven't tried it.  But, you can use a signal tool to trace a geometry.  Using the grid is extremely helpful when dimensions are critical and "odd."  Or, use the command line.

Why don't you show what you want to reproduce?  Maybe I can help.  I am no good at fighting windmills, though.  You might find KiCad more suitable too.

EDIR: Actually, my post was at 8:xx something, not 7:xx.  Sorry, we are on EDT.
« Last Edit: May 08, 2023, 12:14:34 am by jpanhalt »
 

Offline InfravioletTopic starter

  • Frequent Contributor
  • **
  • Posts: 991
  • Country: gb
Re: Getting ground pours from dxf imports
« Reply #4 on: May 08, 2023, 04:32:55 pm »
I've tried importing dxfs and then assinging them to signals, it works really well. I can also assign imported dxfs to be things like the lines of a board outline or to be lines in a silkscreen layer. But I can't seem to find any way to get these "line"/"wire" type features to convert to filled polygons (also it seems filled polygon shapes can only exist on the copper layers, whereas "line"/"wire"/"signal" type shapes can be on copper layers, or any other layer too, although this isn't a problem for anything I'm trying to design).
 

Offline jpanhalt

  • Super Contributor
  • ***
  • Posts: 3316
  • Country: us
Re: Getting ground pours from dxf imports
« Reply #5 on: May 08, 2023, 05:55:37 pm »
Since you haven't shown your design...
So far as I know polygon is a special tool of the signal class.

You can always convert the DXF to Dimension layer and make the polygon pour a rectangle around it.  "Isolation" will give you a border.  The board shop should follow the dimension.  Of course, it's worth confirming. 
 

Offline InfravioletTopic starter

  • Frequent Contributor
  • **
  • Posts: 991
  • Country: gb
Re: Getting ground pours from dxf imports
« Reply #6 on: May 08, 2023, 11:50:55 pm »
Very ugly workaround, but I imported my dxf to the restrict layer, then manually drew the polygon pour tracing around it such that the polygon's line wad overlapping the restrict line at all points even if not quite sharing a centre with it. With this done when I hit the ratsnest button I was able to get a correctly shaped copper pour because the restrict line kept the pour within the dxf's shape, and by having the pour overlapping the restrict line there wasn't sufficient space outside the desired shape for any parts of the pour to squeeze in to that region.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf