horizon-eda / horizon

Horizon is a free EDA package
https://horizon-eda.org/
GNU General Public License v3.0
1.08k stars 79 forks source link

Arc-and-line drawing can't make polygon/outline rendered in 3D view. #729

Closed cortices closed 9 months ago

cortices commented 10 months ago

I'm working on a PCB that's 'D-flatted' -- it has one arc and a straight line joining the two arc points. I can't seem to get Horizon v2.5.0 to either turn this arc and line into a polygon, or to recognise the line and arc with shared junctions as an outline for the 3D view. Attached image has both the full PCB, with rectangular internal cutout (erroneously rendered positive instead of negative) and a simplest proof of bug, where I drew an arc on outline layer, and joined the two points with a line. As you can see, it doesn't register as an outline in 3D view. It seems to be valid as far as generating Gerbers goes. image

carrotIndustries commented 10 months ago

Board outlines need to be explicitly drawn as polygons rather than line loops. Use the 'line loop to polygon' tool to convert them to polygons.

cortices commented 10 months ago

Sorry thought I mentioned — the issue is at least partially that “line loop to polygon” feature refuses to accept these shapes, and says “can’t find line loop”. I’ve double checked that the junctions are correct and merged.

carrotIndustries commented 10 months ago

Can you attach a minimum example that exhibits this behavior?

cortices commented 10 months ago

minimalexample-lineloop.tar.gz

carrotIndustries commented 10 months ago

Ok, the bug is that the line loop to polygon doesn't like paths that only have two edges.

As a workaround, you could split the line into two and then delete the extra vertex from the resulting polygon.

cortices commented 10 months ago

I used the workaround, thanks.