← Back to team overview

kicad-developers team mailing list archive

Re: CPolyLine refactor

 

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