← Back to team overview

kicad-developers team mailing list archive

Re: [RFC] DRAWSEGMENT polygon type vs non-copper zone

 

Le 17/11/2016 à 17:23, Maciej Sumiński a écrit :
> 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

ZONE_CONTAINER is suitable for copper layer areas, because it handle the outline polygon (with
holes) but also sub-polygons which are the actual copper filled areas, and all info (net, clearance)

It looks to me a bit complicated to describe graphic filled (or not filled) polygons
So DRAWSEGMENTs of S_POLYGON type is more suitable to handle one basic polygon.

S_POLYGON is used in microwave tools, but also by bitmap2component.

When you are saying polylines do you mean a usual polyline (a not filled and not closed polygon)
or a set of lines with no common end point?

Regards,
-- 
Jean-Pierre CHARRAS


Follow ups

References