To clarify, this MR was only for architectural changes needed to support arcs in polygons. There is not yet any way to actually create arcs in polygons as a KiCad user. Follow https://gitlab.com/kicad/code/kicad/-/issues/5409 for an example of where this will be used.
is there a sample board file to check the new file format?
Example of how this can be used
arc_test.kicad_pcb (5.0 KB)
Important note: since this feature just landed, bugs might be present and it is entirely possible that the file format may need to be altered to fix bugs. Please keep this in mind when referring to this sample board.
This is confusing. When I look at the file, it doesn’t have arcs in polygons, only approximations using short straight lines in polygons. Basically there’s nothing but conversion from an arc to a bunch of segments. So what is the actual new backend feature apart from that conversion, and what’s new in the file format?
(gr_poly (pts (xy 181.8 127.499999) (arc (start 112.800001 127.499999) (mid 110.678681 126.621319) (end 109.800001 124.499999)) (arc (start 109.800001 80.5) (mid 110.678681 78.37868) (end 112.800001 77.5)) (arc (start 181.8 77.5) (mid 183.92132 78.37868) (end 184.8 80.5)) (arc (start 184.8 124.499999) (mid 183.92132 126.621319) (end 181.8 127.499999))) (layer "F.SilkS") (width 0.2) (fill none) (tstamp 88377deb-24e1-427b-8fd0-88456d2f78dd))
This is a polygon that includes but straight and arc segments in its outline. This wasn’t possible before, so it was not possible to define a closed polygon (for example, a zone fill, keepout, or solid polygon on a mask/silkscreen layer) containing true arcs. The only way to do this in the past was to use an external program to convert the arcs into line-segment approximations, and then import this approximation into KiCad.
KiCad still uses approximations in some places such as for filling zones and displaying arcs.
The conversion is the new frontend feature; it’s currently the only way to create polygons with arcs. There are no drawing tools within KiCad that let you directly define a polygon / zone border including arcs, but if you define one using graphic primitives (line segments and arcs) you can use the Convert tool to create a polygon / zone from it.
Please note that once you have a polygon with arcs, you cannot edit it non-destructively. For example, you can’t decide you want to change the arc radius and just drag on the arc to resize it. That kind of editing will have to come in a future version of KiCad, as it’s an additional layer of complexity that we didn’t have time for at the moment.
So, for the moment, I would say the biggest use case of this is when using an external mechanical CAD or graphic design tool to create complex shapes. Previously, these shapes could only be imported as discrete graphic primitives (lines and arcs) which means you could not design a filled shape, zone outline, etc in an external tool. Now, you can.
I tried the conversion (like in your screencast) but it didn’t create arcs, only straight line approximations. I have to do more testing.
It actually did create arcs, they are just drawn on screen as straight line approximations. Or do you mean that you ended up with a file with only points in the polygon? If so, please open a bug report with your input state (the raw lines/arcs) and I’ll check it out.
Please note that if you use any of the grab handles to resize the polygon after it is created, all the arcs will be converted to points. We don’t currently support modifying the polygon while retaining the arcs.
Yes I do mean that. But I have to test more. It’s possible that modifying and undo did that to me.
This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.