← Back to team overview

kicad-developers team mailing list archive

[RFC] DRAWSEGMENT polygon type vs non-copper zone

 

One of our friends continues work on the SVG importer and would like to
add a possibility of importing graphics as filled polygons. I see there
are two ways of handling polygons:
- DRAWSEGMENTs of S_POLYGON type
- ZONE_CONTAINER placed on non-copper layers

We need to pick one. In order to have the graphics importer return
simply a list of DRAWSEGMENTs, I would prefer to use the first method.
As far as I can tell, currently DRAWSEGMENT polygons are used only by
the microwave tools (and IMHO in a very inappropriate way, as they
create DRAWSEGMENTs on copper layers, but that is a separate discussion).

It requires a few changes for e.g. correct bounding box & hit test
computation, but I can handle it myself. There are no changes to the
file format, but given the code lacks basic support for polygon
DRAWSEGMENTs, it is not going to be work nicely with old revisions. Are
there any objections to following this way? I believe if we agree, then
the file version should be bumped to force the users to update KiCad.

I also wonder if we could have one more DRAWSEGMENT type to handle
polylines as well, so imported vector graphics could be handled as a
single instance instead of many individual segments. Maybe it would be
even better to add generic support for grouping items, but that is a
larger task.

Regards,
Orson

Attachment: signature.asc
Description: OpenPGP digital signature


Follow ups