kicad-developers team mailing list archive
Mailing list archive
[PATCH][WIP] Polygons edititng tool
There's one thing I always missed - ability to change polygons coordinates.
I prepared a patch for that.
First of all there's the linechain editing widget and I used it for some pcbnew dialogs.
But there's few points in which I'm not so sure.
First of all, I added SHAPE_LINE_CHAIN property to ZONE_SETTINGS
I see, that ZONE_SETTINGS holds geometry in SHAPE_POLY_SET.
But is it some equal SHAPE_LINE_CHAIN's? Is it ok to hold just SHAPE_LINE_CHAIN to understand zone geometry?
Anyway, that's what i've done:
auto outline = aSource.Outline();
if( outline->OutlineCount() )
m_shape = outline->COutline( 0 );
to get geometry
auto outline = aTarget.Outline();
for( int i = 0; i < outline->OutlineCount(); ++i )
outline->Outline( i ) = m_shape;
to set geometry
That's work, but if that's bad I can switch to use SHAPE_POLY_SET
And basically some of dialogs look a bit weird. It's probably good idea to rearrange some, but I would need your advices.
I tested as I can zone features, and everything looks ok with that patch.