kicad-developers team mailing list archive
-
kicad-developers team
-
Mailing list archive
-
Message #26819
Re: CPolyLine refactor
-
To:
Alejandro Garcia Montoro <alejandro.garciamontoro@xxxxxxxxx>, "KiCad Developers" <kicad-developers@xxxxxxxxxxxxxxxxxxx>
-
From:
Tomasz Wlostowski <tomasz.wlostowski@xxxxxxx>
-
Date:
Mon, 21 Nov 2016 18:07:13 +0100
-
Authentication-results:
spf=pass (sender IP is 188.184.36.48) smtp.mailfrom=cern.ch; lists.launchpad.net; dkim=none (message not signed) header.d=none;lists.launchpad.net; dmarc=bestguesspass action=none header.from=cern.ch;
-
In-reply-to:
<CAOjHwcV3j=6io9vWXyUASfFBP2-iaGtaDfgL3mmGBBF98JA2Cw@mail.gmail.com>
-
Spamdiagnosticmetadata:
NSPM
-
Spamdiagnosticoutput:
1:99
-
User-agent:
Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0
On 21.11.2016 13:56, Alejandro Garcia Montoro wrote:
> Hi!
>
> I'm working on the CPolyLine refactor into SHAPE_POLY_SET. Before coding
> anything more, I want to discuss with you the changes I have to do, just
> to be sure I'm not doing any useless work.
>
> The classes that use CPolyLine, and that have to be modified, are:
>
> * ZONE_CONTAINER: This class has two CPolyLine members: m_Poly and
> m_smoothedPoly. The latter is not used, but the former is the one
> that has all the information about the zone. It's necessary to
> carefully refactor this class, as the interface of CPolyLine and
> SHAPE_POLY_SET is not exactly the same, e.g., the Hatch-related
> functions are not yet implemented in SHAPE_POLY_SET or the code in
> DrawWhileCreateOutline access the methods of the old CPOLYGONS_LIST
> class.
Hi Alejandro,
If it's only about hatching, it's (as far as I know) only for the
purpose of displaying a hatched zone outline (JP, please confirm). Then
it belongs to the renderer (be it legacy or GAL), not to the polygon class.
> * BOARD, PCB_PAINTER and POINT_EDITOR: These classes use instances of
> the ZONE_CONTAINER class, that still has methods that return
> CPolyLine objects. The work on these classes should be more or less
> straightforward when the refactor on the first one is finished.
OK.
>
> I would like to set up some tests on these classes, just to be sure that
> the refactor does not change anything. Does anyone have some tests using
> these classes that I could reuse?
I don't ;-)
>
> Furthermore, some more instances of CPolyLine HATCH_STYLE enum are
> found. I am not sure that the hatch style should be inside
> SHAPE_POLY_SET, that contains just geometric information: what do you think?
As said above, I don't think SHAPE_POLY_SET should contain hatching
functions.
Best,
Tom
>
> Any comments on this will be appreciated.
>
> Regards,
> Alejandro
>
>
> _______________________________________________
> Mailing list: https://launchpad.net/~kicad-developers
> Post to : kicad-developers@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~kicad-developers
> More help : https://help.launchpad.net/ListHelp
>
Follow ups
References