kicad-developers team mailing list archive
-
kicad-developers team
-
Mailing list archive
-
Message #26817
CPolyLine refactor
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.
- 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.
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?
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?
Any comments on this will be appreciated.
Regards,
Alejandro
Follow ups