@maui Yes, if two segments overlap twice, it removes them. I could add a setting to disable this behavior in the future. The code assumes you want to make a single polygon so it treats these “connected polygons” as a single polygon. Basically every structure I’ve designed in CST or otherwise will have these blocks so I’m trying to avoid unneeded work
that’s good IMO.
That is a good approach to speed up the process…
I’ve played with your file and I was able to obtain the desired result also in KSU, but I needed to manually delete internal segments, to get a single connected polygon…
I think I would need to use your approach in KSU to speed up the process…
antenna-rf-1.FCStd (125.1 KB)
antenna-rf-1.kicad_mod (43.0 KB)
That’s strange. I did the same thing in KSU (deleting the overlapping lines) but it still didnt work. Perhaps I had another issue as well. Was there anything else you did?
Coalescing the polygon is a bit tedious. I went with a brute force approach which takes some time but seems to work well. That is, I search the full list of lines to find one where the next start matches the previous end. Maybe there is a smarter way to do it.
cheers
dom
I copied the simplified sketch (without internal segments) to a shape and then converted the shape to a sketch… after that, the sketch segment would be in the right sequence to be converted in a closed polygon… I’ve attached the FreeCAD file above for your convenience.
Yes, the file you attached works- but I want to be able to do it myself I will try again later from scratch.
use the simple copy button on the simplified sketch, then convert the resulting shape to a new sketch, add a circle internal to the polygon to add a pad for kicad fp reference and export it with ksu fp exp button
Hi @dom11990
I’ve adapted part of your plugin code into KicadStepUp WB.
Now it is possible to import your DXF generated antenna in FreeCAD and convert it to a closed poligon, so to be easily exported as ‘kicad_mod’ footprint.
Would you mind to test the new tool with other of your DXF antenna samples?
dxf-to-polyline-sketch
This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.