![]() ![]() This is what the “geom” specification of PHI character looks like: [['Polygon', ![]() Then I took the “d” path in the SVG glyph element and converted to “geoms” in KiCommand, then converted that to Polygon “geom” and finally used newdrawing to draw it. It was created from a ttf file using an online converter to SVG. Here is a Polygon with holes of the PHI character on F.SilkS: I’m interested in seeing how you convert the glyphs to polygons and how they are rendered in different layers (especially copper, silk and mask) In any case, I’ll see what I can do to generate polygons from SVG. This also makes the 2d calculations easier (I think). ![]() It is also the standard for GIS ShapeFile format and other GIS formats, where outer contours are CCW/LW and interior contours (holes) are CW/RW. I don’t think KiCAD recognizes the difference between CW/RW and CCW/LW points. I’d have to work through the possible difference in polygon specification (SVG: the “inside” of the polygon is to the right). However, it’s technically possible (mathematically) to convert each of the SVG d path commands (shapes) into a straight-edged outline. A couple of years ago, I posted the results of KiCommand’s ability to add text similar to your image.Īs far as translating the outlines to polygons, this will be a little harder because KiCAD zones only support straight line edges. I had to totally rework my existing fromsvg code to handle a more general input format. KiCAD implements (only?) cubic Bezier curves, so I added code to convert the SVG quadratic Bezier curve into cubic. It was a short (ish) exercise to convert SVG “d” path support and convert SVG d path commands into geoms. In my recent work on KiCommand to add (what I call) geoms, I added support for all DRAWSEGMENT shapes, including Bezier curves. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |