From b321efffaf6d932cd4607be28c1dbd0ab68f0169 Mon Sep 17 00:00:00 2001 From: Miles McCoo Date: Fri, 14 Apr 2017 14:11:24 +0200 Subject: [PATCH] Minor Pcbnew Python scripting fix to expose SHAPE_POLY_SET interface The recent refactoring work to move zones from CPolyLine to SHAPE_POLY_SET resulted in a reduction in pcbnew's python capabilities. This change exposed SHAPE_POLY_SET to restore that functionality (albeit with slightly different method names) --- common/swig/kicad.i | 5 ++++- include/geometry/shape_poly_set.h | 3 --- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/common/swig/kicad.i b/common/swig/kicad.i index 1ce87c7df0..f0a03dad68 100644 --- a/common/swig/kicad.i +++ b/common/swig/kicad.i @@ -2,7 +2,7 @@ * This program source code file is part of KiCad, a free EDA CAD application. * * Copyright (C) 2012 NBEE Embedded Systems, Miguel Angel Ajo - * Copyright (C) 1992-2012 KiCad Developers, see AUTHORS.txt for contributors. + * Copyright (C) 1992-2017 KiCad Developers, see AUTHORS.txt for contributors. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -130,6 +130,9 @@ principle should be easily implemented by adapting the current STL containers. #include <../polygon/PolyLine.h> %include <../polygon/PolyLine.h> +#include +%include + // ignore warning relative to operator = and operator ++: #pragma SWIG nowarn=362,383 diff --git a/include/geometry/shape_poly_set.h b/include/geometry/shape_poly_set.h index efdd91e9f9..5e90c61d00 100644 --- a/include/geometry/shape_poly_set.h +++ b/include/geometry/shape_poly_set.h @@ -760,9 +760,6 @@ class SHAPE_POLY_SET : public SHAPE ///> For aFastMode meaning, see function booleanOp void Fracture( POLYGON_MODE aFastMode ); - ///> Converts a set of slitted polygons to a set of polygons with holes - void Unfracture(); - ///> Returns true if the polygon set has any holes. bool HasHoles() const;