Strokes to polygons

Post about using Inkscape with cutters or plotters.
glococo
Posts: 6
Joined: Sat Jun 01, 2013 11:04 pm

Strokes to polygons

Postby glococo » Sat Jun 01, 2013 11:19 pm

Hi !

I would like to convert this attached graphics to plt or dxf in full polygons format. However Im finding troubles in converting strokes/paths to polygons
Some programs (like eagleCad) export polygons like strokes or paths, and I need for the laserplotter a polygon to fill it. No strokes.

I ungrouped, break apart, and converted any stroke or object to a path. Now If I try to make UNION, the polygon result is far away from what I expect. Same for Combine.

Any help is really appreciated.
Attachments
strokes2path.rar
ugly eaglecad export to gerber, gerbv export to svg, open in inkscape to convert to dxf or plt
(20.54 KiB) Downloaded 261 times
inkscape_union.JPG
inkscape_union.JPG (155.69 KiB) Viewed 6426 times

Lazur
Posts: 4717
Joined: Tue Jun 14, 2016 10:38 am

Re: Strokes to polygons

Postby Lazur » Sun Jun 02, 2013 8:48 am

Welcome aboard!

I don't really understand what you want the design to be.
Could you be a bit more specific?
You are using the tools we would suggest so you might as well attach the original svg.

User avatar
flamingolady
Posts: 687
Joined: Wed Jun 10, 2009 1:40 pm

Re: Strokes to polygons

Postby flamingolady » Sun Jun 02, 2013 1:27 pm

If you don't want to see all of the circles, then you could do a path/union, or to just the ones you chose, but I'm also not entirely sure what outcome it is that you are expecting.

User avatar
Maestral
Posts: 982
Joined: Sat Aug 27, 2011 7:10 am

Re: Strokes to polygons

Postby Maestral » Sun Jun 02, 2013 5:46 pm

Have you checked those two buttons in the upper right corner of the Fill and Stroke dialog? The ones which deals with path intersections.
That could cause it aswell as different (sub)path directions (Path/Reverse). Just in case you would like to avoid future counterdirectional paths, you can enable "Show path direction on outlines" through Inkscape Preferences/Tools/Node.
:tool_zoom: <<< click! - but, those with a cheaper tickets should go this way >>> :!:

glococo
Posts: 6
Joined: Sat Jun 01, 2013 11:04 pm

Re: Strokes to polygons

Postby glococo » Sun Jun 02, 2013 10:35 pm

Hi and thanks for your replies,
I was trying to convert those strokes to a nice polygon, since my laserplotter need a polygon to fill. A was thinking in UNION, but for some reason, is not working as expected.
I take again a portion of the design, ungrouped and break apart everything. Then, I chose UNION with both options that MAESTRAL show me. The result is very similar.

Original: http://bayimg.com/EAnHLAaEa

results with both options: http://bayimg.com/EaNHmAaeA http://bayimg.com/EAnHnaAea
I also attached the drawing.

Thank you so much for you support!
Attachments
drawing.svgz
(7.32 KiB) Downloaded 260 times

Lazur
Posts: 4717
Joined: Tue Jun 14, 2016 10:38 am

Re: Strokes to polygons

Postby Lazur » Mon Jun 03, 2013 7:45 am

A-ha! So that's for a circuit board.
For the poligons, the paths should be combined and the unconnected nodes connected.
Thus delete every second path as they are unnecessary.
At least for that biggest "poligon".
But what do you want the lined background to be? You want to create a closed path from that as well?
Another thing, those circle-like shapes aredrawn with only 3 nodes. Maybe it would be a good idea to redraw them with the ellipse tool.

Edit: attached svg now contains the basic polygon corrected.
Attachments
hlp46.svg
(61.98 KiB) Downloaded 324 times

glococo
Posts: 6
Joined: Sat Jun 01, 2013 11:04 pm

Re: Strokes to polygons

Postby glococo » Mon Jun 03, 2013 9:10 am

Hi Lazur!
Yes, EagleCAD has a very precarious export option, and I found one way to reach the laserplotter:
1) Export from eaglecad in Gerber (http://bayimg.com/naNjfAaea)
2) Open gerber files with opensource Gerbv and export again in SVG
3) open in Inkscape, <b>convert strokes to paths</b>, and export again to plt.
4) Open the plt with a very ugle app for the proprietary laser controller (made only for windows and the only reason I actually need something from microsoft), and plot!

Now, What I did was:
1) Break apart selected nodes http://bayimg.com/NanJPAaEa
2) Combine http://bayimg.com/NaNJHAaEa
3) Union http://bayimg.com/nAnjnaaea

And the end picture is not what I expected from UNION. I think I'm missing something...
Since this is a simple drawing to find the automatized way, I need to make a tool apply order to make the right output for high complex drawings that cant be manipulated.

Lazur
Posts: 4717
Joined: Tue Jun 14, 2016 10:38 am

Re: Strokes to polygons

Postby Lazur » Mon Jun 03, 2013 9:27 am

Now you are confusing me with that convert strokes to paths.
Thought that the laser pointer could plot only the outlines.
Thought you want the lines to add up to be one path that the laser beam can follow through at once.
Seemed as the main task, and, for such use, that the original svg is not drawn that way was the problem.
I don't think there is an automatic method in inkscape to capture the right parts and join them back together and remove the doubles, for more complex projects.
In my opinion your work would be much easier if you could produce right svg-s from the start.
And, by that point, is that really necessary to have?
Inkscape can bear with some dxf files, so you may try that instead of exporting thorugh gerbv that seems to mess up the svg-s.

glococo
Posts: 6
Joined: Sat Jun 01, 2013 11:04 pm

Re: Strokes to polygons

Postby glococo » Mon Jun 03, 2013 9:31 am

Eureka ! I found the solution. Im out of battery, gime some hours and post the result with pictures.

meanwhile it was from initial:
ungroup
stroke to path
breakapart selected nodes
stroke to path
combine selected nodes
UNION !

glococo
Posts: 6
Joined: Sat Jun 01, 2013 11:04 pm

Re: Strokes to polygons

Postby glococo » Mon Jun 03, 2013 9:35 am

Many people complain about bad quality export in eaglecad and other electronic cad programs in gerber. If you are a manufacturer, you have to paid for a gerber panelizer program. and I want something free. Paid solutions likes ViewMate work flawless. I think we should make a gerber panelizer here in inkscape plugin, like gcode tools.
Gerbv use cairo internally, I downloaded the source few hours ago to try to understand what it does and how I can automatize this path tasks.

glococo
Posts: 6
Joined: Sat Jun 01, 2013 11:04 pm

Re: Strokes to polygons

Postby glococo » Tue Jun 04, 2013 7:57 am

Hi Lazur,

The right process I follow was:
(F1), Select all & Ungroup
(F2) , Select all & NodeUNION (symbol in fill&stroke)
Break apart selected nodes (icon)
Stroke to paths
Join Selected nodes (icon)
UNION

Versions: 0.48.4
This process is incredible incredible incredible slow. So maybe an script can reduce the time.

Regarding the 0.49dev+12346+11, the result after the final UNION is diferent :shock: See attach
Attachments
2013-06-03-225456_1920x1080_scrot.jpg
0.49 UNION ?
2013-06-03-225456_1920x1080_scrot.jpg (242.6 KiB) Viewed 6267 times
2013-06-03-222717_1920x1080_scrot.png
Goal
2013-06-03-222717_1920x1080_scrot.png (208.7 KiB) Viewed 6267 times


Return to “Inkscape & Cutters/Plotters”