← Back to team overview

kicad-developers team mailing list archive

Re: [PATCH][WIP] Polygons edititng tool

 

Hi!,
I just found how to make cutout in zone. I never thought it possible
in KiCad. I see now, it definitely has to be SHAPE_POLY_SET
So, if somebody want to look at the code and make suggestions, I
attached it below. But I will change it a lot.

On Tue, 10 Sep 2019 at 15:47, Seth Hillbrand <seth@xxxxxxxxxxxxx> wrote:
>
> On 2019-09-09 08:21, Alexander Shuklin wrote:
> > Hi!
> > 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.
>
> Hi Alexander-
>
> We cannot assume that the Zone is merely a SHAPE_LINE_CHAIN.  Holes in
> the zone also live in the SHAPE_POLY_SET and should be addressed by a
> point-editing patch.
>
> Unfortunately, I don't see a patch attached to this e-mail (or the other
> one that was attached to CERN Open Days).
>
> You can also make a merge request on launchpad or create a bug report
> for the feature and attach the patch there.
>
> Best-
> Seth
>
>

References