← Back to team overview

kicad-developers team mailing list archive

Custom shaped pads work. Next test.

 

I just reworked on custom shaped pads.

They are now supported by the PnS (they were supported by DRC since a long time), and all needed
features are now supported.

Of course, there is room for enhancements and optimizations, but it works (I hope).

Attached the patch, and a test board.

Please test.

-- 
Jean-Pierre CHARRAS
 3d-viewer/3d_canvas/create_layer_items.cpp         |   28 +-
 3d-viewer/3d_canvas/create_layer_poly.cpp          |   14 +-
 CMakeLists.txt                                     |    8 +
 common/CMakeLists.txt                              |    1 +
 common/pcb.keywords                                |    3 +
 include/pad_shapes.h                               |    2 +
 pcbnew/CMakeLists.txt                              |    1 +
 pcbnew/board_items_to_polygon_shape_transform.cpp  |   13 +
 pcbnew/class_pad.cpp                               |  101 +
 pcbnew/class_pad.h                                 |  124 +-
 pcbnew/class_pad_custom_shape_functions.cpp        |  246 +
 pcbnew/class_pad_draw_functions.cpp                |   87 +
 .../dialogs/dialog_pad_basicshapes_properties.cpp  |  585 +++
 pcbnew/dialogs/dialog_pad_properties.cpp           |  389 +-
 pcbnew/dialogs/dialog_pad_properties.h             |  127 +-
 pcbnew/dialogs/dialog_pad_properties_base.cpp      |  425 +-
 pcbnew/dialogs/dialog_pad_properties_base.fbp      | 5170 +++++++++++++++++++-
 pcbnew/dialogs/dialog_pad_properties_base.h        |  131 +-
 pcbnew/drc_clearance_test_functions.cpp            |  139 +-
 pcbnew/kicad_plugin.cpp                            |   89 +
 pcbnew/pad_edition_functions.cpp                   |    4 +
 pcbnew/pcb_painter.cpp                             |   54 +
 pcbnew/pcb_parser.cpp                              |   75 +
 pcbnew/plot_brditems_plotter.cpp                   |   13 +
 pcbnew/router/pns_kicad_iface.cpp                  |   40 +
 ...es_convert_brd_items_to_polygons_with_Boost.cpp |   79 +-
 26 files changed, 7705 insertions(+), 243 deletions(-)

diff --git a/3d-viewer/3d_canvas/create_layer_items.cpp b/3d-viewer/3d_canvas/create_layer_items.cpp
index cdfefb2..62ab3a6 100644
--- a/3d-viewer/3d_canvas/create_layer_items.cpp
+++ b/3d-viewer/3d_canvas/create_layer_items.cpp
@@ -296,8 +296,8 @@ COBJECT2D *CINFO3D_VISU::createNewTrack( const TRACK* aTrack,
 // void D_PAD:: TransformShapeWithClearanceToPolygon(
 // board_items_to_polygon_shape_transform.cpp
 void CINFO3D_VISU::createNewPadWithClearance( const D_PAD* aPad,
-                                                    CGENERICCONTAINER2D *aDstContainer,
-                                                    int aClearanceValue ) const
+                                              CGENERICCONTAINER2D *aDstContainer,
+                                              int aClearanceValue ) const
 {
     const int dx = (aPad->GetSize().x / 2) + aClearanceValue;
     const int dy = (aPad->GetSize().y / 2) + aClearanceValue;
@@ -495,8 +495,23 @@ void CINFO3D_VISU::createNewPadWithClearance( const D_PAD* aPad,
     }
     break;
 
-    default:
-        wxFAIL_MSG( "CINFO3D_VISU::createNewPadWithClearance - a pad shape type is not implemented" );
+    case PAD_SHAPE_CUSTOM:
+    {
+        SHAPE_POLY_SET polyList;     // Will contain the pad outlines in board coordinates
+        polyList.Append( aPad->GetCustomShapeAsPolygon() );
+        aPad->BasicShapesAsPolygonToBoardPosition( &polyList, aPad->ShapePos(), aPad->GetOrientation() );
+
+        if( aClearanceValue )
+            polyList.Inflate( aClearanceValue, 32 );
+
+        // This convert the poly in outline and holes
+        polyList.Simplify( SHAPE_POLY_SET::PM_FAST );
+        polyList.Simplify( SHAPE_POLY_SET::PM_STRICTLY_SIMPLE );
+
+        // Add the PAD polygon
+        Convert_shape_line_polygon_to_triangles( polyList, *aDstContainer, m_biuTo3Dunits, *aPad );
+
+    }
         break;
     }
 }
@@ -565,13 +580,10 @@ void CINFO3D_VISU::createNewPad( const D_PAD* aPad,
 {
     switch( aPad->GetShape() )
     {
-    default:
-        wxFAIL_MSG( wxT( "CINFO3D_VISU::createNewPad: found a not implemented pad shape (new shape?)" ) );
-        break;
-
     case PAD_SHAPE_CIRCLE:
     case PAD_SHAPE_OVAL:
     case PAD_SHAPE_ROUNDRECT:
+    case PAD_SHAPE_CUSTOM:
         createNewPadWithClearance( aPad, aDstContainer, aInflateValue.x );
         break;
 
diff --git a/3d-viewer/3d_canvas/create_layer_poly.cpp b/3d-viewer/3d_canvas/create_layer_poly.cpp
index bd3cc87..13a67cf 100644
--- a/3d-viewer/3d_canvas/create_layer_poly.cpp
+++ b/3d-viewer/3d_canvas/create_layer_poly.cpp
@@ -75,8 +75,13 @@ void CINFO3D_VISU::buildPadShapePolygon( const D_PAD* aPad,
     }
         break;
 
-    default:
-        wxFAIL_MSG( wxT( "CINFO3D_VISU::buildPadShapePolygon: found a not implemented pad shape (new shape?)" ) );
+    case PAD_SHAPE_CUSTOM:
+        {
+        SHAPE_POLY_SET polyList;     // Will contain the pad outlines in board coordinates
+        polyList.Append( aPad->GetCustomShapeAsPolygon() );
+        aPad->BasicShapesAsPolygonToBoardPosition( &polyList, aPad->ShapePos(), aPad->GetOrientation() );
+        aCornerBuffer.Append( polyList );
+        }
         break;
     }
 }
@@ -96,14 +101,15 @@ void CINFO3D_VISU::buildPadShapeThickOutlineAsPolygon( const D_PAD* aPad,
         return;
     }
 
+
     // For other shapes, draw polygon outlines
     SHAPE_POLY_SET corners;
 
     unsigned int nr_sides_per_circle = GetNrSegmentsCircle( glm::min( aPad->GetSize().x,
                                                                       aPad->GetSize().y) );
-
     buildPadShapePolygon( aPad, corners, wxSize( 0, 0 ),
-                                nr_sides_per_circle, GetCircleCorrectionFactor( nr_sides_per_circle ) );
+                          nr_sides_per_circle,
+                          GetCircleCorrectionFactor( nr_sides_per_circle ) );
 
     // Add outlines as thick segments in polygon buffer
 
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 5822c44..5613fb9 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -73,6 +73,10 @@ option( KICAD_USE_OCE
     "Build tools and plugins related to OpenCascade Community Edition (default OFF)"
     )
 
+option( KICAD_USE_CUSTOM_PADS
+    "allows custom pads in Pcbnew (default OFF)"
+    )
+
 option( KICAD_INSTALL_DEMOS
     "Install kicad demos and examples (default ON)"
     ON )
@@ -325,6 +329,10 @@ if( KICAD_USE_OCE )
     add_definitions( -DKICAD_USE_OCE )
 endif()
 
+if( KICAD_USE_CUSTOM_PADS )
+    add_definitions( -DKICAD_USE_CUSTOM_PADS )
+endif()
+
 if( USE_WX_GRAPHICS_CONTEXT OR APPLE )
     add_definitions( -DUSE_WX_GRAPHICS_CONTEXT )
 endif()
diff --git a/common/CMakeLists.txt b/common/CMakeLists.txt
index 5ff5104..5abdae0 100644
--- a/common/CMakeLists.txt
+++ b/common/CMakeLists.txt
@@ -375,6 +375,7 @@ set( PCB_COMMON_SRCS
     ../pcbnew/class_mire.cpp
     ../pcbnew/class_module.cpp
     ../pcbnew/class_pad.cpp
+    ../pcbnew/class_pad_custom_shape_functions.cpp
     ../pcbnew/class_pad_draw_functions.cpp
     ../pcbnew/class_pcb_text.cpp
     ../pcbnew/class_text_mod.cpp
diff --git a/common/pcb.keywords b/common/pcb.keywords
index e8ffab2..4f5d0c7 100644
--- a/common/pcb.keywords
+++ b/common/pcb.keywords
@@ -25,6 +25,7 @@
 
 add_net
 allowed
+anchor_pad_shape
 angle
 arc
 arc_segments
@@ -38,6 +39,7 @@ attr
 autoplace_cost90
 autoplace_cost180
 aux_axis_origin
+basic_shapes
 blind
 blind_buried_vias_allowed
 bold
@@ -52,6 +54,7 @@ connect
 connect_pads
 copperpour
 crossbar
+custom
 date
 descr
 die_length
diff --git a/include/pad_shapes.h b/include/pad_shapes.h
index d5a171e..fb77b50 100644
--- a/include/pad_shapes.h
+++ b/include/pad_shapes.h
@@ -35,6 +35,8 @@ enum PAD_SHAPE_T
     PAD_SHAPE_OVAL,
     PAD_SHAPE_TRAPEZOID,
     PAD_SHAPE_ROUNDRECT,
+    PAD_SHAPE_CUSTOM            // A shape defined by user, using a set of basic shapes
+                                // (thick segments, circles, arcs, polygons
 };
 
 /**
diff --git a/pcbnew/CMakeLists.txt b/pcbnew/CMakeLists.txt
index f63743a..d8fee6b 100644
--- a/pcbnew/CMakeLists.txt
+++ b/pcbnew/CMakeLists.txt
@@ -132,6 +132,7 @@ set( PCBNEW_DIALOGS
     dialogs/dialog_non_copper_zones_properties_base.cpp
     dialogs/dialog_pad_properties.cpp
     dialogs/dialog_pad_properties_base.cpp
+    dialogs/dialog_pad_basicshapes_properties.cpp
     dialogs/dialog_plot_base.cpp
     dialogs/dialog_plot.cpp
     dialogs/dialog_position_relative.cpp
diff --git a/pcbnew/board_items_to_polygon_shape_transform.cpp b/pcbnew/board_items_to_polygon_shape_transform.cpp
index 97814f8..07a57cd 100644
--- a/pcbnew/board_items_to_polygon_shape_transform.cpp
+++ b/pcbnew/board_items_to_polygon_shape_transform.cpp
@@ -704,6 +704,18 @@ void D_PAD::TransformShapeWithClearanceToPolygon( SHAPE_POLY_SET& aCornerBuffer,
         aCornerBuffer.Append( outline );
     }
         break;
+
+    case PAD_SHAPE_CUSTOM:
+    {
+        int clearance = KiROUND( aClearanceValue * aCorrectionFactor );
+
+        SHAPE_POLY_SET outline;     // Will contain the corners in board coordinates
+        outline.Append( m_customShapeAsPolygon );
+        BasicShapesAsPolygonToBoardPosition( &outline, GetPosition(), GetOrientation() );
+        outline.Inflate( clearance, aCircleToSegmentsCount );
+        aCornerBuffer.Append( outline );
+    }
+        break;
     }
 }
 
@@ -730,6 +742,7 @@ void D_PAD::BuildPadShapePolygon( SHAPE_POLY_SET& aCornerBuffer,
     case PAD_SHAPE_CIRCLE:
     case PAD_SHAPE_OVAL:
     case PAD_SHAPE_ROUNDRECT:
+    case PAD_SHAPE_CUSTOM:
         TransformShapeWithClearanceToPolygon( aCornerBuffer, aInflateValue.x,
                                               aSegmentsPerCircle, aCorrectionFactor );
         break;
diff --git a/pcbnew/class_pad.cpp b/pcbnew/class_pad.cpp
index fc1dd92..a4a10b1 100644
--- a/pcbnew/class_pad.cpp
+++ b/pcbnew/class_pad.cpp
@@ -72,6 +72,8 @@ D_PAD::D_PAD( MODULE* parent ) :
     }
 
     SetShape( PAD_SHAPE_CIRCLE );                   // Default pad shape is PAD_CIRCLE.
+    SetAnchorPadShape( PAD_SHAPE_CIRCLE );          // Default shape for custom shaped pads
+                                                    // is PAD_CIRCLE.
     SetDrillShape( PAD_DRILL_SHAPE_CIRCLE );        // Default pad drill shape is a circle.
     m_Attribute           = PAD_ATTRIB_STANDARD;    // Default pad type is NORMAL (thru hole)
     m_LocalClearance      = 0;
@@ -160,6 +162,22 @@ int D_PAD::boundingRadius() const
         radius += 1 + KiROUND( EuclideanNorm( wxSize( x - radius, y - radius )));
         break;
 
+    case PAD_SHAPE_CUSTOM:
+        radius = 0;
+
+        for( int cnt = 0; cnt < m_customShapeAsPolygon.OutlineCount(); ++cnt )
+        {
+            const SHAPE_LINE_CHAIN& poly = m_customShapeAsPolygon.COutline( cnt );
+            for( int ii = 0; ii < poly.PointCount(); ++ii )
+            {
+                int dist = KiROUND( poly.CPoint( ii ).EuclideanNorm() );
+                radius = std::max( radius, dist );
+            }
+        }
+
+        radius += 1;
+        break;
+
     default:
         radius = 0;
     }
@@ -306,6 +324,32 @@ const EDA_RECT D_PAD::GetBoundingBox() const
         area.SetSize( dx-x, dy-y );
         break;
 
+    case PAD_SHAPE_CUSTOM:
+        {
+        SHAPE_POLY_SET polySet( m_customShapeAsPolygon );
+        // Move shape to actual position
+        BasicShapesAsPolygonToBoardPosition( &polySet, GetPosition(), GetOrientation() );
+        quadrant1 = m_Pos;
+        quadrant2 = m_Pos;
+
+        for( int cnt = 0; cnt < polySet.OutlineCount(); ++cnt )
+        {
+            const SHAPE_LINE_CHAIN& poly = polySet.COutline( cnt );
+
+            for( int ii = 0; ii < poly.PointCount(); ++ii )
+            {
+                quadrant1.x = std::min( quadrant1.x, poly.CPoint( ii ).x );
+                quadrant1.y = std::min( quadrant1.y, poly.CPoint( ii ).y );
+                quadrant2.x = std::max( quadrant2.x, poly.CPoint( ii ).x );
+                quadrant2.y = std::max( quadrant2.y, poly.CPoint( ii ).y );
+            }
+        }
+
+        area.SetOrigin( quadrant1 );
+        area.SetEnd( quadrant2 );
+        }
+        break;
+
     default:
         break;
     }
@@ -379,10 +423,48 @@ void D_PAD::Flip( const wxPoint& aCentre )
     // So the copper layers count is not taken in account
     SetLayerSet( FlipLayerMask( m_layerMask ) );
 
+    // Flip the basic shapes, in custom pads
+    FlipBasicShapes();
+
     // m_boundingRadius = -1;  the shape has not been changed
 }
 
 
+// Flip the basic shapes, in custom pads
+void D_PAD::FlipBasicShapes()
+{
+    // Flip custom shapes
+    for( unsigned ii = 0; ii < m_basicShapes.size(); ++ii )
+    {
+        PAD_BC_SHAPE& bshape = m_basicShapes[ii];
+
+        MIRROR( bshape.m_Start.y, 0 );
+        MIRROR( bshape.m_End.y, 0 );
+        bshape.m_ArcAngle = -bshape.m_ArcAngle;
+
+        switch( bshape.m_Type )
+        {
+        case S_POLYGON:         // polygon
+            for( unsigned jj = 0; jj < bshape.m_Poly.size(); jj++ )
+                MIRROR( bshape.m_Poly[jj].y, 0 );
+            break;
+
+        default:
+            break;
+        }
+    }
+
+    // Flip local coordinates in merged Polygon
+    for( int cnt = 0; cnt < m_customShapeAsPolygon.OutlineCount(); ++cnt )
+    {
+        SHAPE_LINE_CHAIN& poly = m_customShapeAsPolygon.Outline( cnt );
+
+        for( int ii = 0; ii < poly.PointCount(); ++ii )
+            MIRROR( poly.Point( ii ).y, 0 );
+    }
+}
+
+
 void D_PAD::AppendConfigs( PARAM_CFG_ARRAY* aResult )
 {
     // Parameters stored in config are only significant parameters
@@ -817,6 +899,17 @@ bool D_PAD::HitTest( const wxPoint& aPosition ) const
         return TestPointInsidePolygon( (const wxPoint*)&poly.CPoint(0), poly.PointCount(), delta );
     }
         break;
+
+    case PAD_SHAPE_CUSTOM:
+        // Check for hit in polygon
+        RotatePoint( &delta, -m_Orient );
+
+        if( m_customShapeAsPolygon.OutlineCount() )
+        {
+            const SHAPE_LINE_CHAIN& poly = m_customShapeAsPolygon.COutline( 0 );
+            return TestPointInsidePolygon( (const wxPoint*)&poly.CPoint(0), poly.PointCount(), delta );
+        }
+        break;
     }
 
     return false;
@@ -1096,6 +1189,9 @@ wxString D_PAD::ShowPadShape() const
     case PAD_SHAPE_ROUNDRECT:
         return _( "Roundrect" );
 
+    case PAD_SHAPE_CUSTOM:
+        return _( "CustomShape" );
+
     default:
         return wxT( "???" );
     }
@@ -1334,4 +1430,9 @@ void D_PAD::ImportSettingsFromMaster( const D_PAD& aMasterPad )
     default:
         ;
     }
+
+    // Add or remove custom pad shapes:
+    SetBasicShapes( aMasterPad.GetBasicShapes() );
+    SetAnchorPadShape( aMasterPad.GetAnchorPadShape() );
+    MergeBasicShapesAsPolygon();
 }
diff --git a/pcbnew/class_pad.h b/pcbnew/class_pad.h
index af78eff..8ec8bfa 100644
--- a/pcbnew/class_pad.h
+++ b/pcbnew/class_pad.h
@@ -76,6 +76,26 @@ public:
     PAD_DRAWINFO();
 };
 
+// Helper class to handle a basic custom shape (polygon, segment, circle or arc)
+class PAD_BC_SHAPE
+{
+public:
+    STROKE_T m_Type;    // S_SEGMENT, S_ARC, S_CIRCLE, S_POLYGON only
+    int m_Thickness;    // thickness of segment or outline
+                        // For filled S_CIRCLE shape, thickness = 0.
+                        // if thickness is not = 0 S_CIRCLE shape is a ring
+    int m_Radius;
+    int m_ArcAngle;
+    wxPoint m_Start;    // is also the center of the circle and arc
+    wxPoint m_End;      // is also the start point of the arc
+    std::vector<wxPoint> m_Poly;
+
+    PAD_BC_SHAPE( STROKE_T aType ):
+        m_Type( aType ), m_Thickness( 0 ), m_Radius( 0 ), m_ArcAngle( 0 )
+    {
+    }
+};
+
 
 class D_PAD : public BOARD_CONNECTED_ITEM
 {
@@ -169,6 +189,24 @@ public:
     void SetPosition( const wxPoint& aPos ) override { m_Pos = aPos; }
     const wxPoint& GetPosition() const override { return m_Pos; }
 
+    /**
+     * Function GetAnchorPadShape
+     * @return the shape of the anchor pad shape, for custom shaped pads.
+     */
+    PAD_SHAPE_T GetAnchorPadShape() const       { return m_anchorPadShape; }
+
+    /**
+     * Function SetAnchorPadShape
+     * Set the shape of the anchor pad for custm shped pads.
+     * @param the shape of the anchor pad shape( currently, only
+     * PAD_SHAPE_RECT or PAD_SHAPE_CIRCLE.
+     */
+    void SetAnchorPadShape( PAD_SHAPE_T aShape )
+    {
+        m_anchorPadShape = ( aShape ==  PAD_SHAPE_RECT ) ? PAD_SHAPE_RECT : PAD_SHAPE_CIRCLE;
+        m_boundingRadius = -1;
+    }
+
     void SetY( int y )                          { m_Pos.y = y; }
     void SetX( int x )                          { m_Pos.x = x; }
 
@@ -190,9 +228,80 @@ public:
     void SetOffset( const wxPoint& aOffset )    { m_Offset = aOffset; }
     const wxPoint& GetOffset() const            { return m_Offset; }
 
+    /**
+     * Has meaning only for free shape pads.
+     * add a free shape to the shape list.
+     * the shape can be
+     *   a polygon (outline can have a thickness)
+     *   a thick segment
+     *   a filled circle or ring ( if thickness == 0, this is a filled circle, else a ring)
+     *   a arc
+     */
+    void AddBasicShape( std::vector<wxPoint>& aPoly, int aThickness );  ///< add a polygonal basic shape
+    void AddBasicShape( wxPoint aStart, wxPoint aEnd, int aThickness ); ///< segment basic shape
+    void AddBasicShape( wxPoint aCenter, int aRadius, int aThickness ); ///< ring or circle basic shape
+    void AddBasicShape( wxPoint aCenter, wxPoint aStart,
+                        int aArcAngle, int aThickness );    ///< arc basic shape
+
+
+    /**
+     * Merge all basic shapes, converted to a polygon in one polygon,
+     * in m_customShapeAsPolygon
+     * @return true if OK, false in there is more than one polygon
+     * in m_customShapeAsPolygon
+     * @param aMergedPolygon = the SHAPE_POLY_SET to fill.
+     * if NULL, m_customShapeAsPolygon is the target
+     * @param aCircleToSegmentsCount = number of segment to approximate a circle
+     * (default = 32)
+     * Note: The corners coordinates are relative to the pad position, orientation 0,
+     */
+    bool MergeBasicShapesAsPolygon( SHAPE_POLY_SET * aMergedPolygon = NULL,
+                                    int aCircleToSegmentsCount = 32 );
+
+    /**
+     * clear the basic shapes list
+     */
+    void DeleteBasicShapesList();
+
+    /**
+     * When created, the corners coordinates are relative to the pad position, orientation 0,
+     * in m_customShapeAsPolygon
+     * BasicShapesAsPolygonToBoardPosition transform these coordinates to actual
+     * (board) coordinates
+     * @param aMergedPolygon = the corners coordinates, relative to aPosition and
+     *  rotated by aRotation
+     * @param aPosition = the position of the shape (usually the pad shape, but
+     * not always, when moving the pad)
+     * @param aRotation = the rotation of the shape (usually the pad rotation, but
+     * not always, in DRC)
+     */
+    void BasicShapesAsPolygonToBoardPosition( SHAPE_POLY_SET * aMergedPolygon,
+                                    wxPoint aPosition, double aRotation ) const;
+
+    /**
+     * Accessor to the basic shape list
+     */
+    const std::vector<PAD_BC_SHAPE>& GetBasicShapes() const { return m_basicShapes; }
+
+    /**
+     * Accessor to the custom shape as one polygon
+     */
+    const SHAPE_POLY_SET& GetCustomShapeAsPolygon() const { return m_customShapeAsPolygon; }
 
     void Flip( const wxPoint& aCentre ) override;
 
+    /**
+     * Flip the basic shapes, in custom pads
+     */
+    void FlipBasicShapes();
+
+    /**
+     * Import to the basic shape list
+     * @return true if OK, false if issues
+     * (more than one polygon to build the polygon shape list)
+     */
+    bool SetBasicShapes( const std::vector<PAD_BC_SHAPE>& aBasicShapesList );
+
 
     /**
      * Function SetOrientation
@@ -217,7 +326,6 @@ public:
 
     void SetDrillShape( PAD_DRILL_SHAPE_T aDrillShape )
         { m_drillShape = aDrillShape; }
-
     PAD_DRILL_SHAPE_T GetDrillShape() const     { return m_drillShape; }
 
     /**
@@ -607,6 +715,17 @@ private:    // Private variable members:
                                     ///< PAD_SHAPE_OVAL, PAD_SHAPE_TRAPEZOID,
                                     ///< PAD_SHAPE_ROUNDRECT, PAD_SHAPE_POLYGON
 
+    /** for free shape pads: a list of basic shapes,
+     * in local coordinates, orient 0, coordinates relative to m_Pos
+     * They are expected to define only one copper area.
+     */
+    std::vector<PAD_BC_SHAPE> m_basicShapes;
+
+    /** for free shape pads: the set of basic shapes, merged as one polygon,
+     * in local coordinates, orient 0, coordinates relative to m_Pos
+     */
+    SHAPE_POLY_SET m_customShapeAsPolygon;
+
     int         m_SubRatsnest;      ///< variable used in rats nest computations
                                     ///< handle subnet (block) number in ratsnest connection
 
@@ -621,6 +740,9 @@ private:    // Private variable members:
     double      m_padRoundRectRadiusScale;  ///< scaling factor from smallest m_Size coord
                                             ///< to corner radius, default 0.25
 
+    PAD_SHAPE_T m_anchorPadShape;         ///< for custom shaped pads: shape of pad anchor,
+                                          ///< PAD_SHAPE_RECT, PAD_SHAPE_CIRCLE
+
     /**
      * m_Offset is useful only for oblong and rect pads (it can be used for other
      * shapes, but without any interest).
diff --git a/pcbnew/class_pad_custom_shape_functions.cpp b/pcbnew/class_pad_custom_shape_functions.cpp
new file mode 100644
index 0000000..ad88b4c
--- /dev/null
+++ b/pcbnew/class_pad_custom_shape_functions.cpp
@@ -0,0 +1,246 @@
+/*
+ * This program source code file is part of KiCad, a free EDA CAD application.
+ *
+ * Copyright (C) 2016 Jean-Pierre Charras, jp.charras at wanadoo.fr
+ * Copyright (C) 1992-2016 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
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, you may find one here:
+ * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
+ * or you may search the http://www.gnu.org website for the version 2 license,
+ * or you may write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
+ */
+
+/**
+ * @file class_pad_custom_shape_functions.cpp
+ * class D_PAD functions specific to custom shaped pads.
+ */
+
+#include <fctsys.h>
+#include <PolyLine.h>
+#include <trigo.h>
+#include <wxstruct.h>
+
+#include <pcbnew.h>
+
+#include <class_pad.h>
+#include <convert_basic_shapes_to_polygon.h>
+#include <geometry/shape_rect.h>
+#include <geometry/convex_hull.h>
+
+
+/*
+ * Has meaning only for free shape pads.
+ * add a free shape to the shape list.
+ * the shape is a polygon (can be with thick outline), segment, circle or arc
+ */
+void D_PAD::AddBasicShape( std::vector<wxPoint>& aPoly, int aThickness )
+{
+    PAD_BC_SHAPE shape( S_POLYGON );
+    shape.m_Poly = aPoly;
+    shape.m_Thickness = aThickness;
+    m_basicShapes.push_back( shape );
+
+    MergeBasicShapesAsPolygon();
+}
+
+
+void D_PAD::AddBasicShape( wxPoint aStart, wxPoint aEnd, int aThickness )
+{
+    PAD_BC_SHAPE shape( S_SEGMENT );
+    shape.m_Start = aStart;
+    shape.m_End = aEnd;
+    shape.m_Thickness = aThickness;
+    m_basicShapes.push_back( shape );
+
+    MergeBasicShapesAsPolygon();
+}
+
+
+void D_PAD::AddBasicShape( wxPoint aCenter, wxPoint aStart, int aArcAngle, int aThickness )
+{
+    PAD_BC_SHAPE shape( S_ARC );
+    shape.m_Start = aCenter;
+    shape.m_End = aStart;
+    shape.m_ArcAngle = aArcAngle;
+    shape.m_Thickness = aThickness;
+    m_basicShapes.push_back( shape );
+
+    MergeBasicShapesAsPolygon();
+}
+
+
+void D_PAD::AddBasicShape( wxPoint aCenter, int aRadius, int aThickness )
+{
+    PAD_BC_SHAPE shape( S_CIRCLE );
+    shape.m_Start = aCenter;
+    shape.m_Radius = aRadius;
+    shape.m_Thickness = aThickness;
+    m_basicShapes.push_back( shape );
+
+    MergeBasicShapesAsPolygon();
+}
+
+
+bool D_PAD::SetBasicShapes( const std::vector<PAD_BC_SHAPE>& aBasicShapesList )
+{
+    // clear old list
+    m_basicShapes.clear();
+
+    // Import to the basic shape list
+    if( aBasicShapesList.size() )
+        m_basicShapes = aBasicShapesList;
+
+    // Only one polygon is expected (pad area = only one copper area)
+    return MergeBasicShapesAsPolygon();
+}
+
+// clear the basic shapes list and associated data
+void D_PAD::DeleteBasicShapesList()
+{
+    m_basicShapes.clear();
+    m_customShapeAsPolygon.RemoveAllContours();
+}
+
+
+/* Merge all basic shapes, converted to a polygon in one polygon,
+ * return true if OK, false in there is more than one polygon
+ * in aMergedPolygon
+ */
+bool D_PAD::MergeBasicShapesAsPolygon(  SHAPE_POLY_SET* aMergedPolygon,
+                                        int aCircleToSegmentsCount )
+{
+    // if aMergedPolygon == NULL, use m_customShapeAsPolygon as target
+
+    if( !aMergedPolygon )
+        aMergedPolygon = &m_customShapeAsPolygon;
+
+    aMergedPolygon->RemoveAllContours();
+
+    // Add the anchor pad shape in aMergedPolygon, others in aux_polyset:
+    // The anchor pad is always at 0,0
+    switch( GetAnchorPadShape() )
+    {
+    default:
+    case PAD_SHAPE_CIRCLE:
+        TransformCircleToPolygon( *aMergedPolygon, wxPoint( 0,0 ), GetSize().x/2,
+                              aCircleToSegmentsCount );
+        break;
+
+    case PAD_SHAPE_RECT:
+        {
+        SHAPE_RECT rect( -GetSize().x/2, -GetSize().y/2, GetSize().x, GetSize().y );
+        aMergedPolygon->AddOutline( rect.Outline() );
+        }
+        break;
+    }
+
+    SHAPE_POLY_SET aux_polyset;
+
+    for( unsigned cnt = 0; cnt < m_basicShapes.size(); ++cnt )
+    {
+        const PAD_BC_SHAPE& bshape = m_basicShapes[cnt];
+
+        switch( bshape.m_Type )
+        {
+        case S_SEGMENT:         // usual segment : line with rounded ends
+            TransformRoundedEndsSegmentToPolygon( aux_polyset,
+                bshape.m_Start, bshape.m_End, aCircleToSegmentsCount, bshape.m_Thickness );
+            break;
+
+        case S_ARC:             // Arc with rounded ends
+            TransformArcToPolygon( aux_polyset,
+                                   bshape.m_Start, bshape.m_End, bshape.m_ArcAngle,
+                                   aCircleToSegmentsCount, bshape.m_Thickness );
+            break;
+
+        case S_CIRCLE:          //  ring or circle
+            if( bshape.m_Thickness )    // ring
+                TransformRingToPolygon( aux_polyset,
+                                    bshape.m_Start, bshape.m_Radius,
+                                    aCircleToSegmentsCount, bshape.m_Thickness ) ;
+            else                // Filled circle
+                TransformCircleToPolygon( aux_polyset,
+                                    bshape.m_Start, bshape.m_Radius,
+                                    aCircleToSegmentsCount ) ;
+            break;
+
+        case S_POLYGON:         // polygon
+            if( bshape.m_Poly.size() < 2 )
+                break;      // Malformed polygon.
+
+            {
+            // Insert the polygon:
+            const std::vector< wxPoint>& poly = bshape.m_Poly;
+            aux_polyset.NewOutline();
+
+            if( bshape.m_Thickness )
+            {
+                SHAPE_POLY_SET polyset;
+                polyset.NewOutline();
+
+                for( unsigned ii = 0; ii < poly.size(); ii++ )
+                    polyset.Append( poly[ii].x, poly[ii].y );
+
+                polyset.Inflate( bshape.m_Thickness/2, 32 );
+
+                aux_polyset.Append( polyset );
+            }
+
+            else
+                for( unsigned ii = 0; ii < poly.size(); ii++ )
+                    aux_polyset.Append( poly[ii].x, poly[ii].y );
+            }
+            break;
+
+        default:
+            break;
+        }
+    }
+
+    // Merge all polygons:
+    if( aux_polyset.OutlineCount() )
+    {
+        aMergedPolygon->BooleanAdd( aux_polyset, SHAPE_POLY_SET::PM_FAST );
+        aMergedPolygon->Fracture( SHAPE_POLY_SET::PM_FAST );
+    }
+
+    m_boundingRadius = -1;  // The current bouding radius is no more valid.
+
+    return aMergedPolygon->OutlineCount() <= 1;
+}
+
+void D_PAD::BasicShapesAsPolygonToBoardPosition( SHAPE_POLY_SET * aMergedPolygon,
+                        wxPoint aPosition, double aRotation ) const
+{
+    if( aMergedPolygon->OutlineCount() == 0 )
+        return;
+
+    // Move, rotate, ... coordinates in aMergedPolygon according to the
+    // pad position and orientation
+    for( int cnt = 0; cnt < aMergedPolygon->OutlineCount(); ++cnt )
+    {
+        SHAPE_LINE_CHAIN& poly = aMergedPolygon->Outline( cnt );
+
+        for( int ii = 0; ii < poly.PointCount(); ++ii )
+        {
+            wxPoint corner( poly.Point( ii ).x, poly.Point( ii ).y );
+            RotatePoint( &corner, aRotation );
+            corner += aPosition;
+
+            poly.Point( ii ).x = corner.x;
+            poly.Point( ii ).y = corner.y;
+        }
+    }
+}
diff --git a/pcbnew/class_pad_draw_functions.cpp b/pcbnew/class_pad_draw_functions.cpp
index 02b5edd..6febaf0 100644
--- a/pcbnew/class_pad_draw_functions.cpp
+++ b/pcbnew/class_pad_draw_functions.cpp
@@ -456,6 +456,93 @@ void D_PAD::DrawShape( EDA_RECT* aClipBox, wxDC* aDC, PAD_DRAWINFO& aDrawInfo )
     }
         break;
 
+    case PAD_SHAPE_CUSTOM:
+    {
+        // The full shape has 2 items
+        // 1- The anchor pad: a round or rect pad located at pad position
+        // 2- The custom complex shape
+        // Note: The anchor pad shape is containing by the custom complex shape polygon
+        // The anchor pad is shown to help user to see where is the anchor, only in sketch mode
+        // (In filled mode, it is merged with the basic shapes)
+        wxPoint pad_pos = GetPosition() - aDrawInfo.m_Offset;
+
+        // In sketch mode only: Draw the anchor pad: a round or rect pad
+        if( !aDrawInfo.m_ShowPadFilled )
+        {
+            if( GetAnchorPadShape() == PAD_SHAPE_RECT )
+            {
+                wxPoint poly[4];
+                poly[0] = wxPoint( - halfsize.x, - halfsize.y );
+                poly[1] = wxPoint( - halfsize.x, + halfsize.y );
+                poly[2] = wxPoint( + halfsize.x, + halfsize.y );
+                poly[3] = wxPoint( + halfsize.x, - halfsize.y );
+
+                for( int ii = 0; ii < 4; ++ii )
+                {
+                    RotatePoint( &poly[ii], m_Orient );
+                    poly[ii] += pad_pos;
+                }
+
+                GRClosedPoly( aClipBox, aDC, 4, poly, false, 0,
+                              aDrawInfo.m_Color, aDrawInfo.m_Color );
+            }
+            else
+            {
+                GRCircle( aClipBox, aDC, pad_pos.x, pad_pos.y,
+                          halfsize.x,
+                          m_PadSketchModePenSize, aDrawInfo.m_Color );
+            }
+        }
+
+        SHAPE_POLY_SET outline;     // Will contain the corners in board coordinates
+        outline.Append( m_customShapeAsPolygon );
+        BasicShapesAsPolygonToBoardPosition( &outline, pad_pos, GetOrientation() );
+        SHAPE_LINE_CHAIN* poly;
+
+        const int segmentToCircleCount = 32;
+
+        if( aDrawInfo.m_Mask_margin.x )
+        {
+            SHAPE_POLY_SET clearance_outline;
+            clearance_outline.Append( outline );
+            clearance_outline.Inflate( aDrawInfo.m_Mask_margin.x, segmentToCircleCount );
+
+            poly = &clearance_outline.Outline( 0 );
+        }
+        else
+        {
+            // Draw the polygon: only one polygon is expected
+            // However we provide a multi polygon shape drawing
+            // ( for the future or to show a non expected shape )
+            for( int jj = 0; jj < outline.OutlineCount(); ++jj )
+            {
+                poly = &outline.Outline( jj );
+
+                GRClosedPoly( aClipBox, aDC, poly->PointCount(),
+                        (wxPoint*)&poly->Point( 0 ), aDrawInfo.m_ShowPadFilled, 0,
+                        aDrawInfo.m_Color, aDrawInfo.m_Color );
+            }
+        }
+
+        if( aDrawInfo.m_PadClearance )
+        {
+            SHAPE_POLY_SET clearance_outline;
+            clearance_outline.Append( outline );
+
+            clearance_outline.Inflate( aDrawInfo.m_PadClearance, segmentToCircleCount );
+
+            for( int jj = 0; jj < clearance_outline.OutlineCount(); ++jj )
+            {
+                poly = &clearance_outline.Outline( jj );
+
+                GRClosedPoly( aClipBox, aDC, poly->PointCount(),
+                              (wxPoint*)&poly->Point( 0 ), false, 0,
+                              aDrawInfo.m_Color, aDrawInfo.m_Color );
+            }
+        }
+        break;
+    }
+
     default:
         break;
     }
diff --git a/pcbnew/dialogs/dialog_pad_basicshapes_properties.cpp b/pcbnew/dialogs/dialog_pad_basicshapes_properties.cpp
new file mode 100644
index 0000000..e5b431d
--- /dev/null
+++ b/pcbnew/dialogs/dialog_pad_basicshapes_properties.cpp
@@ -0,0 +1,585 @@
+/**
+ * @file dialog_pad_basicshapes_properties.cpp
+ * @brief basic shapes for pads crude editor.
+ */
+
+/*
+ * This program source code file is part of KiCad, a free EDA CAD application.
+ *
+ * Copyright (C) 2017 Jean-Pierre Charras, jp.charras at wanadoo.fr
+ * 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
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, you may find one here:
+ * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
+ * or you may search the http://www.gnu.org website for the version 2 license,
+ * or you may write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
+ */
+
+#include <algorithm>
+
+#include <fctsys.h>
+#include <common.h>
+#include <confirm.h>
+#include <pcbnew.h>
+#include <trigo.h>
+#include <macros.h>
+#include <wxBasePcbFrame.h>
+#include <base_units.h>
+#include <gr_basic.h>
+
+#include <class_board.h>
+#include <class_module.h>
+
+#include <dialog_pad_properties.h>
+
+DIALOG_PAD_BASICSHAPES_PROPERTIES::DIALOG_PAD_BASICSHAPES_PROPERTIES(
+                            wxWindow* aParent, PAD_BC_SHAPE * aShape )
+    : DIALOG_PAD_BASICSHAPES_PROPERTIES_BASE( aParent )
+{
+    m_shape = aShape;
+    TransferDataToWindow();
+
+    m_sdbSizerOK->SetDefault();
+    GetSizer()->SetSizeHints( this );
+}
+
+bool DIALOG_PAD_BASICSHAPES_PROPERTIES::TransferDataToWindow()
+{
+    if( m_shape == NULL )
+        return false;
+
+    // Shows the text info about circle or ring only for S_CIRCLE shape
+    if( m_shape->m_Type != S_CIRCLE )
+        m_staticTextInfo->Show( false );
+
+    PutValueInLocalUnits( *m_textCtrlThickness, m_shape->m_Thickness );
+
+    // Update units and parameters names according to the shape to edit:
+    wxString unit = GetAbbreviatedUnitsLabel();
+    m_staticTextPosUnit->SetLabel( unit );
+    m_staticTextEndUnit->SetLabel( unit );
+    m_staticTextThicknessUnit->SetLabel( unit );
+
+    m_staticTextAngleUnit->SetLabel( wxEmptyString );
+    m_staticTextAngle->SetLabel( wxEmptyString );
+
+    switch( m_shape->m_Type )
+    {
+    case S_SEGMENT:         // Segment with rounded ends
+        SetTitle( _( "Segment" ) );
+        PutValueInLocalUnits( *m_textCtrPosX, m_shape->m_Start.x );
+        PutValueInLocalUnits( *m_textCtrPosY, m_shape->m_Start.y );
+        PutValueInLocalUnits( *m_textCtrEndX, m_shape->m_End.x );
+        PutValueInLocalUnits( *m_textCtrEndY, m_shape->m_End.y );
+        m_textCtrAngle->Show( false );
+        m_staticTextAngleUnit->Show( false );
+        m_staticTextAngle->Show( false );
+        break;
+
+    case S_ARC:             // Arc with rounded ends
+        SetTitle( _( "Arc" ) );
+        m_staticTextPosEnd->SetLabel( _( "Center X,Y" ) );
+        PutValueInLocalUnits( *m_textCtrEndX, m_shape->m_Start.x ); // Start point of arc
+        PutValueInLocalUnits( *m_textCtrEndY, m_shape->m_Start.y );
+        PutValueInLocalUnits( *m_textCtrPosX, m_shape->m_End.x );   // arc center
+        PutValueInLocalUnits( *m_textCtrPosY, m_shape->m_End.y );
+        m_textCtrAngle->SetValue( FMT_ANGLE( m_shape->m_ArcAngle ) );
+        m_staticTextAngle->SetLabel( _( "Angle" ) );
+        m_staticTextAngleUnit->SetLabel( _( "degree" ) );
+        break;
+
+    case S_CIRCLE:          //  ring or circle
+        if( m_shape->m_Thickness )
+            SetTitle( _( "Ring" ) );
+        else
+            SetTitle( _( "Circle" ) );
+
+        // End point does not exist for a circle or ring:
+        m_textCtrEndX->Show( false );
+        m_textCtrEndY->Show( false );
+        m_staticTextPosEnd->Show( false );
+        m_staticTextEndUnit->Show( false );
+
+        // Circle center uses position controls:
+        m_staticTextPosStart->SetLabel( _( "Center X,Y" ) );
+        PutValueInLocalUnits( *m_textCtrPosX, m_shape->m_Start.x );
+        PutValueInLocalUnits( *m_textCtrPosY, m_shape->m_Start.y );
+        PutValueInLocalUnits( *m_textCtrAngle, m_shape->m_Radius );
+        m_staticTextAngleUnit->SetLabel( unit );
+        m_staticTextAngle->SetLabel( _( "Radius" ) );
+        break;
+
+    case S_POLYGON:         // polygon
+        SetTitle( "Polygon" );
+        m_staticTextPosStart->SetLabel( wxEmptyString );
+        m_staticTextPosEnd->SetLabel( wxEmptyString );
+        m_staticTextAngle->SetLabel( _( "corners count" ) );
+        m_textCtrAngle->SetValue( wxString::Format( "%d", m_shape->m_Poly.size() ) );
+        break;
+
+    default:
+        SetTitle( "Unknown basic shape" );
+        break;
+    }
+
+    return true;
+}
+
+bool DIALOG_PAD_BASICSHAPES_PROPERTIES::TransferDataFromWindow()
+{
+    // Transfer data out of the GUI.
+    m_shape->m_Thickness = ValueFromString( g_UserUnit, m_textCtrlThickness->GetValue() );
+
+    switch( m_shape->m_Type )
+    {
+    case S_SEGMENT:         // Segment with rounded ends
+        m_shape->m_Start.x = ValueFromString( g_UserUnit, m_textCtrPosX->GetValue() );
+        m_shape->m_Start.y = ValueFromString( g_UserUnit, m_textCtrPosY->GetValue() );
+        m_shape->m_End.x = ValueFromString( g_UserUnit, m_textCtrEndX->GetValue() );
+        m_shape->m_End.y = ValueFromString( g_UserUnit, m_textCtrEndY->GetValue() );
+        break;
+
+    case S_ARC:             // Arc with rounded ends
+        // Start point of arc
+        m_shape->m_Start.x = ValueFromString( g_UserUnit, m_textCtrEndX->GetValue() );
+        m_shape->m_Start.y = ValueFromString( g_UserUnit, m_textCtrEndY->GetValue() );
+        // arc center
+        m_shape->m_End.x = ValueFromString( g_UserUnit, m_textCtrPosX->GetValue() );
+        m_shape->m_End.y = ValueFromString( g_UserUnit, m_textCtrPosY->GetValue() );
+        m_shape->m_ArcAngle = ValueFromString( DEGREES, m_textCtrAngle->GetValue() );
+        break;
+
+    case S_CIRCLE:          //  ring or circle
+        m_shape->m_Start.x = ValueFromString( g_UserUnit, m_textCtrPosX->GetValue() );
+        m_shape->m_Start.y = ValueFromString( g_UserUnit, m_textCtrPosY->GetValue() );
+        //radius
+        m_shape->m_Radius = ValueFromString( g_UserUnit, m_textCtrAngle->GetValue() );
+        break;
+
+    case S_POLYGON:         // polygon
+        // polygon has a specific dialog editor. No nothing here
+        break;
+
+    default:
+        SetTitle( "Unknown basic shape" );
+        break;
+    }
+
+    return true;
+}
+
+
+DIALOG_PAD_BASIC_SHP_POLY_PROPS::DIALOG_PAD_BASIC_SHP_POLY_PROPS(
+                            wxWindow* aParent, PAD_BC_SHAPE * aShape )
+    : DIALOG_PAD_BASIC_SHP_POLY_PROPS_BASE( aParent ),
+        m_shape( aShape ), m_currshape( *m_shape )
+{
+    TransferDataToWindow();
+
+    m_sdbSizerOK->SetDefault();
+    GetSizer()->SetSizeHints( this );
+
+    // TODO: move wxEVT_GRID_CELL_CHANGING in wxFormbuilder, when it support it
+	m_gridCornersList->Connect( wxEVT_GRID_CELL_CHANGING,
+                                wxGridEventHandler( DIALOG_PAD_BASIC_SHP_POLY_PROPS::onCellChanging ), NULL, this );
+}
+
+
+DIALOG_PAD_BASIC_SHP_POLY_PROPS::~DIALOG_PAD_BASIC_SHP_POLY_PROPS()
+{
+	m_gridCornersList->Disconnect( wxEVT_GRID_CELL_CHANGING,
+                                   wxGridEventHandler( DIALOG_PAD_BASIC_SHP_POLY_PROPS::onCellChanging ), NULL, this );
+}
+
+
+bool DIALOG_PAD_BASIC_SHP_POLY_PROPS::TransferDataToWindow()
+{
+    if( m_shape == NULL )
+        return false;
+
+    // Update units and parameters names according to the shape to edit:
+    wxString unit = GetAbbreviatedUnitsLabel();
+    m_staticTextThicknessUnit->SetLabel( unit );
+
+    PutValueInLocalUnits( *m_textCtrlThickness, m_currshape.m_Thickness );
+
+    // Test for acceptable polygon (more than 2 corners, and not self-intersecting)
+    // A warning message is displayed if not OK
+    Validate();
+
+    // If the number of corners is < 2 (Happens for a new shape, prepare 2 dummy corners
+    while( m_currshape.m_Poly.size() < 2 )
+        m_currshape.m_Poly.push_back( wxPoint( 0, 0 ) );
+
+    // Populates the list of corners
+    int extra_rows = m_currshape.m_Poly.size() - m_gridCornersList->GetNumberRows();
+
+    if( extra_rows > 0 )
+    {
+        m_gridCornersList->AppendRows( extra_rows );
+    }
+    else if( extra_rows < 0 )
+    {
+        extra_rows = -extra_rows;
+        m_gridCornersList->DeleteRows( 0, extra_rows );
+    }
+
+    // enter others corner coordinates
+    wxString msg;
+    for( unsigned row = 0; row < m_currshape.m_Poly.size(); ++row )
+    {
+        // Row label is "Corner x"
+        msg.Printf( "Corner %d", row+1 );
+        m_gridCornersList->SetRowLabelValue( row, msg );
+
+        msg = StringFromValue( g_UserUnit, m_currshape.m_Poly[row].x );
+        m_gridCornersList->SetCellValue( row, 0, msg );
+
+        msg = StringFromValue( g_UserUnit, m_currshape.m_Poly[row].y );
+        m_gridCornersList->SetCellValue( row, 1, msg );
+    }
+
+    return true;
+}
+
+bool DIALOG_PAD_BASIC_SHP_POLY_PROPS::TransferDataFromWindow()
+{
+    if( !Validate() )
+        return false;
+
+    // Transfer data out of the GUI.
+    m_currshape.m_Thickness = ValueFromString( g_UserUnit, m_textCtrlThickness->GetValue() );
+    *m_shape = m_currshape;
+
+    return true;
+}
+
+
+// test for a valid polygon (a not self intersectiong polygon)
+bool DIALOG_PAD_BASIC_SHP_POLY_PROPS::Validate()
+{
+    if( m_currshape.m_Poly.size() < 3 )
+    {
+        m_staticTextValidate->SetLabel( _(" Incorrect polygon: less than 3 corners" ) );
+        m_staticTextValidate->Show( true );
+        return false;
+    }
+
+    bool valid = true;
+
+    SHAPE_LINE_CHAIN polyline;
+
+    for( unsigned ii = 0; ii < m_currshape.m_Poly.size(); ++ii )
+        polyline.Append( m_currshape.m_Poly[ii].x, m_currshape.m_Poly[ii].y );
+
+    // The polyline describes a polygon: close it.
+    polyline.SetClosed( true );
+
+    // Remove redundant corners:
+    polyline.Simplify();
+
+    if(  polyline.PointCount() < 3 )
+    {
+        m_staticTextValidate->SetLabel( _("Incorrect polygon: too few corners after simplification" ) );
+        valid = false;
+    }
+
+    if( valid && polyline.SelfIntersecting() )
+    {
+        m_staticTextValidate->SetLabel( _("Incorrect polygon: self intersecting" ) );
+        valid = false;
+    }
+
+    if( valid )
+        m_staticTextValidate->SetLabel( _("Polygon:" ) );
+
+    if( polyline.PointCount() != (int)m_currshape.m_Poly.size() )
+    {   // Happens after simplification
+        m_currshape.m_Poly.clear();
+
+        for( int ii = 0; ii < polyline.PointCount(); ++ii )
+            m_currshape.m_Poly.push_back( wxPoint( polyline.CPoint( ii ).x, polyline.CPoint( ii ).y ) );
+
+        m_staticTextValidate->SetLabel( _("Polygon: redundant corners removed" ) );
+    }
+
+    return valid;
+}
+
+
+void DIALOG_PAD_BASIC_SHP_POLY_PROPS::onButtonAdd( wxCommandEvent& event )
+{
+    // Insert a new corner after the currently selected:
+    int row = -1;
+
+    if( m_gridCornersList->GetNumberRows() )
+    {
+        wxArrayInt selections =	m_gridCornersList->GetSelectedRows();
+
+        if( selections.size() > 0 )
+        {
+            std::sort( selections.begin(), selections.end() );
+            row = selections[0];
+        }
+        else
+        {
+            row = m_gridCornersList->GetGridCursorRow();
+        }
+
+        if( row < 0 )
+        {
+            wxMessageBox( _( "Select a corner before adding a new corner" ) );
+            return;
+        }
+    }
+    else
+        row = 0;
+
+    m_gridCornersList->SelectRow( row, false );
+
+    if( m_currshape.m_Poly.size() == 0 )
+        m_currshape.m_Poly.push_back( wxPoint(0,0) );
+    else
+        m_currshape.m_Poly.insert( m_currshape.m_Poly.begin() + row + 1, wxPoint(0,0) );
+
+    TransferDataToWindow();
+
+    m_panelPoly->Refresh();
+}
+
+void DIALOG_PAD_BASIC_SHP_POLY_PROPS::OnButtonDelete( wxCommandEvent& event )
+{
+    wxArrayInt selections =	m_gridCornersList->GetSelectedRows();
+    std::sort( selections.begin(), selections.end() );
+
+    // remove corners:
+    for( int ii = selections.size()-1; ii >= 0 ; --ii )
+    {
+        m_currshape.m_Poly.erase( m_currshape.m_Poly.begin() + selections[ii] );
+    }
+
+    // Unselect all raws:
+    m_gridCornersList->SelectRow( -1, false );
+
+    TransferDataToWindow();
+
+    m_panelPoly->Refresh();
+}
+
+void DIALOG_PAD_BASIC_SHP_POLY_PROPS::onPaintPolyPanel( wxPaintEvent& event )
+{
+    wxPaintDC dc( m_panelPoly );
+    wxSize dc_size = dc.GetSize();
+    dc.SetDeviceOrigin( dc_size.x / 2, dc_size.y / 2 );
+
+    // Calculate a suitable scale to fit the available draw area
+    wxSize minsize;
+
+    for( unsigned ii = 0; ii < m_currshape.m_Poly.size(); ++ii )
+    {
+        minsize.x = std::max( minsize.x, std::abs( m_currshape.m_Poly[ii].x ) );
+        minsize.y = std::max( minsize.y, std::abs( m_currshape.m_Poly[ii].y ) );
+    }
+
+    // The draw origin is the center of the window.
+    // Therefore the window size is twice the minsize just calculated
+    minsize.x *= 2;
+    minsize.y *= 2;
+    minsize.x += m_currshape.m_Thickness;
+    minsize.y += m_currshape.m_Thickness;
+
+    // Avoid null or too small size:
+    int mindim = Millimeter2iu( 0.5 );
+
+    if( minsize.x < mindim )
+        minsize.x = mindim;
+
+    if( minsize.y < mindim )
+        minsize.y = mindim;
+
+    double scale = std::min( (double) dc_size.x / minsize.x, (double) dc_size.y / minsize.y );
+
+    // Give a margin
+    scale *= 0.9;
+    dc.SetUserScale( scale, scale );
+
+    GRResetPenAndBrush( &dc );
+
+    // Draw X and Y axis. This is particularly useful to show the
+    // reference position of basic shape
+    // Axis are drawn before the polygon to avoid masking segments on axis
+    GRLine( NULL, &dc, -int( dc_size.x/scale ), 0, int( dc_size.x/scale ), 0, 0, LIGHTBLUE );   // X axis
+    GRLine( NULL, &dc, 0, -int( dc_size.y/scale ), 0, int( dc_size.y/scale ), 0, LIGHTBLUE );   // Y axis
+
+    // Draw polygon.
+    // The selected edge(s) are shown in selectcolor, the others in normalcolor.
+    EDA_COLOR_T normalcolor = WHITE;
+    EDA_COLOR_T selectcolor = RED;
+
+    for( unsigned ii = 0; ii < m_currshape.m_Poly.size(); ++ii )
+    {
+        EDA_COLOR_T color = normalcolor;
+
+        if( m_gridCornersList->IsInSelection (ii, 0) ||
+            m_gridCornersList->IsInSelection (ii, 1) ||
+            m_gridCornersList->GetGridCursorRow() == (int)ii )
+            color = selectcolor;
+
+        unsigned jj = ii + 1;
+
+        if( jj >= m_currshape.m_Poly.size() )
+            jj = 0;
+
+        GRLine( NULL, &dc, m_currshape.m_Poly[ii], m_currshape.m_Poly[jj], m_currshape.m_Thickness, color );
+    }
+
+    event.Skip();
+}
+
+void DIALOG_PAD_BASIC_SHP_POLY_PROPS::onPolyPanelResize( wxSizeEvent& event )
+{
+    m_panelPoly->Refresh();
+    event.Skip();
+}
+
+void DIALOG_PAD_BASIC_SHP_POLY_PROPS::onGridSelect( wxGridRangeSelectEvent& event )
+{
+    m_panelPoly->Refresh();
+}
+
+void DIALOG_PAD_BASIC_SHP_POLY_PROPS::onCellChanging( wxGridEvent& event )
+{
+    int row = event.GetRow();
+    int col = event.GetCol();
+
+    wxString msg = event.GetString();
+
+    if( msg.IsEmpty() )
+        return;
+
+    int value = ValueFromString( g_UserUnit, msg );
+
+    if( col == 0 )  // Set the X value
+        m_currshape.m_Poly[row].x = value;
+    else            // Set the Y value
+        m_currshape.m_Poly[row].y = value;
+
+    m_currshape.m_Thickness = ValueFromString( g_UserUnit, m_textCtrlThickness->GetValue() );
+
+    Validate();
+
+    m_panelPoly->Refresh();
+}
+
+
+// A dialog to apply geometry transforms to a shape or set of shapes
+// (move, rotate around origin, scaling factor, duplication).
+DIALOG_PAD_BASICSHAPES_TRANSFORM::DIALOG_PAD_BASICSHAPES_TRANSFORM(
+                                        wxWindow* aParent,
+                                        std::vector<PAD_BC_SHAPE*>& aList, bool aShowDuplicate )
+    :DIALOG_PAD_BASICSHAPES_TRANSFORM_BASE( aParent ), m_list( aList )
+{
+    wxString unit = GetAbbreviatedUnitsLabel();
+    m_staticTextMoveUnit->SetLabel( unit );
+
+    if( !aShowDuplicate )     // means no duplicate transform
+    {
+		m_staticTextDupCnt->Enable( false );
+		m_spinCtrlDuplicateCount->Enable( false );
+    }
+
+    m_sdbSizerOK->SetDefault();
+    GetSizer()->SetSizeHints( this );
+}
+
+// A helper function in geometry transform
+inline void geom_transf( wxPoint& aCoord, wxPoint& aMove, double aScale, double aRotation )
+{
+    aCoord.x = KiROUND( aCoord.x * aScale );
+    aCoord.y = KiROUND( aCoord.y * aScale );
+    aCoord += aMove;
+    RotatePoint( &aCoord, aRotation );
+}
+
+void DIALOG_PAD_BASICSHAPES_TRANSFORM::Transform( std::vector<PAD_BC_SHAPE>* aList, int aDuplicateCount )
+{
+    // Get parameters from dlg:
+    wxPoint moveVect;
+    moveVect.x = ValueFromString( g_UserUnit, m_textCtrMoveX->GetValue() );
+    moveVect.y = ValueFromString( g_UserUnit, m_textCtrMoveY->GetValue() );
+
+    double rotation = DoubleValueFromString( DEGREES, m_textCtrAngle->GetValue() );
+    double scale = DoubleValueFromString( UNSCALED_UNITS, m_textCtrlScalingFactor->GetValue() );
+
+    // Avoid too small /too large scale, which could create issues:
+    if( scale < 0.01 )
+        scale = 0.01;
+
+    if( scale > 100.0 )
+        scale = 100.0;
+
+    // Transform shapes
+    // shapes are scaled, then moved then rotated.
+    // if aList != NULL, the initial shape will be duplicated, and transform
+    // applied to the duplicated shape
+    do {
+        for( unsigned idx = 0; idx < m_list.size(); ++idx )
+        {
+            PAD_BC_SHAPE* shape;
+
+            if( aList == NULL )
+                shape = m_list[idx];
+            else
+            {
+                PAD_BC_SHAPE new_shape( *m_list[idx] );
+                aList->push_back( new_shape );
+                shape = &aList->back();
+            }
+
+            // Transform parameters common to all shape types (some can be unused)
+            shape->m_Thickness = KiROUND( shape->m_Thickness * scale );
+            geom_transf( shape->m_Start, moveVect, scale, rotation );
+            geom_transf( shape->m_End, moveVect, scale, rotation );
+
+            // specific parameters:
+            switch( shape->m_Type )
+            {
+            case S_SEGMENT:         // Segment with rounded ends
+                break;
+
+            case S_ARC:             // Arc with rounded ends
+                break;
+
+            case S_CIRCLE:          //  ring or circle
+                shape->m_Radius = KiROUND( shape->m_Radius * scale );
+                break;
+
+            case S_POLYGON:         // polygon
+                for( unsigned ii = 0; ii < shape->m_Poly.size(); ++ii )
+                    geom_transf( shape->m_Poly[ii], moveVect, scale, rotation );
+                break;
+
+            default:
+                break;
+            }
+        }
+
+        // Prepare new transform on duplication:
+        // Each new item is rotated (or moved) by the transform from the last duplication
+        rotation += rotation;
+        moveVect += moveVect;
+    } while( aList && --aDuplicateCount > 0 );
+}
+
diff --git a/pcbnew/dialogs/dialog_pad_properties.cpp b/pcbnew/dialogs/dialog_pad_properties.cpp
index da7427b..645a21c 100644
--- a/pcbnew/dialogs/dialog_pad_properties.cpp
+++ b/pcbnew/dialogs/dialog_pad_properties.cpp
@@ -6,10 +6,10 @@
 /*
  * This program source code file is part of KiCad, a free EDA CAD application.
  *
- * Copyright (C) 2016 Jean-Pierre Charras, jp.charras at wanadoo.fr
+ * Copyright (C) 2017 Jean-Pierre Charras, jp.charras at wanadoo.fr
  * Copyright (C) 2013 Dick Hollenbeck, dick@xxxxxxxxxxx
  * Copyright (C) 2008-2013 Wayne Stambaugh <stambaughw@xxxxxxxxxxx>
- * Copyright (C) 1992-2016 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
@@ -53,6 +53,8 @@ static PAD_SHAPE_T code_shape[] = {
     PAD_SHAPE_RECT,
     PAD_SHAPE_TRAPEZOID,
     PAD_SHAPE_ROUNDRECT,
+    PAD_SHAPE_CUSTOM,      // choice = CHOICE_SHAPE_CUSTOM_CIRC_ANCHOR
+    PAD_SHAPE_CUSTOM       // choice = PAD_SHAPE_CUSTOM_RECT_ANCHOR
 };
 
 // the ordered index of the pad shape wxChoice in dialog.
@@ -63,6 +65,8 @@ enum CODE_CHOICE {
     CHOICE_SHAPE_RECT,
     CHOICE_SHAPE_TRAPEZOID,
     CHOICE_SHAPE_ROUNDRECT,
+    CHOICE_SHAPE_CUSTOM_CIRC_ANCHOR,
+    CHOICE_SHAPE_CUSTOM_RECT_ANCHOR
 };
 
 
@@ -102,6 +106,15 @@ DIALOG_PAD_PROPERTIES::DIALOG_PAD_PROPERTIES( PCB_BASE_FRAME* aParent, D_PAD* aP
     DIALOG_PAD_PROPERTIES_BASE( aParent ),
     m_OrientValidator( 1, &m_OrientValue )
 {
+#ifndef KICAD_USE_CUSTOM_PADS
+    // Temporary code:
+    // Should be removed when the work in progress on custom pad shapes is finished
+    while( m_PadShape->GetCount() > 5 )
+        m_PadShape->Delete( m_PadShape->GetCount()-1 );
+
+    m_notebook->RemovePage( 2 );    // remove custom shape page from page list
+#endif
+
     m_canUpdate  = false;
     m_parent     = aParent;
     m_currentPad = aPad;        // aPad can be NULL, if the dialog is called
@@ -147,6 +160,10 @@ DIALOG_PAD_PROPERTIES::DIALOG_PAD_PROPERTIES( PCB_BASE_FRAME* aParent, D_PAD* aP
     }
 
     initValues();
+
+    // Usually, TransferDataToWindow is called by OnInitDialog
+    // calling it here fixes all widgets sizes, and FinishDialogSettings can
+    // safely fix minsizes
     TransferDataToWindow();
 
     m_sdbSizerOK->SetDefault();
@@ -156,12 +173,14 @@ DIALOG_PAD_PROPERTIES::DIALOG_PAD_PROPERTIES( PCB_BASE_FRAME* aParent, D_PAD* aP
     FinishDialogSettings();
 }
 
+
 void DIALOG_PAD_PROPERTIES::OnInitDialog( wxInitDialogEvent& event )
 {
     m_PadNumCtrl->SetFocus();
     m_PadNumCtrl->SetSelection( -1, -1 );
 }
 
+
 void DIALOG_PAD_PROPERTIES::OnPaintShowPanel( wxPaintEvent& event )
 {
     wxPaintDC    dc( m_panelShowPad );
@@ -375,8 +394,13 @@ void DIALOG_PAD_PROPERTIES::initValues()
 
         // flip pad's layers
         m_dummyPad->SetLayerSet( FlipLayerMask( m_dummyPad->GetLayerSet() ) );
+
+        // flip custom pad shapes
+        m_dummyPad->FlipBasicShapes();
     }
 
+    m_basicShapes = m_dummyPad->GetBasicShapes();
+
     m_staticTextWarningPadFlipped->Show(m_isFlipped);
 
     m_PadNumCtrl->SetValue( m_dummyPad->GetPadName() );
@@ -530,6 +554,13 @@ void DIALOG_PAD_PROPERTIES::initValues()
     case PAD_SHAPE_ROUNDRECT:
         m_PadShape->SetSelection( CHOICE_SHAPE_ROUNDRECT );
         break;
+
+    case PAD_SHAPE_CUSTOM:
+        if( m_dummyPad->GetAnchorPadShape() == PAD_SHAPE_RECT )
+            m_PadShape->SetSelection( CHOICE_SHAPE_CUSTOM_RECT_ANCHOR );
+        else
+            m_PadShape->SetSelection( CHOICE_SHAPE_CUSTOM_CIRC_ANCHOR );
+        break;
     }
 
     m_OrientValue = angle / 10.0;
@@ -565,8 +596,97 @@ void DIALOG_PAD_PROPERTIES::initValues()
     OnDrillShapeSelected( cmd_event );
     OnPadShapeSelection( cmd_event );
     updateRoundRectCornerValues();
+
+    // Update basic shapes list
+    displayBasicShapesList();
 }
 
+// A small helper function, to display coordinates:
+static wxString formatCoord( wxPoint aCoord )
+{
+    return wxString::Format( "X=%s  Y=%s",
+                CoordinateToString( aCoord.x, true ),
+                CoordinateToString( aCoord.y, true ) );
+}
+
+void DIALOG_PAD_PROPERTIES::displayBasicShapesList()
+{
+    m_listCtrlShapes->ClearAll();
+
+    wxListItem itemCol;
+    itemCol.SetText(wxT("Shape"));
+    itemCol.SetImage(-1);
+    m_listCtrlShapes->InsertColumn(0, itemCol);
+
+    itemCol.SetText(wxT("Prm1"));
+    m_listCtrlShapes->InsertColumn(1, itemCol);
+
+    itemCol.SetText(wxT("Prm2"));
+    m_listCtrlShapes->InsertColumn(2, itemCol);
+
+    itemCol.SetText(wxT("Prm3"));
+    m_listCtrlShapes->InsertColumn(3, itemCol);
+
+    itemCol.SetText(wxT("Thickness"));
+    m_listCtrlShapes->InsertColumn(4, itemCol);
+
+    wxString bs_info[5];
+
+    for( unsigned ii = 0; ii < m_basicShapes.size(); ++ii )
+    {
+        const PAD_BC_SHAPE& bshape = m_basicShapes[ii];
+
+        for( unsigned jj = 0; jj < 5; ++jj )
+            bs_info[jj].Empty();
+
+        bs_info[4] = wxString::Format( "%s", FMT_IU( bshape.m_Thickness ) );
+
+        switch( bshape.m_Type )
+        {
+        case S_SEGMENT:         // usual segment : line with rounded ends
+            bs_info[0] = ( "Segment" );
+            bs_info[1] = formatCoord( bshape.m_Start );
+            bs_info[2] = formatCoord( bshape.m_End );
+            break;
+
+        case S_ARC:             // Arc with rounded ends
+            bs_info[0] = "Arc";
+            bs_info[1] = formatCoord( bshape.m_Start );     // Center
+            bs_info[2] = formatCoord( bshape.m_End );       // Start point
+            bs_info[3] = wxString::Format( "angle %s", FMT_ANGLE( bshape.m_ArcAngle ) );
+            break;
+
+        case S_CIRCLE:          //  ring or circle
+            if( bshape.m_Thickness )
+                bs_info[0] = "ring";
+            else
+                bs_info[0] = "circle";
+
+            bs_info[1] = formatCoord( bshape.m_Start );
+            bs_info[2] = wxString::Format( "radius %s",
+                                CoordinateToString( bshape.m_Radius, true ) );
+            break;
+
+        case S_POLYGON:         // polygon
+            bs_info[0] = "Polygon";
+            bs_info[1] = wxString::Format( "corners %d", bshape.m_Poly.size() );
+            break;
+
+        default:
+            bs_info[0] = "Unknown basic shape";
+            break;
+        }
+
+        long tmp = m_listCtrlShapes->InsertItem(ii, bs_info[0]);
+        m_listCtrlShapes->SetItemData(tmp, ii);
+
+        for( int jj = 0; jj < 5; ++jj )
+            m_listCtrlShapes->SetItem(tmp, jj, bs_info[jj]);
+    }
+
+    for( unsigned ii = 0; ii < 5; ++ii )
+        m_listCtrlShapes->SetColumnWidth( ii, wxLIST_AUTOSIZE );
+}
 
 void DIALOG_PAD_PROPERTIES::OnResize( wxSizeEvent& event )
 {
@@ -621,6 +741,16 @@ void DIALOG_PAD_PROPERTIES::OnPadShapeSelection( wxCommandEvent& event )
         m_tcCornerSizeRatio->ChangeValue( wxString::Format( "%.1f",
                                 m_dummyPad->GetRoundRectRadiusRatio()*100 ) );
         break;
+
+    case CHOICE_SHAPE_CUSTOM_CIRC_ANCHOR:     // PAD_SHAPE_CUSTOM, circular anchor
+    case CHOICE_SHAPE_CUSTOM_RECT_ANCHOR:     // PAD_SHAPE_CUSTOM, rect anchor
+        m_ShapeDelta_Ctrl->Enable( false );
+        m_trapDeltaDirChoice->Enable( false );
+        m_ShapeSize_Y_Ctrl->Enable(
+            m_PadShape->GetSelection() == CHOICE_SHAPE_CUSTOM_RECT_ANCHOR );
+        m_ShapeOffset_X_Ctrl->Enable( false );
+        m_ShapeOffset_Y_Ctrl->Enable( false );
+        break;
     }
 
     // A few widgets are enabled only for rounded rect pads:
@@ -871,6 +1001,14 @@ bool DIALOG_PAD_PROPERTIES::padValuesOK()
         }
     }
 
+    if( m_dummyPad->GetShape() == PAD_SHAPE_CUSTOM )
+    {
+        if( !m_dummyPad->MergeBasicShapesAsPolygon( ) )
+            error_msgs.Add(
+                _( "Incorrect pad shape: the shape must be equivalent to only one polygon" ) );
+    }
+
+
     if( error_msgs.GetCount() )
     {
         HTML_MESSAGE_BOX dlg( this, _("Pad setup errors list" ) );
@@ -1003,6 +1141,19 @@ bool DIALOG_PAD_PROPERTIES::TransferDataFromWindow()
 
     m_currentPad->SetPadToDieLength( m_padMaster->GetPadToDieLength() );
 
+    if( m_padMaster->GetShape() != PAD_SHAPE_CUSTOM )
+        m_padMaster->DeleteBasicShapesList();
+
+
+    m_currentPad->SetAnchorPadShape( m_padMaster->GetAnchorPadShape() );
+    m_currentPad->SetBasicShapes( m_padMaster->GetBasicShapes() );
+
+    if( m_isFlipped )
+    {
+        m_currentPad->SetLayerSet( FlipLayerMask( m_currentPad->GetLayerSet() ) );
+        m_currentPad->FlipBasicShapes();
+    }
+
     if( m_currentPad->GetLayerSet() != m_padMaster->GetLayerSet() )
     {
         rastnestIsChanged = true;
@@ -1087,7 +1238,11 @@ bool DIALOG_PAD_PROPERTIES::transferDataToPad( D_PAD* aPad )
 
     aPad->SetAttribute( code_type[m_PadType->GetSelection()] );
     aPad->SetShape( code_shape[m_PadShape->GetSelection()] );
+    aPad->SetAnchorPadShape( m_PadShape->GetSelection() == CHOICE_SHAPE_CUSTOM_RECT_ANCHOR ?
+                                PAD_SHAPE_RECT : PAD_SHAPE_CIRCLE );
 
+    if( aPad->GetShape() == PAD_SHAPE_CUSTOM )
+        aPad->SetBasicShapes( m_basicShapes );
 
     // Read pad clearances values:
     aPad->SetLocalClearance( ValueFromTextCtrl( *m_NetClearanceValueCtrl ) );
@@ -1157,6 +1312,10 @@ bool DIALOG_PAD_PROPERTIES::transferDataToPad( D_PAD* aPad )
     if( aPad->GetShape() == PAD_SHAPE_CIRCLE )
         y = x;
 
+    // for custom shped pads, the pad size is the anchor pad size:
+    if( aPad->GetShape() == PAD_SHAPE_CUSTOM && aPad->GetAnchorPadShape() == PAD_SHAPE_CIRCLE )
+        y = x;
+
     aPad->SetSize( wxSize( x, y ) );
 
     // Read pad length die
@@ -1247,6 +1406,16 @@ bool DIALOG_PAD_PROPERTIES::transferDataToPad( D_PAD* aPad )
         aPad->SetDelta( wxSize( 0, 0 ) );
         break;
 
+    case PAD_SHAPE_CUSTOM:  // The pad custom has an "anchor pad" (round or rect pad)
+        aPad->SetOffset( wxPoint( 0, 0 ) );
+        aPad->SetDelta( wxSize( 0, 0 ) );
+        if( aPad->GetAnchorPadShape() == PAD_SHAPE_CIRCLE )
+        {
+            x = aPad->GetSize().x;
+            aPad->SetSize( wxSize( x, x ) );
+        }
+        break;
+
     default:
         ;
     }
@@ -1360,3 +1529,219 @@ void DIALOG_PAD_PROPERTIES::OnValuesChanged( wxCommandEvent& event )
         redraw();
     }
 }
+
+void DIALOG_PAD_PROPERTIES::editBasicShape()
+{
+    long select = m_listCtrlShapes->GetFirstSelected();
+
+    if( select < 0 )
+    {
+        wxMessageBox( _( "No shape selected" ) );
+        return;
+    }
+
+    PAD_BC_SHAPE& shape = m_basicShapes[select];
+
+    if( shape.m_Type == S_POLYGON )
+    {
+        DIALOG_PAD_BASIC_SHP_POLY_PROPS dlg( this, &shape );
+
+        if( dlg.ShowModal() != wxID_OK )
+            return;
+
+        dlg.TransferDataFromWindow();
+    }
+
+    else
+    {
+        DIALOG_PAD_BASICSHAPES_PROPERTIES dlg( this, &shape );
+
+        if( dlg.ShowModal() != wxID_OK )
+            return;
+
+        dlg.TransferDataFromWindow();
+    }
+
+    displayBasicShapesList();
+
+    if( m_canUpdate )
+    {
+        transferDataToPad( m_dummyPad );
+        redraw();
+    }
+}
+
+
+/// Called on a double click on the basic shapes list
+void DIALOG_PAD_PROPERTIES::onCustomShapeDClick( wxMouseEvent& event )
+{
+    editBasicShape();
+}
+
+
+// Called on a click on basic shapes list panel button
+void DIALOG_PAD_PROPERTIES::onEditShape( wxCommandEvent& event )
+{
+    editBasicShape();
+}
+
+// Called on a click on basic shapes list panel button
+void DIALOG_PAD_PROPERTIES::onDeleteShape( wxCommandEvent& event )
+{
+    long select = m_listCtrlShapes->GetFirstSelected();
+
+    if( select < 0 )
+        return;
+
+    // Multiple selections are allowed. get them and remove corresponding shapes
+    std::vector<long> indexes;
+    indexes.push_back( select );
+
+    while( ( select = m_listCtrlShapes->GetNextSelected( select ) ) >= 0 )
+        indexes.push_back( select );
+
+    // Erase all select shapes
+    for( unsigned ii = indexes.size(); ii > 0; --ii )
+        m_basicShapes.erase( m_basicShapes.begin() + indexes[ii-1] );
+
+    displayBasicShapesList();
+
+    if( m_canUpdate )
+    {
+        transferDataToPad( m_dummyPad );
+        redraw();
+    }
+}
+
+
+void DIALOG_PAD_PROPERTIES::onAddShape( wxCommandEvent& event )
+{
+    // Ask user for shape type
+    wxString shapelist[] =
+    {
+        _( "Segment" ), _( "Arc" ), _( "ring/circle" ), _( "polygon" )
+    };
+
+    int type = wxGetSingleChoiceIndex( wxEmptyString, _( " Select shape type:" ),
+                    DIM( shapelist ), shapelist, 0 );
+
+    STROKE_T listtype[] =
+    {
+        S_SEGMENT, S_ARC, S_CIRCLE, S_POLYGON
+    };
+
+    PAD_BC_SHAPE basicShape( listtype[type] );
+
+    if( listtype[type] == S_POLYGON )
+    {
+        DIALOG_PAD_BASIC_SHP_POLY_PROPS dlg( this, &basicShape );
+
+        if( dlg.ShowModal() != wxID_OK )
+            return;
+    }
+    else
+    {
+        DIALOG_PAD_BASICSHAPES_PROPERTIES dlg( this, &basicShape );
+
+        if( dlg.ShowModal() != wxID_OK )
+            return;
+    }
+
+    m_basicShapes.push_back( basicShape );
+
+    displayBasicShapesList();
+
+    if( m_canUpdate )
+    {
+        transferDataToPad( m_dummyPad );
+        redraw();
+    }
+}
+
+
+void DIALOG_PAD_PROPERTIES::onImportShape( wxCommandEvent& event )
+{
+    wxMessageBox( "Not yet available" );
+}
+
+
+void DIALOG_PAD_PROPERTIES::onGeometryTransform( wxCommandEvent& event )
+{
+    long select = m_listCtrlShapes->GetFirstSelected();
+
+    if( select < 0 )
+    {
+        wxMessageBox( _( "No shape selected" ) );
+        return;
+    }
+
+    // Multiple selections are allowed. Build selected shapes list
+    std::vector<long> indexes;
+    indexes.push_back( select );
+
+    std::vector<PAD_BC_SHAPE*> shapeList;
+    shapeList.push_back( &m_basicShapes[select] );
+
+    while( ( select = m_listCtrlShapes->GetNextSelected( select ) ) >= 0 )
+    {
+        indexes.push_back( select );
+        shapeList.push_back( &m_basicShapes[select] );
+    }
+
+    DIALOG_PAD_BASICSHAPES_TRANSFORM dlg( this, shapeList );
+
+    if( dlg.ShowModal() != wxID_OK )
+        return;
+
+    // Transfert new settings:
+    dlg.Transform();
+
+    displayBasicShapesList();
+
+    if( m_canUpdate )
+    {
+        transferDataToPad( m_dummyPad );
+        redraw();
+    }
+}
+
+
+void DIALOG_PAD_PROPERTIES::onDuplicateShape( wxCommandEvent& event )
+{
+    long select = m_listCtrlShapes->GetFirstSelected();
+
+    if( select < 0 )
+    {
+        wxMessageBox( _( "No shape selected" ) );
+        return;
+    }
+
+    // Multiple selections are allowed. Build selected shapes list
+    std::vector<long> indexes;
+    indexes.push_back( select );
+
+    std::vector<PAD_BC_SHAPE*> shapeList;
+    shapeList.push_back( &m_basicShapes[select] );
+
+    while( ( select = m_listCtrlShapes->GetNextSelected( select ) ) >= 0 )
+    {
+        indexes.push_back( select );
+        shapeList.push_back( &m_basicShapes[select] );
+    }
+
+    DIALOG_PAD_BASICSHAPES_TRANSFORM dlg( this, shapeList, true );
+
+    if( dlg.ShowModal() != wxID_OK )
+        return;
+
+    // Transfert new settings:
+    dlg.Transform( &m_basicShapes, dlg.GetDuplicateCount() );
+
+    displayBasicShapesList();
+
+    if( m_canUpdate )
+    {
+        transferDataToPad( m_dummyPad );
+        redraw();
+    }
+}
diff --git a/pcbnew/dialogs/dialog_pad_properties.h b/pcbnew/dialogs/dialog_pad_properties.h
index 59d341e..0238fd1 100644
--- a/pcbnew/dialogs/dialog_pad_properties.h
+++ b/pcbnew/dialogs/dialog_pad_properties.h
@@ -56,7 +56,6 @@ class DIALOG_PAD_PROPERTIES : public DIALOG_PAD_PROPERTIES_BASE
 {
 public:
     DIALOG_PAD_PROPERTIES( PCB_BASE_FRAME* aParent, D_PAD* aPad );
-    void OnInitDialog( wxInitDialogEvent& event ) override;
     ~DIALOG_PAD_PROPERTIES()
     {
         delete m_dummyPad;
@@ -80,13 +79,20 @@ private:
     bool    m_canUpdate;
     bool    m_canEditNetName;       // true only if the caller is the board editor
 
+    // for free shape pads: the list of basic shapes,
+    // in local coordinates, orient 0, coordinates relative to m_Pos
+    // They are expected to define only one copper area.
+    std::vector<PAD_BC_SHAPE> m_basicShapes;
+
     wxFloatingPointValidator<double>    m_OrientValidator;
     double  m_OrientValue;
 
 private:
     void initValues();
+    void displayBasicShapesList();
     bool padValuesOK();       ///< test if all values are acceptable for the pad
     void redraw();
+    void editBasicShape();
     void updateRoundRectCornerValues();
 
     /**
@@ -100,6 +106,7 @@ private:
     bool transferDataToPad( D_PAD* aPad );
 
     // event handlers:
+    void OnInitDialog( wxInitDialogEvent& event ) override;
     void OnResize( wxSizeEvent& event );
 
     void OnPadShapeSelection( wxCommandEvent& event ) override;
@@ -120,8 +127,126 @@ private:
 
     /// Updates the different parameters for the component being edited.
     /// Automatically fired from the OK button click.
+
+    bool TransferDataFromWindow() override;
+    bool TransferDataToWindow() override;
+
+    /// Event handlers of basic shapes list panel
+    void onDeleteShape( wxCommandEvent& event ) override;
+    void onEditShape( wxCommandEvent& event ) override;
+    void onAddShape( wxCommandEvent& event ) override;
+    void onImportShape( wxCommandEvent& event ) override;
+    void onGeometryTransform( wxCommandEvent& event ) override;
+    void onDuplicateShape( wxCommandEvent& event ) override;
+
+    /// Called on a double click on the basic shapes list
+    void onCustomShapeDClick( wxMouseEvent& event ) override;
+};
+
+/**
+ * a dialog to edit basics shapes parameters.
+ * Polygonal shape is not handles by this dialog
+ */
+class DIALOG_PAD_BASICSHAPES_PROPERTIES: public DIALOG_PAD_BASICSHAPES_PROPERTIES_BASE
+{
+public:
+    DIALOG_PAD_BASICSHAPES_PROPERTIES( wxWindow* aParent, PAD_BC_SHAPE * aShape );
+
+    /**
+     * Function TransferDataFromWindow
+     * Transfer data out of the GUI.
+     */
+    bool TransferDataFromWindow() override;
+
+private:
+    /**
+     * Function TransferDataToWindow
+     * Transfer data into the GUI.
+     */
+    bool TransferDataToWindow() override;
+
+    // The basic shape currently edited
+    PAD_BC_SHAPE * m_shape;
+};
+
+
+/**
+ * a dialog to edit basic polygonal shape parameters
+ */
+class DIALOG_PAD_BASIC_SHP_POLY_PROPS: public DIALOG_PAD_BASIC_SHP_POLY_PROPS_BASE
+{
+    // The basic shape currently edited
+    PAD_BC_SHAPE * m_shape;
+
+    // The working copy of the basic shape currently edited
+    PAD_BC_SHAPE m_currshape;
+
+public:
+    DIALOG_PAD_BASIC_SHP_POLY_PROPS( wxWindow* aParent, PAD_BC_SHAPE * aShape );
+    ~DIALOG_PAD_BASIC_SHP_POLY_PROPS();
+
+    /**
+     * Function TransferDataFromWindow
+     * Transfer data out of the GUI.
+     */
     bool TransferDataFromWindow() override;
+
+private:
+    /**
+     * Function TransferDataToWindow
+     * Transfer data into the GUI.
+     */
     bool TransferDataToWindow() override;
+
+    /**
+     * test for a valid polygon (a not self intersectiong polygon)
+     */
+    bool Validate() override;
+
+    // Events handlers:
+    void OnValidateButton( wxCommandEvent& event );
+    void onButtonAdd( wxCommandEvent& event ) override;
+    void OnButtonDelete( wxCommandEvent& event ) override;
+    void onPaintPolyPanel( wxPaintEvent& event ) override;
+    void onPolyPanelResize( wxSizeEvent& event ) override;
+    void onGridSelect( wxGridRangeSelectEvent& event ) override;
+    void onCellChanging( wxGridEvent& event );
+    void onCellSelect( wxGridEvent& event ) override
+    {
+        event.Skip();
+    }
+};
+
+
+/** A dialog to apply geometry transforms to a shape or set of shapes
+ * (move, rotate around origin, scaling factor, duplication).
+ * shapes are scaled, then moved then rotated.
+ * aList is a list of shapes to transform or duplicate
+ * if aShowDuplicate == false, the parameter "Duplicate count" is disabled
+ */
+
+class DIALOG_PAD_BASICSHAPES_TRANSFORM : public DIALOG_PAD_BASICSHAPES_TRANSFORM_BASE
+{
+public:
+    DIALOG_PAD_BASICSHAPES_TRANSFORM( wxWindow* aParent,
+                                      std::vector<PAD_BC_SHAPE*>& aList, bool aShowDuplicate = false );
+
+    /**
+     * Apply geometric transform (rotation, move, scale) defined in dialog
+     * aDuplicate = 1 .. n to duplicate the list of shapes
+     * aDuplicate = 0 to transform the list of shapes
+     * The duplicated items are transformed, but the initial shpes are not modified.
+     * The duplicated items are added to aList
+     */
+    void Transform( std::vector<PAD_BC_SHAPE>* aList = NULL, int aDuplicateCount = 0 );
+
+    /**
+     * @return the number of duplicate, chosen by user
+     */
+    int GetDuplicateCount() { return m_spinCtrlDuplicateCount->GetValue(); }
+
+private:
+    std::vector<PAD_BC_SHAPE*>& m_list;
 };
 
 #endif      // #ifndef _DIALOG_PAD_PROPERTIES_H_
diff --git a/pcbnew/dialogs/dialog_pad_properties_base.cpp b/pcbnew/dialogs/dialog_pad_properties_base.cpp
index 30c2ce3..b20a7bf 100644
--- a/pcbnew/dialogs/dialog_pad_properties_base.cpp
+++ b/pcbnew/dialogs/dialog_pad_properties_base.cpp
@@ -1,5 +1,5 @@
 ///////////////////////////////////////////////////////////////////////////
-// C++ code generated with wxFormBuilder (version Jul 17 2016)
+// C++ code generated with wxFormBuilder (version May  6 2016)
 // http://www.wxformbuilder.org/
 //
 // PLEASE DO "NOT" EDIT THIS FILE!
@@ -63,10 +63,10 @@ DIALOG_PAD_PROPERTIES_BASE::DIALOG_PAD_PROPERTIES_BASE( wxWindow* parent, wxWind
 	m_staticText45->Wrap( -1 );
 	fgSizerPadType->Add( m_staticText45, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT|wxTOP, 5 );
 	
-	wxString m_PadShapeChoices[] = { _("Circular"), _("Oval"), _("Rectangular"), _("Trapezoidal"), _("Rounded Rectangle") };
+	wxString m_PadShapeChoices[] = { _("Circular"), _("Oval"), _("Rectangular"), _("Trapezoidal"), _("Rounded Rectangle"), _("Custom Shape with Circular Anchor"), _("Custom Shape with Rectangular Anchor") };
 	int m_PadShapeNChoices = sizeof( m_PadShapeChoices ) / sizeof( wxString );
 	m_PadShape = new wxChoice( m_panelGeneral, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_PadShapeNChoices, m_PadShapeChoices, 0 );
-	m_PadShape->SetSelection( 0 );
+	m_PadShape->SetSelection( 6 );
 	fgSizerPadType->Add( m_PadShape, 0, wxALL|wxEXPAND, 5 );
 	
 	
@@ -223,7 +223,7 @@ DIALOG_PAD_PROPERTIES_BASE::DIALOG_PAD_PROPERTIES_BASE( wxWindow* parent, wxWind
 	m_staticline9 = new wxStaticLine( m_panelGeneral, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
 	fgSizerShapeType->Add( m_staticline9, 0, wxEXPAND | wxALL, 5 );
 	
-	m_staticTextCornerSizeRatio = new wxStaticText( m_panelGeneral, wxID_ANY, _("Corner size ( percent of width):"), wxDefaultPosition, wxDefaultSize, 0 );
+	m_staticTextCornerSizeRatio = new wxStaticText( m_panelGeneral, wxID_ANY, _("Corner size (% of width):"), wxDefaultPosition, wxDefaultSize, 0 );
 	m_staticTextCornerSizeRatio->Wrap( -1 );
 	m_staticTextCornerSizeRatio->SetToolTip( _("Corner radius in percent  of the pad width.\nThe width is the smaller value between size X and size Y\nThe max value is 50 percent ") );
 	
@@ -551,6 +551,63 @@ DIALOG_PAD_PROPERTIES_BASE::DIALOG_PAD_PROPERTIES_BASE( wxWindow* parent, wxWind
 	m_localSettingsPanel->Layout();
 	bSizerPanelClearance->Fit( m_localSettingsPanel );
 	m_notebook->AddPage( m_localSettingsPanel, _("Local Clearance and Settings"), false );
+	m_panelCustomShape = new wxPanel( m_notebook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+	m_bSizerPanelShapes = new wxBoxSizer( wxVERTICAL );
+	
+	m_staticTextShapesList = new wxStaticText( m_panelCustomShape, wxID_ANY, _("Basic shapes list"), wxDefaultPosition, wxDefaultSize, 0 );
+	m_staticTextShapesList->Wrap( -1 );
+	m_bSizerPanelShapes->Add( m_staticTextShapesList, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 );
+	
+	m_staticTextShapesListWraning = new wxStaticText( m_panelCustomShape, wxID_ANY, _(" Coordinates are relative to anchor pad, orientation 0"), wxDefaultPosition, wxDefaultSize, 0 );
+	m_staticTextShapesListWraning->Wrap( -1 );
+	m_staticTextShapesListWraning->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) );
+	
+	m_bSizerPanelShapes->Add( m_staticTextShapesListWraning, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 );
+	
+	m_listCtrlShapes = new wxListView( m_panelCustomShape, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_HRULES|wxLC_REPORT );
+	m_bSizerPanelShapes->Add( m_listCtrlShapes, 1, wxALL|wxEXPAND, 5 );
+	
+	wxBoxSizer* bSizerButtons;
+	bSizerButtons = new wxBoxSizer( wxVERTICAL );
+	
+	wxBoxSizer* bSizerButtonsUpper;
+	bSizerButtonsUpper = new wxBoxSizer( wxHORIZONTAL );
+	
+	m_buttonDel = new wxButton( m_panelCustomShape, wxID_ANY, _("Delete Shape"), wxDefaultPosition, wxDefaultSize, 0 );
+	bSizerButtonsUpper->Add( m_buttonDel, 0, wxALL, 5 );
+	
+	m_buttonEditShape = new wxButton( m_panelCustomShape, wxID_ANY, _("Edit Shape"), wxDefaultPosition, wxDefaultSize, 0 );
+	bSizerButtonsUpper->Add( m_buttonEditShape, 0, wxALL, 5 );
+	
+	m_buttonAddShape = new wxButton( m_panelCustomShape, wxID_ANY, _("Add Shape"), wxDefaultPosition, wxDefaultSize, 0 );
+	bSizerButtonsUpper->Add( m_buttonAddShape, 0, wxALL, 5 );
+	
+	m_buttonDup = new wxButton( m_panelCustomShape, wxID_ANY, _("Duplicate Shape"), wxDefaultPosition, wxDefaultSize, 0 );
+	bSizerButtonsUpper->Add( m_buttonDup, 0, wxALL, 5 );
+	
+	
+	bSizerButtons->Add( bSizerButtonsUpper, 0, wxALIGN_CENTER_HORIZONTAL, 5 );
+	
+	wxBoxSizer* bSizerButtonsLower;
+	bSizerButtonsLower = new wxBoxSizer( wxHORIZONTAL );
+	
+	m_buttonGeometry = new wxButton( m_panelCustomShape, wxID_ANY, _("Geometry Transform"), wxDefaultPosition, wxDefaultSize, 0 );
+	bSizerButtonsLower->Add( m_buttonGeometry, 0, wxALL, 5 );
+	
+	m_buttonImport = new wxButton( m_panelCustomShape, wxID_ANY, _("Import Shapes"), wxDefaultPosition, wxDefaultSize, 0 );
+	bSizerButtonsLower->Add( m_buttonImport, 0, wxALL, 5 );
+	
+	
+	bSizerButtons->Add( bSizerButtonsLower, 0, wxALIGN_CENTER_HORIZONTAL, 5 );
+	
+	
+	m_bSizerPanelShapes->Add( bSizerButtons, 0, wxALIGN_CENTER_HORIZONTAL, 5 );
+	
+	
+	m_panelCustomShape->SetSizer( m_bSizerPanelShapes );
+	m_panelCustomShape->Layout();
+	m_bSizerPanelShapes->Fit( m_panelCustomShape );
+	m_notebook->AddPage( m_panelCustomShape, _("Custom Shape"), false );
 	
 	bSizerUpper->Add( m_notebook, 0, wxALL|wxEXPAND, 5 );
 	
@@ -624,6 +681,13 @@ DIALOG_PAD_PROPERTIES_BASE::DIALOG_PAD_PROPERTIES_BASE( wxWindow* parent, wxWind
 	m_PadLayerECO1->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnSetLayers ), NULL, this );
 	m_PadLayerECO2->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnSetLayers ), NULL, this );
 	m_NetClearanceValueCtrl->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnValuesChanged ), NULL, this );
+	m_listCtrlShapes->Connect( wxEVT_LEFT_DCLICK, wxMouseEventHandler( DIALOG_PAD_PROPERTIES_BASE::onCustomShapeDClick ), NULL, this );
+	m_buttonDel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::onDeleteShape ), NULL, this );
+	m_buttonEditShape->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::onEditShape ), NULL, this );
+	m_buttonAddShape->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::onAddShape ), NULL, this );
+	m_buttonDup->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::onDuplicateShape ), NULL, this );
+	m_buttonGeometry->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::onGeometryTransform ), NULL, this );
+	m_buttonImport->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::onImportShape ), NULL, this );
 	m_panelShowPad->Connect( wxEVT_PAINT, wxPaintEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnPaintShowPanel ), NULL, this );
 }
 
@@ -660,6 +724,359 @@ DIALOG_PAD_PROPERTIES_BASE::~DIALOG_PAD_PROPERTIES_BASE()
 	m_PadLayerECO1->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnSetLayers ), NULL, this );
 	m_PadLayerECO2->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnSetLayers ), NULL, this );
 	m_NetClearanceValueCtrl->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnValuesChanged ), NULL, this );
+	m_listCtrlShapes->Disconnect( wxEVT_LEFT_DCLICK, wxMouseEventHandler( DIALOG_PAD_PROPERTIES_BASE::onCustomShapeDClick ), NULL, this );
+	m_buttonDel->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::onDeleteShape ), NULL, this );
+	m_buttonEditShape->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::onEditShape ), NULL, this );
+	m_buttonAddShape->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::onAddShape ), NULL, this );
+	m_buttonDup->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::onDuplicateShape ), NULL, this );
+	m_buttonGeometry->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::onGeometryTransform ), NULL, this );
+	m_buttonImport->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::onImportShape ), NULL, this );
 	m_panelShowPad->Disconnect( wxEVT_PAINT, wxPaintEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnPaintShowPanel ), NULL, this );
 	
 }
+
+DIALOG_PAD_BASICSHAPES_PROPERTIES_BASE::DIALOG_PAD_BASICSHAPES_PROPERTIES_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : DIALOG_SHIM( parent, id, title, pos, size, style )
+{
+	this->SetSizeHints( wxDefaultSize, wxDefaultSize );
+	
+	wxBoxSizer* bSizermain;
+	bSizermain = new wxBoxSizer( wxVERTICAL );
+	
+	m_staticTextInfo = new wxStaticText( this, wxID_ANY, _("Filled circle: set thickness to 0\nRing:  set thickness to the width of the ring"), wxDefaultPosition, wxDefaultSize, 0 );
+	m_staticTextInfo->Wrap( -1 );
+	m_staticTextInfo->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) );
+	
+	bSizermain->Add( m_staticTextInfo, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 );
+	
+	wxFlexGridSizer* fgSizerShapeProperties;
+	fgSizerShapeProperties = new wxFlexGridSizer( 0, 4, 0, 0 );
+	fgSizerShapeProperties->AddGrowableCol( 1 );
+	fgSizerShapeProperties->AddGrowableCol( 2 );
+	fgSizerShapeProperties->SetFlexibleDirection( wxBOTH );
+	fgSizerShapeProperties->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
+	
+	m_staticTextPosStart = new wxStaticText( this, wxID_ANY, _("Start point  X,Y"), wxDefaultPosition, wxDefaultSize, 0 );
+	m_staticTextPosStart->Wrap( -1 );
+	fgSizerShapeProperties->Add( m_staticTextPosStart, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
+	
+	m_textCtrPosX = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
+	fgSizerShapeProperties->Add( m_textCtrPosX, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
+	
+	m_textCtrPosY = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
+	fgSizerShapeProperties->Add( m_textCtrPosY, 0, wxALL|wxEXPAND, 5 );
+	
+	m_staticTextPosUnit = new wxStaticText( this, wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 );
+	m_staticTextPosUnit->Wrap( -1 );
+	fgSizerShapeProperties->Add( m_staticTextPosUnit, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
+	
+	m_staticTextPosEnd = new wxStaticText( this, wxID_ANY, _("End point X,Y"), wxDefaultPosition, wxDefaultSize, 0 );
+	m_staticTextPosEnd->Wrap( -1 );
+	fgSizerShapeProperties->Add( m_staticTextPosEnd, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
+	
+	m_textCtrEndX = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
+	fgSizerShapeProperties->Add( m_textCtrEndX, 0, wxALL|wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 );
+	
+	m_textCtrEndY = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
+	fgSizerShapeProperties->Add( m_textCtrEndY, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
+	
+	m_staticTextEndUnit = new wxStaticText( this, wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 );
+	m_staticTextEndUnit->Wrap( -1 );
+	fgSizerShapeProperties->Add( m_staticTextEndUnit, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
+	
+	m_staticTextAngle = new wxStaticText( this, wxID_ANY, _("Angle"), wxDefaultPosition, wxDefaultSize, 0 );
+	m_staticTextAngle->Wrap( -1 );
+	fgSizerShapeProperties->Add( m_staticTextAngle, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
+	
+	m_textCtrAngle = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
+	fgSizerShapeProperties->Add( m_textCtrAngle, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
+	
+	m_staticTextAngleUnit = new wxStaticText( this, wxID_ANY, _("degree"), wxDefaultPosition, wxDefaultSize, 0 );
+	m_staticTextAngleUnit->Wrap( -1 );
+	fgSizerShapeProperties->Add( m_staticTextAngleUnit, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
+	
+	
+	fgSizerShapeProperties->Add( 0, 0, 1, wxEXPAND, 5 );
+	
+	m_staticTextThickness = new wxStaticText( this, wxID_ANY, _("Thickness"), wxDefaultPosition, wxDefaultSize, 0 );
+	m_staticTextThickness->Wrap( -1 );
+	fgSizerShapeProperties->Add( m_staticTextThickness, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
+	
+	m_textCtrlThickness = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
+	fgSizerShapeProperties->Add( m_textCtrlThickness, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
+	
+	m_staticTextThicknessUnit = new wxStaticText( this, wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 );
+	m_staticTextThicknessUnit->Wrap( -1 );
+	fgSizerShapeProperties->Add( m_staticTextThicknessUnit, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
+	
+	
+	fgSizerShapeProperties->Add( 0, 0, 1, wxEXPAND, 5 );
+	
+	
+	bSizermain->Add( fgSizerShapeProperties, 1, wxEXPAND, 5 );
+	
+	m_staticline1 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
+	bSizermain->Add( m_staticline1, 0, wxEXPAND | wxALL, 5 );
+	
+	m_sdbSizer = new wxStdDialogButtonSizer();
+	m_sdbSizerOK = new wxButton( this, wxID_OK );
+	m_sdbSizer->AddButton( m_sdbSizerOK );
+	m_sdbSizerCancel = new wxButton( this, wxID_CANCEL );
+	m_sdbSizer->AddButton( m_sdbSizerCancel );
+	m_sdbSizer->Realize();
+	
+	bSizermain->Add( m_sdbSizer, 0, wxALIGN_RIGHT|wxALL, 5 );
+	
+	
+	this->SetSizer( bSizermain );
+	this->Layout();
+	
+	this->Centre( wxBOTH );
+}
+
+DIALOG_PAD_BASICSHAPES_PROPERTIES_BASE::~DIALOG_PAD_BASICSHAPES_PROPERTIES_BASE()
+{
+}
+
+DIALOG_PAD_BASICSHAPES_TRANSFORM_BASE::DIALOG_PAD_BASICSHAPES_TRANSFORM_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : DIALOG_SHIM( parent, id, title, pos, size, style )
+{
+	this->SetSizeHints( wxDefaultSize, wxDefaultSize );
+	
+	wxBoxSizer* bSizermain;
+	bSizermain = new wxBoxSizer( wxVERTICAL );
+	
+	wxFlexGridSizer* fgSizerShapeProperties;
+	fgSizerShapeProperties = new wxFlexGridSizer( 0, 4, 0, 0 );
+	fgSizerShapeProperties->AddGrowableCol( 1 );
+	fgSizerShapeProperties->AddGrowableCol( 2 );
+	fgSizerShapeProperties->SetFlexibleDirection( wxBOTH );
+	fgSizerShapeProperties->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
+	
+	m_staticTextMove = new wxStaticText( this, wxID_ANY, _("Move vector X,Y"), wxDefaultPosition, wxDefaultSize, 0 );
+	m_staticTextMove->Wrap( -1 );
+	fgSizerShapeProperties->Add( m_staticTextMove, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
+	
+	m_textCtrMoveX = new wxTextCtrl( this, wxID_ANY, _("0"), wxDefaultPosition, wxDefaultSize, 0 );
+	fgSizerShapeProperties->Add( m_textCtrMoveX, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
+	
+	m_textCtrMoveY = new wxTextCtrl( this, wxID_ANY, _("0"), wxDefaultPosition, wxDefaultSize, 0 );
+	fgSizerShapeProperties->Add( m_textCtrMoveY, 0, wxALL|wxEXPAND, 5 );
+	
+	m_staticTextMoveUnit = new wxStaticText( this, wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 );
+	m_staticTextMoveUnit->Wrap( -1 );
+	fgSizerShapeProperties->Add( m_staticTextMoveUnit, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
+	
+	m_staticTextAngle = new wxStaticText( this, wxID_ANY, _("Rotation"), wxDefaultPosition, wxDefaultSize, 0 );
+	m_staticTextAngle->Wrap( -1 );
+	fgSizerShapeProperties->Add( m_staticTextAngle, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
+	
+	m_textCtrAngle = new wxTextCtrl( this, wxID_ANY, _("0"), wxDefaultPosition, wxDefaultSize, 0 );
+	fgSizerShapeProperties->Add( m_textCtrAngle, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
+	
+	m_staticTextAngleUnit = new wxStaticText( this, wxID_ANY, _("degree"), wxDefaultPosition, wxDefaultSize, 0 );
+	m_staticTextAngleUnit->Wrap( -1 );
+	fgSizerShapeProperties->Add( m_staticTextAngleUnit, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
+	
+	
+	fgSizerShapeProperties->Add( 0, 0, 1, wxEXPAND, 5 );
+	
+	m_staticTextSF = new wxStaticText( this, wxID_ANY, _("Scaling factor"), wxDefaultPosition, wxDefaultSize, 0 );
+	m_staticTextSF->Wrap( -1 );
+	fgSizerShapeProperties->Add( m_staticTextSF, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
+	
+	m_textCtrlScalingFactor = new wxTextCtrl( this, wxID_ANY, _("1.0"), wxDefaultPosition, wxDefaultSize, 0 );
+	fgSizerShapeProperties->Add( m_textCtrlScalingFactor, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
+	
+	
+	fgSizerShapeProperties->Add( 0, 0, 1, wxEXPAND, 5 );
+	
+	
+	fgSizerShapeProperties->Add( 0, 0, 1, wxEXPAND, 5 );
+	
+	m_staticTextDupCnt = new wxStaticText( this, wxID_ANY, _("Duplicate count"), wxDefaultPosition, wxDefaultSize, 0 );
+	m_staticTextDupCnt->Wrap( -1 );
+	fgSizerShapeProperties->Add( m_staticTextDupCnt, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
+	
+	m_spinCtrlDuplicateCount = new wxSpinCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 1, 100, 1 );
+	fgSizerShapeProperties->Add( m_spinCtrlDuplicateCount, 0, wxALL, 5 );
+	
+	
+	fgSizerShapeProperties->Add( 0, 0, 1, wxEXPAND, 5 );
+	
+	
+	fgSizerShapeProperties->Add( 0, 0, 1, wxEXPAND, 5 );
+	
+	
+	bSizermain->Add( fgSizerShapeProperties, 1, wxEXPAND, 5 );
+	
+	m_staticline1 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
+	bSizermain->Add( m_staticline1, 0, wxEXPAND | wxALL, 5 );
+	
+	m_sdbSizer = new wxStdDialogButtonSizer();
+	m_sdbSizerOK = new wxButton( this, wxID_OK );
+	m_sdbSizer->AddButton( m_sdbSizerOK );
+	m_sdbSizerCancel = new wxButton( this, wxID_CANCEL );
+	m_sdbSizer->AddButton( m_sdbSizerCancel );
+	m_sdbSizer->Realize();
+	
+	bSizermain->Add( m_sdbSizer, 0, wxALIGN_RIGHT|wxALL, 5 );
+	
+	
+	this->SetSizer( bSizermain );
+	this->Layout();
+	
+	this->Centre( wxBOTH );
+}
+
+DIALOG_PAD_BASICSHAPES_TRANSFORM_BASE::~DIALOG_PAD_BASICSHAPES_TRANSFORM_BASE()
+{
+}
+
+DIALOG_PAD_BASIC_SHP_POLY_PROPS_BASE::DIALOG_PAD_BASIC_SHP_POLY_PROPS_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : DIALOG_SHIM( parent, id, title, pos, size, style )
+{
+	this->SetSizeHints( wxDefaultSize, wxDefaultSize );
+	
+	wxBoxSizer* bSizerMain;
+	bSizerMain = new wxBoxSizer( wxVERTICAL );
+	
+	m_staticTextShapesListWarning = new wxStaticText( this, wxID_ANY, _(" Coordinates are relative to anchor pad, orientation 0"), wxDefaultPosition, wxDefaultSize, 0 );
+	m_staticTextShapesListWarning->Wrap( -1 );
+	m_staticTextShapesListWarning->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) );
+	
+	bSizerMain->Add( m_staticTextShapesListWarning, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 );
+	
+	m_staticTextValidate = new wxStaticText( this, wxID_ANY, _("Incorrect polygon"), wxDefaultPosition, wxDefaultSize, 0 );
+	m_staticTextValidate->Wrap( -1 );
+	m_staticTextValidate->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_ITALIC, wxFONTWEIGHT_BOLD, false, wxEmptyString ) );
+	
+	bSizerMain->Add( m_staticTextValidate, 0, wxALL, 5 );
+	
+	wxBoxSizer* bSizerUpper;
+	bSizerUpper = new wxBoxSizer( wxVERTICAL );
+	
+	wxBoxSizer* bSizer23;
+	bSizer23 = new wxBoxSizer( wxHORIZONTAL );
+	
+	wxBoxSizer* bSizerCornerlist;
+	bSizerCornerlist = new wxBoxSizer( wxVERTICAL );
+	
+	m_gridCornersList = new wxGrid( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
+	
+	// Grid
+	m_gridCornersList->CreateGrid( 1, 2 );
+	m_gridCornersList->EnableEditing( true );
+	m_gridCornersList->EnableGridLines( true );
+	m_gridCornersList->EnableDragGridSize( false );
+	m_gridCornersList->SetMargins( 0, 0 );
+	
+	// Columns
+	m_gridCornersList->EnableDragColMove( false );
+	m_gridCornersList->EnableDragColSize( true );
+	m_gridCornersList->SetColLabelSize( 30 );
+	m_gridCornersList->SetColLabelValue( 0, _("Pos X") );
+	m_gridCornersList->SetColLabelValue( 1, _("Pos Y") );
+	m_gridCornersList->SetColLabelAlignment( wxALIGN_CENTRE, wxALIGN_CENTRE );
+	
+	// Rows
+	m_gridCornersList->AutoSizeRows();
+	m_gridCornersList->EnableDragRowSize( false );
+	m_gridCornersList->SetRowLabelSize( 80 );
+	m_gridCornersList->SetRowLabelAlignment( wxALIGN_CENTRE, wxALIGN_CENTRE );
+	
+	// Label Appearance
+	
+	// Cell Defaults
+	m_gridCornersList->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_TOP );
+	bSizerCornerlist->Add( m_gridCornersList, 1, wxALL, 5 );
+	
+	wxBoxSizer* bSizerRightButts;
+	bSizerRightButts = new wxBoxSizer( wxHORIZONTAL );
+	
+	m_buttonAdd = new wxButton( this, wxID_ANY, _("Add"), wxDefaultPosition, wxDefaultSize, 0 );
+	bSizerRightButts->Add( m_buttonAdd, 0, wxALL, 5 );
+	
+	m_buttonDelete = new wxButton( this, wxID_ANY, _("Delete"), wxDefaultPosition, wxDefaultSize, 0 );
+	bSizerRightButts->Add( m_buttonDelete, 0, wxALL, 5 );
+	
+	
+	bSizerCornerlist->Add( bSizerRightButts, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
+	
+	
+	bSizer23->Add( bSizerCornerlist, 0, wxEXPAND, 5 );
+	
+	m_panelPoly = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxSUNKEN_BORDER|wxTAB_TRAVERSAL );
+	m_panelPoly->SetBackgroundColour( wxColour( 0, 0, 0 ) );
+	m_panelPoly->SetMinSize( wxSize( 300,300 ) );
+	
+	bSizer23->Add( m_panelPoly, 1, wxEXPAND | wxALL, 5 );
+	
+	
+	bSizerUpper->Add( bSizer23, 1, wxEXPAND, 5 );
+	
+	wxFlexGridSizer* fgSizerThickness;
+	fgSizerThickness = new wxFlexGridSizer( 0, 5, 0, 0 );
+	fgSizerThickness->AddGrowableCol( 1 );
+	fgSizerThickness->SetFlexibleDirection( wxBOTH );
+	fgSizerThickness->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
+	
+	m_staticTextThickness = new wxStaticText( this, wxID_ANY, _("Outline thickness"), wxDefaultPosition, wxDefaultSize, 0 );
+	m_staticTextThickness->Wrap( -1 );
+	fgSizerThickness->Add( m_staticTextThickness, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
+	
+	m_textCtrlThickness = new wxTextCtrl( this, wxID_ANY, _("0"), wxDefaultPosition, wxDefaultSize, 0 );
+	fgSizerThickness->Add( m_textCtrlThickness, 0, wxALL|wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 );
+	
+	m_staticTextThicknessUnit = new wxStaticText( this, wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 );
+	m_staticTextThicknessUnit->Wrap( -1 );
+	fgSizerThickness->Add( m_staticTextThicknessUnit, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
+	
+	
+	fgSizerThickness->Add( 10, 10, 0, 0, 5 );
+	
+	m_staticTextInfo = new wxStaticText( this, wxID_ANY, _("(Thickness outline is usually set to 0)"), wxDefaultPosition, wxDefaultSize, 0 );
+	m_staticTextInfo->Wrap( -1 );
+	fgSizerThickness->Add( m_staticTextInfo, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
+	
+	
+	bSizerUpper->Add( fgSizerThickness, 0, 0, 5 );
+	
+	
+	bSizerMain->Add( bSizerUpper, 1, wxEXPAND, 5 );
+	
+	m_staticline3 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
+	bSizerMain->Add( m_staticline3, 0, wxEXPAND | wxALL, 5 );
+	
+	m_sdbSizer = new wxStdDialogButtonSizer();
+	m_sdbSizerOK = new wxButton( this, wxID_OK );
+	m_sdbSizer->AddButton( m_sdbSizerOK );
+	m_sdbSizerCancel = new wxButton( this, wxID_CANCEL );
+	m_sdbSizer->AddButton( m_sdbSizerCancel );
+	m_sdbSizer->Realize();
+	
+	bSizerMain->Add( m_sdbSizer, 0, wxEXPAND|wxALL, 5 );
+	
+	
+	this->SetSizer( bSizerMain );
+	this->Layout();
+	
+	this->Centre( wxBOTH );
+	
+	// Connect Events
+	m_gridCornersList->Connect( wxEVT_GRID_RANGE_SELECT, wxGridRangeSelectEventHandler( DIALOG_PAD_BASIC_SHP_POLY_PROPS_BASE::onGridSelect ), NULL, this );
+	m_gridCornersList->Connect( wxEVT_GRID_SELECT_CELL, wxGridEventHandler( DIALOG_PAD_BASIC_SHP_POLY_PROPS_BASE::onCellSelect ), NULL, this );
+	m_buttonAdd->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PAD_BASIC_SHP_POLY_PROPS_BASE::onButtonAdd ), NULL, this );
+	m_buttonDelete->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PAD_BASIC_SHP_POLY_PROPS_BASE::OnButtonDelete ), NULL, this );
+	m_panelPoly->Connect( wxEVT_PAINT, wxPaintEventHandler( DIALOG_PAD_BASIC_SHP_POLY_PROPS_BASE::onPaintPolyPanel ), NULL, this );
+	m_panelPoly->Connect( wxEVT_SIZE, wxSizeEventHandler( DIALOG_PAD_BASIC_SHP_POLY_PROPS_BASE::onPolyPanelResize ), NULL, this );
+}
+
+DIALOG_PAD_BASIC_SHP_POLY_PROPS_BASE::~DIALOG_PAD_BASIC_SHP_POLY_PROPS_BASE()
+{
+	// Disconnect Events
+	m_gridCornersList->Disconnect( wxEVT_GRID_RANGE_SELECT, wxGridRangeSelectEventHandler( DIALOG_PAD_BASIC_SHP_POLY_PROPS_BASE::onGridSelect ), NULL, this );
+	m_gridCornersList->Disconnect( wxEVT_GRID_SELECT_CELL, wxGridEventHandler( DIALOG_PAD_BASIC_SHP_POLY_PROPS_BASE::onCellSelect ), NULL, this );
+	m_buttonAdd->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PAD_BASIC_SHP_POLY_PROPS_BASE::onButtonAdd ), NULL, this );
+	m_buttonDelete->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PAD_BASIC_SHP_POLY_PROPS_BASE::OnButtonDelete ), NULL, this );
+	m_panelPoly->Disconnect( wxEVT_PAINT, wxPaintEventHandler( DIALOG_PAD_BASIC_SHP_POLY_PROPS_BASE::onPaintPolyPanel ), NULL, this );
+	m_panelPoly->Disconnect( wxEVT_SIZE, wxSizeEventHandler( DIALOG_PAD_BASIC_SHP_POLY_PROPS_BASE::onPolyPanelResize ), NULL, this );
+	
+}
diff --git a/pcbnew/dialogs/dialog_pad_properties_base.fbp b/pcbnew/dialogs/dialog_pad_properties_base.fbp
index 5599682..a711294 100644
--- a/pcbnew/dialogs/dialog_pad_properties_base.fbp
+++ b/pcbnew/dialogs/dialog_pad_properties_base.fbp
@@ -912,7 +912,7 @@
                                                                     <property name="caption"></property>
                                                                     <property name="caption_visible">1</property>
                                                                     <property name="center_pane">0</property>
-                                                                    <property name="choices">&quot;Circular&quot; &quot;Oval&quot; &quot;Rectangular&quot; &quot;Trapezoidal&quot; &quot;Rounded Rectangle&quot;</property>
+                                                                    <property name="choices">&quot;Circular&quot; &quot;Oval&quot; &quot;Rectangular&quot; &quot;Trapezoidal&quot; &quot;Rounded Rectangle&quot; &quot;Custom Shape with Circular Anchor&quot; &quot;Custom Shape with Rectangular Anchor&quot;</property>
                                                                     <property name="close_button">1</property>
                                                                     <property name="context_help"></property>
                                                                     <property name="context_menu">1</property>
@@ -942,7 +942,7 @@
                                                                     <property name="pin_button">1</property>
                                                                     <property name="pos"></property>
                                                                     <property name="resize">Resizable</property>
-                                                                    <property name="selection">0</property>
+                                                                    <property name="selection">6</property>
                                                                     <property name="show">1</property>
                                                                     <property name="size"></property>
                                                                     <property name="style"></property>
@@ -4193,7 +4193,7 @@
                                                                     <property name="gripper">0</property>
                                                                     <property name="hidden">0</property>
                                                                     <property name="id">wxID_ANY</property>
-                                                                    <property name="label">Corner size ( percent of width):</property>
+                                                                    <property name="label">Corner size (% of width):</property>
                                                                     <property name="max_size"></property>
                                                                     <property name="maximize_button">0</property>
                                                                     <property name="maximum_size"></property>
@@ -9073,102 +9073,11 @@
                                         </object>
                                     </object>
                                 </object>
-                            </object>
-                        </object>
-                        <object class="sizeritem" expanded="1">
-                            <property name="border">5</property>
-                            <property name="flag">wxEXPAND|wxTOP|wxBOTTOM</property>
-                            <property name="proportion">1</property>
-                            <object class="wxBoxSizer" expanded="0">
-                                <property name="minimum_size">200,-1</property>
-                                <property name="name">bSizerDisplayPad</property>
-                                <property name="orient">wxVERTICAL</property>
-                                <property name="permission">none</property>
-                                <object class="sizeritem" expanded="0">
-                                    <property name="border">5</property>
-                                    <property name="flag">wxRIGHT|wxTOP|wxEXPAND</property>
-                                    <property name="proportion">4</property>
-                                    <object class="wxPanel" expanded="0">
-                                        <property name="BottomDockable">1</property>
-                                        <property name="LeftDockable">1</property>
-                                        <property name="RightDockable">1</property>
-                                        <property name="TopDockable">1</property>
-                                        <property name="aui_layer"></property>
-                                        <property name="aui_name"></property>
-                                        <property name="aui_position"></property>
-                                        <property name="aui_row"></property>
-                                        <property name="best_size"></property>
-                                        <property name="bg">0,0,0</property>
-                                        <property name="caption"></property>
-                                        <property name="caption_visible">1</property>
-                                        <property name="center_pane">0</property>
-                                        <property name="close_button">1</property>
-                                        <property name="context_help"></property>
-                                        <property name="context_menu">1</property>
-                                        <property name="default_pane">0</property>
-                                        <property name="dock">Dock</property>
-                                        <property name="dock_fixed">0</property>
-                                        <property name="docking">Left</property>
-                                        <property name="enabled">1</property>
-                                        <property name="fg"></property>
-                                        <property name="floatable">1</property>
-                                        <property name="font"></property>
-                                        <property name="gripper">0</property>
-                                        <property name="hidden">0</property>
-                                        <property name="id">wxID_ANY</property>
-                                        <property name="max_size"></property>
-                                        <property name="maximize_button">0</property>
-                                        <property name="maximum_size"></property>
-                                        <property name="min_size"></property>
-                                        <property name="minimize_button">0</property>
-                                        <property name="minimum_size">-1,-1</property>
-                                        <property name="moveable">1</property>
-                                        <property name="name">m_panelShowPad</property>
-                                        <property name="pane_border">1</property>
-                                        <property name="pane_position"></property>
-                                        <property name="pane_size"></property>
-                                        <property name="permission">protected</property>
-                                        <property name="pin_button">1</property>
-                                        <property name="pos"></property>
-                                        <property name="resize">Resizable</property>
-                                        <property name="show">1</property>
-                                        <property name="size">200,-1</property>
-                                        <property name="subclass"></property>
-                                        <property name="toolbar_pane">0</property>
-                                        <property name="tooltip"></property>
-                                        <property name="window_extra_style"></property>
-                                        <property name="window_name"></property>
-                                        <property name="window_style">wxFULL_REPAINT_ON_RESIZE|wxSIMPLE_BORDER</property>
-                                        <event name="OnChar"></event>
-                                        <event name="OnEnterWindow"></event>
-                                        <event name="OnEraseBackground"></event>
-                                        <event name="OnKeyDown"></event>
-                                        <event name="OnKeyUp"></event>
-                                        <event name="OnKillFocus"></event>
-                                        <event name="OnLeaveWindow"></event>
-                                        <event name="OnLeftDClick"></event>
-                                        <event name="OnLeftDown"></event>
-                                        <event name="OnLeftUp"></event>
-                                        <event name="OnMiddleDClick"></event>
-                                        <event name="OnMiddleDown"></event>
-                                        <event name="OnMiddleUp"></event>
-                                        <event name="OnMotion"></event>
-                                        <event name="OnMouseEvents"></event>
-                                        <event name="OnMouseWheel"></event>
-                                        <event name="OnPaint">OnPaintShowPanel</event>
-                                        <event name="OnRightDClick"></event>
-                                        <event name="OnRightDown"></event>
-                                        <event name="OnRightUp"></event>
-                                        <event name="OnSetFocus"></event>
-                                        <event name="OnSize"></event>
-                                        <event name="OnUpdateUI"></event>
-                                    </object>
-                                </object>
-                                <object class="sizeritem" expanded="0">
-                                    <property name="border">5</property>
-                                    <property name="flag">wxEXPAND|wxRIGHT|wxTOP</property>
-                                    <property name="proportion">4</property>
-                                    <object class="CustomControl" expanded="0">
+                                <object class="notebookpage" expanded="1">
+                                    <property name="bitmap"></property>
+                                    <property name="label">Custom Shape</property>
+                                    <property name="select">0</property>
+                                    <object class="wxPanel" expanded="1">
                                         <property name="BottomDockable">1</property>
                                         <property name="LeftDockable">1</property>
                                         <property name="RightDockable">1</property>
@@ -9182,12 +9091,9 @@
                                         <property name="caption"></property>
                                         <property name="caption_visible">1</property>
                                         <property name="center_pane">0</property>
-                                        <property name="class">PCB_DRAW_PANEL_GAL</property>
                                         <property name="close_button">1</property>
-                                        <property name="construction">m_panelShowPadGal = new PCB_DRAW_PANEL_GAL( this, -1, wxPoint( 0, 0 ), wxDefaultSize, m_galOptions, EDA_DRAW_PANEL_GAL::GAL_TYPE_CAIRO );</property>
                                         <property name="context_help"></property>
                                         <property name="context_menu">1</property>
-                                        <property name="declaration">PCB_DRAW_PANEL_GAL* m_panelShowPadGal;&#x0A;KIGFX::GAL_DISPLAY_OPTIONS m_galOptions;</property>
                                         <property name="default_pane">0</property>
                                         <property name="dock">Dock</property>
                                         <property name="dock_fixed">0</property>
@@ -9199,7 +9105,6 @@
                                         <property name="gripper">0</property>
                                         <property name="hidden">0</property>
                                         <property name="id">wxID_ANY</property>
-                                        <property name="include">#include &lt;wxBasePcbFrame.h&gt;&#x0A;#include &lt;pcb_draw_panel_gal.h&gt;</property>
                                         <property name="max_size"></property>
                                         <property name="maximize_button">0</property>
                                         <property name="maximum_size"></property>
@@ -9207,7 +9112,7 @@
                                         <property name="minimize_button">0</property>
                                         <property name="minimum_size"></property>
                                         <property name="moveable">1</property>
-                                        <property name="name">m_panelShowPadGal</property>
+                                        <property name="name">m_panelCustomShape</property>
                                         <property name="pane_border">1</property>
                                         <property name="pane_position"></property>
                                         <property name="pane_size"></property>
@@ -9215,15 +9120,14 @@
                                         <property name="pin_button">1</property>
                                         <property name="pos"></property>
                                         <property name="resize">Resizable</property>
-                                        <property name="settings"></property>
                                         <property name="show">1</property>
                                         <property name="size"></property>
-                                        <property name="subclass"></property>
+                                        <property name="subclass">; </property>
                                         <property name="toolbar_pane">0</property>
                                         <property name="tooltip"></property>
                                         <property name="window_extra_style"></property>
                                         <property name="window_name"></property>
-                                        <property name="window_style"></property>
+                                        <property name="window_style">wxTAB_TRAVERSAL</property>
                                         <event name="OnChar"></event>
                                         <event name="OnEnterWindow"></event>
                                         <event name="OnEraseBackground"></event>
@@ -9247,98 +9151,4966 @@
                                         <event name="OnSetFocus"></event>
                                         <event name="OnSize"></event>
                                         <event name="OnUpdateUI"></event>
-                                    </object>
-                                </object>
-                            </object>
-                        </object>
-                    </object>
-                </object>
-                <object class="sizeritem" expanded="0">
-                    <property name="border">5</property>
-                    <property name="flag">wxALL</property>
-                    <property name="proportion">0</property>
-                    <object class="wxStaticText" expanded="0">
-                        <property name="BottomDockable">1</property>
-                        <property name="LeftDockable">1</property>
-                        <property name="RightDockable">1</property>
-                        <property name="TopDockable">1</property>
-                        <property name="aui_layer"></property>
-                        <property name="aui_name"></property>
-                        <property name="aui_position"></property>
-                        <property name="aui_row"></property>
-                        <property name="best_size"></property>
-                        <property name="bg"></property>
-                        <property name="caption"></property>
-                        <property name="caption_visible">1</property>
-                        <property name="center_pane">0</property>
-                        <property name="close_button">1</property>
-                        <property name="context_help"></property>
-                        <property name="context_menu">1</property>
-                        <property name="default_pane">0</property>
-                        <property name="dock">Dock</property>
-                        <property name="dock_fixed">0</property>
-                        <property name="docking">Left</property>
-                        <property name="enabled">1</property>
-                        <property name="fg"></property>
-                        <property name="floatable">1</property>
-                        <property name="font">,90,92,-1,70,0</property>
-                        <property name="gripper">0</property>
-                        <property name="hidden">0</property>
-                        <property name="id">wxID_ANY</property>
-                        <property name="label">Warning:&#x0A;This pad is flipped on board.&#x0A;Back and front layers will be swapped.</property>
-                        <property name="max_size"></property>
-                        <property name="maximize_button">0</property>
-                        <property name="maximum_size"></property>
-                        <property name="min_size"></property>
-                        <property name="minimize_button">0</property>
-                        <property name="minimum_size"></property>
-                        <property name="moveable">1</property>
-                        <property name="name">m_staticTextWarningPadFlipped</property>
-                        <property name="pane_border">1</property>
-                        <property name="pane_position"></property>
-                        <property name="pane_size"></property>
-                        <property name="permission">protected</property>
-                        <property name="pin_button">1</property>
-                        <property name="pos"></property>
-                        <property name="resize">Resizable</property>
-                        <property name="show">1</property>
-                        <property name="size"></property>
-                        <property name="style"></property>
-                        <property name="subclass"></property>
-                        <property name="toolbar_pane">0</property>
-                        <property name="tooltip"></property>
-                        <property name="window_extra_style"></property>
-                        <property name="window_name"></property>
-                        <property name="window_style"></property>
-                        <property name="wrap">-1</property>
-                        <event name="OnChar"></event>
-                        <event name="OnEnterWindow"></event>
-                        <event name="OnEraseBackground"></event>
-                        <event name="OnKeyDown"></event>
-                        <event name="OnKeyUp"></event>
-                        <event name="OnKillFocus"></event>
-                        <event name="OnLeaveWindow"></event>
-                        <event name="OnLeftDClick"></event>
-                        <event name="OnLeftDown"></event>
-                        <event name="OnLeftUp"></event>
-                        <event name="OnMiddleDClick"></event>
-                        <event name="OnMiddleDown"></event>
-                        <event name="OnMiddleUp"></event>
-                        <event name="OnMotion"></event>
-                        <event name="OnMouseEvents"></event>
-                        <event name="OnMouseWheel"></event>
-                        <event name="OnPaint"></event>
-                        <event name="OnRightDClick"></event>
-                        <event name="OnRightDown"></event>
-                        <event name="OnRightUp"></event>
-                        <event name="OnSetFocus"></event>
-                        <event name="OnSize"></event>
-                        <event name="OnUpdateUI"></event>
-                    </object>
-                </object>
-                <object class="sizeritem" expanded="0">
-                    <property name="border">5</property>
-                    <property name="flag">wxALIGN_RIGHT|wxBOTTOM|wxRIGHT|wxLEFT</property>
+                                        <object class="wxBoxSizer" expanded="1">
+                                            <property name="minimum_size"></property>
+                                            <property name="name">m_bSizerPanelShapes</property>
+                                            <property name="orient">wxVERTICAL</property>
+                                            <property name="permission">protected</property>
+                                            <object class="sizeritem" expanded="0">
+                                                <property name="border">5</property>
+                                                <property name="flag">wxALL|wxALIGN_CENTER_HORIZONTAL</property>
+                                                <property name="proportion">0</property>
+                                                <object class="wxStaticText" expanded="0">
+                                                    <property name="BottomDockable">1</property>
+                                                    <property name="LeftDockable">1</property>
+                                                    <property name="RightDockable">1</property>
+                                                    <property name="TopDockable">1</property>
+                                                    <property name="aui_layer"></property>
+                                                    <property name="aui_name"></property>
+                                                    <property name="aui_position"></property>
+                                                    <property name="aui_row"></property>
+                                                    <property name="best_size"></property>
+                                                    <property name="bg"></property>
+                                                    <property name="caption"></property>
+                                                    <property name="caption_visible">1</property>
+                                                    <property name="center_pane">0</property>
+                                                    <property name="close_button">1</property>
+                                                    <property name="context_help"></property>
+                                                    <property name="context_menu">1</property>
+                                                    <property name="default_pane">0</property>
+                                                    <property name="dock">Dock</property>
+                                                    <property name="dock_fixed">0</property>
+                                                    <property name="docking">Left</property>
+                                                    <property name="enabled">1</property>
+                                                    <property name="fg"></property>
+                                                    <property name="floatable">1</property>
+                                                    <property name="font"></property>
+                                                    <property name="gripper">0</property>
+                                                    <property name="hidden">0</property>
+                                                    <property name="id">wxID_ANY</property>
+                                                    <property name="label">Basic shapes list</property>
+                                                    <property name="max_size"></property>
+                                                    <property name="maximize_button">0</property>
+                                                    <property name="maximum_size"></property>
+                                                    <property name="min_size"></property>
+                                                    <property name="minimize_button">0</property>
+                                                    <property name="minimum_size"></property>
+                                                    <property name="moveable">1</property>
+                                                    <property name="name">m_staticTextShapesList</property>
+                                                    <property name="pane_border">1</property>
+                                                    <property name="pane_position"></property>
+                                                    <property name="pane_size"></property>
+                                                    <property name="permission">protected</property>
+                                                    <property name="pin_button">1</property>
+                                                    <property name="pos"></property>
+                                                    <property name="resize">Resizable</property>
+                                                    <property name="show">1</property>
+                                                    <property name="size"></property>
+                                                    <property name="style"></property>
+                                                    <property name="subclass"></property>
+                                                    <property name="toolbar_pane">0</property>
+                                                    <property name="tooltip"></property>
+                                                    <property name="window_extra_style"></property>
+                                                    <property name="window_name"></property>
+                                                    <property name="window_style"></property>
+                                                    <property name="wrap">-1</property>
+                                                    <event name="OnChar"></event>
+                                                    <event name="OnEnterWindow"></event>
+                                                    <event name="OnEraseBackground"></event>
+                                                    <event name="OnKeyDown"></event>
+                                                    <event name="OnKeyUp"></event>
+                                                    <event name="OnKillFocus"></event>
+                                                    <event name="OnLeaveWindow"></event>
+                                                    <event name="OnLeftDClick"></event>
+                                                    <event name="OnLeftDown"></event>
+                                                    <event name="OnLeftUp"></event>
+                                                    <event name="OnMiddleDClick"></event>
+                                                    <event name="OnMiddleDown"></event>
+                                                    <event name="OnMiddleUp"></event>
+                                                    <event name="OnMotion"></event>
+                                                    <event name="OnMouseEvents"></event>
+                                                    <event name="OnMouseWheel"></event>
+                                                    <event name="OnPaint"></event>
+                                                    <event name="OnRightDClick"></event>
+                                                    <event name="OnRightDown"></event>
+                                                    <event name="OnRightUp"></event>
+                                                    <event name="OnSetFocus"></event>
+                                                    <event name="OnSize"></event>
+                                                    <event name="OnUpdateUI"></event>
+                                                </object>
+                                            </object>
+                                            <object class="sizeritem" expanded="0">
+                                                <property name="border">5</property>
+                                                <property name="flag">wxALL|wxALIGN_CENTER_HORIZONTAL</property>
+                                                <property name="proportion">0</property>
+                                                <object class="wxStaticText" expanded="0">
+                                                    <property name="BottomDockable">1</property>
+                                                    <property name="LeftDockable">1</property>
+                                                    <property name="RightDockable">1</property>
+                                                    <property name="TopDockable">1</property>
+                                                    <property name="aui_layer"></property>
+                                                    <property name="aui_name"></property>
+                                                    <property name="aui_position"></property>
+                                                    <property name="aui_row"></property>
+                                                    <property name="best_size"></property>
+                                                    <property name="bg"></property>
+                                                    <property name="caption"></property>
+                                                    <property name="caption_visible">1</property>
+                                                    <property name="center_pane">0</property>
+                                                    <property name="close_button">1</property>
+                                                    <property name="context_help"></property>
+                                                    <property name="context_menu">1</property>
+                                                    <property name="default_pane">0</property>
+                                                    <property name="dock">Dock</property>
+                                                    <property name="dock_fixed">0</property>
+                                                    <property name="docking">Left</property>
+                                                    <property name="enabled">1</property>
+                                                    <property name="fg"></property>
+                                                    <property name="floatable">1</property>
+                                                    <property name="font">,90,92,-1,70,0</property>
+                                                    <property name="gripper">0</property>
+                                                    <property name="hidden">0</property>
+                                                    <property name="id">wxID_ANY</property>
+                                                    <property name="label"> Coordinates are relative to anchor pad, orientation 0</property>
+                                                    <property name="max_size"></property>
+                                                    <property name="maximize_button">0</property>
+                                                    <property name="maximum_size"></property>
+                                                    <property name="min_size"></property>
+                                                    <property name="minimize_button">0</property>
+                                                    <property name="minimum_size"></property>
+                                                    <property name="moveable">1</property>
+                                                    <property name="name">m_staticTextShapesListWraning</property>
+                                                    <property name="pane_border">1</property>
+                                                    <property name="pane_position"></property>
+                                                    <property name="pane_size"></property>
+                                                    <property name="permission">protected</property>
+                                                    <property name="pin_button">1</property>
+                                                    <property name="pos"></property>
+                                                    <property name="resize">Resizable</property>
+                                                    <property name="show">1</property>
+                                                    <property name="size"></property>
+                                                    <property name="style"></property>
+                                                    <property name="subclass"></property>
+                                                    <property name="toolbar_pane">0</property>
+                                                    <property name="tooltip"></property>
+                                                    <property name="window_extra_style"></property>
+                                                    <property name="window_name"></property>
+                                                    <property name="window_style"></property>
+                                                    <property name="wrap">-1</property>
+                                                    <event name="OnChar"></event>
+                                                    <event name="OnEnterWindow"></event>
+                                                    <event name="OnEraseBackground"></event>
+                                                    <event name="OnKeyDown"></event>
+                                                    <event name="OnKeyUp"></event>
+                                                    <event name="OnKillFocus"></event>
+                                                    <event name="OnLeaveWindow"></event>
+                                                    <event name="OnLeftDClick"></event>
+                                                    <event name="OnLeftDown"></event>
+                                                    <event name="OnLeftUp"></event>
+                                                    <event name="OnMiddleDClick"></event>
+                                                    <event name="OnMiddleDown"></event>
+                                                    <event name="OnMiddleUp"></event>
+                                                    <event name="OnMotion"></event>
+                                                    <event name="OnMouseEvents"></event>
+                                                    <event name="OnMouseWheel"></event>
+                                                    <event name="OnPaint"></event>
+                                                    <event name="OnRightDClick"></event>
+                                                    <event name="OnRightDown"></event>
+                                                    <event name="OnRightUp"></event>
+                                                    <event name="OnSetFocus"></event>
+                                                    <event name="OnSize"></event>
+                                                    <event name="OnUpdateUI"></event>
+                                                </object>
+                                            </object>
+                                            <object class="sizeritem" expanded="0">
+                                                <property name="border">5</property>
+                                                <property name="flag">wxALL|wxEXPAND</property>
+                                                <property name="proportion">1</property>
+                                                <object class="wxListCtrl" expanded="0">
+                                                    <property name="BottomDockable">1</property>
+                                                    <property name="LeftDockable">1</property>
+                                                    <property name="RightDockable">1</property>
+                                                    <property name="TopDockable">1</property>
+                                                    <property name="aui_layer"></property>
+                                                    <property name="aui_name"></property>
+                                                    <property name="aui_position"></property>
+                                                    <property name="aui_row"></property>
+                                                    <property name="best_size"></property>
+                                                    <property name="bg"></property>
+                                                    <property name="caption"></property>
+                                                    <property name="caption_visible">1</property>
+                                                    <property name="center_pane">0</property>
+                                                    <property name="close_button">1</property>
+                                                    <property name="context_help"></property>
+                                                    <property name="context_menu">1</property>
+                                                    <property name="default_pane">0</property>
+                                                    <property name="dock">Dock</property>
+                                                    <property name="dock_fixed">0</property>
+                                                    <property name="docking">Left</property>
+                                                    <property name="enabled">1</property>
+                                                    <property name="fg"></property>
+                                                    <property name="floatable">1</property>
+                                                    <property name="font"></property>
+                                                    <property name="gripper">0</property>
+                                                    <property name="hidden">0</property>
+                                                    <property name="id">wxID_ANY</property>
+                                                    <property name="max_size"></property>
+                                                    <property name="maximize_button">0</property>
+                                                    <property name="maximum_size"></property>
+                                                    <property name="min_size"></property>
+                                                    <property name="minimize_button">0</property>
+                                                    <property name="minimum_size"></property>
+                                                    <property name="moveable">1</property>
+                                                    <property name="name">m_listCtrlShapes</property>
+                                                    <property name="pane_border">1</property>
+                                                    <property name="pane_position"></property>
+                                                    <property name="pane_size"></property>
+                                                    <property name="permission">protected</property>
+                                                    <property name="pin_button">1</property>
+                                                    <property name="pos"></property>
+                                                    <property name="resize">Resizable</property>
+                                                    <property name="show">1</property>
+                                                    <property name="size"></property>
+                                                    <property name="style">wxLC_HRULES|wxLC_REPORT</property>
+                                                    <property name="subclass">wxListView; </property>
+                                                    <property name="toolbar_pane">0</property>
+                                                    <property name="tooltip"></property>
+                                                    <property name="validator_data_type"></property>
+                                                    <property name="validator_style">wxFILTER_NONE</property>
+                                                    <property name="validator_type">wxDefaultValidator</property>
+                                                    <property name="validator_variable"></property>
+                                                    <property name="window_extra_style"></property>
+                                                    <property name="window_name"></property>
+                                                    <property name="window_style"></property>
+                                                    <event name="OnChar"></event>
+                                                    <event name="OnEnterWindow"></event>
+                                                    <event name="OnEraseBackground"></event>
+                                                    <event name="OnKeyDown"></event>
+                                                    <event name="OnKeyUp"></event>
+                                                    <event name="OnKillFocus"></event>
+                                                    <event name="OnLeaveWindow"></event>
+                                                    <event name="OnLeftDClick">onCustomShapeDClick</event>
+                                                    <event name="OnLeftDown"></event>
+                                                    <event name="OnLeftUp"></event>
+                                                    <event name="OnListBeginDrag"></event>
+                                                    <event name="OnListBeginLabelEdit"></event>
+                                                    <event name="OnListBeginRDrag"></event>
+                                                    <event name="OnListCacheHint"></event>
+                                                    <event name="OnListColBeginDrag"></event>
+                                                    <event name="OnListColClick"></event>
+                                                    <event name="OnListColDragging"></event>
+                                                    <event name="OnListColEndDrag"></event>
+                                                    <event name="OnListColRightClick"></event>
+                                                    <event name="OnListDeleteAllItems"></event>
+                                                    <event name="OnListDeleteItem"></event>
+                                                    <event name="OnListEndLabelEdit"></event>
+                                                    <event name="OnListInsertItem"></event>
+                                                    <event name="OnListItemActivated"></event>
+                                                    <event name="OnListItemDeselected"></event>
+                                                    <event name="OnListItemFocused"></event>
+                                                    <event name="OnListItemMiddleClick"></event>
+                                                    <event name="OnListItemRightClick"></event>
+                                                    <event name="OnListItemSelected"></event>
+                                                    <event name="OnListKeyDown"></event>
+                                                    <event name="OnMiddleDClick"></event>
+                                                    <event name="OnMiddleDown"></event>
+                                                    <event name="OnMiddleUp"></event>
+                                                    <event name="OnMotion"></event>
+                                                    <event name="OnMouseEvents"></event>
+                                                    <event name="OnMouseWheel"></event>
+                                                    <event name="OnPaint"></event>
+                                                    <event name="OnRightDClick"></event>
+                                                    <event name="OnRightDown"></event>
+                                                    <event name="OnRightUp"></event>
+                                                    <event name="OnSetFocus"></event>
+                                                    <event name="OnSize"></event>
+                                                    <event name="OnUpdateUI"></event>
+                                                </object>
+                                            </object>
+                                            <object class="sizeritem" expanded="0">
+                                                <property name="border">5</property>
+                                                <property name="flag">wxALIGN_CENTER_HORIZONTAL</property>
+                                                <property name="proportion">0</property>
+                                                <object class="wxBoxSizer" expanded="0">
+                                                    <property name="minimum_size"></property>
+                                                    <property name="name">bSizerButtons</property>
+                                                    <property name="orient">wxVERTICAL</property>
+                                                    <property name="permission">none</property>
+                                                    <object class="sizeritem" expanded="0">
+                                                        <property name="border">5</property>
+                                                        <property name="flag">wxALIGN_CENTER_HORIZONTAL</property>
+                                                        <property name="proportion">0</property>
+                                                        <object class="wxBoxSizer" expanded="0">
+                                                            <property name="minimum_size"></property>
+                                                            <property name="name">bSizerButtonsUpper</property>
+                                                            <property name="orient">wxHORIZONTAL</property>
+                                                            <property name="permission">none</property>
+                                                            <object class="sizeritem" expanded="0">
+                                                                <property name="border">5</property>
+                                                                <property name="flag">wxALL</property>
+                                                                <property name="proportion">0</property>
+                                                                <object class="wxButton" expanded="0">
+                                                                    <property name="BottomDockable">1</property>
+                                                                    <property name="LeftDockable">1</property>
+                                                                    <property name="RightDockable">1</property>
+                                                                    <property name="TopDockable">1</property>
+                                                                    <property name="aui_layer"></property>
+                                                                    <property name="aui_name"></property>
+                                                                    <property name="aui_position"></property>
+                                                                    <property name="aui_row"></property>
+                                                                    <property name="best_size"></property>
+                                                                    <property name="bg"></property>
+                                                                    <property name="caption"></property>
+                                                                    <property name="caption_visible">1</property>
+                                                                    <property name="center_pane">0</property>
+                                                                    <property name="close_button">1</property>
+                                                                    <property name="context_help"></property>
+                                                                    <property name="context_menu">1</property>
+                                                                    <property name="default">0</property>
+                                                                    <property name="default_pane">0</property>
+                                                                    <property name="dock">Dock</property>
+                                                                    <property name="dock_fixed">0</property>
+                                                                    <property name="docking">Left</property>
+                                                                    <property name="enabled">1</property>
+                                                                    <property name="fg"></property>
+                                                                    <property name="floatable">1</property>
+                                                                    <property name="font"></property>
+                                                                    <property name="gripper">0</property>
+                                                                    <property name="hidden">0</property>
+                                                                    <property name="id">wxID_ANY</property>
+                                                                    <property name="label">Delete Shape</property>
+                                                                    <property name="max_size"></property>
+                                                                    <property name="maximize_button">0</property>
+                                                                    <property name="maximum_size"></property>
+                                                                    <property name="min_size"></property>
+                                                                    <property name="minimize_button">0</property>
+                                                                    <property name="minimum_size"></property>
+                                                                    <property name="moveable">1</property>
+                                                                    <property name="name">m_buttonDel</property>
+                                                                    <property name="pane_border">1</property>
+                                                                    <property name="pane_position"></property>
+                                                                    <property name="pane_size"></property>
+                                                                    <property name="permission">protected</property>
+                                                                    <property name="pin_button">1</property>
+                                                                    <property name="pos"></property>
+                                                                    <property name="resize">Resizable</property>
+                                                                    <property name="show">1</property>
+                                                                    <property name="size"></property>
+                                                                    <property name="style"></property>
+                                                                    <property name="subclass"></property>
+                                                                    <property name="toolbar_pane">0</property>
+                                                                    <property name="tooltip"></property>
+                                                                    <property name="validator_data_type"></property>
+                                                                    <property name="validator_style">wxFILTER_NONE</property>
+                                                                    <property name="validator_type">wxDefaultValidator</property>
+                                                                    <property name="validator_variable"></property>
+                                                                    <property name="window_extra_style"></property>
+                                                                    <property name="window_name"></property>
+                                                                    <property name="window_style"></property>
+                                                                    <event name="OnButtonClick">onDeleteShape</event>
+                                                                    <event name="OnChar"></event>
+                                                                    <event name="OnEnterWindow"></event>
+                                                                    <event name="OnEraseBackground"></event>
+                                                                    <event name="OnKeyDown"></event>
+                                                                    <event name="OnKeyUp"></event>
+                                                                    <event name="OnKillFocus"></event>
+                                                                    <event name="OnLeaveWindow"></event>
+                                                                    <event name="OnLeftDClick"></event>
+                                                                    <event name="OnLeftDown"></event>
+                                                                    <event name="OnLeftUp"></event>
+                                                                    <event name="OnMiddleDClick"></event>
+                                                                    <event name="OnMiddleDown"></event>
+                                                                    <event name="OnMiddleUp"></event>
+                                                                    <event name="OnMotion"></event>
+                                                                    <event name="OnMouseEvents"></event>
+                                                                    <event name="OnMouseWheel"></event>
+                                                                    <event name="OnPaint"></event>
+                                                                    <event name="OnRightDClick"></event>
+                                                                    <event name="OnRightDown"></event>
+                                                                    <event name="OnRightUp"></event>
+                                                                    <event name="OnSetFocus"></event>
+                                                                    <event name="OnSize"></event>
+                                                                    <event name="OnUpdateUI"></event>
+                                                                </object>
+                                                            </object>
+                                                            <object class="sizeritem" expanded="0">
+                                                                <property name="border">5</property>
+                                                                <property name="flag">wxALL</property>
+                                                                <property name="proportion">0</property>
+                                                                <object class="wxButton" expanded="0">
+                                                                    <property name="BottomDockable">1</property>
+                                                                    <property name="LeftDockable">1</property>
+                                                                    <property name="RightDockable">1</property>
+                                                                    <property name="TopDockable">1</property>
+                                                                    <property name="aui_layer"></property>
+                                                                    <property name="aui_name"></property>
+                                                                    <property name="aui_position"></property>
+                                                                    <property name="aui_row"></property>
+                                                                    <property name="best_size"></property>
+                                                                    <property name="bg"></property>
+                                                                    <property name="caption"></property>
+                                                                    <property name="caption_visible">1</property>
+                                                                    <property name="center_pane">0</property>
+                                                                    <property name="close_button">1</property>
+                                                                    <property name="context_help"></property>
+                                                                    <property name="context_menu">1</property>
+                                                                    <property name="default">0</property>
+                                                                    <property name="default_pane">0</property>
+                                                                    <property name="dock">Dock</property>
+                                                                    <property name="dock_fixed">0</property>
+                                                                    <property name="docking">Left</property>
+                                                                    <property name="enabled">1</property>
+                                                                    <property name="fg"></property>
+                                                                    <property name="floatable">1</property>
+                                                                    <property name="font"></property>
+                                                                    <property name="gripper">0</property>
+                                                                    <property name="hidden">0</property>
+                                                                    <property name="id">wxID_ANY</property>
+                                                                    <property name="label">Edit Shape</property>
+                                                                    <property name="max_size"></property>
+                                                                    <property name="maximize_button">0</property>
+                                                                    <property name="maximum_size"></property>
+                                                                    <property name="min_size"></property>
+                                                                    <property name="minimize_button">0</property>
+                                                                    <property name="minimum_size"></property>
+                                                                    <property name="moveable">1</property>
+                                                                    <property name="name">m_buttonEditShape</property>
+                                                                    <property name="pane_border">1</property>
+                                                                    <property name="pane_position"></property>
+                                                                    <property name="pane_size"></property>
+                                                                    <property name="permission">protected</property>
+                                                                    <property name="pin_button">1</property>
+                                                                    <property name="pos"></property>
+                                                                    <property name="resize">Resizable</property>
+                                                                    <property name="show">1</property>
+                                                                    <property name="size"></property>
+                                                                    <property name="style"></property>
+                                                                    <property name="subclass"></property>
+                                                                    <property name="toolbar_pane">0</property>
+                                                                    <property name="tooltip"></property>
+                                                                    <property name="validator_data_type"></property>
+                                                                    <property name="validator_style">wxFILTER_NONE</property>
+                                                                    <property name="validator_type">wxDefaultValidator</property>
+                                                                    <property name="validator_variable"></property>
+                                                                    <property name="window_extra_style"></property>
+                                                                    <property name="window_name"></property>
+                                                                    <property name="window_style"></property>
+                                                                    <event name="OnButtonClick">onEditShape</event>
+                                                                    <event name="OnChar"></event>
+                                                                    <event name="OnEnterWindow"></event>
+                                                                    <event name="OnEraseBackground"></event>
+                                                                    <event name="OnKeyDown"></event>
+                                                                    <event name="OnKeyUp"></event>
+                                                                    <event name="OnKillFocus"></event>
+                                                                    <event name="OnLeaveWindow"></event>
+                                                                    <event name="OnLeftDClick"></event>
+                                                                    <event name="OnLeftDown"></event>
+                                                                    <event name="OnLeftUp"></event>
+                                                                    <event name="OnMiddleDClick"></event>
+                                                                    <event name="OnMiddleDown"></event>
+                                                                    <event name="OnMiddleUp"></event>
+                                                                    <event name="OnMotion"></event>
+                                                                    <event name="OnMouseEvents"></event>
+                                                                    <event name="OnMouseWheel"></event>
+                                                                    <event name="OnPaint"></event>
+                                                                    <event name="OnRightDClick"></event>
+                                                                    <event name="OnRightDown"></event>
+                                                                    <event name="OnRightUp"></event>
+                                                                    <event name="OnSetFocus"></event>
+                                                                    <event name="OnSize"></event>
+                                                                    <event name="OnUpdateUI"></event>
+                                                                </object>
+                                                            </object>
+                                                            <object class="sizeritem" expanded="0">
+                                                                <property name="border">5</property>
+                                                                <property name="flag">wxALL</property>
+                                                                <property name="proportion">0</property>
+                                                                <object class="wxButton" expanded="0">
+                                                                    <property name="BottomDockable">1</property>
+                                                                    <property name="LeftDockable">1</property>
+                                                                    <property name="RightDockable">1</property>
+                                                                    <property name="TopDockable">1</property>
+                                                                    <property name="aui_layer"></property>
+                                                                    <property name="aui_name"></property>
+                                                                    <property name="aui_position"></property>
+                                                                    <property name="aui_row"></property>
+                                                                    <property name="best_size"></property>
+                                                                    <property name="bg"></property>
+                                                                    <property name="caption"></property>
+                                                                    <property name="caption_visible">1</property>
+                                                                    <property name="center_pane">0</property>
+                                                                    <property name="close_button">1</property>
+                                                                    <property name="context_help"></property>
+                                                                    <property name="context_menu">1</property>
+                                                                    <property name="default">0</property>
+                                                                    <property name="default_pane">0</property>
+                                                                    <property name="dock">Dock</property>
+                                                                    <property name="dock_fixed">0</property>
+                                                                    <property name="docking">Left</property>
+                                                                    <property name="enabled">1</property>
+                                                                    <property name="fg"></property>
+                                                                    <property name="floatable">1</property>
+                                                                    <property name="font"></property>
+                                                                    <property name="gripper">0</property>
+                                                                    <property name="hidden">0</property>
+                                                                    <property name="id">wxID_ANY</property>
+                                                                    <property name="label">Add Shape</property>
+                                                                    <property name="max_size"></property>
+                                                                    <property name="maximize_button">0</property>
+                                                                    <property name="maximum_size"></property>
+                                                                    <property name="min_size"></property>
+                                                                    <property name="minimize_button">0</property>
+                                                                    <property name="minimum_size"></property>
+                                                                    <property name="moveable">1</property>
+                                                                    <property name="name">m_buttonAddShape</property>
+                                                                    <property name="pane_border">1</property>
+                                                                    <property name="pane_position"></property>
+                                                                    <property name="pane_size"></property>
+                                                                    <property name="permission">protected</property>
+                                                                    <property name="pin_button">1</property>
+                                                                    <property name="pos"></property>
+                                                                    <property name="resize">Resizable</property>
+                                                                    <property name="show">1</property>
+                                                                    <property name="size"></property>
+                                                                    <property name="style"></property>
+                                                                    <property name="subclass"></property>
+                                                                    <property name="toolbar_pane">0</property>
+                                                                    <property name="tooltip"></property>
+                                                                    <property name="validator_data_type"></property>
+                                                                    <property name="validator_style">wxFILTER_NONE</property>
+                                                                    <property name="validator_type">wxDefaultValidator</property>
+                                                                    <property name="validator_variable"></property>
+                                                                    <property name="window_extra_style"></property>
+                                                                    <property name="window_name"></property>
+                                                                    <property name="window_style"></property>
+                                                                    <event name="OnButtonClick">onAddShape</event>
+                                                                    <event name="OnChar"></event>
+                                                                    <event name="OnEnterWindow"></event>
+                                                                    <event name="OnEraseBackground"></event>
+                                                                    <event name="OnKeyDown"></event>
+                                                                    <event name="OnKeyUp"></event>
+                                                                    <event name="OnKillFocus"></event>
+                                                                    <event name="OnLeaveWindow"></event>
+                                                                    <event name="OnLeftDClick"></event>
+                                                                    <event name="OnLeftDown"></event>
+                                                                    <event name="OnLeftUp"></event>
+                                                                    <event name="OnMiddleDClick"></event>
+                                                                    <event name="OnMiddleDown"></event>
+                                                                    <event name="OnMiddleUp"></event>
+                                                                    <event name="OnMotion"></event>
+                                                                    <event name="OnMouseEvents"></event>
+                                                                    <event name="OnMouseWheel"></event>
+                                                                    <event name="OnPaint"></event>
+                                                                    <event name="OnRightDClick"></event>
+                                                                    <event name="OnRightDown"></event>
+                                                                    <event name="OnRightUp"></event>
+                                                                    <event name="OnSetFocus"></event>
+                                                                    <event name="OnSize"></event>
+                                                                    <event name="OnUpdateUI"></event>
+                                                                </object>
+                                                            </object>
+                                                            <object class="sizeritem" expanded="0">
+                                                                <property name="border">5</property>
+                                                                <property name="flag">wxALL</property>
+                                                                <property name="proportion">0</property>
+                                                                <object class="wxButton" expanded="0">
+                                                                    <property name="BottomDockable">1</property>
+                                                                    <property name="LeftDockable">1</property>
+                                                                    <property name="RightDockable">1</property>
+                                                                    <property name="TopDockable">1</property>
+                                                                    <property name="aui_layer"></property>
+                                                                    <property name="aui_name"></property>
+                                                                    <property name="aui_position"></property>
+                                                                    <property name="aui_row"></property>
+                                                                    <property name="best_size"></property>
+                                                                    <property name="bg"></property>
+                                                                    <property name="caption"></property>
+                                                                    <property name="caption_visible">1</property>
+                                                                    <property name="center_pane">0</property>
+                                                                    <property name="close_button">1</property>
+                                                                    <property name="context_help"></property>
+                                                                    <property name="context_menu">1</property>
+                                                                    <property name="default">0</property>
+                                                                    <property name="default_pane">0</property>
+                                                                    <property name="dock">Dock</property>
+                                                                    <property name="dock_fixed">0</property>
+                                                                    <property name="docking">Left</property>
+                                                                    <property name="enabled">1</property>
+                                                                    <property name="fg"></property>
+                                                                    <property name="floatable">1</property>
+                                                                    <property name="font"></property>
+                                                                    <property name="gripper">0</property>
+                                                                    <property name="hidden">0</property>
+                                                                    <property name="id">wxID_ANY</property>
+                                                                    <property name="label">Duplicate Shape</property>
+                                                                    <property name="max_size"></property>
+                                                                    <property name="maximize_button">0</property>
+                                                                    <property name="maximum_size"></property>
+                                                                    <property name="min_size"></property>
+                                                                    <property name="minimize_button">0</property>
+                                                                    <property name="minimum_size"></property>
+                                                                    <property name="moveable">1</property>
+                                                                    <property name="name">m_buttonDup</property>
+                                                                    <property name="pane_border">1</property>
+                                                                    <property name="pane_position"></property>
+                                                                    <property name="pane_size"></property>
+                                                                    <property name="permission">protected</property>
+                                                                    <property name="pin_button">1</property>
+                                                                    <property name="pos"></property>
+                                                                    <property name="resize">Resizable</property>
+                                                                    <property name="show">1</property>
+                                                                    <property name="size"></property>
+                                                                    <property name="style"></property>
+                                                                    <property name="subclass"></property>
+                                                                    <property name="toolbar_pane">0</property>
+                                                                    <property name="tooltip"></property>
+                                                                    <property name="validator_data_type"></property>
+                                                                    <property name="validator_style">wxFILTER_NONE</property>
+                                                                    <property name="validator_type">wxDefaultValidator</property>
+                                                                    <property name="validator_variable"></property>
+                                                                    <property name="window_extra_style"></property>
+                                                                    <property name="window_name"></property>
+                                                                    <property name="window_style"></property>
+                                                                    <event name="OnButtonClick">onDuplicateShape</event>
+                                                                    <event name="OnChar"></event>
+                                                                    <event name="OnEnterWindow"></event>
+                                                                    <event name="OnEraseBackground"></event>
+                                                                    <event name="OnKeyDown"></event>
+                                                                    <event name="OnKeyUp"></event>
+                                                                    <event name="OnKillFocus"></event>
+                                                                    <event name="OnLeaveWindow"></event>
+                                                                    <event name="OnLeftDClick"></event>
+                                                                    <event name="OnLeftDown"></event>
+                                                                    <event name="OnLeftUp"></event>
+                                                                    <event name="OnMiddleDClick"></event>
+                                                                    <event name="OnMiddleDown"></event>
+                                                                    <event name="OnMiddleUp"></event>
+                                                                    <event name="OnMotion"></event>
+                                                                    <event name="OnMouseEvents"></event>
+                                                                    <event name="OnMouseWheel"></event>
+                                                                    <event name="OnPaint"></event>
+                                                                    <event name="OnRightDClick"></event>
+                                                                    <event name="OnRightDown"></event>
+                                                                    <event name="OnRightUp"></event>
+                                                                    <event name="OnSetFocus"></event>
+                                                                    <event name="OnSize"></event>
+                                                                    <event name="OnUpdateUI"></event>
+                                                                </object>
+                                                            </object>
+                                                        </object>
+                                                    </object>
+                                                    <object class="sizeritem" expanded="0">
+                                                        <property name="border">5</property>
+                                                        <property name="flag">wxALIGN_CENTER_HORIZONTAL</property>
+                                                        <property name="proportion">0</property>
+                                                        <object class="wxBoxSizer" expanded="0">
+                                                            <property name="minimum_size"></property>
+                                                            <property name="name">bSizerButtonsLower</property>
+                                                            <property name="orient">wxHORIZONTAL</property>
+                                                            <property name="permission">none</property>
+                                                            <object class="sizeritem" expanded="0">
+                                                                <property name="border">5</property>
+                                                                <property name="flag">wxALL</property>
+                                                                <property name="proportion">0</property>
+                                                                <object class="wxButton" expanded="0">
+                                                                    <property name="BottomDockable">1</property>
+                                                                    <property name="LeftDockable">1</property>
+                                                                    <property name="RightDockable">1</property>
+                                                                    <property name="TopDockable">1</property>
+                                                                    <property name="aui_layer"></property>
+                                                                    <property name="aui_name"></property>
+                                                                    <property name="aui_position"></property>
+                                                                    <property name="aui_row"></property>
+                                                                    <property name="best_size"></property>
+                                                                    <property name="bg"></property>
+                                                                    <property name="caption"></property>
+                                                                    <property name="caption_visible">1</property>
+                                                                    <property name="center_pane">0</property>
+                                                                    <property name="close_button">1</property>
+                                                                    <property name="context_help"></property>
+                                                                    <property name="context_menu">1</property>
+                                                                    <property name="default">0</property>
+                                                                    <property name="default_pane">0</property>
+                                                                    <property name="dock">Dock</property>
+                                                                    <property name="dock_fixed">0</property>
+                                                                    <property name="docking">Left</property>
+                                                                    <property name="enabled">1</property>
+                                                                    <property name="fg"></property>
+                                                                    <property name="floatable">1</property>
+                                                                    <property name="font"></property>
+                                                                    <property name="gripper">0</property>
+                                                                    <property name="hidden">0</property>
+                                                                    <property name="id">wxID_ANY</property>
+                                                                    <property name="label">Geometry Transform</property>
+                                                                    <property name="max_size"></property>
+                                                                    <property name="maximize_button">0</property>
+                                                                    <property name="maximum_size"></property>
+                                                                    <property name="min_size"></property>
+                                                                    <property name="minimize_button">0</property>
+                                                                    <property name="minimum_size"></property>
+                                                                    <property name="moveable">1</property>
+                                                                    <property name="name">m_buttonGeometry</property>
+                                                                    <property name="pane_border">1</property>
+                                                                    <property name="pane_position"></property>
+                                                                    <property name="pane_size"></property>
+                                                                    <property name="permission">protected</property>
+                                                                    <property name="pin_button">1</property>
+                                                                    <property name="pos"></property>
+                                                                    <property name="resize">Resizable</property>
+                                                                    <property name="show">1</property>
+                                                                    <property name="size"></property>
+                                                                    <property name="style"></property>
+                                                                    <property name="subclass"></property>
+                                                                    <property name="toolbar_pane">0</property>
+                                                                    <property name="tooltip"></property>
+                                                                    <property name="validator_data_type"></property>
+                                                                    <property name="validator_style">wxFILTER_NONE</property>
+                                                                    <property name="validator_type">wxDefaultValidator</property>
+                                                                    <property name="validator_variable"></property>
+                                                                    <property name="window_extra_style"></property>
+                                                                    <property name="window_name"></property>
+                                                                    <property name="window_style"></property>
+                                                                    <event name="OnButtonClick">onGeometryTransform</event>
+                                                                    <event name="OnChar"></event>
+                                                                    <event name="OnEnterWindow"></event>
+                                                                    <event name="OnEraseBackground"></event>
+                                                                    <event name="OnKeyDown"></event>
+                                                                    <event name="OnKeyUp"></event>
+                                                                    <event name="OnKillFocus"></event>
+                                                                    <event name="OnLeaveWindow"></event>
+                                                                    <event name="OnLeftDClick"></event>
+                                                                    <event name="OnLeftDown"></event>
+                                                                    <event name="OnLeftUp"></event>
+                                                                    <event name="OnMiddleDClick"></event>
+                                                                    <event name="OnMiddleDown"></event>
+                                                                    <event name="OnMiddleUp"></event>
+                                                                    <event name="OnMotion"></event>
+                                                                    <event name="OnMouseEvents"></event>
+                                                                    <event name="OnMouseWheel"></event>
+                                                                    <event name="OnPaint"></event>
+                                                                    <event name="OnRightDClick"></event>
+                                                                    <event name="OnRightDown"></event>
+                                                                    <event name="OnRightUp"></event>
+                                                                    <event name="OnSetFocus"></event>
+                                                                    <event name="OnSize"></event>
+                                                                    <event name="OnUpdateUI"></event>
+                                                                </object>
+                                                            </object>
+                                                            <object class="sizeritem" expanded="0">
+                                                                <property name="border">5</property>
+                                                                <property name="flag">wxALL</property>
+                                                                <property name="proportion">0</property>
+                                                                <object class="wxButton" expanded="0">
+                                                                    <property name="BottomDockable">1</property>
+                                                                    <property name="LeftDockable">1</property>
+                                                                    <property name="RightDockable">1</property>
+                                                                    <property name="TopDockable">1</property>
+                                                                    <property name="aui_layer"></property>
+                                                                    <property name="aui_name"></property>
+                                                                    <property name="aui_position"></property>
+                                                                    <property name="aui_row"></property>
+                                                                    <property name="best_size"></property>
+                                                                    <property name="bg"></property>
+                                                                    <property name="caption"></property>
+                                                                    <property name="caption_visible">1</property>
+                                                                    <property name="center_pane">0</property>
+                                                                    <property name="close_button">1</property>
+                                                                    <property name="context_help"></property>
+                                                                    <property name="context_menu">1</property>
+                                                                    <property name="default">0</property>
+                                                                    <property name="default_pane">0</property>
+                                                                    <property name="dock">Dock</property>
+                                                                    <property name="dock_fixed">0</property>
+                                                                    <property name="docking">Left</property>
+                                                                    <property name="enabled">1</property>
+                                                                    <property name="fg"></property>
+                                                                    <property name="floatable">1</property>
+                                                                    <property name="font"></property>
+                                                                    <property name="gripper">0</property>
+                                                                    <property name="hidden">0</property>
+                                                                    <property name="id">wxID_ANY</property>
+                                                                    <property name="label">Import Shapes</property>
+                                                                    <property name="max_size"></property>
+                                                                    <property name="maximize_button">0</property>
+                                                                    <property name="maximum_size"></property>
+                                                                    <property name="min_size"></property>
+                                                                    <property name="minimize_button">0</property>
+                                                                    <property name="minimum_size"></property>
+                                                                    <property name="moveable">1</property>
+                                                                    <property name="name">m_buttonImport</property>
+                                                                    <property name="pane_border">1</property>
+                                                                    <property name="pane_position"></property>
+                                                                    <property name="pane_size"></property>
+                                                                    <property name="permission">protected</property>
+                                                                    <property name="pin_button">1</property>
+                                                                    <property name="pos"></property>
+                                                                    <property name="resize">Resizable</property>
+                                                                    <property name="show">1</property>
+                                                                    <property name="size"></property>
+                                                                    <property name="style"></property>
+                                                                    <property name="subclass"></property>
+                                                                    <property name="toolbar_pane">0</property>
+                                                                    <property name="tooltip"></property>
+                                                                    <property name="validator_data_type"></property>
+                                                                    <property name="validator_style">wxFILTER_NONE</property>
+                                                                    <property name="validator_type">wxDefaultValidator</property>
+                                                                    <property name="validator_variable"></property>
+                                                                    <property name="window_extra_style"></property>
+                                                                    <property name="window_name"></property>
+                                                                    <property name="window_style"></property>
+                                                                    <event name="OnButtonClick">onImportShape</event>
+                                                                    <event name="OnChar"></event>
+                                                                    <event name="OnEnterWindow"></event>
+                                                                    <event name="OnEraseBackground"></event>
+                                                                    <event name="OnKeyDown"></event>
+                                                                    <event name="OnKeyUp"></event>
+                                                                    <event name="OnKillFocus"></event>
+                                                                    <event name="OnLeaveWindow"></event>
+                                                                    <event name="OnLeftDClick"></event>
+                                                                    <event name="OnLeftDown"></event>
+                                                                    <event name="OnLeftUp"></event>
+                                                                    <event name="OnMiddleDClick"></event>
+                                                                    <event name="OnMiddleDown"></event>
+                                                                    <event name="OnMiddleUp"></event>
+                                                                    <event name="OnMotion"></event>
+                                                                    <event name="OnMouseEvents"></event>
+                                                                    <event name="OnMouseWheel"></event>
+                                                                    <event name="OnPaint"></event>
+                                                                    <event name="OnRightDClick"></event>
+                                                                    <event name="OnRightDown"></event>
+                                                                    <event name="OnRightUp"></event>
+                                                                    <event name="OnSetFocus"></event>
+                                                                    <event name="OnSize"></event>
+                                                                    <event name="OnUpdateUI"></event>
+                                                                </object>
+                                                            </object>
+                                                        </object>
+                                                    </object>
+                                                </object>
+                                            </object>
+                                        </object>
+                                    </object>
+                                </object>
+                            </object>
+                        </object>
+                        <object class="sizeritem" expanded="1">
+                            <property name="border">5</property>
+                            <property name="flag">wxEXPAND|wxTOP|wxBOTTOM</property>
+                            <property name="proportion">1</property>
+                            <object class="wxBoxSizer" expanded="0">
+                                <property name="minimum_size">200,-1</property>
+                                <property name="name">bSizerDisplayPad</property>
+                                <property name="orient">wxVERTICAL</property>
+                                <property name="permission">none</property>
+                                <object class="sizeritem" expanded="0">
+                                    <property name="border">5</property>
+                                    <property name="flag">wxRIGHT|wxTOP|wxEXPAND</property>
+                                    <property name="proportion">4</property>
+                                    <object class="wxPanel" expanded="0">
+                                        <property name="BottomDockable">1</property>
+                                        <property name="LeftDockable">1</property>
+                                        <property name="RightDockable">1</property>
+                                        <property name="TopDockable">1</property>
+                                        <property name="aui_layer"></property>
+                                        <property name="aui_name"></property>
+                                        <property name="aui_position"></property>
+                                        <property name="aui_row"></property>
+                                        <property name="best_size"></property>
+                                        <property name="bg">0,0,0</property>
+                                        <property name="caption"></property>
+                                        <property name="caption_visible">1</property>
+                                        <property name="center_pane">0</property>
+                                        <property name="close_button">1</property>
+                                        <property name="context_help"></property>
+                                        <property name="context_menu">1</property>
+                                        <property name="default_pane">0</property>
+                                        <property name="dock">Dock</property>
+                                        <property name="dock_fixed">0</property>
+                                        <property name="docking">Left</property>
+                                        <property name="enabled">1</property>
+                                        <property name="fg"></property>
+                                        <property name="floatable">1</property>
+                                        <property name="font"></property>
+                                        <property name="gripper">0</property>
+                                        <property name="hidden">0</property>
+                                        <property name="id">wxID_ANY</property>
+                                        <property name="max_size"></property>
+                                        <property name="maximize_button">0</property>
+                                        <property name="maximum_size"></property>
+                                        <property name="min_size"></property>
+                                        <property name="minimize_button">0</property>
+                                        <property name="minimum_size">-1,-1</property>
+                                        <property name="moveable">1</property>
+                                        <property name="name">m_panelShowPad</property>
+                                        <property name="pane_border">1</property>
+                                        <property name="pane_position"></property>
+                                        <property name="pane_size"></property>
+                                        <property name="permission">protected</property>
+                                        <property name="pin_button">1</property>
+                                        <property name="pos"></property>
+                                        <property name="resize">Resizable</property>
+                                        <property name="show">1</property>
+                                        <property name="size">200,-1</property>
+                                        <property name="subclass"></property>
+                                        <property name="toolbar_pane">0</property>
+                                        <property name="tooltip"></property>
+                                        <property name="window_extra_style"></property>
+                                        <property name="window_name"></property>
+                                        <property name="window_style">wxFULL_REPAINT_ON_RESIZE|wxSIMPLE_BORDER</property>
+                                        <event name="OnChar"></event>
+                                        <event name="OnEnterWindow"></event>
+                                        <event name="OnEraseBackground"></event>
+                                        <event name="OnKeyDown"></event>
+                                        <event name="OnKeyUp"></event>
+                                        <event name="OnKillFocus"></event>
+                                        <event name="OnLeaveWindow"></event>
+                                        <event name="OnLeftDClick"></event>
+                                        <event name="OnLeftDown"></event>
+                                        <event name="OnLeftUp"></event>
+                                        <event name="OnMiddleDClick"></event>
+                                        <event name="OnMiddleDown"></event>
+                                        <event name="OnMiddleUp"></event>
+                                        <event name="OnMotion"></event>
+                                        <event name="OnMouseEvents"></event>
+                                        <event name="OnMouseWheel"></event>
+                                        <event name="OnPaint">OnPaintShowPanel</event>
+                                        <event name="OnRightDClick"></event>
+                                        <event name="OnRightDown"></event>
+                                        <event name="OnRightUp"></event>
+                                        <event name="OnSetFocus"></event>
+                                        <event name="OnSize"></event>
+                                        <event name="OnUpdateUI"></event>
+                                    </object>
+                                </object>
+                                <object class="sizeritem" expanded="0">
+                                    <property name="border">5</property>
+                                    <property name="flag">wxEXPAND|wxRIGHT|wxTOP</property>
+                                    <property name="proportion">4</property>
+                                    <object class="CustomControl" expanded="0">
+                                        <property name="BottomDockable">1</property>
+                                        <property name="LeftDockable">1</property>
+                                        <property name="RightDockable">1</property>
+                                        <property name="TopDockable">1</property>
+                                        <property name="aui_layer"></property>
+                                        <property name="aui_name"></property>
+                                        <property name="aui_position"></property>
+                                        <property name="aui_row"></property>
+                                        <property name="best_size"></property>
+                                        <property name="bg"></property>
+                                        <property name="caption"></property>
+                                        <property name="caption_visible">1</property>
+                                        <property name="center_pane">0</property>
+                                        <property name="class">PCB_DRAW_PANEL_GAL</property>
+                                        <property name="close_button">1</property>
+                                        <property name="construction">m_panelShowPadGal = new PCB_DRAW_PANEL_GAL( this, -1, wxPoint( 0, 0 ), wxDefaultSize, m_galOptions, EDA_DRAW_PANEL_GAL::GAL_TYPE_CAIRO );</property>
+                                        <property name="context_help"></property>
+                                        <property name="context_menu">1</property>
+                                        <property name="declaration">PCB_DRAW_PANEL_GAL* m_panelShowPadGal;&#x0A;KIGFX::GAL_DISPLAY_OPTIONS m_galOptions;</property>
+                                        <property name="default_pane">0</property>
+                                        <property name="dock">Dock</property>
+                                        <property name="dock_fixed">0</property>
+                                        <property name="docking">Left</property>
+                                        <property name="enabled">1</property>
+                                        <property name="fg"></property>
+                                        <property name="floatable">1</property>
+                                        <property name="font"></property>
+                                        <property name="gripper">0</property>
+                                        <property name="hidden">0</property>
+                                        <property name="id">wxID_ANY</property>
+                                        <property name="include">#include &lt;wxBasePcbFrame.h&gt;&#x0A;#include &lt;pcb_draw_panel_gal.h&gt;</property>
+                                        <property name="max_size"></property>
+                                        <property name="maximize_button">0</property>
+                                        <property name="maximum_size"></property>
+                                        <property name="min_size"></property>
+                                        <property name="minimize_button">0</property>
+                                        <property name="minimum_size"></property>
+                                        <property name="moveable">1</property>
+                                        <property name="name">m_panelShowPadGal</property>
+                                        <property name="pane_border">1</property>
+                                        <property name="pane_position"></property>
+                                        <property name="pane_size"></property>
+                                        <property name="permission">protected</property>
+                                        <property name="pin_button">1</property>
+                                        <property name="pos"></property>
+                                        <property name="resize">Resizable</property>
+                                        <property name="settings"></property>
+                                        <property name="show">1</property>
+                                        <property name="size"></property>
+                                        <property name="subclass"></property>
+                                        <property name="toolbar_pane">0</property>
+                                        <property name="tooltip"></property>
+                                        <property name="window_extra_style"></property>
+                                        <property name="window_name"></property>
+                                        <property name="window_style"></property>
+                                        <event name="OnChar"></event>
+                                        <event name="OnEnterWindow"></event>
+                                        <event name="OnEraseBackground"></event>
+                                        <event name="OnKeyDown"></event>
+                                        <event name="OnKeyUp"></event>
+                                        <event name="OnKillFocus"></event>
+                                        <event name="OnLeaveWindow"></event>
+                                        <event name="OnLeftDClick"></event>
+                                        <event name="OnLeftDown"></event>
+                                        <event name="OnLeftUp"></event>
+                                        <event name="OnMiddleDClick"></event>
+                                        <event name="OnMiddleDown"></event>
+                                        <event name="OnMiddleUp"></event>
+                                        <event name="OnMotion"></event>
+                                        <event name="OnMouseEvents"></event>
+                                        <event name="OnMouseWheel"></event>
+                                        <event name="OnPaint"></event>
+                                        <event name="OnRightDClick"></event>
+                                        <event name="OnRightDown"></event>
+                                        <event name="OnRightUp"></event>
+                                        <event name="OnSetFocus"></event>
+                                        <event name="OnSize"></event>
+                                        <event name="OnUpdateUI"></event>
+                                    </object>
+                                </object>
+                            </object>
+                        </object>
+                    </object>
+                </object>
+                <object class="sizeritem" expanded="0">
+                    <property name="border">5</property>
+                    <property name="flag">wxALL</property>
+                    <property name="proportion">0</property>
+                    <object class="wxStaticText" expanded="0">
+                        <property name="BottomDockable">1</property>
+                        <property name="LeftDockable">1</property>
+                        <property name="RightDockable">1</property>
+                        <property name="TopDockable">1</property>
+                        <property name="aui_layer"></property>
+                        <property name="aui_name"></property>
+                        <property name="aui_position"></property>
+                        <property name="aui_row"></property>
+                        <property name="best_size"></property>
+                        <property name="bg"></property>
+                        <property name="caption"></property>
+                        <property name="caption_visible">1</property>
+                        <property name="center_pane">0</property>
+                        <property name="close_button">1</property>
+                        <property name="context_help"></property>
+                        <property name="context_menu">1</property>
+                        <property name="default_pane">0</property>
+                        <property name="dock">Dock</property>
+                        <property name="dock_fixed">0</property>
+                        <property name="docking">Left</property>
+                        <property name="enabled">1</property>
+                        <property name="fg"></property>
+                        <property name="floatable">1</property>
+                        <property name="font">,90,92,-1,70,0</property>
+                        <property name="gripper">0</property>
+                        <property name="hidden">0</property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="label">Warning:&#x0A;This pad is flipped on board.&#x0A;Back and front layers will be swapped.</property>
+                        <property name="max_size"></property>
+                        <property name="maximize_button">0</property>
+                        <property name="maximum_size"></property>
+                        <property name="min_size"></property>
+                        <property name="minimize_button">0</property>
+                        <property name="minimum_size"></property>
+                        <property name="moveable">1</property>
+                        <property name="name">m_staticTextWarningPadFlipped</property>
+                        <property name="pane_border">1</property>
+                        <property name="pane_position"></property>
+                        <property name="pane_size"></property>
+                        <property name="permission">protected</property>
+                        <property name="pin_button">1</property>
+                        <property name="pos"></property>
+                        <property name="resize">Resizable</property>
+                        <property name="show">1</property>
+                        <property name="size"></property>
+                        <property name="style"></property>
+                        <property name="subclass"></property>
+                        <property name="toolbar_pane">0</property>
+                        <property name="tooltip"></property>
+                        <property name="window_extra_style"></property>
+                        <property name="window_name"></property>
+                        <property name="window_style"></property>
+                        <property name="wrap">-1</property>
+                        <event name="OnChar"></event>
+                        <event name="OnEnterWindow"></event>
+                        <event name="OnEraseBackground"></event>
+                        <event name="OnKeyDown"></event>
+                        <event name="OnKeyUp"></event>
+                        <event name="OnKillFocus"></event>
+                        <event name="OnLeaveWindow"></event>
+                        <event name="OnLeftDClick"></event>
+                        <event name="OnLeftDown"></event>
+                        <event name="OnLeftUp"></event>
+                        <event name="OnMiddleDClick"></event>
+                        <event name="OnMiddleDown"></event>
+                        <event name="OnMiddleUp"></event>
+                        <event name="OnMotion"></event>
+                        <event name="OnMouseEvents"></event>
+                        <event name="OnMouseWheel"></event>
+                        <event name="OnPaint"></event>
+                        <event name="OnRightDClick"></event>
+                        <event name="OnRightDown"></event>
+                        <event name="OnRightUp"></event>
+                        <event name="OnSetFocus"></event>
+                        <event name="OnSize"></event>
+                        <event name="OnUpdateUI"></event>
+                    </object>
+                </object>
+                <object class="sizeritem" expanded="0">
+                    <property name="border">5</property>
+                    <property name="flag">wxALIGN_RIGHT|wxBOTTOM|wxRIGHT|wxLEFT</property>
+                    <property name="proportion">0</property>
+                    <object class="wxStdDialogButtonSizer" expanded="0">
+                        <property name="Apply">0</property>
+                        <property name="Cancel">1</property>
+                        <property name="ContextHelp">0</property>
+                        <property name="Help">0</property>
+                        <property name="No">0</property>
+                        <property name="OK">1</property>
+                        <property name="Save">0</property>
+                        <property name="Yes">0</property>
+                        <property name="minimum_size"></property>
+                        <property name="name">m_sdbSizer</property>
+                        <property name="permission">protected</property>
+                        <event name="OnApplyButtonClick"></event>
+                        <event name="OnCancelButtonClick"></event>
+                        <event name="OnContextHelpButtonClick"></event>
+                        <event name="OnHelpButtonClick"></event>
+                        <event name="OnNoButtonClick"></event>
+                        <event name="OnOKButtonClick"></event>
+                        <event name="OnSaveButtonClick"></event>
+                        <event name="OnYesButtonClick"></event>
+                    </object>
+                </object>
+            </object>
+        </object>
+        <object class="Dialog" expanded="1">
+            <property name="aui_managed">0</property>
+            <property name="aui_manager_style">wxAUI_MGR_DEFAULT</property>
+            <property name="bg"></property>
+            <property name="center">wxBOTH</property>
+            <property name="context_help"></property>
+            <property name="context_menu">1</property>
+            <property name="enabled">1</property>
+            <property name="event_handler">impl_virtual</property>
+            <property name="extra_style"></property>
+            <property name="fg"></property>
+            <property name="font"></property>
+            <property name="hidden">0</property>
+            <property name="id">wxID_ANY</property>
+            <property name="maximum_size"></property>
+            <property name="minimum_size"></property>
+            <property name="name">DIALOG_PAD_BASICSHAPES_PROPERTIES_BASE</property>
+            <property name="pos"></property>
+            <property name="size">443,233</property>
+            <property name="style">wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER</property>
+            <property name="subclass">DIALOG_SHIM; </property>
+            <property name="title"></property>
+            <property name="tooltip"></property>
+            <property name="window_extra_style"></property>
+            <property name="window_name"></property>
+            <property name="window_style"></property>
+            <event name="OnActivate"></event>
+            <event name="OnActivateApp"></event>
+            <event name="OnAuiFindManager"></event>
+            <event name="OnAuiPaneButton"></event>
+            <event name="OnAuiPaneClose"></event>
+            <event name="OnAuiPaneMaximize"></event>
+            <event name="OnAuiPaneRestore"></event>
+            <event name="OnAuiRender"></event>
+            <event name="OnChar"></event>
+            <event name="OnClose"></event>
+            <event name="OnEnterWindow"></event>
+            <event name="OnEraseBackground"></event>
+            <event name="OnHibernate"></event>
+            <event name="OnIconize"></event>
+            <event name="OnIdle"></event>
+            <event name="OnInitDialog"></event>
+            <event name="OnKeyDown"></event>
+            <event name="OnKeyUp"></event>
+            <event name="OnKillFocus"></event>
+            <event name="OnLeaveWindow"></event>
+            <event name="OnLeftDClick"></event>
+            <event name="OnLeftDown"></event>
+            <event name="OnLeftUp"></event>
+            <event name="OnMiddleDClick"></event>
+            <event name="OnMiddleDown"></event>
+            <event name="OnMiddleUp"></event>
+            <event name="OnMotion"></event>
+            <event name="OnMouseEvents"></event>
+            <event name="OnMouseWheel"></event>
+            <event name="OnPaint"></event>
+            <event name="OnRightDClick"></event>
+            <event name="OnRightDown"></event>
+            <event name="OnRightUp"></event>
+            <event name="OnSetFocus"></event>
+            <event name="OnSize"></event>
+            <event name="OnUpdateUI"></event>
+            <object class="wxBoxSizer" expanded="1">
+                <property name="minimum_size"></property>
+                <property name="name">bSizermain</property>
+                <property name="orient">wxVERTICAL</property>
+                <property name="permission">none</property>
+                <object class="sizeritem" expanded="1">
+                    <property name="border">5</property>
+                    <property name="flag">wxALL|wxALIGN_CENTER_HORIZONTAL</property>
+                    <property name="proportion">0</property>
+                    <object class="wxStaticText" expanded="1">
+                        <property name="BottomDockable">1</property>
+                        <property name="LeftDockable">1</property>
+                        <property name="RightDockable">1</property>
+                        <property name="TopDockable">1</property>
+                        <property name="aui_layer"></property>
+                        <property name="aui_name"></property>
+                        <property name="aui_position"></property>
+                        <property name="aui_row"></property>
+                        <property name="best_size"></property>
+                        <property name="bg"></property>
+                        <property name="caption"></property>
+                        <property name="caption_visible">1</property>
+                        <property name="center_pane">0</property>
+                        <property name="close_button">1</property>
+                        <property name="context_help"></property>
+                        <property name="context_menu">1</property>
+                        <property name="default_pane">0</property>
+                        <property name="dock">Dock</property>
+                        <property name="dock_fixed">0</property>
+                        <property name="docking">Left</property>
+                        <property name="enabled">1</property>
+                        <property name="fg"></property>
+                        <property name="floatable">1</property>
+                        <property name="font">,90,92,-1,70,0</property>
+                        <property name="gripper">0</property>
+                        <property name="hidden">0</property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="label">Filled circle: set thickness to 0&#x0A;Ring:  set thickness to the width of the ring</property>
+                        <property name="max_size"></property>
+                        <property name="maximize_button">0</property>
+                        <property name="maximum_size"></property>
+                        <property name="min_size"></property>
+                        <property name="minimize_button">0</property>
+                        <property name="minimum_size"></property>
+                        <property name="moveable">1</property>
+                        <property name="name">m_staticTextInfo</property>
+                        <property name="pane_border">1</property>
+                        <property name="pane_position"></property>
+                        <property name="pane_size"></property>
+                        <property name="permission">protected</property>
+                        <property name="pin_button">1</property>
+                        <property name="pos"></property>
+                        <property name="resize">Resizable</property>
+                        <property name="show">1</property>
+                        <property name="size"></property>
+                        <property name="style"></property>
+                        <property name="subclass"></property>
+                        <property name="toolbar_pane">0</property>
+                        <property name="tooltip"></property>
+                        <property name="window_extra_style"></property>
+                        <property name="window_name"></property>
+                        <property name="window_style"></property>
+                        <property name="wrap">-1</property>
+                        <event name="OnChar"></event>
+                        <event name="OnEnterWindow"></event>
+                        <event name="OnEraseBackground"></event>
+                        <event name="OnKeyDown"></event>
+                        <event name="OnKeyUp"></event>
+                        <event name="OnKillFocus"></event>
+                        <event name="OnLeaveWindow"></event>
+                        <event name="OnLeftDClick"></event>
+                        <event name="OnLeftDown"></event>
+                        <event name="OnLeftUp"></event>
+                        <event name="OnMiddleDClick"></event>
+                        <event name="OnMiddleDown"></event>
+                        <event name="OnMiddleUp"></event>
+                        <event name="OnMotion"></event>
+                        <event name="OnMouseEvents"></event>
+                        <event name="OnMouseWheel"></event>
+                        <event name="OnPaint"></event>
+                        <event name="OnRightDClick"></event>
+                        <event name="OnRightDown"></event>
+                        <event name="OnRightUp"></event>
+                        <event name="OnSetFocus"></event>
+                        <event name="OnSize"></event>
+                        <event name="OnUpdateUI"></event>
+                    </object>
+                </object>
+                <object class="sizeritem" expanded="0">
+                    <property name="border">5</property>
+                    <property name="flag">wxEXPAND</property>
+                    <property name="proportion">1</property>
+                    <object class="wxFlexGridSizer" expanded="0">
+                        <property name="cols">4</property>
+                        <property name="flexible_direction">wxBOTH</property>
+                        <property name="growablecols">1,2</property>
+                        <property name="growablerows"></property>
+                        <property name="hgap">0</property>
+                        <property name="minimum_size"></property>
+                        <property name="name">fgSizerShapeProperties</property>
+                        <property name="non_flexible_grow_mode">wxFLEX_GROWMODE_SPECIFIED</property>
+                        <property name="permission">none</property>
+                        <property name="rows">0</property>
+                        <property name="vgap">0</property>
+                        <object class="sizeritem" expanded="0">
+                            <property name="border">5</property>
+                            <property name="flag">wxALL|wxALIGN_CENTER_VERTICAL</property>
+                            <property name="proportion">0</property>
+                            <object class="wxStaticText" expanded="0">
+                                <property name="BottomDockable">1</property>
+                                <property name="LeftDockable">1</property>
+                                <property name="RightDockable">1</property>
+                                <property name="TopDockable">1</property>
+                                <property name="aui_layer"></property>
+                                <property name="aui_name"></property>
+                                <property name="aui_position"></property>
+                                <property name="aui_row"></property>
+                                <property name="best_size"></property>
+                                <property name="bg"></property>
+                                <property name="caption"></property>
+                                <property name="caption_visible">1</property>
+                                <property name="center_pane">0</property>
+                                <property name="close_button">1</property>
+                                <property name="context_help"></property>
+                                <property name="context_menu">1</property>
+                                <property name="default_pane">0</property>
+                                <property name="dock">Dock</property>
+                                <property name="dock_fixed">0</property>
+                                <property name="docking">Left</property>
+                                <property name="enabled">1</property>
+                                <property name="fg"></property>
+                                <property name="floatable">1</property>
+                                <property name="font"></property>
+                                <property name="gripper">0</property>
+                                <property name="hidden">0</property>
+                                <property name="id">wxID_ANY</property>
+                                <property name="label">Start point  X,Y</property>
+                                <property name="max_size"></property>
+                                <property name="maximize_button">0</property>
+                                <property name="maximum_size"></property>
+                                <property name="min_size"></property>
+                                <property name="minimize_button">0</property>
+                                <property name="minimum_size"></property>
+                                <property name="moveable">1</property>
+                                <property name="name">m_staticTextPosStart</property>
+                                <property name="pane_border">1</property>
+                                <property name="pane_position"></property>
+                                <property name="pane_size"></property>
+                                <property name="permission">protected</property>
+                                <property name="pin_button">1</property>
+                                <property name="pos"></property>
+                                <property name="resize">Resizable</property>
+                                <property name="show">1</property>
+                                <property name="size"></property>
+                                <property name="style"></property>
+                                <property name="subclass"></property>
+                                <property name="toolbar_pane">0</property>
+                                <property name="tooltip"></property>
+                                <property name="window_extra_style"></property>
+                                <property name="window_name"></property>
+                                <property name="window_style"></property>
+                                <property name="wrap">-1</property>
+                                <event name="OnChar"></event>
+                                <event name="OnEnterWindow"></event>
+                                <event name="OnEraseBackground"></event>
+                                <event name="OnKeyDown"></event>
+                                <event name="OnKeyUp"></event>
+                                <event name="OnKillFocus"></event>
+                                <event name="OnLeaveWindow"></event>
+                                <event name="OnLeftDClick"></event>
+                                <event name="OnLeftDown"></event>
+                                <event name="OnLeftUp"></event>
+                                <event name="OnMiddleDClick"></event>
+                                <event name="OnMiddleDown"></event>
+                                <event name="OnMiddleUp"></event>
+                                <event name="OnMotion"></event>
+                                <event name="OnMouseEvents"></event>
+                                <event name="OnMouseWheel"></event>
+                                <event name="OnPaint"></event>
+                                <event name="OnRightDClick"></event>
+                                <event name="OnRightDown"></event>
+                                <event name="OnRightUp"></event>
+                                <event name="OnSetFocus"></event>
+                                <event name="OnSize"></event>
+                                <event name="OnUpdateUI"></event>
+                            </object>
+                        </object>
+                        <object class="sizeritem" expanded="0">
+                            <property name="border">5</property>
+                            <property name="flag">wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND</property>
+                            <property name="proportion">0</property>
+                            <object class="wxTextCtrl" expanded="0">
+                                <property name="BottomDockable">1</property>
+                                <property name="LeftDockable">1</property>
+                                <property name="RightDockable">1</property>
+                                <property name="TopDockable">1</property>
+                                <property name="aui_layer"></property>
+                                <property name="aui_name"></property>
+                                <property name="aui_position"></property>
+                                <property name="aui_row"></property>
+                                <property name="best_size"></property>
+                                <property name="bg"></property>
+                                <property name="caption"></property>
+                                <property name="caption_visible">1</property>
+                                <property name="center_pane">0</property>
+                                <property name="close_button">1</property>
+                                <property name="context_help"></property>
+                                <property name="context_menu">1</property>
+                                <property name="default_pane">0</property>
+                                <property name="dock">Dock</property>
+                                <property name="dock_fixed">0</property>
+                                <property name="docking">Left</property>
+                                <property name="enabled">1</property>
+                                <property name="fg"></property>
+                                <property name="floatable">1</property>
+                                <property name="font"></property>
+                                <property name="gripper">0</property>
+                                <property name="hidden">0</property>
+                                <property name="id">wxID_ANY</property>
+                                <property name="max_size"></property>
+                                <property name="maximize_button">0</property>
+                                <property name="maximum_size"></property>
+                                <property name="maxlength">0</property>
+                                <property name="min_size"></property>
+                                <property name="minimize_button">0</property>
+                                <property name="minimum_size"></property>
+                                <property name="moveable">1</property>
+                                <property name="name">m_textCtrPosX</property>
+                                <property name="pane_border">1</property>
+                                <property name="pane_position"></property>
+                                <property name="pane_size"></property>
+                                <property name="permission">protected</property>
+                                <property name="pin_button">1</property>
+                                <property name="pos"></property>
+                                <property name="resize">Resizable</property>
+                                <property name="show">1</property>
+                                <property name="size"></property>
+                                <property name="style"></property>
+                                <property name="subclass"></property>
+                                <property name="toolbar_pane">0</property>
+                                <property name="tooltip"></property>
+                                <property name="validator_data_type"></property>
+                                <property name="validator_style">wxFILTER_NONE</property>
+                                <property name="validator_type">wxDefaultValidator</property>
+                                <property name="validator_variable"></property>
+                                <property name="value"></property>
+                                <property name="window_extra_style"></property>
+                                <property name="window_name"></property>
+                                <property name="window_style"></property>
+                                <event name="OnChar"></event>
+                                <event name="OnEnterWindow"></event>
+                                <event name="OnEraseBackground"></event>
+                                <event name="OnKeyDown"></event>
+                                <event name="OnKeyUp"></event>
+                                <event name="OnKillFocus"></event>
+                                <event name="OnLeaveWindow"></event>
+                                <event name="OnLeftDClick"></event>
+                                <event name="OnLeftDown"></event>
+                                <event name="OnLeftUp"></event>
+                                <event name="OnMiddleDClick"></event>
+                                <event name="OnMiddleDown"></event>
+                                <event name="OnMiddleUp"></event>
+                                <event name="OnMotion"></event>
+                                <event name="OnMouseEvents"></event>
+                                <event name="OnMouseWheel"></event>
+                                <event name="OnPaint"></event>
+                                <event name="OnRightDClick"></event>
+                                <event name="OnRightDown"></event>
+                                <event name="OnRightUp"></event>
+                                <event name="OnSetFocus"></event>
+                                <event name="OnSize"></event>
+                                <event name="OnText"></event>
+                                <event name="OnTextEnter"></event>
+                                <event name="OnTextMaxLen"></event>
+                                <event name="OnTextURL"></event>
+                                <event name="OnUpdateUI"></event>
+                            </object>
+                        </object>
+                        <object class="sizeritem" expanded="0">
+                            <property name="border">5</property>
+                            <property name="flag">wxALL|wxEXPAND</property>
+                            <property name="proportion">0</property>
+                            <object class="wxTextCtrl" expanded="0">
+                                <property name="BottomDockable">1</property>
+                                <property name="LeftDockable">1</property>
+                                <property name="RightDockable">1</property>
+                                <property name="TopDockable">1</property>
+                                <property name="aui_layer"></property>
+                                <property name="aui_name"></property>
+                                <property name="aui_position"></property>
+                                <property name="aui_row"></property>
+                                <property name="best_size"></property>
+                                <property name="bg"></property>
+                                <property name="caption"></property>
+                                <property name="caption_visible">1</property>
+                                <property name="center_pane">0</property>
+                                <property name="close_button">1</property>
+                                <property name="context_help"></property>
+                                <property name="context_menu">1</property>
+                                <property name="default_pane">0</property>
+                                <property name="dock">Dock</property>
+                                <property name="dock_fixed">0</property>
+                                <property name="docking">Left</property>
+                                <property name="enabled">1</property>
+                                <property name="fg"></property>
+                                <property name="floatable">1</property>
+                                <property name="font"></property>
+                                <property name="gripper">0</property>
+                                <property name="hidden">0</property>
+                                <property name="id">wxID_ANY</property>
+                                <property name="max_size"></property>
+                                <property name="maximize_button">0</property>
+                                <property name="maximum_size"></property>
+                                <property name="maxlength">0</property>
+                                <property name="min_size"></property>
+                                <property name="minimize_button">0</property>
+                                <property name="minimum_size"></property>
+                                <property name="moveable">1</property>
+                                <property name="name">m_textCtrPosY</property>
+                                <property name="pane_border">1</property>
+                                <property name="pane_position"></property>
+                                <property name="pane_size"></property>
+                                <property name="permission">protected</property>
+                                <property name="pin_button">1</property>
+                                <property name="pos"></property>
+                                <property name="resize">Resizable</property>
+                                <property name="show">1</property>
+                                <property name="size"></property>
+                                <property name="style"></property>
+                                <property name="subclass"></property>
+                                <property name="toolbar_pane">0</property>
+                                <property name="tooltip"></property>
+                                <property name="validator_data_type"></property>
+                                <property name="validator_style">wxFILTER_NONE</property>
+                                <property name="validator_type">wxDefaultValidator</property>
+                                <property name="validator_variable"></property>
+                                <property name="value"></property>
+                                <property name="window_extra_style"></property>
+                                <property name="window_name"></property>
+                                <property name="window_style"></property>
+                                <event name="OnChar"></event>
+                                <event name="OnEnterWindow"></event>
+                                <event name="OnEraseBackground"></event>
+                                <event name="OnKeyDown"></event>
+                                <event name="OnKeyUp"></event>
+                                <event name="OnKillFocus"></event>
+                                <event name="OnLeaveWindow"></event>
+                                <event name="OnLeftDClick"></event>
+                                <event name="OnLeftDown"></event>
+                                <event name="OnLeftUp"></event>
+                                <event name="OnMiddleDClick"></event>
+                                <event name="OnMiddleDown"></event>
+                                <event name="OnMiddleUp"></event>
+                                <event name="OnMotion"></event>
+                                <event name="OnMouseEvents"></event>
+                                <event name="OnMouseWheel"></event>
+                                <event name="OnPaint"></event>
+                                <event name="OnRightDClick"></event>
+                                <event name="OnRightDown"></event>
+                                <event name="OnRightUp"></event>
+                                <event name="OnSetFocus"></event>
+                                <event name="OnSize"></event>
+                                <event name="OnText"></event>
+                                <event name="OnTextEnter"></event>
+                                <event name="OnTextMaxLen"></event>
+                                <event name="OnTextURL"></event>
+                                <event name="OnUpdateUI"></event>
+                            </object>
+                        </object>
+                        <object class="sizeritem" expanded="0">
+                            <property name="border">5</property>
+                            <property name="flag">wxALL|wxALIGN_CENTER_VERTICAL</property>
+                            <property name="proportion">0</property>
+                            <object class="wxStaticText" expanded="0">
+                                <property name="BottomDockable">1</property>
+                                <property name="LeftDockable">1</property>
+                                <property name="RightDockable">1</property>
+                                <property name="TopDockable">1</property>
+                                <property name="aui_layer"></property>
+                                <property name="aui_name"></property>
+                                <property name="aui_position"></property>
+                                <property name="aui_row"></property>
+                                <property name="best_size"></property>
+                                <property name="bg"></property>
+                                <property name="caption"></property>
+                                <property name="caption_visible">1</property>
+                                <property name="center_pane">0</property>
+                                <property name="close_button">1</property>
+                                <property name="context_help"></property>
+                                <property name="context_menu">1</property>
+                                <property name="default_pane">0</property>
+                                <property name="dock">Dock</property>
+                                <property name="dock_fixed">0</property>
+                                <property name="docking">Left</property>
+                                <property name="enabled">1</property>
+                                <property name="fg"></property>
+                                <property name="floatable">1</property>
+                                <property name="font"></property>
+                                <property name="gripper">0</property>
+                                <property name="hidden">0</property>
+                                <property name="id">wxID_ANY</property>
+                                <property name="label">unit</property>
+                                <property name="max_size"></property>
+                                <property name="maximize_button">0</property>
+                                <property name="maximum_size"></property>
+                                <property name="min_size"></property>
+                                <property name="minimize_button">0</property>
+                                <property name="minimum_size"></property>
+                                <property name="moveable">1</property>
+                                <property name="name">m_staticTextPosUnit</property>
+                                <property name="pane_border">1</property>
+                                <property name="pane_position"></property>
+                                <property name="pane_size"></property>
+                                <property name="permission">protected</property>
+                                <property name="pin_button">1</property>
+                                <property name="pos"></property>
+                                <property name="resize">Resizable</property>
+                                <property name="show">1</property>
+                                <property name="size"></property>
+                                <property name="style"></property>
+                                <property name="subclass"></property>
+                                <property name="toolbar_pane">0</property>
+                                <property name="tooltip"></property>
+                                <property name="window_extra_style"></property>
+                                <property name="window_name"></property>
+                                <property name="window_style"></property>
+                                <property name="wrap">-1</property>
+                                <event name="OnChar"></event>
+                                <event name="OnEnterWindow"></event>
+                                <event name="OnEraseBackground"></event>
+                                <event name="OnKeyDown"></event>
+                                <event name="OnKeyUp"></event>
+                                <event name="OnKillFocus"></event>
+                                <event name="OnLeaveWindow"></event>
+                                <event name="OnLeftDClick"></event>
+                                <event name="OnLeftDown"></event>
+                                <event name="OnLeftUp"></event>
+                                <event name="OnMiddleDClick"></event>
+                                <event name="OnMiddleDown"></event>
+                                <event name="OnMiddleUp"></event>
+                                <event name="OnMotion"></event>
+                                <event name="OnMouseEvents"></event>
+                                <event name="OnMouseWheel"></event>
+                                <event name="OnPaint"></event>
+                                <event name="OnRightDClick"></event>
+                                <event name="OnRightDown"></event>
+                                <event name="OnRightUp"></event>
+                                <event name="OnSetFocus"></event>
+                                <event name="OnSize"></event>
+                                <event name="OnUpdateUI"></event>
+                            </object>
+                        </object>
+                        <object class="sizeritem" expanded="0">
+                            <property name="border">5</property>
+                            <property name="flag">wxALL|wxALIGN_CENTER_VERTICAL</property>
+                            <property name="proportion">0</property>
+                            <object class="wxStaticText" expanded="0">
+                                <property name="BottomDockable">1</property>
+                                <property name="LeftDockable">1</property>
+                                <property name="RightDockable">1</property>
+                                <property name="TopDockable">1</property>
+                                <property name="aui_layer"></property>
+                                <property name="aui_name"></property>
+                                <property name="aui_position"></property>
+                                <property name="aui_row"></property>
+                                <property name="best_size"></property>
+                                <property name="bg"></property>
+                                <property name="caption"></property>
+                                <property name="caption_visible">1</property>
+                                <property name="center_pane">0</property>
+                                <property name="close_button">1</property>
+                                <property name="context_help"></property>
+                                <property name="context_menu">1</property>
+                                <property name="default_pane">0</property>
+                                <property name="dock">Dock</property>
+                                <property name="dock_fixed">0</property>
+                                <property name="docking">Left</property>
+                                <property name="enabled">1</property>
+                                <property name="fg"></property>
+                                <property name="floatable">1</property>
+                                <property name="font"></property>
+                                <property name="gripper">0</property>
+                                <property name="hidden">0</property>
+                                <property name="id">wxID_ANY</property>
+                                <property name="label">End point X,Y</property>
+                                <property name="max_size"></property>
+                                <property name="maximize_button">0</property>
+                                <property name="maximum_size"></property>
+                                <property name="min_size"></property>
+                                <property name="minimize_button">0</property>
+                                <property name="minimum_size"></property>
+                                <property name="moveable">1</property>
+                                <property name="name">m_staticTextPosEnd</property>
+                                <property name="pane_border">1</property>
+                                <property name="pane_position"></property>
+                                <property name="pane_size"></property>
+                                <property name="permission">protected</property>
+                                <property name="pin_button">1</property>
+                                <property name="pos"></property>
+                                <property name="resize">Resizable</property>
+                                <property name="show">1</property>
+                                <property name="size"></property>
+                                <property name="style"></property>
+                                <property name="subclass"></property>
+                                <property name="toolbar_pane">0</property>
+                                <property name="tooltip"></property>
+                                <property name="window_extra_style"></property>
+                                <property name="window_name"></property>
+                                <property name="window_style"></property>
+                                <property name="wrap">-1</property>
+                                <event name="OnChar"></event>
+                                <event name="OnEnterWindow"></event>
+                                <event name="OnEraseBackground"></event>
+                                <event name="OnKeyDown"></event>
+                                <event name="OnKeyUp"></event>
+                                <event name="OnKillFocus"></event>
+                                <event name="OnLeaveWindow"></event>
+                                <event name="OnLeftDClick"></event>
+                                <event name="OnLeftDown"></event>
+                                <event name="OnLeftUp"></event>
+                                <event name="OnMiddleDClick"></event>
+                                <event name="OnMiddleDown"></event>
+                                <event name="OnMiddleUp"></event>
+                                <event name="OnMotion"></event>
+                                <event name="OnMouseEvents"></event>
+                                <event name="OnMouseWheel"></event>
+                                <event name="OnPaint"></event>
+                                <event name="OnRightDClick"></event>
+                                <event name="OnRightDown"></event>
+                                <event name="OnRightUp"></event>
+                                <event name="OnSetFocus"></event>
+                                <event name="OnSize"></event>
+                                <event name="OnUpdateUI"></event>
+                            </object>
+                        </object>
+                        <object class="sizeritem" expanded="0">
+                            <property name="border">5</property>
+                            <property name="flag">wxALL|wxEXPAND|wxALIGN_CENTER_VERTICAL</property>
+                            <property name="proportion">0</property>
+                            <object class="wxTextCtrl" expanded="0">
+                                <property name="BottomDockable">1</property>
+                                <property name="LeftDockable">1</property>
+                                <property name="RightDockable">1</property>
+                                <property name="TopDockable">1</property>
+                                <property name="aui_layer"></property>
+                                <property name="aui_name"></property>
+                                <property name="aui_position"></property>
+                                <property name="aui_row"></property>
+                                <property name="best_size"></property>
+                                <property name="bg"></property>
+                                <property name="caption"></property>
+                                <property name="caption_visible">1</property>
+                                <property name="center_pane">0</property>
+                                <property name="close_button">1</property>
+                                <property name="context_help"></property>
+                                <property name="context_menu">1</property>
+                                <property name="default_pane">0</property>
+                                <property name="dock">Dock</property>
+                                <property name="dock_fixed">0</property>
+                                <property name="docking">Left</property>
+                                <property name="enabled">1</property>
+                                <property name="fg"></property>
+                                <property name="floatable">1</property>
+                                <property name="font"></property>
+                                <property name="gripper">0</property>
+                                <property name="hidden">0</property>
+                                <property name="id">wxID_ANY</property>
+                                <property name="max_size"></property>
+                                <property name="maximize_button">0</property>
+                                <property name="maximum_size"></property>
+                                <property name="maxlength">0</property>
+                                <property name="min_size"></property>
+                                <property name="minimize_button">0</property>
+                                <property name="minimum_size"></property>
+                                <property name="moveable">1</property>
+                                <property name="name">m_textCtrEndX</property>
+                                <property name="pane_border">1</property>
+                                <property name="pane_position"></property>
+                                <property name="pane_size"></property>
+                                <property name="permission">protected</property>
+                                <property name="pin_button">1</property>
+                                <property name="pos"></property>
+                                <property name="resize">Resizable</property>
+                                <property name="show">1</property>
+                                <property name="size"></property>
+                                <property name="style"></property>
+                                <property name="subclass"></property>
+                                <property name="toolbar_pane">0</property>
+                                <property name="tooltip"></property>
+                                <property name="validator_data_type"></property>
+                                <property name="validator_style">wxFILTER_NONE</property>
+                                <property name="validator_type">wxDefaultValidator</property>
+                                <property name="validator_variable"></property>
+                                <property name="value"></property>
+                                <property name="window_extra_style"></property>
+                                <property name="window_name"></property>
+                                <property name="window_style"></property>
+                                <event name="OnChar"></event>
+                                <event name="OnEnterWindow"></event>
+                                <event name="OnEraseBackground"></event>
+                                <event name="OnKeyDown"></event>
+                                <event name="OnKeyUp"></event>
+                                <event name="OnKillFocus"></event>
+                                <event name="OnLeaveWindow"></event>
+                                <event name="OnLeftDClick"></event>
+                                <event name="OnLeftDown"></event>
+                                <event name="OnLeftUp"></event>
+                                <event name="OnMiddleDClick"></event>
+                                <event name="OnMiddleDown"></event>
+                                <event name="OnMiddleUp"></event>
+                                <event name="OnMotion"></event>
+                                <event name="OnMouseEvents"></event>
+                                <event name="OnMouseWheel"></event>
+                                <event name="OnPaint"></event>
+                                <event name="OnRightDClick"></event>
+                                <event name="OnRightDown"></event>
+                                <event name="OnRightUp"></event>
+                                <event name="OnSetFocus"></event>
+                                <event name="OnSize"></event>
+                                <event name="OnText"></event>
+                                <event name="OnTextEnter"></event>
+                                <event name="OnTextMaxLen"></event>
+                                <event name="OnTextURL"></event>
+                                <event name="OnUpdateUI"></event>
+                            </object>
+                        </object>
+                        <object class="sizeritem" expanded="0">
+                            <property name="border">5</property>
+                            <property name="flag">wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND</property>
+                            <property name="proportion">0</property>
+                            <object class="wxTextCtrl" expanded="0">
+                                <property name="BottomDockable">1</property>
+                                <property name="LeftDockable">1</property>
+                                <property name="RightDockable">1</property>
+                                <property name="TopDockable">1</property>
+                                <property name="aui_layer"></property>
+                                <property name="aui_name"></property>
+                                <property name="aui_position"></property>
+                                <property name="aui_row"></property>
+                                <property name="best_size"></property>
+                                <property name="bg"></property>
+                                <property name="caption"></property>
+                                <property name="caption_visible">1</property>
+                                <property name="center_pane">0</property>
+                                <property name="close_button">1</property>
+                                <property name="context_help"></property>
+                                <property name="context_menu">1</property>
+                                <property name="default_pane">0</property>
+                                <property name="dock">Dock</property>
+                                <property name="dock_fixed">0</property>
+                                <property name="docking">Left</property>
+                                <property name="enabled">1</property>
+                                <property name="fg"></property>
+                                <property name="floatable">1</property>
+                                <property name="font"></property>
+                                <property name="gripper">0</property>
+                                <property name="hidden">0</property>
+                                <property name="id">wxID_ANY</property>
+                                <property name="max_size"></property>
+                                <property name="maximize_button">0</property>
+                                <property name="maximum_size"></property>
+                                <property name="maxlength">0</property>
+                                <property name="min_size"></property>
+                                <property name="minimize_button">0</property>
+                                <property name="minimum_size"></property>
+                                <property name="moveable">1</property>
+                                <property name="name">m_textCtrEndY</property>
+                                <property name="pane_border">1</property>
+                                <property name="pane_position"></property>
+                                <property name="pane_size"></property>
+                                <property name="permission">protected</property>
+                                <property name="pin_button">1</property>
+                                <property name="pos"></property>
+                                <property name="resize">Resizable</property>
+                                <property name="show">1</property>
+                                <property name="size"></property>
+                                <property name="style"></property>
+                                <property name="subclass"></property>
+                                <property name="toolbar_pane">0</property>
+                                <property name="tooltip"></property>
+                                <property name="validator_data_type"></property>
+                                <property name="validator_style">wxFILTER_NONE</property>
+                                <property name="validator_type">wxDefaultValidator</property>
+                                <property name="validator_variable"></property>
+                                <property name="value"></property>
+                                <property name="window_extra_style"></property>
+                                <property name="window_name"></property>
+                                <property name="window_style"></property>
+                                <event name="OnChar"></event>
+                                <event name="OnEnterWindow"></event>
+                                <event name="OnEraseBackground"></event>
+                                <event name="OnKeyDown"></event>
+                                <event name="OnKeyUp"></event>
+                                <event name="OnKillFocus"></event>
+                                <event name="OnLeaveWindow"></event>
+                                <event name="OnLeftDClick"></event>
+                                <event name="OnLeftDown"></event>
+                                <event name="OnLeftUp"></event>
+                                <event name="OnMiddleDClick"></event>
+                                <event name="OnMiddleDown"></event>
+                                <event name="OnMiddleUp"></event>
+                                <event name="OnMotion"></event>
+                                <event name="OnMouseEvents"></event>
+                                <event name="OnMouseWheel"></event>
+                                <event name="OnPaint"></event>
+                                <event name="OnRightDClick"></event>
+                                <event name="OnRightDown"></event>
+                                <event name="OnRightUp"></event>
+                                <event name="OnSetFocus"></event>
+                                <event name="OnSize"></event>
+                                <event name="OnText"></event>
+                                <event name="OnTextEnter"></event>
+                                <event name="OnTextMaxLen"></event>
+                                <event name="OnTextURL"></event>
+                                <event name="OnUpdateUI"></event>
+                            </object>
+                        </object>
+                        <object class="sizeritem" expanded="0">
+                            <property name="border">5</property>
+                            <property name="flag">wxALL|wxALIGN_CENTER_VERTICAL</property>
+                            <property name="proportion">0</property>
+                            <object class="wxStaticText" expanded="0">
+                                <property name="BottomDockable">1</property>
+                                <property name="LeftDockable">1</property>
+                                <property name="RightDockable">1</property>
+                                <property name="TopDockable">1</property>
+                                <property name="aui_layer"></property>
+                                <property name="aui_name"></property>
+                                <property name="aui_position"></property>
+                                <property name="aui_row"></property>
+                                <property name="best_size"></property>
+                                <property name="bg"></property>
+                                <property name="caption"></property>
+                                <property name="caption_visible">1</property>
+                                <property name="center_pane">0</property>
+                                <property name="close_button">1</property>
+                                <property name="context_help"></property>
+                                <property name="context_menu">1</property>
+                                <property name="default_pane">0</property>
+                                <property name="dock">Dock</property>
+                                <property name="dock_fixed">0</property>
+                                <property name="docking">Left</property>
+                                <property name="enabled">1</property>
+                                <property name="fg"></property>
+                                <property name="floatable">1</property>
+                                <property name="font"></property>
+                                <property name="gripper">0</property>
+                                <property name="hidden">0</property>
+                                <property name="id">wxID_ANY</property>
+                                <property name="label">unit</property>
+                                <property name="max_size"></property>
+                                <property name="maximize_button">0</property>
+                                <property name="maximum_size"></property>
+                                <property name="min_size"></property>
+                                <property name="minimize_button">0</property>
+                                <property name="minimum_size"></property>
+                                <property name="moveable">1</property>
+                                <property name="name">m_staticTextEndUnit</property>
+                                <property name="pane_border">1</property>
+                                <property name="pane_position"></property>
+                                <property name="pane_size"></property>
+                                <property name="permission">protected</property>
+                                <property name="pin_button">1</property>
+                                <property name="pos"></property>
+                                <property name="resize">Resizable</property>
+                                <property name="show">1</property>
+                                <property name="size"></property>
+                                <property name="style"></property>
+                                <property name="subclass"></property>
+                                <property name="toolbar_pane">0</property>
+                                <property name="tooltip"></property>
+                                <property name="window_extra_style"></property>
+                                <property name="window_name"></property>
+                                <property name="window_style"></property>
+                                <property name="wrap">-1</property>
+                                <event name="OnChar"></event>
+                                <event name="OnEnterWindow"></event>
+                                <event name="OnEraseBackground"></event>
+                                <event name="OnKeyDown"></event>
+                                <event name="OnKeyUp"></event>
+                                <event name="OnKillFocus"></event>
+                                <event name="OnLeaveWindow"></event>
+                                <event name="OnLeftDClick"></event>
+                                <event name="OnLeftDown"></event>
+                                <event name="OnLeftUp"></event>
+                                <event name="OnMiddleDClick"></event>
+                                <event name="OnMiddleDown"></event>
+                                <event name="OnMiddleUp"></event>
+                                <event name="OnMotion"></event>
+                                <event name="OnMouseEvents"></event>
+                                <event name="OnMouseWheel"></event>
+                                <event name="OnPaint"></event>
+                                <event name="OnRightDClick"></event>
+                                <event name="OnRightDown"></event>
+                                <event name="OnRightUp"></event>
+                                <event name="OnSetFocus"></event>
+                                <event name="OnSize"></event>
+                                <event name="OnUpdateUI"></event>
+                            </object>
+                        </object>
+                        <object class="sizeritem" expanded="0">
+                            <property name="border">5</property>
+                            <property name="flag">wxALL|wxALIGN_CENTER_VERTICAL</property>
+                            <property name="proportion">0</property>
+                            <object class="wxStaticText" expanded="0">
+                                <property name="BottomDockable">1</property>
+                                <property name="LeftDockable">1</property>
+                                <property name="RightDockable">1</property>
+                                <property name="TopDockable">1</property>
+                                <property name="aui_layer"></property>
+                                <property name="aui_name"></property>
+                                <property name="aui_position"></property>
+                                <property name="aui_row"></property>
+                                <property name="best_size"></property>
+                                <property name="bg"></property>
+                                <property name="caption"></property>
+                                <property name="caption_visible">1</property>
+                                <property name="center_pane">0</property>
+                                <property name="close_button">1</property>
+                                <property name="context_help"></property>
+                                <property name="context_menu">1</property>
+                                <property name="default_pane">0</property>
+                                <property name="dock">Dock</property>
+                                <property name="dock_fixed">0</property>
+                                <property name="docking">Left</property>
+                                <property name="enabled">1</property>
+                                <property name="fg"></property>
+                                <property name="floatable">1</property>
+                                <property name="font"></property>
+                                <property name="gripper">0</property>
+                                <property name="hidden">0</property>
+                                <property name="id">wxID_ANY</property>
+                                <property name="label">Angle</property>
+                                <property name="max_size"></property>
+                                <property name="maximize_button">0</property>
+                                <property name="maximum_size"></property>
+                                <property name="min_size"></property>
+                                <property name="minimize_button">0</property>
+                                <property name="minimum_size"></property>
+                                <property name="moveable">1</property>
+                                <property name="name">m_staticTextAngle</property>
+                                <property name="pane_border">1</property>
+                                <property name="pane_position"></property>
+                                <property name="pane_size"></property>
+                                <property name="permission">protected</property>
+                                <property name="pin_button">1</property>
+                                <property name="pos"></property>
+                                <property name="resize">Resizable</property>
+                                <property name="show">1</property>
+                                <property name="size"></property>
+                                <property name="style"></property>
+                                <property name="subclass"></property>
+                                <property name="toolbar_pane">0</property>
+                                <property name="tooltip"></property>
+                                <property name="window_extra_style"></property>
+                                <property name="window_name"></property>
+                                <property name="window_style"></property>
+                                <property name="wrap">-1</property>
+                                <event name="OnChar"></event>
+                                <event name="OnEnterWindow"></event>
+                                <event name="OnEraseBackground"></event>
+                                <event name="OnKeyDown"></event>
+                                <event name="OnKeyUp"></event>
+                                <event name="OnKillFocus"></event>
+                                <event name="OnLeaveWindow"></event>
+                                <event name="OnLeftDClick"></event>
+                                <event name="OnLeftDown"></event>
+                                <event name="OnLeftUp"></event>
+                                <event name="OnMiddleDClick"></event>
+                                <event name="OnMiddleDown"></event>
+                                <event name="OnMiddleUp"></event>
+                                <event name="OnMotion"></event>
+                                <event name="OnMouseEvents"></event>
+                                <event name="OnMouseWheel"></event>
+                                <event name="OnPaint"></event>
+                                <event name="OnRightDClick"></event>
+                                <event name="OnRightDown"></event>
+                                <event name="OnRightUp"></event>
+                                <event name="OnSetFocus"></event>
+                                <event name="OnSize"></event>
+                                <event name="OnUpdateUI"></event>
+                            </object>
+                        </object>
+                        <object class="sizeritem" expanded="0">
+                            <property name="border">5</property>
+                            <property name="flag">wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND</property>
+                            <property name="proportion">0</property>
+                            <object class="wxTextCtrl" expanded="0">
+                                <property name="BottomDockable">1</property>
+                                <property name="LeftDockable">1</property>
+                                <property name="RightDockable">1</property>
+                                <property name="TopDockable">1</property>
+                                <property name="aui_layer"></property>
+                                <property name="aui_name"></property>
+                                <property name="aui_position"></property>
+                                <property name="aui_row"></property>
+                                <property name="best_size"></property>
+                                <property name="bg"></property>
+                                <property name="caption"></property>
+                                <property name="caption_visible">1</property>
+                                <property name="center_pane">0</property>
+                                <property name="close_button">1</property>
+                                <property name="context_help"></property>
+                                <property name="context_menu">1</property>
+                                <property name="default_pane">0</property>
+                                <property name="dock">Dock</property>
+                                <property name="dock_fixed">0</property>
+                                <property name="docking">Left</property>
+                                <property name="enabled">1</property>
+                                <property name="fg"></property>
+                                <property name="floatable">1</property>
+                                <property name="font"></property>
+                                <property name="gripper">0</property>
+                                <property name="hidden">0</property>
+                                <property name="id">wxID_ANY</property>
+                                <property name="max_size"></property>
+                                <property name="maximize_button">0</property>
+                                <property name="maximum_size"></property>
+                                <property name="maxlength">0</property>
+                                <property name="min_size"></property>
+                                <property name="minimize_button">0</property>
+                                <property name="minimum_size"></property>
+                                <property name="moveable">1</property>
+                                <property name="name">m_textCtrAngle</property>
+                                <property name="pane_border">1</property>
+                                <property name="pane_position"></property>
+                                <property name="pane_size"></property>
+                                <property name="permission">protected</property>
+                                <property name="pin_button">1</property>
+                                <property name="pos"></property>
+                                <property name="resize">Resizable</property>
+                                <property name="show">1</property>
+                                <property name="size"></property>
+                                <property name="style"></property>
+                                <property name="subclass"></property>
+                                <property name="toolbar_pane">0</property>
+                                <property name="tooltip"></property>
+                                <property name="validator_data_type"></property>
+                                <property name="validator_style">wxFILTER_NONE</property>
+                                <property name="validator_type">wxDefaultValidator</property>
+                                <property name="validator_variable"></property>
+                                <property name="value"></property>
+                                <property name="window_extra_style"></property>
+                                <property name="window_name"></property>
+                                <property name="window_style"></property>
+                                <event name="OnChar"></event>
+                                <event name="OnEnterWindow"></event>
+                                <event name="OnEraseBackground"></event>
+                                <event name="OnKeyDown"></event>
+                                <event name="OnKeyUp"></event>
+                                <event name="OnKillFocus"></event>
+                                <event name="OnLeaveWindow"></event>
+                                <event name="OnLeftDClick"></event>
+                                <event name="OnLeftDown"></event>
+                                <event name="OnLeftUp"></event>
+                                <event name="OnMiddleDClick"></event>
+                                <event name="OnMiddleDown"></event>
+                                <event name="OnMiddleUp"></event>
+                                <event name="OnMotion"></event>
+                                <event name="OnMouseEvents"></event>
+                                <event name="OnMouseWheel"></event>
+                                <event name="OnPaint"></event>
+                                <event name="OnRightDClick"></event>
+                                <event name="OnRightDown"></event>
+                                <event name="OnRightUp"></event>
+                                <event name="OnSetFocus"></event>
+                                <event name="OnSize"></event>
+                                <event name="OnText"></event>
+                                <event name="OnTextEnter"></event>
+                                <event name="OnTextMaxLen"></event>
+                                <event name="OnTextURL"></event>
+                                <event name="OnUpdateUI"></event>
+                            </object>
+                        </object>
+                        <object class="sizeritem" expanded="0">
+                            <property name="border">5</property>
+                            <property name="flag">wxALL|wxALIGN_CENTER_VERTICAL</property>
+                            <property name="proportion">0</property>
+                            <object class="wxStaticText" expanded="0">
+                                <property name="BottomDockable">1</property>
+                                <property name="LeftDockable">1</property>
+                                <property name="RightDockable">1</property>
+                                <property name="TopDockable">1</property>
+                                <property name="aui_layer"></property>
+                                <property name="aui_name"></property>
+                                <property name="aui_position"></property>
+                                <property name="aui_row"></property>
+                                <property name="best_size"></property>
+                                <property name="bg"></property>
+                                <property name="caption"></property>
+                                <property name="caption_visible">1</property>
+                                <property name="center_pane">0</property>
+                                <property name="close_button">1</property>
+                                <property name="context_help"></property>
+                                <property name="context_menu">1</property>
+                                <property name="default_pane">0</property>
+                                <property name="dock">Dock</property>
+                                <property name="dock_fixed">0</property>
+                                <property name="docking">Left</property>
+                                <property name="enabled">1</property>
+                                <property name="fg"></property>
+                                <property name="floatable">1</property>
+                                <property name="font"></property>
+                                <property name="gripper">0</property>
+                                <property name="hidden">0</property>
+                                <property name="id">wxID_ANY</property>
+                                <property name="label">degree</property>
+                                <property name="max_size"></property>
+                                <property name="maximize_button">0</property>
+                                <property name="maximum_size"></property>
+                                <property name="min_size"></property>
+                                <property name="minimize_button">0</property>
+                                <property name="minimum_size"></property>
+                                <property name="moveable">1</property>
+                                <property name="name">m_staticTextAngleUnit</property>
+                                <property name="pane_border">1</property>
+                                <property name="pane_position"></property>
+                                <property name="pane_size"></property>
+                                <property name="permission">protected</property>
+                                <property name="pin_button">1</property>
+                                <property name="pos"></property>
+                                <property name="resize">Resizable</property>
+                                <property name="show">1</property>
+                                <property name="size"></property>
+                                <property name="style"></property>
+                                <property name="subclass"></property>
+                                <property name="toolbar_pane">0</property>
+                                <property name="tooltip"></property>
+                                <property name="window_extra_style"></property>
+                                <property name="window_name"></property>
+                                <property name="window_style"></property>
+                                <property name="wrap">-1</property>
+                                <event name="OnChar"></event>
+                                <event name="OnEnterWindow"></event>
+                                <event name="OnEraseBackground"></event>
+                                <event name="OnKeyDown"></event>
+                                <event name="OnKeyUp"></event>
+                                <event name="OnKillFocus"></event>
+                                <event name="OnLeaveWindow"></event>
+                                <event name="OnLeftDClick"></event>
+                                <event name="OnLeftDown"></event>
+                                <event name="OnLeftUp"></event>
+                                <event name="OnMiddleDClick"></event>
+                                <event name="OnMiddleDown"></event>
+                                <event name="OnMiddleUp"></event>
+                                <event name="OnMotion"></event>
+                                <event name="OnMouseEvents"></event>
+                                <event name="OnMouseWheel"></event>
+                                <event name="OnPaint"></event>
+                                <event name="OnRightDClick"></event>
+                                <event name="OnRightDown"></event>
+                                <event name="OnRightUp"></event>
+                                <event name="OnSetFocus"></event>
+                                <event name="OnSize"></event>
+                                <event name="OnUpdateUI"></event>
+                            </object>
+                        </object>
+                        <object class="sizeritem" expanded="0">
+                            <property name="border">5</property>
+                            <property name="flag">wxEXPAND</property>
+                            <property name="proportion">1</property>
+                            <object class="spacer" expanded="0">
+                                <property name="height">0</property>
+                                <property name="permission">protected</property>
+                                <property name="width">0</property>
+                            </object>
+                        </object>
+                        <object class="sizeritem" expanded="0">
+                            <property name="border">5</property>
+                            <property name="flag">wxALL|wxALIGN_CENTER_VERTICAL</property>
+                            <property name="proportion">0</property>
+                            <object class="wxStaticText" expanded="0">
+                                <property name="BottomDockable">1</property>
+                                <property name="LeftDockable">1</property>
+                                <property name="RightDockable">1</property>
+                                <property name="TopDockable">1</property>
+                                <property name="aui_layer"></property>
+                                <property name="aui_name"></property>
+                                <property name="aui_position"></property>
+                                <property name="aui_row"></property>
+                                <property name="best_size"></property>
+                                <property name="bg"></property>
+                                <property name="caption"></property>
+                                <property name="caption_visible">1</property>
+                                <property name="center_pane">0</property>
+                                <property name="close_button">1</property>
+                                <property name="context_help"></property>
+                                <property name="context_menu">1</property>
+                                <property name="default_pane">0</property>
+                                <property name="dock">Dock</property>
+                                <property name="dock_fixed">0</property>
+                                <property name="docking">Left</property>
+                                <property name="enabled">1</property>
+                                <property name="fg"></property>
+                                <property name="floatable">1</property>
+                                <property name="font"></property>
+                                <property name="gripper">0</property>
+                                <property name="hidden">0</property>
+                                <property name="id">wxID_ANY</property>
+                                <property name="label">Thickness</property>
+                                <property name="max_size"></property>
+                                <property name="maximize_button">0</property>
+                                <property name="maximum_size"></property>
+                                <property name="min_size"></property>
+                                <property name="minimize_button">0</property>
+                                <property name="minimum_size"></property>
+                                <property name="moveable">1</property>
+                                <property name="name">m_staticTextThickness</property>
+                                <property name="pane_border">1</property>
+                                <property name="pane_position"></property>
+                                <property name="pane_size"></property>
+                                <property name="permission">protected</property>
+                                <property name="pin_button">1</property>
+                                <property name="pos"></property>
+                                <property name="resize">Resizable</property>
+                                <property name="show">1</property>
+                                <property name="size"></property>
+                                <property name="style"></property>
+                                <property name="subclass"></property>
+                                <property name="toolbar_pane">0</property>
+                                <property name="tooltip"></property>
+                                <property name="window_extra_style"></property>
+                                <property name="window_name"></property>
+                                <property name="window_style"></property>
+                                <property name="wrap">-1</property>
+                                <event name="OnChar"></event>
+                                <event name="OnEnterWindow"></event>
+                                <event name="OnEraseBackground"></event>
+                                <event name="OnKeyDown"></event>
+                                <event name="OnKeyUp"></event>
+                                <event name="OnKillFocus"></event>
+                                <event name="OnLeaveWindow"></event>
+                                <event name="OnLeftDClick"></event>
+                                <event name="OnLeftDown"></event>
+                                <event name="OnLeftUp"></event>
+                                <event name="OnMiddleDClick"></event>
+                                <event name="OnMiddleDown"></event>
+                                <event name="OnMiddleUp"></event>
+                                <event name="OnMotion"></event>
+                                <event name="OnMouseEvents"></event>
+                                <event name="OnMouseWheel"></event>
+                                <event name="OnPaint"></event>
+                                <event name="OnRightDClick"></event>
+                                <event name="OnRightDown"></event>
+                                <event name="OnRightUp"></event>
+                                <event name="OnSetFocus"></event>
+                                <event name="OnSize"></event>
+                                <event name="OnUpdateUI"></event>
+                            </object>
+                        </object>
+                        <object class="sizeritem" expanded="0">
+                            <property name="border">5</property>
+                            <property name="flag">wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND</property>
+                            <property name="proportion">0</property>
+                            <object class="wxTextCtrl" expanded="0">
+                                <property name="BottomDockable">1</property>
+                                <property name="LeftDockable">1</property>
+                                <property name="RightDockable">1</property>
+                                <property name="TopDockable">1</property>
+                                <property name="aui_layer"></property>
+                                <property name="aui_name"></property>
+                                <property name="aui_position"></property>
+                                <property name="aui_row"></property>
+                                <property name="best_size"></property>
+                                <property name="bg"></property>
+                                <property name="caption"></property>
+                                <property name="caption_visible">1</property>
+                                <property name="center_pane">0</property>
+                                <property name="close_button">1</property>
+                                <property name="context_help"></property>
+                                <property name="context_menu">1</property>
+                                <property name="default_pane">0</property>
+                                <property name="dock">Dock</property>
+                                <property name="dock_fixed">0</property>
+                                <property name="docking">Left</property>
+                                <property name="enabled">1</property>
+                                <property name="fg"></property>
+                                <property name="floatable">1</property>
+                                <property name="font"></property>
+                                <property name="gripper">0</property>
+                                <property name="hidden">0</property>
+                                <property name="id">wxID_ANY</property>
+                                <property name="max_size"></property>
+                                <property name="maximize_button">0</property>
+                                <property name="maximum_size"></property>
+                                <property name="maxlength">0</property>
+                                <property name="min_size"></property>
+                                <property name="minimize_button">0</property>
+                                <property name="minimum_size"></property>
+                                <property name="moveable">1</property>
+                                <property name="name">m_textCtrlThickness</property>
+                                <property name="pane_border">1</property>
+                                <property name="pane_position"></property>
+                                <property name="pane_size"></property>
+                                <property name="permission">protected</property>
+                                <property name="pin_button">1</property>
+                                <property name="pos"></property>
+                                <property name="resize">Resizable</property>
+                                <property name="show">1</property>
+                                <property name="size"></property>
+                                <property name="style"></property>
+                                <property name="subclass"></property>
+                                <property name="toolbar_pane">0</property>
+                                <property name="tooltip"></property>
+                                <property name="validator_data_type"></property>
+                                <property name="validator_style">wxFILTER_NONE</property>
+                                <property name="validator_type">wxDefaultValidator</property>
+                                <property name="validator_variable"></property>
+                                <property name="value"></property>
+                                <property name="window_extra_style"></property>
+                                <property name="window_name"></property>
+                                <property name="window_style"></property>
+                                <event name="OnChar"></event>
+                                <event name="OnEnterWindow"></event>
+                                <event name="OnEraseBackground"></event>
+                                <event name="OnKeyDown"></event>
+                                <event name="OnKeyUp"></event>
+                                <event name="OnKillFocus"></event>
+                                <event name="OnLeaveWindow"></event>
+                                <event name="OnLeftDClick"></event>
+                                <event name="OnLeftDown"></event>
+                                <event name="OnLeftUp"></event>
+                                <event name="OnMiddleDClick"></event>
+                                <event name="OnMiddleDown"></event>
+                                <event name="OnMiddleUp"></event>
+                                <event name="OnMotion"></event>
+                                <event name="OnMouseEvents"></event>
+                                <event name="OnMouseWheel"></event>
+                                <event name="OnPaint"></event>
+                                <event name="OnRightDClick"></event>
+                                <event name="OnRightDown"></event>
+                                <event name="OnRightUp"></event>
+                                <event name="OnSetFocus"></event>
+                                <event name="OnSize"></event>
+                                <event name="OnText"></event>
+                                <event name="OnTextEnter"></event>
+                                <event name="OnTextMaxLen"></event>
+                                <event name="OnTextURL"></event>
+                                <event name="OnUpdateUI"></event>
+                            </object>
+                        </object>
+                        <object class="sizeritem" expanded="0">
+                            <property name="border">5</property>
+                            <property name="flag">wxALL|wxALIGN_CENTER_VERTICAL</property>
+                            <property name="proportion">0</property>
+                            <object class="wxStaticText" expanded="0">
+                                <property name="BottomDockable">1</property>
+                                <property name="LeftDockable">1</property>
+                                <property name="RightDockable">1</property>
+                                <property name="TopDockable">1</property>
+                                <property name="aui_layer"></property>
+                                <property name="aui_name"></property>
+                                <property name="aui_position"></property>
+                                <property name="aui_row"></property>
+                                <property name="best_size"></property>
+                                <property name="bg"></property>
+                                <property name="caption"></property>
+                                <property name="caption_visible">1</property>
+                                <property name="center_pane">0</property>
+                                <property name="close_button">1</property>
+                                <property name="context_help"></property>
+                                <property name="context_menu">1</property>
+                                <property name="default_pane">0</property>
+                                <property name="dock">Dock</property>
+                                <property name="dock_fixed">0</property>
+                                <property name="docking">Left</property>
+                                <property name="enabled">1</property>
+                                <property name="fg"></property>
+                                <property name="floatable">1</property>
+                                <property name="font"></property>
+                                <property name="gripper">0</property>
+                                <property name="hidden">0</property>
+                                <property name="id">wxID_ANY</property>
+                                <property name="label">unit</property>
+                                <property name="max_size"></property>
+                                <property name="maximize_button">0</property>
+                                <property name="maximum_size"></property>
+                                <property name="min_size"></property>
+                                <property name="minimize_button">0</property>
+                                <property name="minimum_size"></property>
+                                <property name="moveable">1</property>
+                                <property name="name">m_staticTextThicknessUnit</property>
+                                <property name="pane_border">1</property>
+                                <property name="pane_position"></property>
+                                <property name="pane_size"></property>
+                                <property name="permission">protected</property>
+                                <property name="pin_button">1</property>
+                                <property name="pos"></property>
+                                <property name="resize">Resizable</property>
+                                <property name="show">1</property>
+                                <property name="size"></property>
+                                <property name="style"></property>
+                                <property name="subclass"></property>
+                                <property name="toolbar_pane">0</property>
+                                <property name="tooltip"></property>
+                                <property name="window_extra_style"></property>
+                                <property name="window_name"></property>
+                                <property name="window_style"></property>
+                                <property name="wrap">-1</property>
+                                <event name="OnChar"></event>
+                                <event name="OnEnterWindow"></event>
+                                <event name="OnEraseBackground"></event>
+                                <event name="OnKeyDown"></event>
+                                <event name="OnKeyUp"></event>
+                                <event name="OnKillFocus"></event>
+                                <event name="OnLeaveWindow"></event>
+                                <event name="OnLeftDClick"></event>
+                                <event name="OnLeftDown"></event>
+                                <event name="OnLeftUp"></event>
+                                <event name="OnMiddleDClick"></event>
+                                <event name="OnMiddleDown"></event>
+                                <event name="OnMiddleUp"></event>
+                                <event name="OnMotion"></event>
+                                <event name="OnMouseEvents"></event>
+                                <event name="OnMouseWheel"></event>
+                                <event name="OnPaint"></event>
+                                <event name="OnRightDClick"></event>
+                                <event name="OnRightDown"></event>
+                                <event name="OnRightUp"></event>
+                                <event name="OnSetFocus"></event>
+                                <event name="OnSize"></event>
+                                <event name="OnUpdateUI"></event>
+                            </object>
+                        </object>
+                        <object class="sizeritem" expanded="0">
+                            <property name="border">5</property>
+                            <property name="flag">wxEXPAND</property>
+                            <property name="proportion">1</property>
+                            <object class="spacer" expanded="0">
+                                <property name="height">0</property>
+                                <property name="permission">protected</property>
+                                <property name="width">0</property>
+                            </object>
+                        </object>
+                    </object>
+                </object>
+                <object class="sizeritem" expanded="0">
+                    <property name="border">5</property>
+                    <property name="flag">wxEXPAND | wxALL</property>
+                    <property name="proportion">0</property>
+                    <object class="wxStaticLine" expanded="0">
+                        <property name="BottomDockable">1</property>
+                        <property name="LeftDockable">1</property>
+                        <property name="RightDockable">1</property>
+                        <property name="TopDockable">1</property>
+                        <property name="aui_layer"></property>
+                        <property name="aui_name"></property>
+                        <property name="aui_position"></property>
+                        <property name="aui_row"></property>
+                        <property name="best_size"></property>
+                        <property name="bg"></property>
+                        <property name="caption"></property>
+                        <property name="caption_visible">1</property>
+                        <property name="center_pane">0</property>
+                        <property name="close_button">1</property>
+                        <property name="context_help"></property>
+                        <property name="context_menu">1</property>
+                        <property name="default_pane">0</property>
+                        <property name="dock">Dock</property>
+                        <property name="dock_fixed">0</property>
+                        <property name="docking">Left</property>
+                        <property name="enabled">1</property>
+                        <property name="fg"></property>
+                        <property name="floatable">1</property>
+                        <property name="font"></property>
+                        <property name="gripper">0</property>
+                        <property name="hidden">0</property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="max_size"></property>
+                        <property name="maximize_button">0</property>
+                        <property name="maximum_size"></property>
+                        <property name="min_size"></property>
+                        <property name="minimize_button">0</property>
+                        <property name="minimum_size"></property>
+                        <property name="moveable">1</property>
+                        <property name="name">m_staticline1</property>
+                        <property name="pane_border">1</property>
+                        <property name="pane_position"></property>
+                        <property name="pane_size"></property>
+                        <property name="permission">protected</property>
+                        <property name="pin_button">1</property>
+                        <property name="pos"></property>
+                        <property name="resize">Resizable</property>
+                        <property name="show">1</property>
+                        <property name="size"></property>
+                        <property name="style">wxLI_HORIZONTAL</property>
+                        <property name="subclass"></property>
+                        <property name="toolbar_pane">0</property>
+                        <property name="tooltip"></property>
+                        <property name="window_extra_style"></property>
+                        <property name="window_name"></property>
+                        <property name="window_style"></property>
+                        <event name="OnChar"></event>
+                        <event name="OnEnterWindow"></event>
+                        <event name="OnEraseBackground"></event>
+                        <event name="OnKeyDown"></event>
+                        <event name="OnKeyUp"></event>
+                        <event name="OnKillFocus"></event>
+                        <event name="OnLeaveWindow"></event>
+                        <event name="OnLeftDClick"></event>
+                        <event name="OnLeftDown"></event>
+                        <event name="OnLeftUp"></event>
+                        <event name="OnMiddleDClick"></event>
+                        <event name="OnMiddleDown"></event>
+                        <event name="OnMiddleUp"></event>
+                        <event name="OnMotion"></event>
+                        <event name="OnMouseEvents"></event>
+                        <event name="OnMouseWheel"></event>
+                        <event name="OnPaint"></event>
+                        <event name="OnRightDClick"></event>
+                        <event name="OnRightDown"></event>
+                        <event name="OnRightUp"></event>
+                        <event name="OnSetFocus"></event>
+                        <event name="OnSize"></event>
+                        <event name="OnUpdateUI"></event>
+                    </object>
+                </object>
+                <object class="sizeritem" expanded="0">
+                    <property name="border">5</property>
+                    <property name="flag">wxALIGN_RIGHT|wxALL</property>
+                    <property name="proportion">0</property>
+                    <object class="wxStdDialogButtonSizer" expanded="0">
+                        <property name="Apply">0</property>
+                        <property name="Cancel">1</property>
+                        <property name="ContextHelp">0</property>
+                        <property name="Help">0</property>
+                        <property name="No">0</property>
+                        <property name="OK">1</property>
+                        <property name="Save">0</property>
+                        <property name="Yes">0</property>
+                        <property name="minimum_size"></property>
+                        <property name="name">m_sdbSizer</property>
+                        <property name="permission">protected</property>
+                        <event name="OnApplyButtonClick"></event>
+                        <event name="OnCancelButtonClick"></event>
+                        <event name="OnContextHelpButtonClick"></event>
+                        <event name="OnHelpButtonClick"></event>
+                        <event name="OnNoButtonClick"></event>
+                        <event name="OnOKButtonClick"></event>
+                        <event name="OnSaveButtonClick"></event>
+                        <event name="OnYesButtonClick"></event>
+                    </object>
+                </object>
+            </object>
+        </object>
+        <object class="Dialog" expanded="0">
+            <property name="aui_managed">0</property>
+            <property name="aui_manager_style">wxAUI_MGR_DEFAULT</property>
+            <property name="bg"></property>
+            <property name="center">wxBOTH</property>
+            <property name="context_help"></property>
+            <property name="context_menu">1</property>
+            <property name="enabled">1</property>
+            <property name="event_handler">impl_virtual</property>
+            <property name="extra_style"></property>
+            <property name="fg"></property>
+            <property name="font"></property>
+            <property name="hidden">0</property>
+            <property name="id">wxID_ANY</property>
+            <property name="maximum_size"></property>
+            <property name="minimum_size"></property>
+            <property name="name">DIALOG_PAD_BASICSHAPES_TRANSFORM_BASE</property>
+            <property name="pos"></property>
+            <property name="size">398,203</property>
+            <property name="style">wxDEFAULT_DIALOG_STYLE</property>
+            <property name="subclass">DIALOG_SHIM; </property>
+            <property name="title">Pad Custom Shape Geometry Transform</property>
+            <property name="tooltip"></property>
+            <property name="window_extra_style"></property>
+            <property name="window_name"></property>
+            <property name="window_style"></property>
+            <event name="OnActivate"></event>
+            <event name="OnActivateApp"></event>
+            <event name="OnAuiFindManager"></event>
+            <event name="OnAuiPaneButton"></event>
+            <event name="OnAuiPaneClose"></event>
+            <event name="OnAuiPaneMaximize"></event>
+            <event name="OnAuiPaneRestore"></event>
+            <event name="OnAuiRender"></event>
+            <event name="OnChar"></event>
+            <event name="OnClose"></event>
+            <event name="OnEnterWindow"></event>
+            <event name="OnEraseBackground"></event>
+            <event name="OnHibernate"></event>
+            <event name="OnIconize"></event>
+            <event name="OnIdle"></event>
+            <event name="OnInitDialog"></event>
+            <event name="OnKeyDown"></event>
+            <event name="OnKeyUp"></event>
+            <event name="OnKillFocus"></event>
+            <event name="OnLeaveWindow"></event>
+            <event name="OnLeftDClick"></event>
+            <event name="OnLeftDown"></event>
+            <event name="OnLeftUp"></event>
+            <event name="OnMiddleDClick"></event>
+            <event name="OnMiddleDown"></event>
+            <event name="OnMiddleUp"></event>
+            <event name="OnMotion"></event>
+            <event name="OnMouseEvents"></event>
+            <event name="OnMouseWheel"></event>
+            <event name="OnPaint"></event>
+            <event name="OnRightDClick"></event>
+            <event name="OnRightDown"></event>
+            <event name="OnRightUp"></event>
+            <event name="OnSetFocus"></event>
+            <event name="OnSize"></event>
+            <event name="OnUpdateUI"></event>
+            <object class="wxBoxSizer" expanded="0">
+                <property name="minimum_size"></property>
+                <property name="name">bSizermain</property>
+                <property name="orient">wxVERTICAL</property>
+                <property name="permission">none</property>
+                <object class="sizeritem" expanded="0">
+                    <property name="border">5</property>
+                    <property name="flag">wxEXPAND</property>
+                    <property name="proportion">1</property>
+                    <object class="wxFlexGridSizer" expanded="0">
+                        <property name="cols">4</property>
+                        <property name="flexible_direction">wxBOTH</property>
+                        <property name="growablecols">1,2</property>
+                        <property name="growablerows"></property>
+                        <property name="hgap">0</property>
+                        <property name="minimum_size"></property>
+                        <property name="name">fgSizerShapeProperties</property>
+                        <property name="non_flexible_grow_mode">wxFLEX_GROWMODE_SPECIFIED</property>
+                        <property name="permission">none</property>
+                        <property name="rows">0</property>
+                        <property name="vgap">0</property>
+                        <object class="sizeritem" expanded="0">
+                            <property name="border">5</property>
+                            <property name="flag">wxALL|wxALIGN_CENTER_VERTICAL</property>
+                            <property name="proportion">0</property>
+                            <object class="wxStaticText" expanded="0">
+                                <property name="BottomDockable">1</property>
+                                <property name="LeftDockable">1</property>
+                                <property name="RightDockable">1</property>
+                                <property name="TopDockable">1</property>
+                                <property name="aui_layer"></property>
+                                <property name="aui_name"></property>
+                                <property name="aui_position"></property>
+                                <property name="aui_row"></property>
+                                <property name="best_size"></property>
+                                <property name="bg"></property>
+                                <property name="caption"></property>
+                                <property name="caption_visible">1</property>
+                                <property name="center_pane">0</property>
+                                <property name="close_button">1</property>
+                                <property name="context_help"></property>
+                                <property name="context_menu">1</property>
+                                <property name="default_pane">0</property>
+                                <property name="dock">Dock</property>
+                                <property name="dock_fixed">0</property>
+                                <property name="docking">Left</property>
+                                <property name="enabled">1</property>
+                                <property name="fg"></property>
+                                <property name="floatable">1</property>
+                                <property name="font"></property>
+                                <property name="gripper">0</property>
+                                <property name="hidden">0</property>
+                                <property name="id">wxID_ANY</property>
+                                <property name="label">Move vector X,Y</property>
+                                <property name="max_size"></property>
+                                <property name="maximize_button">0</property>
+                                <property name="maximum_size"></property>
+                                <property name="min_size"></property>
+                                <property name="minimize_button">0</property>
+                                <property name="minimum_size"></property>
+                                <property name="moveable">1</property>
+                                <property name="name">m_staticTextMove</property>
+                                <property name="pane_border">1</property>
+                                <property name="pane_position"></property>
+                                <property name="pane_size"></property>
+                                <property name="permission">protected</property>
+                                <property name="pin_button">1</property>
+                                <property name="pos"></property>
+                                <property name="resize">Resizable</property>
+                                <property name="show">1</property>
+                                <property name="size"></property>
+                                <property name="style"></property>
+                                <property name="subclass"></property>
+                                <property name="toolbar_pane">0</property>
+                                <property name="tooltip"></property>
+                                <property name="window_extra_style"></property>
+                                <property name="window_name"></property>
+                                <property name="window_style"></property>
+                                <property name="wrap">-1</property>
+                                <event name="OnChar"></event>
+                                <event name="OnEnterWindow"></event>
+                                <event name="OnEraseBackground"></event>
+                                <event name="OnKeyDown"></event>
+                                <event name="OnKeyUp"></event>
+                                <event name="OnKillFocus"></event>
+                                <event name="OnLeaveWindow"></event>
+                                <event name="OnLeftDClick"></event>
+                                <event name="OnLeftDown"></event>
+                                <event name="OnLeftUp"></event>
+                                <event name="OnMiddleDClick"></event>
+                                <event name="OnMiddleDown"></event>
+                                <event name="OnMiddleUp"></event>
+                                <event name="OnMotion"></event>
+                                <event name="OnMouseEvents"></event>
+                                <event name="OnMouseWheel"></event>
+                                <event name="OnPaint"></event>
+                                <event name="OnRightDClick"></event>
+                                <event name="OnRightDown"></event>
+                                <event name="OnRightUp"></event>
+                                <event name="OnSetFocus"></event>
+                                <event name="OnSize"></event>
+                                <event name="OnUpdateUI"></event>
+                            </object>
+                        </object>
+                        <object class="sizeritem" expanded="0">
+                            <property name="border">5</property>
+                            <property name="flag">wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND</property>
+                            <property name="proportion">0</property>
+                            <object class="wxTextCtrl" expanded="0">
+                                <property name="BottomDockable">1</property>
+                                <property name="LeftDockable">1</property>
+                                <property name="RightDockable">1</property>
+                                <property name="TopDockable">1</property>
+                                <property name="aui_layer"></property>
+                                <property name="aui_name"></property>
+                                <property name="aui_position"></property>
+                                <property name="aui_row"></property>
+                                <property name="best_size"></property>
+                                <property name="bg"></property>
+                                <property name="caption"></property>
+                                <property name="caption_visible">1</property>
+                                <property name="center_pane">0</property>
+                                <property name="close_button">1</property>
+                                <property name="context_help"></property>
+                                <property name="context_menu">1</property>
+                                <property name="default_pane">0</property>
+                                <property name="dock">Dock</property>
+                                <property name="dock_fixed">0</property>
+                                <property name="docking">Left</property>
+                                <property name="enabled">1</property>
+                                <property name="fg"></property>
+                                <property name="floatable">1</property>
+                                <property name="font"></property>
+                                <property name="gripper">0</property>
+                                <property name="hidden">0</property>
+                                <property name="id">wxID_ANY</property>
+                                <property name="max_size"></property>
+                                <property name="maximize_button">0</property>
+                                <property name="maximum_size"></property>
+                                <property name="maxlength">0</property>
+                                <property name="min_size"></property>
+                                <property name="minimize_button">0</property>
+                                <property name="minimum_size"></property>
+                                <property name="moveable">1</property>
+                                <property name="name">m_textCtrMoveX</property>
+                                <property name="pane_border">1</property>
+                                <property name="pane_position"></property>
+                                <property name="pane_size"></property>
+                                <property name="permission">protected</property>
+                                <property name="pin_button">1</property>
+                                <property name="pos"></property>
+                                <property name="resize">Resizable</property>
+                                <property name="show">1</property>
+                                <property name="size"></property>
+                                <property name="style"></property>
+                                <property name="subclass"></property>
+                                <property name="toolbar_pane">0</property>
+                                <property name="tooltip"></property>
+                                <property name="validator_data_type"></property>
+                                <property name="validator_style">wxFILTER_NONE</property>
+                                <property name="validator_type">wxDefaultValidator</property>
+                                <property name="validator_variable"></property>
+                                <property name="value">0</property>
+                                <property name="window_extra_style"></property>
+                                <property name="window_name"></property>
+                                <property name="window_style"></property>
+                                <event name="OnChar"></event>
+                                <event name="OnEnterWindow"></event>
+                                <event name="OnEraseBackground"></event>
+                                <event name="OnKeyDown"></event>
+                                <event name="OnKeyUp"></event>
+                                <event name="OnKillFocus"></event>
+                                <event name="OnLeaveWindow"></event>
+                                <event name="OnLeftDClick"></event>
+                                <event name="OnLeftDown"></event>
+                                <event name="OnLeftUp"></event>
+                                <event name="OnMiddleDClick"></event>
+                                <event name="OnMiddleDown"></event>
+                                <event name="OnMiddleUp"></event>
+                                <event name="OnMotion"></event>
+                                <event name="OnMouseEvents"></event>
+                                <event name="OnMouseWheel"></event>
+                                <event name="OnPaint"></event>
+                                <event name="OnRightDClick"></event>
+                                <event name="OnRightDown"></event>
+                                <event name="OnRightUp"></event>
+                                <event name="OnSetFocus"></event>
+                                <event name="OnSize"></event>
+                                <event name="OnText"></event>
+                                <event name="OnTextEnter"></event>
+                                <event name="OnTextMaxLen"></event>
+                                <event name="OnTextURL"></event>
+                                <event name="OnUpdateUI"></event>
+                            </object>
+                        </object>
+                        <object class="sizeritem" expanded="0">
+                            <property name="border">5</property>
+                            <property name="flag">wxALL|wxEXPAND</property>
+                            <property name="proportion">0</property>
+                            <object class="wxTextCtrl" expanded="0">
+                                <property name="BottomDockable">1</property>
+                                <property name="LeftDockable">1</property>
+                                <property name="RightDockable">1</property>
+                                <property name="TopDockable">1</property>
+                                <property name="aui_layer"></property>
+                                <property name="aui_name"></property>
+                                <property name="aui_position"></property>
+                                <property name="aui_row"></property>
+                                <property name="best_size"></property>
+                                <property name="bg"></property>
+                                <property name="caption"></property>
+                                <property name="caption_visible">1</property>
+                                <property name="center_pane">0</property>
+                                <property name="close_button">1</property>
+                                <property name="context_help"></property>
+                                <property name="context_menu">1</property>
+                                <property name="default_pane">0</property>
+                                <property name="dock">Dock</property>
+                                <property name="dock_fixed">0</property>
+                                <property name="docking">Left</property>
+                                <property name="enabled">1</property>
+                                <property name="fg"></property>
+                                <property name="floatable">1</property>
+                                <property name="font"></property>
+                                <property name="gripper">0</property>
+                                <property name="hidden">0</property>
+                                <property name="id">wxID_ANY</property>
+                                <property name="max_size"></property>
+                                <property name="maximize_button">0</property>
+                                <property name="maximum_size"></property>
+                                <property name="maxlength">0</property>
+                                <property name="min_size"></property>
+                                <property name="minimize_button">0</property>
+                                <property name="minimum_size"></property>
+                                <property name="moveable">1</property>
+                                <property name="name">m_textCtrMoveY</property>
+                                <property name="pane_border">1</property>
+                                <property name="pane_position"></property>
+                                <property name="pane_size"></property>
+                                <property name="permission">protected</property>
+                                <property name="pin_button">1</property>
+                                <property name="pos"></property>
+                                <property name="resize">Resizable</property>
+                                <property name="show">1</property>
+                                <property name="size"></property>
+                                <property name="style"></property>
+                                <property name="subclass"></property>
+                                <property name="toolbar_pane">0</property>
+                                <property name="tooltip"></property>
+                                <property name="validator_data_type"></property>
+                                <property name="validator_style">wxFILTER_NONE</property>
+                                <property name="validator_type">wxDefaultValidator</property>
+                                <property name="validator_variable"></property>
+                                <property name="value">0</property>
+                                <property name="window_extra_style"></property>
+                                <property name="window_name"></property>
+                                <property name="window_style"></property>
+                                <event name="OnChar"></event>
+                                <event name="OnEnterWindow"></event>
+                                <event name="OnEraseBackground"></event>
+                                <event name="OnKeyDown"></event>
+                                <event name="OnKeyUp"></event>
+                                <event name="OnKillFocus"></event>
+                                <event name="OnLeaveWindow"></event>
+                                <event name="OnLeftDClick"></event>
+                                <event name="OnLeftDown"></event>
+                                <event name="OnLeftUp"></event>
+                                <event name="OnMiddleDClick"></event>
+                                <event name="OnMiddleDown"></event>
+                                <event name="OnMiddleUp"></event>
+                                <event name="OnMotion"></event>
+                                <event name="OnMouseEvents"></event>
+                                <event name="OnMouseWheel"></event>
+                                <event name="OnPaint"></event>
+                                <event name="OnRightDClick"></event>
+                                <event name="OnRightDown"></event>
+                                <event name="OnRightUp"></event>
+                                <event name="OnSetFocus"></event>
+                                <event name="OnSize"></event>
+                                <event name="OnText"></event>
+                                <event name="OnTextEnter"></event>
+                                <event name="OnTextMaxLen"></event>
+                                <event name="OnTextURL"></event>
+                                <event name="OnUpdateUI"></event>
+                            </object>
+                        </object>
+                        <object class="sizeritem" expanded="0">
+                            <property name="border">5</property>
+                            <property name="flag">wxALL|wxALIGN_CENTER_VERTICAL</property>
+                            <property name="proportion">0</property>
+                            <object class="wxStaticText" expanded="0">
+                                <property name="BottomDockable">1</property>
+                                <property name="LeftDockable">1</property>
+                                <property name="RightDockable">1</property>
+                                <property name="TopDockable">1</property>
+                                <property name="aui_layer"></property>
+                                <property name="aui_name"></property>
+                                <property name="aui_position"></property>
+                                <property name="aui_row"></property>
+                                <property name="best_size"></property>
+                                <property name="bg"></property>
+                                <property name="caption"></property>
+                                <property name="caption_visible">1</property>
+                                <property name="center_pane">0</property>
+                                <property name="close_button">1</property>
+                                <property name="context_help"></property>
+                                <property name="context_menu">1</property>
+                                <property name="default_pane">0</property>
+                                <property name="dock">Dock</property>
+                                <property name="dock_fixed">0</property>
+                                <property name="docking">Left</property>
+                                <property name="enabled">1</property>
+                                <property name="fg"></property>
+                                <property name="floatable">1</property>
+                                <property name="font"></property>
+                                <property name="gripper">0</property>
+                                <property name="hidden">0</property>
+                                <property name="id">wxID_ANY</property>
+                                <property name="label">unit</property>
+                                <property name="max_size"></property>
+                                <property name="maximize_button">0</property>
+                                <property name="maximum_size"></property>
+                                <property name="min_size"></property>
+                                <property name="minimize_button">0</property>
+                                <property name="minimum_size"></property>
+                                <property name="moveable">1</property>
+                                <property name="name">m_staticTextMoveUnit</property>
+                                <property name="pane_border">1</property>
+                                <property name="pane_position"></property>
+                                <property name="pane_size"></property>
+                                <property name="permission">protected</property>
+                                <property name="pin_button">1</property>
+                                <property name="pos"></property>
+                                <property name="resize">Resizable</property>
+                                <property name="show">1</property>
+                                <property name="size"></property>
+                                <property name="style"></property>
+                                <property name="subclass"></property>
+                                <property name="toolbar_pane">0</property>
+                                <property name="tooltip"></property>
+                                <property name="window_extra_style"></property>
+                                <property name="window_name"></property>
+                                <property name="window_style"></property>
+                                <property name="wrap">-1</property>
+                                <event name="OnChar"></event>
+                                <event name="OnEnterWindow"></event>
+                                <event name="OnEraseBackground"></event>
+                                <event name="OnKeyDown"></event>
+                                <event name="OnKeyUp"></event>
+                                <event name="OnKillFocus"></event>
+                                <event name="OnLeaveWindow"></event>
+                                <event name="OnLeftDClick"></event>
+                                <event name="OnLeftDown"></event>
+                                <event name="OnLeftUp"></event>
+                                <event name="OnMiddleDClick"></event>
+                                <event name="OnMiddleDown"></event>
+                                <event name="OnMiddleUp"></event>
+                                <event name="OnMotion"></event>
+                                <event name="OnMouseEvents"></event>
+                                <event name="OnMouseWheel"></event>
+                                <event name="OnPaint"></event>
+                                <event name="OnRightDClick"></event>
+                                <event name="OnRightDown"></event>
+                                <event name="OnRightUp"></event>
+                                <event name="OnSetFocus"></event>
+                                <event name="OnSize"></event>
+                                <event name="OnUpdateUI"></event>
+                            </object>
+                        </object>
+                        <object class="sizeritem" expanded="0">
+                            <property name="border">5</property>
+                            <property name="flag">wxALL|wxALIGN_CENTER_VERTICAL</property>
+                            <property name="proportion">0</property>
+                            <object class="wxStaticText" expanded="0">
+                                <property name="BottomDockable">1</property>
+                                <property name="LeftDockable">1</property>
+                                <property name="RightDockable">1</property>
+                                <property name="TopDockable">1</property>
+                                <property name="aui_layer"></property>
+                                <property name="aui_name"></property>
+                                <property name="aui_position"></property>
+                                <property name="aui_row"></property>
+                                <property name="best_size"></property>
+                                <property name="bg"></property>
+                                <property name="caption"></property>
+                                <property name="caption_visible">1</property>
+                                <property name="center_pane">0</property>
+                                <property name="close_button">1</property>
+                                <property name="context_help"></property>
+                                <property name="context_menu">1</property>
+                                <property name="default_pane">0</property>
+                                <property name="dock">Dock</property>
+                                <property name="dock_fixed">0</property>
+                                <property name="docking">Left</property>
+                                <property name="enabled">1</property>
+                                <property name="fg"></property>
+                                <property name="floatable">1</property>
+                                <property name="font"></property>
+                                <property name="gripper">0</property>
+                                <property name="hidden">0</property>
+                                <property name="id">wxID_ANY</property>
+                                <property name="label">Rotation</property>
+                                <property name="max_size"></property>
+                                <property name="maximize_button">0</property>
+                                <property name="maximum_size"></property>
+                                <property name="min_size"></property>
+                                <property name="minimize_button">0</property>
+                                <property name="minimum_size"></property>
+                                <property name="moveable">1</property>
+                                <property name="name">m_staticTextAngle</property>
+                                <property name="pane_border">1</property>
+                                <property name="pane_position"></property>
+                                <property name="pane_size"></property>
+                                <property name="permission">protected</property>
+                                <property name="pin_button">1</property>
+                                <property name="pos"></property>
+                                <property name="resize">Resizable</property>
+                                <property name="show">1</property>
+                                <property name="size"></property>
+                                <property name="style"></property>
+                                <property name="subclass"></property>
+                                <property name="toolbar_pane">0</property>
+                                <property name="tooltip"></property>
+                                <property name="window_extra_style"></property>
+                                <property name="window_name"></property>
+                                <property name="window_style"></property>
+                                <property name="wrap">-1</property>
+                                <event name="OnChar"></event>
+                                <event name="OnEnterWindow"></event>
+                                <event name="OnEraseBackground"></event>
+                                <event name="OnKeyDown"></event>
+                                <event name="OnKeyUp"></event>
+                                <event name="OnKillFocus"></event>
+                                <event name="OnLeaveWindow"></event>
+                                <event name="OnLeftDClick"></event>
+                                <event name="OnLeftDown"></event>
+                                <event name="OnLeftUp"></event>
+                                <event name="OnMiddleDClick"></event>
+                                <event name="OnMiddleDown"></event>
+                                <event name="OnMiddleUp"></event>
+                                <event name="OnMotion"></event>
+                                <event name="OnMouseEvents"></event>
+                                <event name="OnMouseWheel"></event>
+                                <event name="OnPaint"></event>
+                                <event name="OnRightDClick"></event>
+                                <event name="OnRightDown"></event>
+                                <event name="OnRightUp"></event>
+                                <event name="OnSetFocus"></event>
+                                <event name="OnSize"></event>
+                                <event name="OnUpdateUI"></event>
+                            </object>
+                        </object>
+                        <object class="sizeritem" expanded="0">
+                            <property name="border">5</property>
+                            <property name="flag">wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND</property>
+                            <property name="proportion">0</property>
+                            <object class="wxTextCtrl" expanded="0">
+                                <property name="BottomDockable">1</property>
+                                <property name="LeftDockable">1</property>
+                                <property name="RightDockable">1</property>
+                                <property name="TopDockable">1</property>
+                                <property name="aui_layer"></property>
+                                <property name="aui_name"></property>
+                                <property name="aui_position"></property>
+                                <property name="aui_row"></property>
+                                <property name="best_size"></property>
+                                <property name="bg"></property>
+                                <property name="caption"></property>
+                                <property name="caption_visible">1</property>
+                                <property name="center_pane">0</property>
+                                <property name="close_button">1</property>
+                                <property name="context_help"></property>
+                                <property name="context_menu">1</property>
+                                <property name="default_pane">0</property>
+                                <property name="dock">Dock</property>
+                                <property name="dock_fixed">0</property>
+                                <property name="docking">Left</property>
+                                <property name="enabled">1</property>
+                                <property name="fg"></property>
+                                <property name="floatable">1</property>
+                                <property name="font"></property>
+                                <property name="gripper">0</property>
+                                <property name="hidden">0</property>
+                                <property name="id">wxID_ANY</property>
+                                <property name="max_size"></property>
+                                <property name="maximize_button">0</property>
+                                <property name="maximum_size"></property>
+                                <property name="maxlength">0</property>
+                                <property name="min_size"></property>
+                                <property name="minimize_button">0</property>
+                                <property name="minimum_size"></property>
+                                <property name="moveable">1</property>
+                                <property name="name">m_textCtrAngle</property>
+                                <property name="pane_border">1</property>
+                                <property name="pane_position"></property>
+                                <property name="pane_size"></property>
+                                <property name="permission">protected</property>
+                                <property name="pin_button">1</property>
+                                <property name="pos"></property>
+                                <property name="resize">Resizable</property>
+                                <property name="show">1</property>
+                                <property name="size"></property>
+                                <property name="style"></property>
+                                <property name="subclass"></property>
+                                <property name="toolbar_pane">0</property>
+                                <property name="tooltip"></property>
+                                <property name="validator_data_type"></property>
+                                <property name="validator_style">wxFILTER_NONE</property>
+                                <property name="validator_type">wxDefaultValidator</property>
+                                <property name="validator_variable"></property>
+                                <property name="value">0</property>
+                                <property name="window_extra_style"></property>
+                                <property name="window_name"></property>
+                                <property name="window_style"></property>
+                                <event name="OnChar"></event>
+                                <event name="OnEnterWindow"></event>
+                                <event name="OnEraseBackground"></event>
+                                <event name="OnKeyDown"></event>
+                                <event name="OnKeyUp"></event>
+                                <event name="OnKillFocus"></event>
+                                <event name="OnLeaveWindow"></event>
+                                <event name="OnLeftDClick"></event>
+                                <event name="OnLeftDown"></event>
+                                <event name="OnLeftUp"></event>
+                                <event name="OnMiddleDClick"></event>
+                                <event name="OnMiddleDown"></event>
+                                <event name="OnMiddleUp"></event>
+                                <event name="OnMotion"></event>
+                                <event name="OnMouseEvents"></event>
+                                <event name="OnMouseWheel"></event>
+                                <event name="OnPaint"></event>
+                                <event name="OnRightDClick"></event>
+                                <event name="OnRightDown"></event>
+                                <event name="OnRightUp"></event>
+                                <event name="OnSetFocus"></event>
+                                <event name="OnSize"></event>
+                                <event name="OnText"></event>
+                                <event name="OnTextEnter"></event>
+                                <event name="OnTextMaxLen"></event>
+                                <event name="OnTextURL"></event>
+                                <event name="OnUpdateUI"></event>
+                            </object>
+                        </object>
+                        <object class="sizeritem" expanded="0">
+                            <property name="border">5</property>
+                            <property name="flag">wxALL|wxALIGN_CENTER_VERTICAL</property>
+                            <property name="proportion">0</property>
+                            <object class="wxStaticText" expanded="0">
+                                <property name="BottomDockable">1</property>
+                                <property name="LeftDockable">1</property>
+                                <property name="RightDockable">1</property>
+                                <property name="TopDockable">1</property>
+                                <property name="aui_layer"></property>
+                                <property name="aui_name"></property>
+                                <property name="aui_position"></property>
+                                <property name="aui_row"></property>
+                                <property name="best_size"></property>
+                                <property name="bg"></property>
+                                <property name="caption"></property>
+                                <property name="caption_visible">1</property>
+                                <property name="center_pane">0</property>
+                                <property name="close_button">1</property>
+                                <property name="context_help"></property>
+                                <property name="context_menu">1</property>
+                                <property name="default_pane">0</property>
+                                <property name="dock">Dock</property>
+                                <property name="dock_fixed">0</property>
+                                <property name="docking">Left</property>
+                                <property name="enabled">1</property>
+                                <property name="fg"></property>
+                                <property name="floatable">1</property>
+                                <property name="font"></property>
+                                <property name="gripper">0</property>
+                                <property name="hidden">0</property>
+                                <property name="id">wxID_ANY</property>
+                                <property name="label">degree</property>
+                                <property name="max_size"></property>
+                                <property name="maximize_button">0</property>
+                                <property name="maximum_size"></property>
+                                <property name="min_size"></property>
+                                <property name="minimize_button">0</property>
+                                <property name="minimum_size"></property>
+                                <property name="moveable">1</property>
+                                <property name="name">m_staticTextAngleUnit</property>
+                                <property name="pane_border">1</property>
+                                <property name="pane_position"></property>
+                                <property name="pane_size"></property>
+                                <property name="permission">protected</property>
+                                <property name="pin_button">1</property>
+                                <property name="pos"></property>
+                                <property name="resize">Resizable</property>
+                                <property name="show">1</property>
+                                <property name="size"></property>
+                                <property name="style"></property>
+                                <property name="subclass"></property>
+                                <property name="toolbar_pane">0</property>
+                                <property name="tooltip"></property>
+                                <property name="window_extra_style"></property>
+                                <property name="window_name"></property>
+                                <property name="window_style"></property>
+                                <property name="wrap">-1</property>
+                                <event name="OnChar"></event>
+                                <event name="OnEnterWindow"></event>
+                                <event name="OnEraseBackground"></event>
+                                <event name="OnKeyDown"></event>
+                                <event name="OnKeyUp"></event>
+                                <event name="OnKillFocus"></event>
+                                <event name="OnLeaveWindow"></event>
+                                <event name="OnLeftDClick"></event>
+                                <event name="OnLeftDown"></event>
+                                <event name="OnLeftUp"></event>
+                                <event name="OnMiddleDClick"></event>
+                                <event name="OnMiddleDown"></event>
+                                <event name="OnMiddleUp"></event>
+                                <event name="OnMotion"></event>
+                                <event name="OnMouseEvents"></event>
+                                <event name="OnMouseWheel"></event>
+                                <event name="OnPaint"></event>
+                                <event name="OnRightDClick"></event>
+                                <event name="OnRightDown"></event>
+                                <event name="OnRightUp"></event>
+                                <event name="OnSetFocus"></event>
+                                <event name="OnSize"></event>
+                                <event name="OnUpdateUI"></event>
+                            </object>
+                        </object>
+                        <object class="sizeritem" expanded="0">
+                            <property name="border">5</property>
+                            <property name="flag">wxEXPAND</property>
+                            <property name="proportion">1</property>
+                            <object class="spacer" expanded="0">
+                                <property name="height">0</property>
+                                <property name="permission">protected</property>
+                                <property name="width">0</property>
+                            </object>
+                        </object>
+                        <object class="sizeritem" expanded="0">
+                            <property name="border">5</property>
+                            <property name="flag">wxALL|wxALIGN_CENTER_VERTICAL</property>
+                            <property name="proportion">0</property>
+                            <object class="wxStaticText" expanded="0">
+                                <property name="BottomDockable">1</property>
+                                <property name="LeftDockable">1</property>
+                                <property name="RightDockable">1</property>
+                                <property name="TopDockable">1</property>
+                                <property name="aui_layer"></property>
+                                <property name="aui_name"></property>
+                                <property name="aui_position"></property>
+                                <property name="aui_row"></property>
+                                <property name="best_size"></property>
+                                <property name="bg"></property>
+                                <property name="caption"></property>
+                                <property name="caption_visible">1</property>
+                                <property name="center_pane">0</property>
+                                <property name="close_button">1</property>
+                                <property name="context_help"></property>
+                                <property name="context_menu">1</property>
+                                <property name="default_pane">0</property>
+                                <property name="dock">Dock</property>
+                                <property name="dock_fixed">0</property>
+                                <property name="docking">Left</property>
+                                <property name="enabled">1</property>
+                                <property name="fg"></property>
+                                <property name="floatable">1</property>
+                                <property name="font"></property>
+                                <property name="gripper">0</property>
+                                <property name="hidden">0</property>
+                                <property name="id">wxID_ANY</property>
+                                <property name="label">Scaling factor</property>
+                                <property name="max_size"></property>
+                                <property name="maximize_button">0</property>
+                                <property name="maximum_size"></property>
+                                <property name="min_size"></property>
+                                <property name="minimize_button">0</property>
+                                <property name="minimum_size"></property>
+                                <property name="moveable">1</property>
+                                <property name="name">m_staticTextSF</property>
+                                <property name="pane_border">1</property>
+                                <property name="pane_position"></property>
+                                <property name="pane_size"></property>
+                                <property name="permission">protected</property>
+                                <property name="pin_button">1</property>
+                                <property name="pos"></property>
+                                <property name="resize">Resizable</property>
+                                <property name="show">1</property>
+                                <property name="size"></property>
+                                <property name="style"></property>
+                                <property name="subclass"></property>
+                                <property name="toolbar_pane">0</property>
+                                <property name="tooltip"></property>
+                                <property name="window_extra_style"></property>
+                                <property name="window_name"></property>
+                                <property name="window_style"></property>
+                                <property name="wrap">-1</property>
+                                <event name="OnChar"></event>
+                                <event name="OnEnterWindow"></event>
+                                <event name="OnEraseBackground"></event>
+                                <event name="OnKeyDown"></event>
+                                <event name="OnKeyUp"></event>
+                                <event name="OnKillFocus"></event>
+                                <event name="OnLeaveWindow"></event>
+                                <event name="OnLeftDClick"></event>
+                                <event name="OnLeftDown"></event>
+                                <event name="OnLeftUp"></event>
+                                <event name="OnMiddleDClick"></event>
+                                <event name="OnMiddleDown"></event>
+                                <event name="OnMiddleUp"></event>
+                                <event name="OnMotion"></event>
+                                <event name="OnMouseEvents"></event>
+                                <event name="OnMouseWheel"></event>
+                                <event name="OnPaint"></event>
+                                <event name="OnRightDClick"></event>
+                                <event name="OnRightDown"></event>
+                                <event name="OnRightUp"></event>
+                                <event name="OnSetFocus"></event>
+                                <event name="OnSize"></event>
+                                <event name="OnUpdateUI"></event>
+                            </object>
+                        </object>
+                        <object class="sizeritem" expanded="0">
+                            <property name="border">5</property>
+                            <property name="flag">wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND</property>
+                            <property name="proportion">0</property>
+                            <object class="wxTextCtrl" expanded="0">
+                                <property name="BottomDockable">1</property>
+                                <property name="LeftDockable">1</property>
+                                <property name="RightDockable">1</property>
+                                <property name="TopDockable">1</property>
+                                <property name="aui_layer"></property>
+                                <property name="aui_name"></property>
+                                <property name="aui_position"></property>
+                                <property name="aui_row"></property>
+                                <property name="best_size"></property>
+                                <property name="bg"></property>
+                                <property name="caption"></property>
+                                <property name="caption_visible">1</property>
+                                <property name="center_pane">0</property>
+                                <property name="close_button">1</property>
+                                <property name="context_help"></property>
+                                <property name="context_menu">1</property>
+                                <property name="default_pane">0</property>
+                                <property name="dock">Dock</property>
+                                <property name="dock_fixed">0</property>
+                                <property name="docking">Left</property>
+                                <property name="enabled">1</property>
+                                <property name="fg"></property>
+                                <property name="floatable">1</property>
+                                <property name="font"></property>
+                                <property name="gripper">0</property>
+                                <property name="hidden">0</property>
+                                <property name="id">wxID_ANY</property>
+                                <property name="max_size"></property>
+                                <property name="maximize_button">0</property>
+                                <property name="maximum_size"></property>
+                                <property name="maxlength">0</property>
+                                <property name="min_size"></property>
+                                <property name="minimize_button">0</property>
+                                <property name="minimum_size"></property>
+                                <property name="moveable">1</property>
+                                <property name="name">m_textCtrlScalingFactor</property>
+                                <property name="pane_border">1</property>
+                                <property name="pane_position"></property>
+                                <property name="pane_size"></property>
+                                <property name="permission">protected</property>
+                                <property name="pin_button">1</property>
+                                <property name="pos"></property>
+                                <property name="resize">Resizable</property>
+                                <property name="show">1</property>
+                                <property name="size"></property>
+                                <property name="style"></property>
+                                <property name="subclass"></property>
+                                <property name="toolbar_pane">0</property>
+                                <property name="tooltip"></property>
+                                <property name="validator_data_type"></property>
+                                <property name="validator_style">wxFILTER_NONE</property>
+                                <property name="validator_type">wxDefaultValidator</property>
+                                <property name="validator_variable"></property>
+                                <property name="value">1.0</property>
+                                <property name="window_extra_style"></property>
+                                <property name="window_name"></property>
+                                <property name="window_style"></property>
+                                <event name="OnChar"></event>
+                                <event name="OnEnterWindow"></event>
+                                <event name="OnEraseBackground"></event>
+                                <event name="OnKeyDown"></event>
+                                <event name="OnKeyUp"></event>
+                                <event name="OnKillFocus"></event>
+                                <event name="OnLeaveWindow"></event>
+                                <event name="OnLeftDClick"></event>
+                                <event name="OnLeftDown"></event>
+                                <event name="OnLeftUp"></event>
+                                <event name="OnMiddleDClick"></event>
+                                <event name="OnMiddleDown"></event>
+                                <event name="OnMiddleUp"></event>
+                                <event name="OnMotion"></event>
+                                <event name="OnMouseEvents"></event>
+                                <event name="OnMouseWheel"></event>
+                                <event name="OnPaint"></event>
+                                <event name="OnRightDClick"></event>
+                                <event name="OnRightDown"></event>
+                                <event name="OnRightUp"></event>
+                                <event name="OnSetFocus"></event>
+                                <event name="OnSize"></event>
+                                <event name="OnText"></event>
+                                <event name="OnTextEnter"></event>
+                                <event name="OnTextMaxLen"></event>
+                                <event name="OnTextURL"></event>
+                                <event name="OnUpdateUI"></event>
+                            </object>
+                        </object>
+                        <object class="sizeritem" expanded="0">
+                            <property name="border">5</property>
+                            <property name="flag">wxEXPAND</property>
+                            <property name="proportion">1</property>
+                            <object class="spacer" expanded="0">
+                                <property name="height">0</property>
+                                <property name="permission">protected</property>
+                                <property name="width">0</property>
+                            </object>
+                        </object>
+                        <object class="sizeritem" expanded="0">
+                            <property name="border">5</property>
+                            <property name="flag">wxEXPAND</property>
+                            <property name="proportion">1</property>
+                            <object class="spacer" expanded="0">
+                                <property name="height">0</property>
+                                <property name="permission">protected</property>
+                                <property name="width">0</property>
+                            </object>
+                        </object>
+                        <object class="sizeritem" expanded="0">
+                            <property name="border">5</property>
+                            <property name="flag">wxALL|wxALIGN_CENTER_VERTICAL</property>
+                            <property name="proportion">0</property>
+                            <object class="wxStaticText" expanded="0">
+                                <property name="BottomDockable">1</property>
+                                <property name="LeftDockable">1</property>
+                                <property name="RightDockable">1</property>
+                                <property name="TopDockable">1</property>
+                                <property name="aui_layer"></property>
+                                <property name="aui_name"></property>
+                                <property name="aui_position"></property>
+                                <property name="aui_row"></property>
+                                <property name="best_size"></property>
+                                <property name="bg"></property>
+                                <property name="caption"></property>
+                                <property name="caption_visible">1</property>
+                                <property name="center_pane">0</property>
+                                <property name="close_button">1</property>
+                                <property name="context_help"></property>
+                                <property name="context_menu">1</property>
+                                <property name="default_pane">0</property>
+                                <property name="dock">Dock</property>
+                                <property name="dock_fixed">0</property>
+                                <property name="docking">Left</property>
+                                <property name="enabled">1</property>
+                                <property name="fg"></property>
+                                <property name="floatable">1</property>
+                                <property name="font"></property>
+                                <property name="gripper">0</property>
+                                <property name="hidden">0</property>
+                                <property name="id">wxID_ANY</property>
+                                <property name="label">Duplicate count</property>
+                                <property name="max_size"></property>
+                                <property name="maximize_button">0</property>
+                                <property name="maximum_size"></property>
+                                <property name="min_size"></property>
+                                <property name="minimize_button">0</property>
+                                <property name="minimum_size"></property>
+                                <property name="moveable">1</property>
+                                <property name="name">m_staticTextDupCnt</property>
+                                <property name="pane_border">1</property>
+                                <property name="pane_position"></property>
+                                <property name="pane_size"></property>
+                                <property name="permission">protected</property>
+                                <property name="pin_button">1</property>
+                                <property name="pos"></property>
+                                <property name="resize">Resizable</property>
+                                <property name="show">1</property>
+                                <property name="size"></property>
+                                <property name="style"></property>
+                                <property name="subclass"></property>
+                                <property name="toolbar_pane">0</property>
+                                <property name="tooltip"></property>
+                                <property name="window_extra_style"></property>
+                                <property name="window_name"></property>
+                                <property name="window_style"></property>
+                                <property name="wrap">-1</property>
+                                <event name="OnChar"></event>
+                                <event name="OnEnterWindow"></event>
+                                <event name="OnEraseBackground"></event>
+                                <event name="OnKeyDown"></event>
+                                <event name="OnKeyUp"></event>
+                                <event name="OnKillFocus"></event>
+                                <event name="OnLeaveWindow"></event>
+                                <event name="OnLeftDClick"></event>
+                                <event name="OnLeftDown"></event>
+                                <event name="OnLeftUp"></event>
+                                <event name="OnMiddleDClick"></event>
+                                <event name="OnMiddleDown"></event>
+                                <event name="OnMiddleUp"></event>
+                                <event name="OnMotion"></event>
+                                <event name="OnMouseEvents"></event>
+                                <event name="OnMouseWheel"></event>
+                                <event name="OnPaint"></event>
+                                <event name="OnRightDClick"></event>
+                                <event name="OnRightDown"></event>
+                                <event name="OnRightUp"></event>
+                                <event name="OnSetFocus"></event>
+                                <event name="OnSize"></event>
+                                <event name="OnUpdateUI"></event>
+                            </object>
+                        </object>
+                        <object class="sizeritem" expanded="0">
+                            <property name="border">5</property>
+                            <property name="flag">wxALL</property>
+                            <property name="proportion">0</property>
+                            <object class="wxSpinCtrl" expanded="0">
+                                <property name="BottomDockable">1</property>
+                                <property name="LeftDockable">1</property>
+                                <property name="RightDockable">1</property>
+                                <property name="TopDockable">1</property>
+                                <property name="aui_layer"></property>
+                                <property name="aui_name"></property>
+                                <property name="aui_position"></property>
+                                <property name="aui_row"></property>
+                                <property name="best_size"></property>
+                                <property name="bg"></property>
+                                <property name="caption"></property>
+                                <property name="caption_visible">1</property>
+                                <property name="center_pane">0</property>
+                                <property name="close_button">1</property>
+                                <property name="context_help"></property>
+                                <property name="context_menu">1</property>
+                                <property name="default_pane">0</property>
+                                <property name="dock">Dock</property>
+                                <property name="dock_fixed">0</property>
+                                <property name="docking">Left</property>
+                                <property name="enabled">1</property>
+                                <property name="fg"></property>
+                                <property name="floatable">1</property>
+                                <property name="font"></property>
+                                <property name="gripper">0</property>
+                                <property name="hidden">0</property>
+                                <property name="id">wxID_ANY</property>
+                                <property name="initial">1</property>
+                                <property name="max">100</property>
+                                <property name="max_size"></property>
+                                <property name="maximize_button">0</property>
+                                <property name="maximum_size"></property>
+                                <property name="min">1</property>
+                                <property name="min_size"></property>
+                                <property name="minimize_button">0</property>
+                                <property name="minimum_size"></property>
+                                <property name="moveable">1</property>
+                                <property name="name">m_spinCtrlDuplicateCount</property>
+                                <property name="pane_border">1</property>
+                                <property name="pane_position"></property>
+                                <property name="pane_size"></property>
+                                <property name="permission">protected</property>
+                                <property name="pin_button">1</property>
+                                <property name="pos"></property>
+                                <property name="resize">Resizable</property>
+                                <property name="show">1</property>
+                                <property name="size"></property>
+                                <property name="style">wxSP_ARROW_KEYS</property>
+                                <property name="subclass"></property>
+                                <property name="toolbar_pane">0</property>
+                                <property name="tooltip"></property>
+                                <property name="value"></property>
+                                <property name="window_extra_style"></property>
+                                <property name="window_name"></property>
+                                <property name="window_style"></property>
+                                <event name="OnChar"></event>
+                                <event name="OnEnterWindow"></event>
+                                <event name="OnEraseBackground"></event>
+                                <event name="OnKeyDown"></event>
+                                <event name="OnKeyUp"></event>
+                                <event name="OnKillFocus"></event>
+                                <event name="OnLeaveWindow"></event>
+                                <event name="OnLeftDClick"></event>
+                                <event name="OnLeftDown"></event>
+                                <event name="OnLeftUp"></event>
+                                <event name="OnMiddleDClick"></event>
+                                <event name="OnMiddleDown"></event>
+                                <event name="OnMiddleUp"></event>
+                                <event name="OnMotion"></event>
+                                <event name="OnMouseEvents"></event>
+                                <event name="OnMouseWheel"></event>
+                                <event name="OnPaint"></event>
+                                <event name="OnRightDClick"></event>
+                                <event name="OnRightDown"></event>
+                                <event name="OnRightUp"></event>
+                                <event name="OnSetFocus"></event>
+                                <event name="OnSize"></event>
+                                <event name="OnSpinCtrl"></event>
+                                <event name="OnSpinCtrlText"></event>
+                                <event name="OnTextEnter"></event>
+                                <event name="OnUpdateUI"></event>
+                            </object>
+                        </object>
+                        <object class="sizeritem" expanded="0">
+                            <property name="border">5</property>
+                            <property name="flag">wxEXPAND</property>
+                            <property name="proportion">1</property>
+                            <object class="spacer" expanded="0">
+                                <property name="height">0</property>
+                                <property name="permission">protected</property>
+                                <property name="width">0</property>
+                            </object>
+                        </object>
+                        <object class="sizeritem" expanded="0">
+                            <property name="border">5</property>
+                            <property name="flag">wxEXPAND</property>
+                            <property name="proportion">1</property>
+                            <object class="spacer" expanded="0">
+                                <property name="height">0</property>
+                                <property name="permission">protected</property>
+                                <property name="width">0</property>
+                            </object>
+                        </object>
+                    </object>
+                </object>
+                <object class="sizeritem" expanded="0">
+                    <property name="border">5</property>
+                    <property name="flag">wxEXPAND | wxALL</property>
+                    <property name="proportion">0</property>
+                    <object class="wxStaticLine" expanded="0">
+                        <property name="BottomDockable">1</property>
+                        <property name="LeftDockable">1</property>
+                        <property name="RightDockable">1</property>
+                        <property name="TopDockable">1</property>
+                        <property name="aui_layer"></property>
+                        <property name="aui_name"></property>
+                        <property name="aui_position"></property>
+                        <property name="aui_row"></property>
+                        <property name="best_size"></property>
+                        <property name="bg"></property>
+                        <property name="caption"></property>
+                        <property name="caption_visible">1</property>
+                        <property name="center_pane">0</property>
+                        <property name="close_button">1</property>
+                        <property name="context_help"></property>
+                        <property name="context_menu">1</property>
+                        <property name="default_pane">0</property>
+                        <property name="dock">Dock</property>
+                        <property name="dock_fixed">0</property>
+                        <property name="docking">Left</property>
+                        <property name="enabled">1</property>
+                        <property name="fg"></property>
+                        <property name="floatable">1</property>
+                        <property name="font"></property>
+                        <property name="gripper">0</property>
+                        <property name="hidden">0</property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="max_size"></property>
+                        <property name="maximize_button">0</property>
+                        <property name="maximum_size"></property>
+                        <property name="min_size"></property>
+                        <property name="minimize_button">0</property>
+                        <property name="minimum_size"></property>
+                        <property name="moveable">1</property>
+                        <property name="name">m_staticline1</property>
+                        <property name="pane_border">1</property>
+                        <property name="pane_position"></property>
+                        <property name="pane_size"></property>
+                        <property name="permission">protected</property>
+                        <property name="pin_button">1</property>
+                        <property name="pos"></property>
+                        <property name="resize">Resizable</property>
+                        <property name="show">1</property>
+                        <property name="size"></property>
+                        <property name="style">wxLI_HORIZONTAL</property>
+                        <property name="subclass"></property>
+                        <property name="toolbar_pane">0</property>
+                        <property name="tooltip"></property>
+                        <property name="window_extra_style"></property>
+                        <property name="window_name"></property>
+                        <property name="window_style"></property>
+                        <event name="OnChar"></event>
+                        <event name="OnEnterWindow"></event>
+                        <event name="OnEraseBackground"></event>
+                        <event name="OnKeyDown"></event>
+                        <event name="OnKeyUp"></event>
+                        <event name="OnKillFocus"></event>
+                        <event name="OnLeaveWindow"></event>
+                        <event name="OnLeftDClick"></event>
+                        <event name="OnLeftDown"></event>
+                        <event name="OnLeftUp"></event>
+                        <event name="OnMiddleDClick"></event>
+                        <event name="OnMiddleDown"></event>
+                        <event name="OnMiddleUp"></event>
+                        <event name="OnMotion"></event>
+                        <event name="OnMouseEvents"></event>
+                        <event name="OnMouseWheel"></event>
+                        <event name="OnPaint"></event>
+                        <event name="OnRightDClick"></event>
+                        <event name="OnRightDown"></event>
+                        <event name="OnRightUp"></event>
+                        <event name="OnSetFocus"></event>
+                        <event name="OnSize"></event>
+                        <event name="OnUpdateUI"></event>
+                    </object>
+                </object>
+                <object class="sizeritem" expanded="0">
+                    <property name="border">5</property>
+                    <property name="flag">wxALIGN_RIGHT|wxALL</property>
+                    <property name="proportion">0</property>
+                    <object class="wxStdDialogButtonSizer" expanded="0">
+                        <property name="Apply">0</property>
+                        <property name="Cancel">1</property>
+                        <property name="ContextHelp">0</property>
+                        <property name="Help">0</property>
+                        <property name="No">0</property>
+                        <property name="OK">1</property>
+                        <property name="Save">0</property>
+                        <property name="Yes">0</property>
+                        <property name="minimum_size"></property>
+                        <property name="name">m_sdbSizer</property>
+                        <property name="permission">protected</property>
+                        <event name="OnApplyButtonClick"></event>
+                        <event name="OnCancelButtonClick"></event>
+                        <event name="OnContextHelpButtonClick"></event>
+                        <event name="OnHelpButtonClick"></event>
+                        <event name="OnNoButtonClick"></event>
+                        <event name="OnOKButtonClick"></event>
+                        <event name="OnSaveButtonClick"></event>
+                        <event name="OnYesButtonClick"></event>
+                    </object>
+                </object>
+            </object>
+        </object>
+        <object class="Dialog" expanded="1">
+            <property name="aui_managed">0</property>
+            <property name="aui_manager_style">wxAUI_MGR_DEFAULT</property>
+            <property name="bg"></property>
+            <property name="center">wxBOTH</property>
+            <property name="context_help"></property>
+            <property name="context_menu">1</property>
+            <property name="enabled">1</property>
+            <property name="event_handler">impl_virtual</property>
+            <property name="extra_style"></property>
+            <property name="fg"></property>
+            <property name="font"></property>
+            <property name="hidden">0</property>
+            <property name="id">wxID_ANY</property>
+            <property name="maximum_size"></property>
+            <property name="minimum_size"></property>
+            <property name="name">DIALOG_PAD_BASIC_SHP_POLY_PROPS_BASE</property>
+            <property name="pos"></property>
+            <property name="size">503,396</property>
+            <property name="style">wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER</property>
+            <property name="subclass">DIALOG_SHIM; </property>
+            <property name="title">Basic Shape Polygon</property>
+            <property name="tooltip"></property>
+            <property name="window_extra_style"></property>
+            <property name="window_name"></property>
+            <property name="window_style"></property>
+            <event name="OnActivate"></event>
+            <event name="OnActivateApp"></event>
+            <event name="OnAuiFindManager"></event>
+            <event name="OnAuiPaneButton"></event>
+            <event name="OnAuiPaneClose"></event>
+            <event name="OnAuiPaneMaximize"></event>
+            <event name="OnAuiPaneRestore"></event>
+            <event name="OnAuiRender"></event>
+            <event name="OnChar"></event>
+            <event name="OnClose"></event>
+            <event name="OnEnterWindow"></event>
+            <event name="OnEraseBackground"></event>
+            <event name="OnHibernate"></event>
+            <event name="OnIconize"></event>
+            <event name="OnIdle"></event>
+            <event name="OnInitDialog"></event>
+            <event name="OnKeyDown"></event>
+            <event name="OnKeyUp"></event>
+            <event name="OnKillFocus"></event>
+            <event name="OnLeaveWindow"></event>
+            <event name="OnLeftDClick"></event>
+            <event name="OnLeftDown"></event>
+            <event name="OnLeftUp"></event>
+            <event name="OnMiddleDClick"></event>
+            <event name="OnMiddleDown"></event>
+            <event name="OnMiddleUp"></event>
+            <event name="OnMotion"></event>
+            <event name="OnMouseEvents"></event>
+            <event name="OnMouseWheel"></event>
+            <event name="OnPaint"></event>
+            <event name="OnRightDClick"></event>
+            <event name="OnRightDown"></event>
+            <event name="OnRightUp"></event>
+            <event name="OnSetFocus"></event>
+            <event name="OnSize"></event>
+            <event name="OnUpdateUI"></event>
+            <object class="wxBoxSizer" expanded="1">
+                <property name="minimum_size"></property>
+                <property name="name">bSizerMain</property>
+                <property name="orient">wxVERTICAL</property>
+                <property name="permission">none</property>
+                <object class="sizeritem" expanded="1">
+                    <property name="border">5</property>
+                    <property name="flag">wxALL|wxALIGN_CENTER_HORIZONTAL</property>
+                    <property name="proportion">0</property>
+                    <object class="wxStaticText" expanded="1">
+                        <property name="BottomDockable">1</property>
+                        <property name="LeftDockable">1</property>
+                        <property name="RightDockable">1</property>
+                        <property name="TopDockable">1</property>
+                        <property name="aui_layer"></property>
+                        <property name="aui_name"></property>
+                        <property name="aui_position"></property>
+                        <property name="aui_row"></property>
+                        <property name="best_size"></property>
+                        <property name="bg"></property>
+                        <property name="caption"></property>
+                        <property name="caption_visible">1</property>
+                        <property name="center_pane">0</property>
+                        <property name="close_button">1</property>
+                        <property name="context_help"></property>
+                        <property name="context_menu">1</property>
+                        <property name="default_pane">0</property>
+                        <property name="dock">Dock</property>
+                        <property name="dock_fixed">0</property>
+                        <property name="docking">Left</property>
+                        <property name="enabled">1</property>
+                        <property name="fg"></property>
+                        <property name="floatable">1</property>
+                        <property name="font">,90,92,-1,70,0</property>
+                        <property name="gripper">0</property>
+                        <property name="hidden">0</property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="label"> Coordinates are relative to anchor pad, orientation 0</property>
+                        <property name="max_size"></property>
+                        <property name="maximize_button">0</property>
+                        <property name="maximum_size"></property>
+                        <property name="min_size"></property>
+                        <property name="minimize_button">0</property>
+                        <property name="minimum_size"></property>
+                        <property name="moveable">1</property>
+                        <property name="name">m_staticTextShapesListWarning</property>
+                        <property name="pane_border">1</property>
+                        <property name="pane_position"></property>
+                        <property name="pane_size"></property>
+                        <property name="permission">protected</property>
+                        <property name="pin_button">1</property>
+                        <property name="pos"></property>
+                        <property name="resize">Resizable</property>
+                        <property name="show">1</property>
+                        <property name="size"></property>
+                        <property name="style"></property>
+                        <property name="subclass"></property>
+                        <property name="toolbar_pane">0</property>
+                        <property name="tooltip"></property>
+                        <property name="window_extra_style"></property>
+                        <property name="window_name"></property>
+                        <property name="window_style"></property>
+                        <property name="wrap">-1</property>
+                        <event name="OnChar"></event>
+                        <event name="OnEnterWindow"></event>
+                        <event name="OnEraseBackground"></event>
+                        <event name="OnKeyDown"></event>
+                        <event name="OnKeyUp"></event>
+                        <event name="OnKillFocus"></event>
+                        <event name="OnLeaveWindow"></event>
+                        <event name="OnLeftDClick"></event>
+                        <event name="OnLeftDown"></event>
+                        <event name="OnLeftUp"></event>
+                        <event name="OnMiddleDClick"></event>
+                        <event name="OnMiddleDown"></event>
+                        <event name="OnMiddleUp"></event>
+                        <event name="OnMotion"></event>
+                        <event name="OnMouseEvents"></event>
+                        <event name="OnMouseWheel"></event>
+                        <event name="OnPaint"></event>
+                        <event name="OnRightDClick"></event>
+                        <event name="OnRightDown"></event>
+                        <event name="OnRightUp"></event>
+                        <event name="OnSetFocus"></event>
+                        <event name="OnSize"></event>
+                        <event name="OnUpdateUI"></event>
+                    </object>
+                </object>
+                <object class="sizeritem" expanded="1">
+                    <property name="border">5</property>
+                    <property name="flag">wxALL</property>
+                    <property name="proportion">0</property>
+                    <object class="wxStaticText" expanded="1">
+                        <property name="BottomDockable">1</property>
+                        <property name="LeftDockable">1</property>
+                        <property name="RightDockable">1</property>
+                        <property name="TopDockable">1</property>
+                        <property name="aui_layer"></property>
+                        <property name="aui_name"></property>
+                        <property name="aui_position"></property>
+                        <property name="aui_row"></property>
+                        <property name="best_size"></property>
+                        <property name="bg"></property>
+                        <property name="caption"></property>
+                        <property name="caption_visible">1</property>
+                        <property name="center_pane">0</property>
+                        <property name="close_button">1</property>
+                        <property name="context_help"></property>
+                        <property name="context_menu">1</property>
+                        <property name="default_pane">0</property>
+                        <property name="dock">Dock</property>
+                        <property name="dock_fixed">0</property>
+                        <property name="docking">Left</property>
+                        <property name="enabled">1</property>
+                        <property name="fg"></property>
+                        <property name="floatable">1</property>
+                        <property name="font">,93,92,-1,70,0</property>
+                        <property name="gripper">0</property>
+                        <property name="hidden">0</property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="label">Incorrect polygon</property>
+                        <property name="max_size"></property>
+                        <property name="maximize_button">0</property>
+                        <property name="maximum_size"></property>
+                        <property name="min_size"></property>
+                        <property name="minimize_button">0</property>
+                        <property name="minimum_size"></property>
+                        <property name="moveable">1</property>
+                        <property name="name">m_staticTextValidate</property>
+                        <property name="pane_border">1</property>
+                        <property name="pane_position"></property>
+                        <property name="pane_size"></property>
+                        <property name="permission">protected</property>
+                        <property name="pin_button">1</property>
+                        <property name="pos"></property>
+                        <property name="resize">Resizable</property>
+                        <property name="show">1</property>
+                        <property name="size"></property>
+                        <property name="style"></property>
+                        <property name="subclass"></property>
+                        <property name="toolbar_pane">0</property>
+                        <property name="tooltip"></property>
+                        <property name="window_extra_style"></property>
+                        <property name="window_name"></property>
+                        <property name="window_style"></property>
+                        <property name="wrap">-1</property>
+                        <event name="OnChar"></event>
+                        <event name="OnEnterWindow"></event>
+                        <event name="OnEraseBackground"></event>
+                        <event name="OnKeyDown"></event>
+                        <event name="OnKeyUp"></event>
+                        <event name="OnKillFocus"></event>
+                        <event name="OnLeaveWindow"></event>
+                        <event name="OnLeftDClick"></event>
+                        <event name="OnLeftDown"></event>
+                        <event name="OnLeftUp"></event>
+                        <event name="OnMiddleDClick"></event>
+                        <event name="OnMiddleDown"></event>
+                        <event name="OnMiddleUp"></event>
+                        <event name="OnMotion"></event>
+                        <event name="OnMouseEvents"></event>
+                        <event name="OnMouseWheel"></event>
+                        <event name="OnPaint"></event>
+                        <event name="OnRightDClick"></event>
+                        <event name="OnRightDown"></event>
+                        <event name="OnRightUp"></event>
+                        <event name="OnSetFocus"></event>
+                        <event name="OnSize"></event>
+                        <event name="OnUpdateUI"></event>
+                    </object>
+                </object>
+                <object class="sizeritem" expanded="1">
+                    <property name="border">5</property>
+                    <property name="flag">wxEXPAND</property>
+                    <property name="proportion">1</property>
+                    <object class="wxBoxSizer" expanded="1">
+                        <property name="minimum_size"></property>
+                        <property name="name">bSizerUpper</property>
+                        <property name="orient">wxVERTICAL</property>
+                        <property name="permission">none</property>
+                        <object class="sizeritem" expanded="1">
+                            <property name="border">5</property>
+                            <property name="flag">wxEXPAND</property>
+                            <property name="proportion">1</property>
+                            <object class="wxBoxSizer" expanded="1">
+                                <property name="minimum_size"></property>
+                                <property name="name">bSizer23</property>
+                                <property name="orient">wxHORIZONTAL</property>
+                                <property name="permission">none</property>
+                                <object class="sizeritem" expanded="1">
+                                    <property name="border">5</property>
+                                    <property name="flag">wxEXPAND</property>
+                                    <property name="proportion">0</property>
+                                    <object class="wxBoxSizer" expanded="1">
+                                        <property name="minimum_size"></property>
+                                        <property name="name">bSizerCornerlist</property>
+                                        <property name="orient">wxVERTICAL</property>
+                                        <property name="permission">none</property>
+                                        <object class="sizeritem" expanded="1">
+                                            <property name="border">5</property>
+                                            <property name="flag">wxALL</property>
+                                            <property name="proportion">1</property>
+                                            <object class="wxGrid" expanded="1">
+                                                <property name="BottomDockable">1</property>
+                                                <property name="LeftDockable">1</property>
+                                                <property name="RightDockable">1</property>
+                                                <property name="TopDockable">1</property>
+                                                <property name="aui_layer"></property>
+                                                <property name="aui_name"></property>
+                                                <property name="aui_position"></property>
+                                                <property name="aui_row"></property>
+                                                <property name="autosize_cols">0</property>
+                                                <property name="autosize_rows">1</property>
+                                                <property name="best_size"></property>
+                                                <property name="bg"></property>
+                                                <property name="caption"></property>
+                                                <property name="caption_visible">1</property>
+                                                <property name="cell_bg"></property>
+                                                <property name="cell_font"></property>
+                                                <property name="cell_horiz_alignment">wxALIGN_LEFT</property>
+                                                <property name="cell_text"></property>
+                                                <property name="cell_vert_alignment">wxALIGN_TOP</property>
+                                                <property name="center_pane">0</property>
+                                                <property name="close_button">1</property>
+                                                <property name="col_label_horiz_alignment">wxALIGN_CENTRE</property>
+                                                <property name="col_label_size">30</property>
+                                                <property name="col_label_values">&quot;Pos X&quot; &quot;Pos Y&quot;</property>
+                                                <property name="col_label_vert_alignment">wxALIGN_CENTRE</property>
+                                                <property name="cols">2</property>
+                                                <property name="column_sizes"></property>
+                                                <property name="context_help"></property>
+                                                <property name="context_menu">1</property>
+                                                <property name="default_pane">0</property>
+                                                <property name="dock">Dock</property>
+                                                <property name="dock_fixed">0</property>
+                                                <property name="docking">Left</property>
+                                                <property name="drag_col_move">0</property>
+                                                <property name="drag_col_size">1</property>
+                                                <property name="drag_grid_size">0</property>
+                                                <property name="drag_row_size">0</property>
+                                                <property name="editing">1</property>
+                                                <property name="enabled">1</property>
+                                                <property name="fg"></property>
+                                                <property name="floatable">1</property>
+                                                <property name="font"></property>
+                                                <property name="grid_line_color"></property>
+                                                <property name="grid_lines">1</property>
+                                                <property name="gripper">0</property>
+                                                <property name="hidden">0</property>
+                                                <property name="id">wxID_ANY</property>
+                                                <property name="label_bg"></property>
+                                                <property name="label_font"></property>
+                                                <property name="label_text"></property>
+                                                <property name="margin_height">0</property>
+                                                <property name="margin_width">0</property>
+                                                <property name="max_size"></property>
+                                                <property name="maximize_button">0</property>
+                                                <property name="maximum_size"></property>
+                                                <property name="min_size"></property>
+                                                <property name="minimize_button">0</property>
+                                                <property name="minimum_size"></property>
+                                                <property name="moveable">1</property>
+                                                <property name="name">m_gridCornersList</property>
+                                                <property name="pane_border">1</property>
+                                                <property name="pane_position"></property>
+                                                <property name="pane_size"></property>
+                                                <property name="permission">protected</property>
+                                                <property name="pin_button">1</property>
+                                                <property name="pos"></property>
+                                                <property name="resize">Resizable</property>
+                                                <property name="row_label_horiz_alignment">wxALIGN_CENTRE</property>
+                                                <property name="row_label_size">80</property>
+                                                <property name="row_label_values"></property>
+                                                <property name="row_label_vert_alignment">wxALIGN_CENTRE</property>
+                                                <property name="row_sizes"></property>
+                                                <property name="rows">1</property>
+                                                <property name="show">1</property>
+                                                <property name="size"></property>
+                                                <property name="subclass"></property>
+                                                <property name="toolbar_pane">0</property>
+                                                <property name="tooltip"></property>
+                                                <property name="window_extra_style"></property>
+                                                <property name="window_name"></property>
+                                                <property name="window_style"></property>
+                                                <event name="OnChar"></event>
+                                                <event name="OnEnterWindow"></event>
+                                                <event name="OnEraseBackground"></event>
+                                                <event name="OnGridCellChange"></event>
+                                                <event name="OnGridCellLeftClick"></event>
+                                                <event name="OnGridCellLeftDClick"></event>
+                                                <event name="OnGridCellRightClick"></event>
+                                                <event name="OnGridCellRightDClick"></event>
+                                                <event name="OnGridCmdCellChange"></event>
+                                                <event name="OnGridCmdCellLeftClick"></event>
+                                                <event name="OnGridCmdCellLeftDClick"></event>
+                                                <event name="OnGridCmdCellRightClick"></event>
+                                                <event name="OnGridCmdCellRightDClick"></event>
+                                                <event name="OnGridCmdColSize"></event>
+                                                <event name="OnGridCmdEditorCreated"></event>
+                                                <event name="OnGridCmdEditorHidden"></event>
+                                                <event name="OnGridCmdEditorShown"></event>
+                                                <event name="OnGridCmdLabelLeftClick"></event>
+                                                <event name="OnGridCmdLabelLeftDClick"></event>
+                                                <event name="OnGridCmdLabelRightClick"></event>
+                                                <event name="OnGridCmdLabelRightDClick"></event>
+                                                <event name="OnGridCmdRangeSelect"></event>
+                                                <event name="OnGridCmdRowSize"></event>
+                                                <event name="OnGridCmdSelectCell"></event>
+                                                <event name="OnGridColSize"></event>
+                                                <event name="OnGridEditorCreated"></event>
+                                                <event name="OnGridEditorHidden"></event>
+                                                <event name="OnGridEditorShown"></event>
+                                                <event name="OnGridLabelLeftClick"></event>
+                                                <event name="OnGridLabelLeftDClick"></event>
+                                                <event name="OnGridLabelRightClick"></event>
+                                                <event name="OnGridLabelRightDClick"></event>
+                                                <event name="OnGridRangeSelect">onGridSelect</event>
+                                                <event name="OnGridRowSize"></event>
+                                                <event name="OnGridSelectCell">onCellSelect</event>
+                                                <event name="OnKeyDown"></event>
+                                                <event name="OnKeyUp"></event>
+                                                <event name="OnKillFocus"></event>
+                                                <event name="OnLeaveWindow"></event>
+                                                <event name="OnLeftDClick"></event>
+                                                <event name="OnLeftDown"></event>
+                                                <event name="OnLeftUp"></event>
+                                                <event name="OnMiddleDClick"></event>
+                                                <event name="OnMiddleDown"></event>
+                                                <event name="OnMiddleUp"></event>
+                                                <event name="OnMotion"></event>
+                                                <event name="OnMouseEvents"></event>
+                                                <event name="OnMouseWheel"></event>
+                                                <event name="OnPaint"></event>
+                                                <event name="OnRightDClick"></event>
+                                                <event name="OnRightDown"></event>
+                                                <event name="OnRightUp"></event>
+                                                <event name="OnSetFocus"></event>
+                                                <event name="OnSize"></event>
+                                                <event name="OnUpdateUI"></event>
+                                            </object>
+                                        </object>
+                                        <object class="sizeritem" expanded="1">
+                                            <property name="border">5</property>
+                                            <property name="flag">wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL</property>
+                                            <property name="proportion">0</property>
+                                            <object class="wxBoxSizer" expanded="1">
+                                                <property name="minimum_size"></property>
+                                                <property name="name">bSizerRightButts</property>
+                                                <property name="orient">wxHORIZONTAL</property>
+                                                <property name="permission">none</property>
+                                                <object class="sizeritem" expanded="1">
+                                                    <property name="border">5</property>
+                                                    <property name="flag">wxALL</property>
+                                                    <property name="proportion">0</property>
+                                                    <object class="wxButton" expanded="1">
+                                                        <property name="BottomDockable">1</property>
+                                                        <property name="LeftDockable">1</property>
+                                                        <property name="RightDockable">1</property>
+                                                        <property name="TopDockable">1</property>
+                                                        <property name="aui_layer"></property>
+                                                        <property name="aui_name"></property>
+                                                        <property name="aui_position"></property>
+                                                        <property name="aui_row"></property>
+                                                        <property name="best_size"></property>
+                                                        <property name="bg"></property>
+                                                        <property name="caption"></property>
+                                                        <property name="caption_visible">1</property>
+                                                        <property name="center_pane">0</property>
+                                                        <property name="close_button">1</property>
+                                                        <property name="context_help"></property>
+                                                        <property name="context_menu">1</property>
+                                                        <property name="default">0</property>
+                                                        <property name="default_pane">0</property>
+                                                        <property name="dock">Dock</property>
+                                                        <property name="dock_fixed">0</property>
+                                                        <property name="docking">Left</property>
+                                                        <property name="enabled">1</property>
+                                                        <property name="fg"></property>
+                                                        <property name="floatable">1</property>
+                                                        <property name="font"></property>
+                                                        <property name="gripper">0</property>
+                                                        <property name="hidden">0</property>
+                                                        <property name="id">wxID_ANY</property>
+                                                        <property name="label">Add</property>
+                                                        <property name="max_size"></property>
+                                                        <property name="maximize_button">0</property>
+                                                        <property name="maximum_size"></property>
+                                                        <property name="min_size"></property>
+                                                        <property name="minimize_button">0</property>
+                                                        <property name="minimum_size"></property>
+                                                        <property name="moveable">1</property>
+                                                        <property name="name">m_buttonAdd</property>
+                                                        <property name="pane_border">1</property>
+                                                        <property name="pane_position"></property>
+                                                        <property name="pane_size"></property>
+                                                        <property name="permission">protected</property>
+                                                        <property name="pin_button">1</property>
+                                                        <property name="pos"></property>
+                                                        <property name="resize">Resizable</property>
+                                                        <property name="show">1</property>
+                                                        <property name="size"></property>
+                                                        <property name="style"></property>
+                                                        <property name="subclass"></property>
+                                                        <property name="toolbar_pane">0</property>
+                                                        <property name="tooltip"></property>
+                                                        <property name="validator_data_type"></property>
+                                                        <property name="validator_style">wxFILTER_NONE</property>
+                                                        <property name="validator_type">wxDefaultValidator</property>
+                                                        <property name="validator_variable"></property>
+                                                        <property name="window_extra_style"></property>
+                                                        <property name="window_name"></property>
+                                                        <property name="window_style"></property>
+                                                        <event name="OnButtonClick">onButtonAdd</event>
+                                                        <event name="OnChar"></event>
+                                                        <event name="OnEnterWindow"></event>
+                                                        <event name="OnEraseBackground"></event>
+                                                        <event name="OnKeyDown"></event>
+                                                        <event name="OnKeyUp"></event>
+                                                        <event name="OnKillFocus"></event>
+                                                        <event name="OnLeaveWindow"></event>
+                                                        <event name="OnLeftDClick"></event>
+                                                        <event name="OnLeftDown"></event>
+                                                        <event name="OnLeftUp"></event>
+                                                        <event name="OnMiddleDClick"></event>
+                                                        <event name="OnMiddleDown"></event>
+                                                        <event name="OnMiddleUp"></event>
+                                                        <event name="OnMotion"></event>
+                                                        <event name="OnMouseEvents"></event>
+                                                        <event name="OnMouseWheel"></event>
+                                                        <event name="OnPaint"></event>
+                                                        <event name="OnRightDClick"></event>
+                                                        <event name="OnRightDown"></event>
+                                                        <event name="OnRightUp"></event>
+                                                        <event name="OnSetFocus"></event>
+                                                        <event name="OnSize"></event>
+                                                        <event name="OnUpdateUI"></event>
+                                                    </object>
+                                                </object>
+                                                <object class="sizeritem" expanded="1">
+                                                    <property name="border">5</property>
+                                                    <property name="flag">wxALL</property>
+                                                    <property name="proportion">0</property>
+                                                    <object class="wxButton" expanded="1">
+                                                        <property name="BottomDockable">1</property>
+                                                        <property name="LeftDockable">1</property>
+                                                        <property name="RightDockable">1</property>
+                                                        <property name="TopDockable">1</property>
+                                                        <property name="aui_layer"></property>
+                                                        <property name="aui_name"></property>
+                                                        <property name="aui_position"></property>
+                                                        <property name="aui_row"></property>
+                                                        <property name="best_size"></property>
+                                                        <property name="bg"></property>
+                                                        <property name="caption"></property>
+                                                        <property name="caption_visible">1</property>
+                                                        <property name="center_pane">0</property>
+                                                        <property name="close_button">1</property>
+                                                        <property name="context_help"></property>
+                                                        <property name="context_menu">1</property>
+                                                        <property name="default">0</property>
+                                                        <property name="default_pane">0</property>
+                                                        <property name="dock">Dock</property>
+                                                        <property name="dock_fixed">0</property>
+                                                        <property name="docking">Left</property>
+                                                        <property name="enabled">1</property>
+                                                        <property name="fg"></property>
+                                                        <property name="floatable">1</property>
+                                                        <property name="font"></property>
+                                                        <property name="gripper">0</property>
+                                                        <property name="hidden">0</property>
+                                                        <property name="id">wxID_ANY</property>
+                                                        <property name="label">Delete</property>
+                                                        <property name="max_size"></property>
+                                                        <property name="maximize_button">0</property>
+                                                        <property name="maximum_size"></property>
+                                                        <property name="min_size"></property>
+                                                        <property name="minimize_button">0</property>
+                                                        <property name="minimum_size"></property>
+                                                        <property name="moveable">1</property>
+                                                        <property name="name">m_buttonDelete</property>
+                                                        <property name="pane_border">1</property>
+                                                        <property name="pane_position"></property>
+                                                        <property name="pane_size"></property>
+                                                        <property name="permission">protected</property>
+                                                        <property name="pin_button">1</property>
+                                                        <property name="pos"></property>
+                                                        <property name="resize">Resizable</property>
+                                                        <property name="show">1</property>
+                                                        <property name="size"></property>
+                                                        <property name="style"></property>
+                                                        <property name="subclass"></property>
+                                                        <property name="toolbar_pane">0</property>
+                                                        <property name="tooltip"></property>
+                                                        <property name="validator_data_type"></property>
+                                                        <property name="validator_style">wxFILTER_NONE</property>
+                                                        <property name="validator_type">wxDefaultValidator</property>
+                                                        <property name="validator_variable"></property>
+                                                        <property name="window_extra_style"></property>
+                                                        <property name="window_name"></property>
+                                                        <property name="window_style"></property>
+                                                        <event name="OnButtonClick">OnButtonDelete</event>
+                                                        <event name="OnChar"></event>
+                                                        <event name="OnEnterWindow"></event>
+                                                        <event name="OnEraseBackground"></event>
+                                                        <event name="OnKeyDown"></event>
+                                                        <event name="OnKeyUp"></event>
+                                                        <event name="OnKillFocus"></event>
+                                                        <event name="OnLeaveWindow"></event>
+                                                        <event name="OnLeftDClick"></event>
+                                                        <event name="OnLeftDown"></event>
+                                                        <event name="OnLeftUp"></event>
+                                                        <event name="OnMiddleDClick"></event>
+                                                        <event name="OnMiddleDown"></event>
+                                                        <event name="OnMiddleUp"></event>
+                                                        <event name="OnMotion"></event>
+                                                        <event name="OnMouseEvents"></event>
+                                                        <event name="OnMouseWheel"></event>
+                                                        <event name="OnPaint"></event>
+                                                        <event name="OnRightDClick"></event>
+                                                        <event name="OnRightDown"></event>
+                                                        <event name="OnRightUp"></event>
+                                                        <event name="OnSetFocus"></event>
+                                                        <event name="OnSize"></event>
+                                                        <event name="OnUpdateUI"></event>
+                                                    </object>
+                                                </object>
+                                            </object>
+                                        </object>
+                                    </object>
+                                </object>
+                                <object class="sizeritem" expanded="1">
+                                    <property name="border">5</property>
+                                    <property name="flag">wxEXPAND | wxALL</property>
+                                    <property name="proportion">1</property>
+                                    <object class="wxPanel" expanded="1">
+                                        <property name="BottomDockable">1</property>
+                                        <property name="LeftDockable">1</property>
+                                        <property name="RightDockable">1</property>
+                                        <property name="TopDockable">1</property>
+                                        <property name="aui_layer"></property>
+                                        <property name="aui_name"></property>
+                                        <property name="aui_position"></property>
+                                        <property name="aui_row"></property>
+                                        <property name="best_size"></property>
+                                        <property name="bg">0,0,0</property>
+                                        <property name="caption"></property>
+                                        <property name="caption_visible">1</property>
+                                        <property name="center_pane">0</property>
+                                        <property name="close_button">1</property>
+                                        <property name="context_help"></property>
+                                        <property name="context_menu">1</property>
+                                        <property name="default_pane">0</property>
+                                        <property name="dock">Dock</property>
+                                        <property name="dock_fixed">0</property>
+                                        <property name="docking">Left</property>
+                                        <property name="enabled">1</property>
+                                        <property name="fg"></property>
+                                        <property name="floatable">1</property>
+                                        <property name="font"></property>
+                                        <property name="gripper">0</property>
+                                        <property name="hidden">0</property>
+                                        <property name="id">wxID_ANY</property>
+                                        <property name="max_size"></property>
+                                        <property name="maximize_button">0</property>
+                                        <property name="maximum_size"></property>
+                                        <property name="min_size"></property>
+                                        <property name="minimize_button">0</property>
+                                        <property name="minimum_size">300,300</property>
+                                        <property name="moveable">1</property>
+                                        <property name="name">m_panelPoly</property>
+                                        <property name="pane_border">1</property>
+                                        <property name="pane_position"></property>
+                                        <property name="pane_size"></property>
+                                        <property name="permission">protected</property>
+                                        <property name="pin_button">1</property>
+                                        <property name="pos"></property>
+                                        <property name="resize">Resizable</property>
+                                        <property name="show">1</property>
+                                        <property name="size"></property>
+                                        <property name="subclass"></property>
+                                        <property name="toolbar_pane">0</property>
+                                        <property name="tooltip"></property>
+                                        <property name="window_extra_style"></property>
+                                        <property name="window_name"></property>
+                                        <property name="window_style">wxSUNKEN_BORDER|wxTAB_TRAVERSAL</property>
+                                        <event name="OnChar"></event>
+                                        <event name="OnEnterWindow"></event>
+                                        <event name="OnEraseBackground"></event>
+                                        <event name="OnKeyDown"></event>
+                                        <event name="OnKeyUp"></event>
+                                        <event name="OnKillFocus"></event>
+                                        <event name="OnLeaveWindow"></event>
+                                        <event name="OnLeftDClick"></event>
+                                        <event name="OnLeftDown"></event>
+                                        <event name="OnLeftUp"></event>
+                                        <event name="OnMiddleDClick"></event>
+                                        <event name="OnMiddleDown"></event>
+                                        <event name="OnMiddleUp"></event>
+                                        <event name="OnMotion"></event>
+                                        <event name="OnMouseEvents"></event>
+                                        <event name="OnMouseWheel"></event>
+                                        <event name="OnPaint">onPaintPolyPanel</event>
+                                        <event name="OnRightDClick"></event>
+                                        <event name="OnRightDown"></event>
+                                        <event name="OnRightUp"></event>
+                                        <event name="OnSetFocus"></event>
+                                        <event name="OnSize">onPolyPanelResize</event>
+                                        <event name="OnUpdateUI"></event>
+                                    </object>
+                                </object>
+                            </object>
+                        </object>
+                        <object class="sizeritem" expanded="1">
+                            <property name="border">5</property>
+                            <property name="flag"></property>
+                            <property name="proportion">0</property>
+                            <object class="wxFlexGridSizer" expanded="1">
+                                <property name="cols">5</property>
+                                <property name="flexible_direction">wxBOTH</property>
+                                <property name="growablecols">1</property>
+                                <property name="growablerows"></property>
+                                <property name="hgap">0</property>
+                                <property name="minimum_size"></property>
+                                <property name="name">fgSizerThickness</property>
+                                <property name="non_flexible_grow_mode">wxFLEX_GROWMODE_SPECIFIED</property>
+                                <property name="permission">none</property>
+                                <property name="rows">0</property>
+                                <property name="vgap">0</property>
+                                <object class="sizeritem" expanded="1">
+                                    <property name="border">5</property>
+                                    <property name="flag">wxALL|wxALIGN_CENTER_VERTICAL</property>
+                                    <property name="proportion">0</property>
+                                    <object class="wxStaticText" expanded="1">
+                                        <property name="BottomDockable">1</property>
+                                        <property name="LeftDockable">1</property>
+                                        <property name="RightDockable">1</property>
+                                        <property name="TopDockable">1</property>
+                                        <property name="aui_layer"></property>
+                                        <property name="aui_name"></property>
+                                        <property name="aui_position"></property>
+                                        <property name="aui_row"></property>
+                                        <property name="best_size"></property>
+                                        <property name="bg"></property>
+                                        <property name="caption"></property>
+                                        <property name="caption_visible">1</property>
+                                        <property name="center_pane">0</property>
+                                        <property name="close_button">1</property>
+                                        <property name="context_help"></property>
+                                        <property name="context_menu">1</property>
+                                        <property name="default_pane">0</property>
+                                        <property name="dock">Dock</property>
+                                        <property name="dock_fixed">0</property>
+                                        <property name="docking">Left</property>
+                                        <property name="enabled">1</property>
+                                        <property name="fg"></property>
+                                        <property name="floatable">1</property>
+                                        <property name="font"></property>
+                                        <property name="gripper">0</property>
+                                        <property name="hidden">0</property>
+                                        <property name="id">wxID_ANY</property>
+                                        <property name="label">Outline thickness</property>
+                                        <property name="max_size"></property>
+                                        <property name="maximize_button">0</property>
+                                        <property name="maximum_size"></property>
+                                        <property name="min_size"></property>
+                                        <property name="minimize_button">0</property>
+                                        <property name="minimum_size"></property>
+                                        <property name="moveable">1</property>
+                                        <property name="name">m_staticTextThickness</property>
+                                        <property name="pane_border">1</property>
+                                        <property name="pane_position"></property>
+                                        <property name="pane_size"></property>
+                                        <property name="permission">protected</property>
+                                        <property name="pin_button">1</property>
+                                        <property name="pos"></property>
+                                        <property name="resize">Resizable</property>
+                                        <property name="show">1</property>
+                                        <property name="size"></property>
+                                        <property name="style"></property>
+                                        <property name="subclass"></property>
+                                        <property name="toolbar_pane">0</property>
+                                        <property name="tooltip"></property>
+                                        <property name="window_extra_style"></property>
+                                        <property name="window_name"></property>
+                                        <property name="window_style"></property>
+                                        <property name="wrap">-1</property>
+                                        <event name="OnChar"></event>
+                                        <event name="OnEnterWindow"></event>
+                                        <event name="OnEraseBackground"></event>
+                                        <event name="OnKeyDown"></event>
+                                        <event name="OnKeyUp"></event>
+                                        <event name="OnKillFocus"></event>
+                                        <event name="OnLeaveWindow"></event>
+                                        <event name="OnLeftDClick"></event>
+                                        <event name="OnLeftDown"></event>
+                                        <event name="OnLeftUp"></event>
+                                        <event name="OnMiddleDClick"></event>
+                                        <event name="OnMiddleDown"></event>
+                                        <event name="OnMiddleUp"></event>
+                                        <event name="OnMotion"></event>
+                                        <event name="OnMouseEvents"></event>
+                                        <event name="OnMouseWheel"></event>
+                                        <event name="OnPaint"></event>
+                                        <event name="OnRightDClick"></event>
+                                        <event name="OnRightDown"></event>
+                                        <event name="OnRightUp"></event>
+                                        <event name="OnSetFocus"></event>
+                                        <event name="OnSize"></event>
+                                        <event name="OnUpdateUI"></event>
+                                    </object>
+                                </object>
+                                <object class="sizeritem" expanded="1">
+                                    <property name="border">5</property>
+                                    <property name="flag">wxALL|wxEXPAND|wxALIGN_CENTER_VERTICAL</property>
+                                    <property name="proportion">0</property>
+                                    <object class="wxTextCtrl" expanded="1">
+                                        <property name="BottomDockable">1</property>
+                                        <property name="LeftDockable">1</property>
+                                        <property name="RightDockable">1</property>
+                                        <property name="TopDockable">1</property>
+                                        <property name="aui_layer"></property>
+                                        <property name="aui_name"></property>
+                                        <property name="aui_position"></property>
+                                        <property name="aui_row"></property>
+                                        <property name="best_size"></property>
+                                        <property name="bg"></property>
+                                        <property name="caption"></property>
+                                        <property name="caption_visible">1</property>
+                                        <property name="center_pane">0</property>
+                                        <property name="close_button">1</property>
+                                        <property name="context_help"></property>
+                                        <property name="context_menu">1</property>
+                                        <property name="default_pane">0</property>
+                                        <property name="dock">Dock</property>
+                                        <property name="dock_fixed">0</property>
+                                        <property name="docking">Left</property>
+                                        <property name="enabled">1</property>
+                                        <property name="fg"></property>
+                                        <property name="floatable">1</property>
+                                        <property name="font"></property>
+                                        <property name="gripper">0</property>
+                                        <property name="hidden">0</property>
+                                        <property name="id">wxID_ANY</property>
+                                        <property name="max_size"></property>
+                                        <property name="maximize_button">0</property>
+                                        <property name="maximum_size"></property>
+                                        <property name="maxlength">0</property>
+                                        <property name="min_size"></property>
+                                        <property name="minimize_button">0</property>
+                                        <property name="minimum_size"></property>
+                                        <property name="moveable">1</property>
+                                        <property name="name">m_textCtrlThickness</property>
+                                        <property name="pane_border">1</property>
+                                        <property name="pane_position"></property>
+                                        <property name="pane_size"></property>
+                                        <property name="permission">protected</property>
+                                        <property name="pin_button">1</property>
+                                        <property name="pos"></property>
+                                        <property name="resize">Resizable</property>
+                                        <property name="show">1</property>
+                                        <property name="size"></property>
+                                        <property name="style"></property>
+                                        <property name="subclass"></property>
+                                        <property name="toolbar_pane">0</property>
+                                        <property name="tooltip"></property>
+                                        <property name="validator_data_type"></property>
+                                        <property name="validator_style">wxFILTER_NONE</property>
+                                        <property name="validator_type">wxDefaultValidator</property>
+                                        <property name="validator_variable"></property>
+                                        <property name="value">0</property>
+                                        <property name="window_extra_style"></property>
+                                        <property name="window_name"></property>
+                                        <property name="window_style"></property>
+                                        <event name="OnChar"></event>
+                                        <event name="OnEnterWindow"></event>
+                                        <event name="OnEraseBackground"></event>
+                                        <event name="OnKeyDown"></event>
+                                        <event name="OnKeyUp"></event>
+                                        <event name="OnKillFocus"></event>
+                                        <event name="OnLeaveWindow"></event>
+                                        <event name="OnLeftDClick"></event>
+                                        <event name="OnLeftDown"></event>
+                                        <event name="OnLeftUp"></event>
+                                        <event name="OnMiddleDClick"></event>
+                                        <event name="OnMiddleDown"></event>
+                                        <event name="OnMiddleUp"></event>
+                                        <event name="OnMotion"></event>
+                                        <event name="OnMouseEvents"></event>
+                                        <event name="OnMouseWheel"></event>
+                                        <event name="OnPaint"></event>
+                                        <event name="OnRightDClick"></event>
+                                        <event name="OnRightDown"></event>
+                                        <event name="OnRightUp"></event>
+                                        <event name="OnSetFocus"></event>
+                                        <event name="OnSize"></event>
+                                        <event name="OnText"></event>
+                                        <event name="OnTextEnter"></event>
+                                        <event name="OnTextMaxLen"></event>
+                                        <event name="OnTextURL"></event>
+                                        <event name="OnUpdateUI"></event>
+                                    </object>
+                                </object>
+                                <object class="sizeritem" expanded="1">
+                                    <property name="border">5</property>
+                                    <property name="flag">wxALL|wxALIGN_CENTER_VERTICAL</property>
+                                    <property name="proportion">0</property>
+                                    <object class="wxStaticText" expanded="1">
+                                        <property name="BottomDockable">1</property>
+                                        <property name="LeftDockable">1</property>
+                                        <property name="RightDockable">1</property>
+                                        <property name="TopDockable">1</property>
+                                        <property name="aui_layer"></property>
+                                        <property name="aui_name"></property>
+                                        <property name="aui_position"></property>
+                                        <property name="aui_row"></property>
+                                        <property name="best_size"></property>
+                                        <property name="bg"></property>
+                                        <property name="caption"></property>
+                                        <property name="caption_visible">1</property>
+                                        <property name="center_pane">0</property>
+                                        <property name="close_button">1</property>
+                                        <property name="context_help"></property>
+                                        <property name="context_menu">1</property>
+                                        <property name="default_pane">0</property>
+                                        <property name="dock">Dock</property>
+                                        <property name="dock_fixed">0</property>
+                                        <property name="docking">Left</property>
+                                        <property name="enabled">1</property>
+                                        <property name="fg"></property>
+                                        <property name="floatable">1</property>
+                                        <property name="font"></property>
+                                        <property name="gripper">0</property>
+                                        <property name="hidden">0</property>
+                                        <property name="id">wxID_ANY</property>
+                                        <property name="label">unit</property>
+                                        <property name="max_size"></property>
+                                        <property name="maximize_button">0</property>
+                                        <property name="maximum_size"></property>
+                                        <property name="min_size"></property>
+                                        <property name="minimize_button">0</property>
+                                        <property name="minimum_size"></property>
+                                        <property name="moveable">1</property>
+                                        <property name="name">m_staticTextThicknessUnit</property>
+                                        <property name="pane_border">1</property>
+                                        <property name="pane_position"></property>
+                                        <property name="pane_size"></property>
+                                        <property name="permission">protected</property>
+                                        <property name="pin_button">1</property>
+                                        <property name="pos"></property>
+                                        <property name="resize">Resizable</property>
+                                        <property name="show">1</property>
+                                        <property name="size"></property>
+                                        <property name="style"></property>
+                                        <property name="subclass"></property>
+                                        <property name="toolbar_pane">0</property>
+                                        <property name="tooltip"></property>
+                                        <property name="window_extra_style"></property>
+                                        <property name="window_name"></property>
+                                        <property name="window_style"></property>
+                                        <property name="wrap">-1</property>
+                                        <event name="OnChar"></event>
+                                        <event name="OnEnterWindow"></event>
+                                        <event name="OnEraseBackground"></event>
+                                        <event name="OnKeyDown"></event>
+                                        <event name="OnKeyUp"></event>
+                                        <event name="OnKillFocus"></event>
+                                        <event name="OnLeaveWindow"></event>
+                                        <event name="OnLeftDClick"></event>
+                                        <event name="OnLeftDown"></event>
+                                        <event name="OnLeftUp"></event>
+                                        <event name="OnMiddleDClick"></event>
+                                        <event name="OnMiddleDown"></event>
+                                        <event name="OnMiddleUp"></event>
+                                        <event name="OnMotion"></event>
+                                        <event name="OnMouseEvents"></event>
+                                        <event name="OnMouseWheel"></event>
+                                        <event name="OnPaint"></event>
+                                        <event name="OnRightDClick"></event>
+                                        <event name="OnRightDown"></event>
+                                        <event name="OnRightUp"></event>
+                                        <event name="OnSetFocus"></event>
+                                        <event name="OnSize"></event>
+                                        <event name="OnUpdateUI"></event>
+                                    </object>
+                                </object>
+                                <object class="sizeritem" expanded="1">
+                                    <property name="border">5</property>
+                                    <property name="flag"></property>
+                                    <property name="proportion">0</property>
+                                    <object class="spacer" expanded="1">
+                                        <property name="height">10</property>
+                                        <property name="permission">protected</property>
+                                        <property name="width">10</property>
+                                    </object>
+                                </object>
+                                <object class="sizeritem" expanded="1">
+                                    <property name="border">5</property>
+                                    <property name="flag">wxALL|wxALIGN_CENTER_VERTICAL</property>
+                                    <property name="proportion">0</property>
+                                    <object class="wxStaticText" expanded="1">
+                                        <property name="BottomDockable">1</property>
+                                        <property name="LeftDockable">1</property>
+                                        <property name="RightDockable">1</property>
+                                        <property name="TopDockable">1</property>
+                                        <property name="aui_layer"></property>
+                                        <property name="aui_name"></property>
+                                        <property name="aui_position"></property>
+                                        <property name="aui_row"></property>
+                                        <property name="best_size"></property>
+                                        <property name="bg"></property>
+                                        <property name="caption"></property>
+                                        <property name="caption_visible">1</property>
+                                        <property name="center_pane">0</property>
+                                        <property name="close_button">1</property>
+                                        <property name="context_help"></property>
+                                        <property name="context_menu">1</property>
+                                        <property name="default_pane">0</property>
+                                        <property name="dock">Dock</property>
+                                        <property name="dock_fixed">0</property>
+                                        <property name="docking">Left</property>
+                                        <property name="enabled">1</property>
+                                        <property name="fg"></property>
+                                        <property name="floatable">1</property>
+                                        <property name="font"></property>
+                                        <property name="gripper">0</property>
+                                        <property name="hidden">0</property>
+                                        <property name="id">wxID_ANY</property>
+                                        <property name="label">(Thickness outline is usually set to 0)</property>
+                                        <property name="max_size"></property>
+                                        <property name="maximize_button">0</property>
+                                        <property name="maximum_size"></property>
+                                        <property name="min_size"></property>
+                                        <property name="minimize_button">0</property>
+                                        <property name="minimum_size"></property>
+                                        <property name="moveable">1</property>
+                                        <property name="name">m_staticTextInfo</property>
+                                        <property name="pane_border">1</property>
+                                        <property name="pane_position"></property>
+                                        <property name="pane_size"></property>
+                                        <property name="permission">protected</property>
+                                        <property name="pin_button">1</property>
+                                        <property name="pos"></property>
+                                        <property name="resize">Resizable</property>
+                                        <property name="show">1</property>
+                                        <property name="size"></property>
+                                        <property name="style"></property>
+                                        <property name="subclass"></property>
+                                        <property name="toolbar_pane">0</property>
+                                        <property name="tooltip"></property>
+                                        <property name="window_extra_style"></property>
+                                        <property name="window_name"></property>
+                                        <property name="window_style"></property>
+                                        <property name="wrap">-1</property>
+                                        <event name="OnChar"></event>
+                                        <event name="OnEnterWindow"></event>
+                                        <event name="OnEraseBackground"></event>
+                                        <event name="OnKeyDown"></event>
+                                        <event name="OnKeyUp"></event>
+                                        <event name="OnKillFocus"></event>
+                                        <event name="OnLeaveWindow"></event>
+                                        <event name="OnLeftDClick"></event>
+                                        <event name="OnLeftDown"></event>
+                                        <event name="OnLeftUp"></event>
+                                        <event name="OnMiddleDClick"></event>
+                                        <event name="OnMiddleDown"></event>
+                                        <event name="OnMiddleUp"></event>
+                                        <event name="OnMotion"></event>
+                                        <event name="OnMouseEvents"></event>
+                                        <event name="OnMouseWheel"></event>
+                                        <event name="OnPaint"></event>
+                                        <event name="OnRightDClick"></event>
+                                        <event name="OnRightDown"></event>
+                                        <event name="OnRightUp"></event>
+                                        <event name="OnSetFocus"></event>
+                                        <event name="OnSize"></event>
+                                        <event name="OnUpdateUI"></event>
+                                    </object>
+                                </object>
+                            </object>
+                        </object>
+                    </object>
+                </object>
+                <object class="sizeritem" expanded="1">
+                    <property name="border">5</property>
+                    <property name="flag">wxEXPAND | wxALL</property>
+                    <property name="proportion">0</property>
+                    <object class="wxStaticLine" expanded="1">
+                        <property name="BottomDockable">1</property>
+                        <property name="LeftDockable">1</property>
+                        <property name="RightDockable">1</property>
+                        <property name="TopDockable">1</property>
+                        <property name="aui_layer"></property>
+                        <property name="aui_name"></property>
+                        <property name="aui_position"></property>
+                        <property name="aui_row"></property>
+                        <property name="best_size"></property>
+                        <property name="bg"></property>
+                        <property name="caption"></property>
+                        <property name="caption_visible">1</property>
+                        <property name="center_pane">0</property>
+                        <property name="close_button">1</property>
+                        <property name="context_help"></property>
+                        <property name="context_menu">1</property>
+                        <property name="default_pane">0</property>
+                        <property name="dock">Dock</property>
+                        <property name="dock_fixed">0</property>
+                        <property name="docking">Left</property>
+                        <property name="enabled">1</property>
+                        <property name="fg"></property>
+                        <property name="floatable">1</property>
+                        <property name="font"></property>
+                        <property name="gripper">0</property>
+                        <property name="hidden">0</property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="max_size"></property>
+                        <property name="maximize_button">0</property>
+                        <property name="maximum_size"></property>
+                        <property name="min_size"></property>
+                        <property name="minimize_button">0</property>
+                        <property name="minimum_size"></property>
+                        <property name="moveable">1</property>
+                        <property name="name">m_staticline3</property>
+                        <property name="pane_border">1</property>
+                        <property name="pane_position"></property>
+                        <property name="pane_size"></property>
+                        <property name="permission">protected</property>
+                        <property name="pin_button">1</property>
+                        <property name="pos"></property>
+                        <property name="resize">Resizable</property>
+                        <property name="show">1</property>
+                        <property name="size"></property>
+                        <property name="style">wxLI_HORIZONTAL</property>
+                        <property name="subclass"></property>
+                        <property name="toolbar_pane">0</property>
+                        <property name="tooltip"></property>
+                        <property name="window_extra_style"></property>
+                        <property name="window_name"></property>
+                        <property name="window_style"></property>
+                        <event name="OnChar"></event>
+                        <event name="OnEnterWindow"></event>
+                        <event name="OnEraseBackground"></event>
+                        <event name="OnKeyDown"></event>
+                        <event name="OnKeyUp"></event>
+                        <event name="OnKillFocus"></event>
+                        <event name="OnLeaveWindow"></event>
+                        <event name="OnLeftDClick"></event>
+                        <event name="OnLeftDown"></event>
+                        <event name="OnLeftUp"></event>
+                        <event name="OnMiddleDClick"></event>
+                        <event name="OnMiddleDown"></event>
+                        <event name="OnMiddleUp"></event>
+                        <event name="OnMotion"></event>
+                        <event name="OnMouseEvents"></event>
+                        <event name="OnMouseWheel"></event>
+                        <event name="OnPaint"></event>
+                        <event name="OnRightDClick"></event>
+                        <event name="OnRightDown"></event>
+                        <event name="OnRightUp"></event>
+                        <event name="OnSetFocus"></event>
+                        <event name="OnSize"></event>
+                        <event name="OnUpdateUI"></event>
+                    </object>
+                </object>
+                <object class="sizeritem" expanded="0">
+                    <property name="border">5</property>
+                    <property name="flag">wxEXPAND|wxALL</property>
                     <property name="proportion">0</property>
                     <object class="wxStdDialogButtonSizer" expanded="0">
                         <property name="Apply">0</property>
diff --git a/pcbnew/dialogs/dialog_pad_properties_base.h b/pcbnew/dialogs/dialog_pad_properties_base.h
index b35e18b..6f2fb5c 100644
--- a/pcbnew/dialogs/dialog_pad_properties_base.h
+++ b/pcbnew/dialogs/dialog_pad_properties_base.h
@@ -1,5 +1,5 @@
 ///////////////////////////////////////////////////////////////////////////
-// C++ code generated with wxFormBuilder (version Jul 17 2016)
+// C++ code generated with wxFormBuilder (version May  6 2016)
 // http://www.wxformbuilder.org/
 //
 // PLEASE DO "NOT" EDIT THIS FILE!
@@ -12,6 +12,7 @@
 #include <wx/xrc/xmlres.h>
 #include <wx/intl.h>
 class DIALOG_SHIM;
+class wxListView;
 
 #include "dialog_shim.h"
 #include <wx/string.h>
@@ -30,11 +31,14 @@ class DIALOG_SHIM;
 #include <wx/bitmap.h>
 #include <wx/image.h>
 #include <wx/icon.h>
+#include <wx/listctrl.h>
+#include <wx/button.h>
 #include <wx/notebook.h>
 #include <wxBasePcbFrame.h>
 #include <pcb_draw_panel_gal.h>
-#include <wx/button.h>
 #include <wx/dialog.h>
+#include <wx/spinctrl.h>
+#include <wx/grid.h>
 
 ///////////////////////////////////////////////////////////////////////////
 
@@ -155,6 +159,17 @@ class DIALOG_PAD_PROPERTIES_BASE : public DIALOG_SHIM
 		wxTextCtrl* m_ThermalGapCtrl;
 		wxStaticText* m_ThermalGapUnits;
 		wxStaticText* m_staticTextWarning;
+		wxPanel* m_panelCustomShape;
+		wxBoxSizer* m_bSizerPanelShapes;
+		wxStaticText* m_staticTextShapesList;
+		wxStaticText* m_staticTextShapesListWraning;
+		wxListView* m_listCtrlShapes;
+		wxButton* m_buttonDel;
+		wxButton* m_buttonEditShape;
+		wxButton* m_buttonAddShape;
+		wxButton* m_buttonDup;
+		wxButton* m_buttonGeometry;
+		wxButton* m_buttonImport;
 		wxPanel* m_panelShowPad;
 		PCB_DRAW_PANEL_GAL* m_panelShowPadGal;
 		KIGFX::GAL_DISPLAY_OPTIONS m_galOptions;
@@ -172,6 +187,13 @@ class DIALOG_PAD_PROPERTIES_BASE : public DIALOG_SHIM
 		virtual void OnSetLayers( wxCommandEvent& event ) { event.Skip(); }
 		virtual void onCornerSizePercentChange( wxCommandEvent& event ) { event.Skip(); }
 		virtual void OnDrillShapeSelected( wxCommandEvent& event ) { event.Skip(); }
+		virtual void onCustomShapeDClick( wxMouseEvent& event ) { event.Skip(); }
+		virtual void onDeleteShape( wxCommandEvent& event ) { event.Skip(); }
+		virtual void onEditShape( wxCommandEvent& event ) { event.Skip(); }
+		virtual void onAddShape( wxCommandEvent& event ) { event.Skip(); }
+		virtual void onDuplicateShape( wxCommandEvent& event ) { event.Skip(); }
+		virtual void onGeometryTransform( wxCommandEvent& event ) { event.Skip(); }
+		virtual void onImportShape( wxCommandEvent& event ) { event.Skip(); }
 		virtual void OnPaintShowPanel( wxPaintEvent& event ) { event.Skip(); }
 		
 	
@@ -182,4 +204,109 @@ class DIALOG_PAD_PROPERTIES_BASE : public DIALOG_SHIM
 	
 };
 
+///////////////////////////////////////////////////////////////////////////////
+/// Class DIALOG_PAD_BASICSHAPES_PROPERTIES_BASE
+///////////////////////////////////////////////////////////////////////////////
+class DIALOG_PAD_BASICSHAPES_PROPERTIES_BASE : public DIALOG_SHIM
+{
+	private:
+	
+	protected:
+		wxStaticText* m_staticTextInfo;
+		wxStaticText* m_staticTextPosStart;
+		wxTextCtrl* m_textCtrPosX;
+		wxTextCtrl* m_textCtrPosY;
+		wxStaticText* m_staticTextPosUnit;
+		wxStaticText* m_staticTextPosEnd;
+		wxTextCtrl* m_textCtrEndX;
+		wxTextCtrl* m_textCtrEndY;
+		wxStaticText* m_staticTextEndUnit;
+		wxStaticText* m_staticTextAngle;
+		wxTextCtrl* m_textCtrAngle;
+		wxStaticText* m_staticTextAngleUnit;
+		wxStaticText* m_staticTextThickness;
+		wxTextCtrl* m_textCtrlThickness;
+		wxStaticText* m_staticTextThicknessUnit;
+		wxStaticLine* m_staticline1;
+		wxStdDialogButtonSizer* m_sdbSizer;
+		wxButton* m_sdbSizerOK;
+		wxButton* m_sdbSizerCancel;
+	
+	public:
+		
+		DIALOG_PAD_BASICSHAPES_PROPERTIES_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 443,233 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); 
+		~DIALOG_PAD_BASICSHAPES_PROPERTIES_BASE();
+	
+};
+
+///////////////////////////////////////////////////////////////////////////////
+/// Class DIALOG_PAD_BASICSHAPES_TRANSFORM_BASE
+///////////////////////////////////////////////////////////////////////////////
+class DIALOG_PAD_BASICSHAPES_TRANSFORM_BASE : public DIALOG_SHIM
+{
+	private:
+	
+	protected:
+		wxStaticText* m_staticTextMove;
+		wxTextCtrl* m_textCtrMoveX;
+		wxTextCtrl* m_textCtrMoveY;
+		wxStaticText* m_staticTextMoveUnit;
+		wxStaticText* m_staticTextAngle;
+		wxTextCtrl* m_textCtrAngle;
+		wxStaticText* m_staticTextAngleUnit;
+		wxStaticText* m_staticTextSF;
+		wxTextCtrl* m_textCtrlScalingFactor;
+		wxStaticText* m_staticTextDupCnt;
+		wxSpinCtrl* m_spinCtrlDuplicateCount;
+		wxStaticLine* m_staticline1;
+		wxStdDialogButtonSizer* m_sdbSizer;
+		wxButton* m_sdbSizerOK;
+		wxButton* m_sdbSizerCancel;
+	
+	public:
+		
+		DIALOG_PAD_BASICSHAPES_TRANSFORM_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Pad Custom Shape Geometry Transform"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 398,203 ), long style = wxDEFAULT_DIALOG_STYLE ); 
+		~DIALOG_PAD_BASICSHAPES_TRANSFORM_BASE();
+	
+};
+
+///////////////////////////////////////////////////////////////////////////////
+/// Class DIALOG_PAD_BASIC_SHP_POLY_PROPS_BASE
+///////////////////////////////////////////////////////////////////////////////
+class DIALOG_PAD_BASIC_SHP_POLY_PROPS_BASE : public DIALOG_SHIM
+{
+	private:
+	
+	protected:
+		wxStaticText* m_staticTextShapesListWarning;
+		wxStaticText* m_staticTextValidate;
+		wxGrid* m_gridCornersList;
+		wxButton* m_buttonAdd;
+		wxButton* m_buttonDelete;
+		wxPanel* m_panelPoly;
+		wxStaticText* m_staticTextThickness;
+		wxTextCtrl* m_textCtrlThickness;
+		wxStaticText* m_staticTextThicknessUnit;
+		wxStaticText* m_staticTextInfo;
+		wxStaticLine* m_staticline3;
+		wxStdDialogButtonSizer* m_sdbSizer;
+		wxButton* m_sdbSizerOK;
+		wxButton* m_sdbSizerCancel;
+		
+		// Virtual event handlers, overide them in your derived class
+		virtual void onGridSelect( wxGridRangeSelectEvent& event ) { event.Skip(); }
+		virtual void onCellSelect( wxGridEvent& event ) { event.Skip(); }
+		virtual void onButtonAdd( wxCommandEvent& event ) { event.Skip(); }
+		virtual void OnButtonDelete( wxCommandEvent& event ) { event.Skip(); }
+		virtual void onPaintPolyPanel( wxPaintEvent& event ) { event.Skip(); }
+		virtual void onPolyPanelResize( wxSizeEvent& event ) { event.Skip(); }
+		
+	
+	public:
+		
+		DIALOG_PAD_BASIC_SHP_POLY_PROPS_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Basic Shape Polygon"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 503,396 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); 
+		~DIALOG_PAD_BASIC_SHP_POLY_PROPS_BASE();
+	
+};
+
 #endif //__DIALOG_PAD_PROPERTIES_BASE_H__
diff --git a/pcbnew/drc_clearance_test_functions.cpp b/pcbnew/drc_clearance_test_functions.cpp
index 2e3d6fa..3e8e496 100644
--- a/pcbnew/drc_clearance_test_functions.cpp
+++ b/pcbnew/drc_clearance_test_functions.cpp
@@ -5,9 +5,9 @@
 /*
  * This program source code file is part of KiCad, a free EDA CAD application.
  *
- * Copyright (C) 2004-2016 Jean-Pierre Charras, jean-pierre.charras@xxxxxxxxxxxxxxxxx
+ * Copyright (C) 2004-2017 Jean-Pierre Charras, jp.charras at wanadoo.fr
  * Copyright (C) 2007 Dick Hollenbeck, dick@xxxxxxxxxxx
- * Copyright (C) 2016 KiCad Developers, see change_log.txt for contributors.
+ * Copyright (C) 2017 KiCad Developers, see change_log.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
@@ -75,7 +75,7 @@ bool poly2polyDRC( wxPoint* aTref, int aTrefCount,
                                 aTcompare[kk].x, aTcompare[kk].y, aTcompare[ll].x, aTcompare[ll].y,
                                 NULL, NULL, &d );
 
-            if( intersect || ( d< aDist ) )
+            if( intersect || ( d < aDist ) )
                 return false;
         }
     }
@@ -603,7 +603,9 @@ bool DRC::checkClearancePadToPad( D_PAD* aRefPad, D_PAD* aPad )
     dist = KiROUND( EuclideanNorm( relativePadPos ) );
 
     // Quick test: Clearance is OK if the bounding circles are further away than "dist_min"
-    if( (dist - aRefPad->GetBoundingRadius() - aPad->GetBoundingRadius()) >= dist_min )
+    int delta = dist - aRefPad->GetBoundingRadius() - aPad->GetBoundingRadius();
+
+    if( delta >= dist_min )
         return true;
 
     /* Here, pads are near and DRC depend on the pad shapes
@@ -639,7 +641,8 @@ bool DRC::checkClearancePadToPad( D_PAD* aRefPad, D_PAD* aPad )
                     swap_pads = true;
                 break;
 
-            default:
+            case PAD_SHAPE_TRAPEZOID:
+            case PAD_SHAPE_CUSTOM:
                 break;
         }
     }
@@ -686,6 +689,7 @@ bool DRC::checkClearancePadToPad( D_PAD* aRefPad, D_PAD* aPad )
     case PAD_SHAPE_TRAPEZOID:
     case PAD_SHAPE_ROUNDRECT:
     case PAD_SHAPE_RECT:
+    case PAD_SHAPE_CUSTOM:
         // pad_angle = pad orient relative to the aRefPad orient
         pad_angle = aRefPad->GetOrientation() + aPad->GetOrientation();
         NORMALIZE_ANGLE_POS( pad_angle );
@@ -697,14 +701,29 @@ bool DRC::checkClearancePadToPad( D_PAD* aRefPad, D_PAD* aPad )
             GetRoundRectCornerCenters( polyref, padRadius, wxPoint( 0, 0 ),
                                 aRefPad->GetSize(), aRefPad->GetOrientation() );
         }
+        else if( aRefPad->GetShape() == PAD_SHAPE_CUSTOM )
+        {
+            polysetref.Append( aRefPad->GetCustomShapeAsPolygon() );
+
+            // The reference pad can be rotated. calculate the rotated
+            // coordiantes ( note, the ref pad position is the origin of
+            // coordinates for this drc test)
+            aRefPad->BasicShapesAsPolygonToBoardPosition( &polysetref,
+                        wxPoint( 0, 0 ), aRefPad->GetOrientation() );
+        }
         else
+        {
+            // BuildPadPolygon has meaning for rect a trapeziod shapes
+            // and returns the 4 corners
             aRefPad->BuildPadPolygon( polyref, wxSize( 0, 0 ), aRefPad->GetOrientation() );
+        }
 
         switch( aPad->GetShape() )
         {
         case PAD_SHAPE_ROUNDRECT:
         case PAD_SHAPE_RECT:
         case PAD_SHAPE_TRAPEZOID:
+        case PAD_SHAPE_CUSTOM:
             if( aPad->GetShape() == PAD_SHAPE_ROUNDRECT )
             {
                 int padRadius = aPad->GetRoundRectCornerRadius();
@@ -712,6 +731,16 @@ bool DRC::checkClearancePadToPad( D_PAD* aRefPad, D_PAD* aPad )
                 GetRoundRectCornerCenters( polycompare, padRadius, relativePadPos,
                                     aPad->GetSize(), aPad->GetOrientation() );
             }
+            else if( aPad->GetShape() == PAD_SHAPE_CUSTOM )
+            {
+                polysetcompare.Append( aPad->GetCustomShapeAsPolygon() );
+
+                // The pad to compare can be rotated. calculate the rotated
+                // coordinattes ( note, the pad to compare position
+                // is the relativePadPos for this drc test
+                aPad->BasicShapesAsPolygonToBoardPosition( &polysetcompare,
+                            relativePadPos, aPad->GetOrientation() );
+            }
             else
             {
                 aPad->BuildPadPolygon( polycompare, wxSize( 0, 0 ), aPad->GetOrientation() );
@@ -720,9 +749,11 @@ bool DRC::checkClearancePadToPad( D_PAD* aRefPad, D_PAD* aPad )
                 for( int ii = 0; ii < 4; ii++ )
                     polycompare[ii] += relativePadPos;
             }
-
-            // And now test polygons:
-            if( polysetref.OutlineCount() )
+            // And now test polygons: We have 3 cases:
+            // one poly is complex and the other is basic (has only 4 corners)
+            // both polys are complex
+            // both polys are basic (have only 4 corners) the most usual case
+            if( polysetref.OutlineCount() && polysetcompare.OutlineCount() == 0)
             {
                 const SHAPE_LINE_CHAIN& refpoly = polysetref.COutline( 0 );
                 // And now test polygons:
@@ -730,6 +761,24 @@ bool DRC::checkClearancePadToPad( D_PAD* aRefPad, D_PAD* aPad )
                             polycompare, 4, dist_min ) )
                     diag = false;
             }
+            else if( polysetref.OutlineCount() == 0 && polysetcompare.OutlineCount())
+            {
+                const SHAPE_LINE_CHAIN& cmppoly = polysetcompare.COutline( 0 );
+                // And now test polygons:
+                if( !poly2polyDRC( (wxPoint*) &cmppoly.CPoint( 0 ), cmppoly.PointCount(),
+                            polyref, 4, dist_min ) )
+                    diag = false;
+            }
+            else if( polysetref.OutlineCount() && polysetcompare.OutlineCount() )
+            {
+                const SHAPE_LINE_CHAIN& refpoly = polysetref.COutline( 0 );
+                const SHAPE_LINE_CHAIN& cmppoly = polysetcompare.COutline( 0 );
+
+                // And now test polygons:
+                if( !poly2polyDRC( (wxPoint*) &refpoly.CPoint( 0 ), refpoly.PointCount(),
+                            (wxPoint*) &cmppoly.CPoint( 0 ), cmppoly.PointCount(), dist_min ) )
+                    diag = false;
+            }
             else if( !poly2polyDRC( polyref, 4, polycompare, 4, dist_min ) )
                 diag = false;
             break;
@@ -783,7 +832,7 @@ bool DRC::checkClearancePadToPad( D_PAD* aRefPad, D_PAD* aPad )
     }
 
     default:
-        wxLogDebug( wxT( "DRC::checkClearancePadToPad: unknown pad shape" ) );
+        wxMessageBox( wxT( "DRC::checkClearancePadToPad: unknown pad shape" ) );
         break;
     }
 
@@ -798,14 +847,33 @@ bool DRC::checkClearancePadToPad( D_PAD* aRefPad, D_PAD* aPad )
  */
 bool DRC::checkClearanceSegmToPad( const D_PAD* aPad, int aSegmentWidth, int aMinDist )
 {
-    wxSize  padHalfsize;            // half dimension of the pad
-    int     r;
+    // Note:
+    // we are using a horizontal segment for test, because we know here
+    // only the length and orientation+ of the segment
+    // Therefore the coordinates of the  shape of pad to compare
+    // must be calculated in a axis system rotated by m_segmAngle
+    // and centered to the segment origin, before they can be tested
+    // against the segment
+    // We are using:
+    // m_padToTestPos the position of the pad shape in this axis system
+    // m_segmAngle the axis system rotation
 
     int segmHalfWidth = aSegmentWidth / 2;
     int distToLine = segmHalfWidth + aMinDist;
 
-    padHalfsize.x = aPad->GetSize().x >> 1;
-    padHalfsize.y = aPad->GetSize().y >> 1;
+    wxSize  padHalfsize;    // half dimension of the pad
+
+    if( aPad->GetShape() == PAD_SHAPE_CUSTOM )
+    {
+        // For a custom pad, the pad size has no meaning, we only can
+        // use the bounding radius
+        padHalfsize.x = padHalfsize.y = aPad->GetBoundingRadius();
+    }
+    else
+    {
+        padHalfsize.x = aPad->GetSize().x >> 1;
+        padHalfsize.y = aPad->GetSize().y >> 1;
+    }
 
     if( aPad->GetShape() == PAD_SHAPE_TRAPEZOID )     // The size is bigger, due to GetDelta() extra size
     {
@@ -848,7 +916,10 @@ bool DRC::checkClearanceSegmToPad( const D_PAD* aPad, int aSegmentWidth, int aMi
      */
     switch( aPad->GetShape() )
     {
-    default:
+    case PAD_SHAPE_CIRCLE:
+        // This case was already tested, so it cannot be found here.
+        // it is here just to avoid compil warning, and to remember
+        // it is already tested.
         return false;
 
     case PAD_SHAPE_OVAL:
@@ -912,11 +983,13 @@ bool DRC::checkClearanceSegmToPad( const D_PAD* aPad, int aSegmentWidth, int aMi
         break;
 
     case PAD_SHAPE_ROUNDRECT:
+        {
         // a round rect is a smaller rect, with a clearance augmented by the corners radius
-        r = aPad->GetRoundRectCornerRadius();
+        int r = aPad->GetRoundRectCornerRadius();
         padHalfsize.x -= r;
         padHalfsize.y -= r;
         distToLine += r;
+        }
         // Fall through
     case PAD_SHAPE_RECT:
         // the area to test is a rounded rectangle.
@@ -981,7 +1054,7 @@ bool DRC::checkClearanceSegmToPad( const D_PAD* aPad, int aSegmentWidth, int aMi
         break;
 
     case PAD_SHAPE_TRAPEZOID:
-    {
+        {
         wxPoint poly[4];
         aPad->BuildPadPolygon( poly, wxSize( 0, 0 ), orient );
 
@@ -992,12 +1065,42 @@ bool DRC::checkClearanceSegmToPad( const D_PAD* aPad, int aSegmentWidth, int aMi
             RotatePoint( &poly[ii], m_segmAngle );
         }
 
-        if( !poly2segmentDRC( poly, 4, wxPoint( 0, 0 ), wxPoint(m_segmLength,0), distToLine ) )
+        if( !poly2segmentDRC( poly, 4, wxPoint( 0, 0 ),
+                              wxPoint(m_segmLength,0), distToLine ) )
             return false;
+        }
+        break;
 
+    case PAD_SHAPE_CUSTOM:
+        {
+        SHAPE_POLY_SET polyset;
+        polyset.Append( aPad->GetCustomShapeAsPolygon() );
+        // The pad can be rotated. calculate the coordinates
+        // relatives to the segment being tested
+        // Note, the pad position relative to the segment origin
+        // is m_padToTestPos
+        aPad->BasicShapesAsPolygonToBoardPosition( &polyset,
+                    m_padToTestPos, orient );
+
+        // Rotate all coordinates by m_segmAngle, because the segment orient
+        // is m_segmAngle
+        // we are using a horizontal segment for test, because we know here
+        // only the lenght and orientation+ of the segment
+        // therefore all coordinates of the pad to test must be rotated by
+        // m_segmAngle (they are already relative to the segment origin)
+        aPad->BasicShapesAsPolygonToBoardPosition( &polyset,
+                    wxPoint( 0, 0 ), m_segmAngle );
+
+        const SHAPE_LINE_CHAIN& refpoly = polyset.COutline( 0 );
+
+        if( !poly2segmentDRC( (wxPoint*) &refpoly.CPoint( 0 ),
+                              refpoly.PointCount(),
+                              wxPoint( 0, 0 ), wxPoint(m_segmLength,0),
+                              distToLine ) )
+            return false;
+        }
         break;
     }
-    }
 
     return true;
 }
diff --git a/pcbnew/kicad_plugin.cpp b/pcbnew/kicad_plugin.cpp
index ab6eb36..016d31c 100644
--- a/pcbnew/kicad_plugin.cpp
+++ b/pcbnew/kicad_plugin.cpp
@@ -1244,6 +1244,7 @@ void PCB_IO::format( D_PAD* aPad, int aNestLevel ) const
     case PAD_SHAPE_OVAL:      shape = "oval";         break;
     case PAD_SHAPE_TRAPEZOID: shape = "trapezoid";    break;
     case PAD_SHAPE_ROUNDRECT: shape = "roundrect";    break;
+    case PAD_SHAPE_CUSTOM: shape = "custom";    break;
 
     default:
         THROW_IO_ERROR( wxString::Format( _( "unknown pad type: %d"), aPad->GetShape() ) );
@@ -1347,6 +1348,94 @@ void PCB_IO::format( D_PAD* aPad, int aNestLevel ) const
         m_out->Print( aNestLevel+1, "%s", output.c_str()+1 );   // +1 skips 1st space on 1st element
     }
 
+    if( aPad->GetShape() == PAD_SHAPE_CUSTOM )
+    {
+        m_out->Print( 0, "\n");
+        m_out->Print( aNestLevel+1, "(basic_shapes\n" );
+
+        int nested_level = aNestLevel+2;
+
+        // Output the anchor pad shape (circle/rect)
+        if( aPad->GetAnchorPadShape() == PAD_SHAPE_RECT )
+            shape = "rect";
+        else
+            shape = "circle";
+
+        m_out->Print( nested_level, "(anchor_pad_shape %s)", shape );
+
+        // Output all basic shapes
+        for( unsigned icnt = 0; icnt < aPad->GetBasicShapes().size(); ++icnt )
+        {
+            m_out->Print( 0, "\n");
+
+            const PAD_BC_SHAPE& bshape = aPad->GetBasicShapes()[icnt];
+
+            switch( bshape.m_Type )
+            {
+            case S_SEGMENT:         // usual segment : line with rounded ends
+                m_out->Print( nested_level, "(gr_line (start %s) (end %s) (width %s))",
+                              FMT_IU( bshape.m_Start ).c_str(),
+                              FMT_IU( bshape.m_End ).c_str(),
+                              FMT_IU( bshape.m_Thickness ).c_str() );
+                break;
+
+            case S_ARC:             // Arc with rounded ends
+                m_out->Print( nested_level, "(gr_arc (start %s) (end %s) (angle %s) (width %s))",
+                              FMT_IU( bshape.m_Start ).c_str(),
+                              FMT_IU( bshape.m_End ).c_str(),
+                              FMT_ANGLE( bshape.m_ArcAngle ).c_str(),
+                              FMT_IU( bshape.m_Thickness ).c_str() );
+                break;
+
+            case S_CIRCLE:          //  ring or circle (circle if width == 0
+                m_out->Print( nested_level, "(gr_circle (center %s) (end %s %s) (width %s))",
+                              FMT_IU( bshape.m_Start ).c_str(),
+                              FMT_IU( bshape.m_Start.x + bshape.m_Radius ).c_str(),
+                              FMT_IU( bshape.m_Start.y ).c_str(),
+                              FMT_IU( bshape.m_Thickness ).c_str() );
+                break;
+
+            case S_POLYGON:         // polygon
+                if( bshape.m_Poly.size() < 2 )
+                    break;      // Malformed polygon.
+
+                {
+                m_out->Print( nested_level, "(gr_poly (pts\n");
+
+                // Write the polygon corners coordinates:
+                const std::vector< wxPoint>& poly = bshape.m_Poly;
+                int newLine = 0;
+
+                for( unsigned ii = 0; ii < poly.size(); ii++ )
+                {
+                    if( newLine == 0 )
+                        m_out->Print( nested_level+1, " (xy %s)", FMT_IU( wxPoint( poly[ii].x, poly[ii].y ) ).c_str() );
+                    else
+                        m_out->Print( 0, " (xy %s)", FMT_IU( wxPoint( poly[ii].x, poly[ii].y ) ).c_str() );
+
+                    if( ++newLine > 4 )
+                    {
+                        newLine = 0;
+                        m_out->Print( 0, "\n" );
+                    }
+                }
+
+                if( bshape.m_Thickness != 0 )
+                    m_out->Print( 0, ") (width %s))", FMT_IU( bshape.m_Thickness ).c_str() );
+                else
+                    m_out->Print( 0, "))");
+                }
+                break;
+
+            default:
+                break;
+            }
+        }
+
+        m_out->Print( 0, "\n");
+        m_out->Print( aNestLevel+1, ")" );   // end of (basic_shapes
+    }
+
     m_out->Print( 0, ")\n" );
 }
 
diff --git a/pcbnew/pad_edition_functions.cpp b/pcbnew/pad_edition_functions.cpp
index 4703836..1aac656 100644
--- a/pcbnew/pad_edition_functions.cpp
+++ b/pcbnew/pad_edition_functions.cpp
@@ -73,6 +73,10 @@ void PCB_BASE_FRAME::Import_Pad_Settings( D_PAD* aPad, bool aDraw )
 
     aPad->ImportSettingsFromMaster( mp );
 
+    aPad->SetBasicShapes( mp.GetBasicShapes() );
+    aPad->SetAnchorPadShape( mp.GetAnchorPadShape() );
+    aPad->MergeBasicShapesAsPolygon();
+
     if( aDraw )
         m_canvas->RefreshDrawingRect( aPad->GetBoundingBox() );
 
diff --git a/pcbnew/pcb_painter.cpp b/pcbnew/pcb_painter.cpp
index bc27aa9..70d66ed 100644
--- a/pcbnew/pcb_painter.cpp
+++ b/pcbnew/pcb_painter.cpp
@@ -682,6 +682,8 @@ void PCB_PAINTER::draw( const D_PAD* aPad, int aLayer )
     m_gal->Translate( VECTOR2D( aPad->GetPosition() ) );
     m_gal->Rotate( -aPad->GetOrientationRadians() );
 
+    int custom_margin = 0;     // a clearance/margin for custom shape, for solder paste/mask
+
     // Choose drawing settings depending on if we are drawing a pad itself or a hole
     if( aLayer == LAYER_PADS_HOLES || aLayer == LAYER_NON_PLATED )
     {
@@ -693,6 +695,7 @@ void PCB_PAINTER::draw( const D_PAD* aPad, int aLayer )
     {
         // Drawing soldermask
         int soldermaskMargin = aPad->GetSolderMaskMargin();
+        custom_margin = soldermaskMargin;
 
         m_gal->Translate( VECTOR2D( aPad->GetOffset() ) );
         size  = VECTOR2D( aPad->GetSize().x / 2.0 + soldermaskMargin,
@@ -703,6 +706,8 @@ void PCB_PAINTER::draw( const D_PAD* aPad, int aLayer )
     {
         // Drawing solderpaste
         wxSize solderpasteMargin = aPad->GetSolderPasteMargin();
+        // try to find a clearance which can be used for custom shapes
+        custom_margin = solderpasteMargin.x;
 
         m_gal->Translate( VECTOR2D( aPad->GetOffset() ) );
         size  = VECTOR2D( aPad->GetSize().x / 2.0 + solderpasteMargin.x,
@@ -789,6 +794,55 @@ void PCB_PAINTER::draw( const D_PAD* aPad, int aLayer )
         break;
     }
 
+    case PAD_SHAPE_CUSTOM:
+    {   // Draw the complex custom shape
+        std::deque<VECTOR2D> pointList;
+
+        // Use solder[Paste/Mask]size or pad size to build pad shape
+        // however, solder[Paste/Mask] size has no actual meaning for a
+        // custom shape, because it is a set of basic shapes
+        // We use the custom_margin (good for solder mask, but approximative
+        // for solder paste).
+        if( custom_margin )
+        {
+            SHAPE_POLY_SET outline;
+            outline.Append( aPad->GetCustomShapeAsPolygon() );
+            const int segmentToCircleCount = 32;
+            outline.Inflate( custom_margin, segmentToCircleCount );
+
+            // Draw the polygon: only one polygon is expected
+            SHAPE_LINE_CHAIN& poly = outline.Outline( 0 );
+
+            for( int ii = 0; ii < poly.PointCount(); ii++ )
+                pointList.push_back( poly.Point( ii ) );
+        }
+        else
+        {
+            // Draw the polygon: only one polygon is expected
+            // However we provide a multi polygon shape drawing
+            // ( for the future or  to show even an incorrect shape
+            const SHAPE_POLY_SET& outline = aPad->GetCustomShapeAsPolygon();
+
+            for( int jj = 0; jj < outline.OutlineCount(); ++jj )
+            {
+                const SHAPE_LINE_CHAIN& poly = outline.COutline( jj );
+
+                for( int ii = 0; ii < poly.PointCount(); ii++ )
+                    pointList.push_back( poly.CPoint( ii ) );
+            }
+        }
+
+        if( m_pcbSettings.m_sketchMode[LAYER_PADS] )
+        {
+            // Add the beginning point to close the outline
+            pointList.push_back( pointList.front() );
+            m_gal->DrawPolyline( pointList );
+        }
+        else
+            m_gal->DrawPolygon( pointList );
+    }
+        break;
+
     case PAD_SHAPE_TRAPEZOID:
     {
         std::deque<VECTOR2D> pointList;
diff --git a/pcbnew/pcb_parser.cpp b/pcbnew/pcb_parser.cpp
index bbdf436..e6ae99d 100644
--- a/pcbnew/pcb_parser.cpp
+++ b/pcbnew/pcb_parser.cpp
@@ -2307,6 +2307,10 @@ D_PAD* PCB_PARSER::parseD_PAD( MODULE* aParent )
         pad->SetShape( PAD_SHAPE_ROUNDRECT );
         break;
 
+    case T_custom:
+        pad->SetShape( PAD_SHAPE_CUSTOM );
+        break;
+
     default:
         Expecting( "circle, rectangle, roundrect, oval, trapezoid or custom" );
     }
@@ -2481,6 +2485,73 @@ D_PAD* PCB_PARSER::parseD_PAD( MODULE* aParent )
             NeedRIGHT();
             break;
 
+        case T_basic_shapes:
+            for( token = NextTok();  token != T_RIGHT;  token = NextTok() )
+            {
+                if( token == T_LEFT )
+                    token = NextTok();
+
+                // Currently, I am using parseDRAWSEGMENT() to read basic shapes parameters,
+                // because they are the same as a DRAWSEGMENT.
+                // However it could be better to write a specific parser, to avoid possible issues
+                // if the DRAWSEGMENT parser is modified.
+                DRAWSEGMENT* dummysegm = NULL;
+
+                switch( token )
+                {
+                case T_anchor_pad_shape:
+                    token = NextTok();
+                    // Custom shaped pads have a "anchor pad", which is the reference
+                    // for connection calculations.
+                    // Because this is an anchor, only the 2 very basic shapes are managed:
+                    // circle and rect. The default is circle
+                    switch( token )
+                    {
+                        case T_circle:  // default
+                            break;
+
+                        case T_rect:
+                            pad->SetAnchorPadShape( PAD_SHAPE_RECT );
+                            break;
+
+                        default:
+                            break;
+                    }
+                    NeedRIGHT();
+                    break;
+
+                case T_gr_arc:
+                    dummysegm = parseDRAWSEGMENT();
+                    pad->AddBasicShape( dummysegm->GetCenter(), dummysegm->GetArcStart(),
+                                        dummysegm->GetAngle(), dummysegm->GetWidth() );
+                    break;
+
+                case T_gr_line:
+                    dummysegm = parseDRAWSEGMENT();
+                    pad->AddBasicShape( dummysegm->GetStart(), dummysegm->GetEnd(),
+                                        dummysegm->GetWidth() );
+                    break;
+
+                case T_gr_circle:
+                    dummysegm = parseDRAWSEGMENT();
+                    pad->AddBasicShape( dummysegm->GetCenter(), dummysegm->GetRadius(),
+                                        dummysegm->GetWidth() );
+                    break;
+
+                case T_gr_poly:
+                    dummysegm = parseDRAWSEGMENT();
+                    pad->AddBasicShape( dummysegm->GetPolyPoints(), dummysegm->GetWidth() );
+                    break;
+
+                default:
+                    Expecting( "gr_line, gr_arc, gr_circle or gr_poly" );
+                    break;
+                }
+
+                delete dummysegm;
+            }
+            break;
+
         default:
             Expecting( "at, drill, layers, net, die_length, solder_mask_margin, roundrect_rratio,"
                        "solder_paste_margin, solder_paste_margin_ratio, clearance, "
@@ -2488,6 +2559,10 @@ D_PAD* PCB_PARSER::parseD_PAD( MODULE* aParent )
         }
     }
 
+    // Be sure the custom shape polygon is built:
+    if( pad->GetShape() == PAD_SHAPE_CUSTOM )
+        pad->MergeBasicShapesAsPolygon();
+
     return pad.release();
 }
 
diff --git a/pcbnew/plot_brditems_plotter.cpp b/pcbnew/plot_brditems_plotter.cpp
index 6f53c7b..f20ae2d 100644
--- a/pcbnew/plot_brditems_plotter.cpp
+++ b/pcbnew/plot_brditems_plotter.cpp
@@ -182,6 +182,19 @@ void BRDITEMS_PLOTTER::PlotPad( D_PAD* aPad, COLOR4D aColor, EDA_DRAW_MODE_T aPl
                                       aPad->GetOrientation(), aPlotMode, &gbr_metadata );
         break;
 
+    case PAD_SHAPE_CUSTOM:
+        {
+        SHAPE_POLY_SET polygons;
+        aPad->MergeBasicShapesAsPolygon(&polygons, 64 );
+
+        if( polygons.OutlineCount() == 0 )
+            break;
+
+        aPad->BasicShapesAsPolygonToBoardPosition( &polygons, shape_pos, aPad->GetOrientation() );
+        m_plotter->FlashPadCustom( shape_pos, aPad->GetSize(), &polygons, aPlotMode, &gbr_metadata );
+        }
+        break;
+
     case PAD_SHAPE_RECT:
     default:
         m_plotter->FlashPadRect( shape_pos, aPad->GetSize(),
diff --git a/pcbnew/router/pns_kicad_iface.cpp b/pcbnew/router/pns_kicad_iface.cpp
index 0c5ea1f..5115d89 100644
--- a/pcbnew/router/pns_kicad_iface.cpp
+++ b/pcbnew/router/pns_kicad_iface.cpp
@@ -626,6 +626,26 @@ std::unique_ptr<PNS::SOLID> PNS_KICAD_IFACE::syncPad( D_PAD* aPad )
             }
                 break;
 
+            case PAD_SHAPE_CUSTOM:
+            {
+                SHAPE_POLY_SET outline;
+                outline.Append( aPad->GetCustomShapeAsPolygon() );
+                aPad->BasicShapesAsPolygonToBoardPosition( &outline, wx_c, aPad->GetOrientation() );
+
+                for( int jj = 0; jj < outline.OutlineCount(); ++jj )
+                {
+                    SHAPE_CONVEX* shape = new SHAPE_CONVEX();
+                    const SHAPE_LINE_CHAIN& poly = outline.COutline( jj );
+
+                    for( int ii = 0; ii < poly.PointCount(); ii++ )
+                        shape->Append( wxPoint( poly.CPoint( ii ).x, poly.CPoint( ii ).y ) );
+
+                    solid->SetShape( shape );
+                }
+
+                break;
+            }
+
             default:
                 wxLogTrace( "PNS", "unsupported pad shape" );
                 return nullptr;
@@ -722,6 +742,26 @@ std::unique_ptr<PNS::SOLID> PNS_KICAD_IFACE::syncPad( D_PAD* aPad )
                 break;
             }
 
+            case PAD_SHAPE_CUSTOM:
+            {
+                SHAPE_POLY_SET outline;
+                outline.Append( aPad->GetCustomShapeAsPolygon() );
+                aPad->BasicShapesAsPolygonToBoardPosition( &outline, wx_c, aPad->GetOrientation() );
+
+                for( int jj = 0; jj < outline.OutlineCount(); ++jj )
+                {
+                    SHAPE_CONVEX* shape = new SHAPE_CONVEX();
+                    const SHAPE_LINE_CHAIN& poly = outline.COutline( jj );
+
+                    for( int ii = 0; ii < poly.PointCount(); ii++ )
+                        shape->Append( wxPoint( poly.CPoint( ii ).x, poly.CPoint( ii ).y ) );
+
+                    solid->SetShape( shape );
+                }
+
+                break;
+            }
+
             default:
                 wxLogTrace( "PNS", "unsupported pad shape" );
                 return nullptr;
diff --git a/pcbnew/zones_convert_brd_items_to_polygons_with_Boost.cpp b/pcbnew/zones_convert_brd_items_to_polygons_with_Boost.cpp
index 2d2df3c..3de1c98 100644
--- a/pcbnew/zones_convert_brd_items_to_polygons_with_Boost.cpp
+++ b/pcbnew/zones_convert_brd_items_to_polygons_with_Boost.cpp
@@ -69,6 +69,7 @@
 
 #include <geometry/shape_poly_set.h>
 #include <geometry/shape_file_io.h>
+#include <geometry/convex_hull.h>
 
 /* DEBUG OPTION:
  * To emit zone data to a file when filling zones for the debugging purposes,
@@ -190,10 +191,44 @@ void ZONE_CONTAINER::buildFeatureHoleList( BOARD* aPcb, SHAPE_POLY_SET& aFeature
                 if( item_boundingbox.Intersects( zone_boundingbox ) )
                 {
                     int clearance = std::max( zone_clearance, item_clearance );
-                    pad->TransformShapeWithClearanceToPolygon( aFeatures,
-                                                               clearance,
-                                                               segsPerCircle,
-                                                               correctionFactor );
+
+                    // PAD_SHAPE_CUSTOM have a specific keepout, to avoid to break the shape
+                    // The keepout area is the bounding box (with clearance)
+                    // Other way: use the convex hull.
+                    if( pad->GetShape() == PAD_SHAPE_CUSTOM )
+                    {
+                        if( clearance > item_clearance )
+                            item_boundingbox.Inflate( clearance - item_clearance );
+
+                        if( item_boundingbox.Intersects( zone_boundingbox ) )
+                        {
+#if 0
+                            TransformRoundRectToPolygon( aFeatures,
+                                          item_boundingbox.Centre(), item_boundingbox.GetSize(),
+                                          correctionFactor, clearance, segsPerCircle );
+#else
+
+                            // I am using the convex hull of the pad shape.
+                            // this option can be discussed, but it preserve the complex shape.
+                            SHAPE_POLY_SET outline( pad->GetCustomShapeAsPolygon() );
+                            outline.Inflate( KiROUND( clearance*correctionFactor) , segsPerCircle );
+                            pad->BasicShapesAsPolygonToBoardPosition( &outline,
+                                        pad->GetPosition(), pad->GetOrientation() );
+
+                            std::vector<wxPoint> convex_hull;
+                            BuildConvexHull( convex_hull, outline );
+
+                            aFeatures.NewOutline();
+                            for( unsigned ii = 0; ii < convex_hull.size(); ++ii )
+                                aFeatures.Append( convex_hull[ii] );
+                        }
+#endif
+                    }
+                    else
+                        pad->TransformShapeWithClearanceToPolygon( aFeatures,
+                                                                   clearance,
+                                                                   segsPerCircle,
+                                                                   correctionFactor );
                 }
 
                 continue;
@@ -216,6 +251,42 @@ void ZONE_CONTAINER::buildFeatureHoleList( BOARD* aPcb, SHAPE_POLY_SET& aFeature
                                                                correctionFactor );
                 }
             }
+
+            // PAD_SHAPE_CUSTOM have a specific keepout, to avoid to break the shape
+            // The keepout area is the bounding box (with clearance)
+            // Other way: use the convex hull.
+            if( pad->GetShape() == PAD_SHAPE_CUSTOM )
+            {
+                int gap = zone_clearance;
+                int thermalGap = GetThermalReliefGap( pad );
+                gap = std::max( gap, thermalGap );
+                item_boundingbox = pad->GetBoundingBox();
+                item_boundingbox.Inflate( gap );
+
+                if( item_boundingbox.Intersects( zone_boundingbox ) )
+                {
+#if 0
+                    TransformRoundRectToPolygon( aFeatures,
+                                  item_boundingbox.Centre(), item_boundingbox.GetSize(),
+                                  correctionFactor, gap, segsPerCircle );
+#else
+                    SHAPE_POLY_SET outline( pad->GetCustomShapeAsPolygon() );
+                    outline.Inflate( KiROUND( gap*correctionFactor) , segsPerCircle );
+                    pad->BasicShapesAsPolygonToBoardPosition( &outline,
+                                pad->GetPosition(), pad->GetOrientation() );
+
+                    // I am using the convex hull of the pad shape.
+                    // this option can be discussed, but it preserve the complex shape.
+                    std::vector<wxPoint> convex_hull;
+                    BuildConvexHull( convex_hull, outline );
+
+                    aFeatures.NewOutline();
+
+                    for( unsigned ii = 0; ii < convex_hull.size(); ++ii )
+                        aFeatures.Append( convex_hull[ii] );
+#endif
+                }
+            }
         }
     }
 
(kicad_pcb (version 20170123) (host pcbnew "(2017-07-19 revision e1dcdb0)-master")

  (general
    (thickness 1.6)
    (drawings 10)
    (tracks 18)
    (zones 0)
    (modules 5)
    (nets 3)
  )

  (page A4)
  (layers
    (0 F.Cu signal)
    (31 B.Cu signal)
    (32 B.Adhes user)
    (33 F.Adhes user)
    (34 B.Paste user)
    (35 F.Paste user)
    (36 B.SilkS user)
    (37 F.SilkS user)
    (38 B.Mask user)
    (39 F.Mask user)
    (40 Dwgs.User user)
    (41 Cmts.User user)
    (42 Eco1.User user)
    (43 Eco2.User user)
    (44 Edge.Cuts user)
    (45 Margin user)
    (46 B.CrtYd user)
    (47 F.CrtYd user)
    (48 B.Fab user)
    (49 F.Fab user)
  )

  (setup
    (last_trace_width 0.5)
    (trace_clearance 0.4)
    (zone_clearance 0.5)
    (zone_45_only no)
    (trace_min 0.2)
    (segment_width 2)
    (edge_width 0.15)
    (via_size 0.6)
    (via_drill 0.4)
    (via_min_size 0.4)
    (via_min_drill 0.3)
    (uvia_size 0.3)
    (uvia_drill 0.1)
    (uvias_allowed no)
    (uvia_min_size 0.2)
    (uvia_min_drill 0.1)
    (pcb_text_width 0.3)
    (pcb_text_size 1.5 1.5)
    (mod_edge_width 0.15)
    (mod_text_size 1 1)
    (mod_text_width 0.15)
    (pad_size 1 1)
    (pad_drill 0)
    (pad_to_mask_clearance 0.2)
    (aux_axis_origin 0 0)
    (visible_elements 7FFFFFFF)
    (pcbplotparams
      (layerselection 0x000fc_ffffffff)
      (usegerberextensions false)
      (usegerberattributes true)
      (usegerberadvancedattributes true)
      (excludeedgelayer true)
      (linewidth 0.150000)
      (plotframeref false)
      (viasonmask false)
      (mode 1)
      (useauxorigin false)
      (hpglpennumber 1)
      (hpglpenspeed 20)
      (hpglpendiameter 15)
      (psnegative false)
      (psa4output false)
      (plotreference true)
      (plotvalue true)
      (plotinvisibletext false)
      (padsonsilk false)
      (subtractmaskfromsilk false)
      (outputformat 1)
      (mirror false)
      (drillshape 0)
      (scaleselection 1)
      (outputdirectory plots))
  )

  (net 0 "")
  (net 1 /PAD2)
  (net 2 /PAD1)

  (net_class Default "Ceci est la Netclass par défaut"
    (clearance 0.4)
    (trace_width 0.5)
    (via_dia 0.6)
    (via_drill 0.4)
    (uvia_dia 0.3)
    (uvia_drill 0.1)
    (add_net /PAD1)
    (add_net /PAD2)
  )

  (module Discret:C2 (layer F.Cu) (tedit 58D3E0C8) (tstamp 56A6452D)
    (at 104.299 99.72)
    (descr "Condensateur = 2 pas")
    (tags C)
    (path /56A7CE3B)
    (fp_text reference R1 (at -11.5 -15.1) (layer F.SilkS)
      (effects (font (size 1 1) (thickness 0.2)))
    )
    (fp_text value R (at -13.4 14) (layer F.SilkS) hide
      (effects (font (size 1.016 1.016) (thickness 0.2032)))
    )
    (fp_circle (center 0 0) (end 11.3 -11.3) (layer F.SilkS) (width 0.15))
    (fp_circle (center 0 0) (end 17 3) (layer F.CrtYd) (width 0.05))
    (pad 2 connect custom (at 10.509 -0.025 270) (size 3 2) (layers F.Cu F.Mask)
      (net 1 /PAD2)
      (basic_shapes
        (anchor_pad_shape rect)
        (gr_line (start 3 0.5) (end 3 17) (width 2))
        (gr_line (start -3 0.5) (end -3 17) (width 2))
        (gr_arc (start 0 9.9) (end -9.9 7.9) (angle 156.7) (width 2))
        (gr_arc (start 0 9.9) (end -15 7.9) (angle 165) (width 2))
        (gr_line (start 0 0) (end 0 -5) (width 2))
      ))
    (pad 1 connect custom (at -10.5 0 90) (size 1.397 1.397) (layers F.Cu F.Mask)
      (net 2 /PAD1)
      (basic_shapes
        (anchor_pad_shape circle)
        (gr_line (start 6 1.9) (end 6 13.9) (width 2))
        (gr_line (start -6 1.9) (end -6 13.9) (width 2))
        (gr_line (start 0 -0.1) (end 0 18) (width 2))
        (gr_arc (start 0 9.9) (end -9.9 7.9) (angle 156.7) (width 2))
      ))
    (model discret/capa_2pas_5x5mm.wrl
      (at (xyz 0 0 0))
      (scale (xyz 1 1 1))
      (rotate (xyz 0 0 0))
    )
  )

  (module Dip_sockets:DIP-14__300_ELL (layer F.Cu) (tedit 589DE1B3) (tstamp 56AE982A)
    (at 167 116 180)
    (descr "14 pins DIL package, elliptical pads")
    (tags DIL)
    (fp_text reference U*** (at -5.08 -1.27 180) (layer F.SilkS)
      (effects (font (size 1.524 1.143) (thickness 0.3048)))
    )
    (fp_text value DIP-14_300_ELL (at 1.27 1.27 180) (layer F.SilkS)
      (effects (font (size 1.524 1.143) (thickness 0.3048)))
    )
    (fp_line (start -10.16 -2.54) (end 10.16 -2.54) (layer F.SilkS) (width 0.381))
    (fp_line (start 10.16 2.54) (end -10.16 2.54) (layer F.SilkS) (width 0.381))
    (fp_line (start -10.16 2.54) (end -10.16 -2.54) (layer F.SilkS) (width 0.381))
    (fp_line (start -10.16 -1.27) (end -8.89 -1.27) (layer F.SilkS) (width 0.381))
    (fp_line (start -8.89 -1.27) (end -8.89 1.27) (layer F.SilkS) (width 0.381))
    (fp_line (start -8.89 1.27) (end -10.16 1.27) (layer F.SilkS) (width 0.381))
    (fp_line (start 10.16 -2.54) (end 10.16 2.54) (layer F.SilkS) (width 0.381))
    (pad 14 thru_hole trapezoid (at -7.62 -3.81 180) (size 1.5748 2.286) (rect_delta 0 1 ) (drill 0.8128) (layers *.Cu *.Mask F.SilkS))
    (pad 13 thru_hole oval (at -5.08 -3.81 210) (size 1.5748 2.286) (drill 0.8128) (layers *.Cu *.Mask F.SilkS))
    (pad 12 thru_hole oval (at -2.54 -3.81 180) (size 1.5748 2.286) (drill 0.8128) (layers *.Cu *.Mask F.SilkS))
    (pad 11 thru_hole oval (at 0 -3.81 180) (size 1.5748 2.286) (drill 0.8128) (layers *.Cu *.Mask F.SilkS))
    (pad 10 thru_hole oval (at 2.54 -3.81 180) (size 1.5748 2.286) (drill 0.8128) (layers *.Cu *.Mask F.SilkS))
    (pad 9 thru_hole oval (at 5.08 -3.81 180) (size 1.5748 2.286) (drill 0.8128) (layers *.Cu *.Mask F.SilkS))
    (pad 8 smd custom (at 22.5 9.5 180) (size 1 1) (layers F.Cu F.Paste F.SilkS F.Mask)
      (basic_shapes
        (anchor_pad_shape circle)
        (gr_circle (center 0 -10) (end 2.5 -10) (width 1))
        (gr_circle (center 0 -10) (end 5 -10) (width 1))
        (gr_circle (center 0 -10) (end 7.5 -10) (width 1))
        (gr_circle (center 0 -10) (end 10 -10) (width 1))
        (gr_line (start 0 0) (end 0 -7.5) (width 1))
      ))
    (pad 7 thru_hole custom (at 7.62 3.81 180) (size 1.6 1.6) (drill 0.8) (layers *.Cu *.Mask F.SilkS)
      (basic_shapes
        (anchor_pad_shape circle)
      ))
    (pad 6 thru_hole oval (at 5.08 3.81 180) (size 1.5748 2.286) (drill 0.8128) (layers *.Cu *.Mask F.SilkS))
    (pad 5 thru_hole oval (at 2.54 3.81 180) (size 1.5748 2.286) (drill 0.8128) (layers *.Cu *.Mask F.SilkS))
    (pad 4 thru_hole oval (at 0 3.81 180) (size 1.5748 2.286) (drill 0.8128) (layers *.Cu *.Mask F.SilkS))
    (pad 3 thru_hole oval (at -2.54 3.81 180) (size 1.5748 2.286) (drill 0.8128) (layers *.Cu *.Mask F.SilkS))
    (pad 2 thru_hole oval (at -5.08 3.81 180) (size 1.5748 2.286) (drill 0.8128) (layers *.Cu *.Mask F.SilkS))
    (pad 1 thru_hole rect (at -8.2 3.8 180) (size 1.5748 2.286) (drill 0.8128) (layers *.Cu *.Mask F.SilkS))
    (model dil/dil_14.wrl
      (at (xyz 0 0 0))
      (scale (xyz 1 1 1))
      (rotate (xyz 0 0 0))
    )
  )

  (module Connect:1pin (layer F.Cu) (tedit 57E50E55) (tstamp 56AA30DC)
    (at 173.3 58.7)
    (descr "module 1 pin (ou trou mecanique de percage)")
    (tags DEV)
    (fp_text reference REF_A2 (at -11.4 3) (layer F.SilkS)
      (effects (font (size 1 1) (thickness 0.15)))
    )
    (fp_text value ANTENNA_pad_polyline (at 0 2.794) (layer F.Fab)
      (effects (font (size 1 1) (thickness 0.15)))
    )
    (fp_line (start -20 -10) (end 1.5 -10) (layer F.SilkS) (width 0.15))
    (fp_line (start 1.5 -10) (end 1.5 1) (layer F.SilkS) (width 0.15))
    (fp_line (start 1.5 1) (end -20 1) (layer F.SilkS) (width 0.15))
    (fp_line (start -20 1) (end -20 -10) (layer F.SilkS) (width 0.15))
    (pad 1 smd custom (at 0 0) (size 1 1) (layers F.Cu F.Paste F.Mask)
      (basic_shapes
        (anchor_pad_shape circle)
        (gr_line (start -0.4928 -8.5) (end -0.4928 0.5) (width 0.1))
        (gr_line (start -6.4928 -8.5) (end -0.4928 -8.5) (width 0.1))
        (gr_line (start -6.4928 0.5) (end -6.4928 -8.5) (width 0.1))
        (gr_line (start -7.4928 0.5) (end -6.4928 0.5) (width 0.1))
        (gr_line (start -7.4928 -8.5) (end -7.4928 0.5) (width 0.1))
        (gr_line (start -9.4928 -8.5) (end -7.4928 -8.5) (width 0.1))
        (gr_line (start -9.4928 -4.5) (end -9.4928 -8.5) (width 0.1))
        (gr_line (start -12.4928 -4.5) (end -9.4928 -4.5) (width 0.1))
        (gr_line (start -12.4928 -8.5) (end -12.4928 -4.5) (width 0.1))
        (gr_line (start -13.4928 -8.5) (end -12.4928 -8.5) (width 0.1))
        (gr_line (start -13.4928 -4.5) (end -13.4928 -8.5) (width 0.1))
        (gr_line (start -16.4928 -4.5) (end -13.4928 -4.5) (width 0.1))
        (gr_line (start -16.4928 -8.5) (end -16.4928 -4.5) (width 0.1))
        (gr_line (start -17.4928 -8.5) (end -16.4928 -8.5) (width 0.1))
        (gr_line (start -17.4928 -4.5) (end -17.4928 -8.5) (width 0.1))
        (gr_line (start -19.4928 -4.5) (end -17.4928 -4.5) (width 0.1))
        (gr_line (start -19.4928 -9.5) (end -19.4928 -4.5) (width 0.1))
        (gr_line (start -15.4928 -9.5) (end -19.4928 -9.5) (width 0.1))
        (gr_line (start -15.4928 -5.5) (end -15.4928 -9.5) (width 0.1))
        (gr_line (start -14.4928 -5.5) (end -15.4928 -5.5) (width 0.1))
        (gr_line (start -14.4928 -9.5) (end -14.4928 -5.5) (width 0.1))
        (gr_line (start -11.4928 -9.5) (end -14.4928 -9.5) (width 0.1))
        (gr_line (start -11.4928 -5.5) (end -11.4928 -9.5) (width 0.1))
        (gr_line (start -10.4928 -5.5) (end -11.4928 -5.5) (width 0.1))
        (gr_line (start -10.4928 -9.5) (end -10.4928 -5.5) (width 0.1))
        (gr_line (start 0.5072 -9.5) (end -10.4928 -9.5) (width 0.1))
        (gr_line (start 0.5072 0.5) (end 0.5072 -9.5) (width 0.1))
        (gr_line (start -0.4928 0.5) (end 0.5072 0.5) (width 0.1))
      ))
  )

  (module Connect:1pin (layer F.Cu) (tedit 587D2039) (tstamp 56AA42FE)
    (at 90.2 62.4)
    (descr "module 1 pin (ou trou mecanique de percage)")
    (tags DEV)
    (fp_text reference REF_A1 (at 0 -3.048) (layer F.SilkS)
      (effects (font (size 1 1) (thickness 0.15)))
    )
    (fp_text value ANTENNA_pad_polygon (at -2.2 2.7) (layer F.Fab)
      (effects (font (size 1 1) (thickness 0.15)))
    )
    (fp_line (start -20 -10) (end 1.5 -10) (layer F.SilkS) (width 0.15))
    (fp_line (start 1.5 -10) (end 1.5 1) (layer F.SilkS) (width 0.15))
    (fp_line (start 1.5 1) (end -20 1) (layer F.SilkS) (width 0.15))
    (fp_line (start -20 1) (end -20 -10) (layer F.SilkS) (width 0.15))
    (pad 1 smd custom (at 0 0) (size 1 1) (layers F.Cu F.Paste F.Mask)
      (basic_shapes
        (anchor_pad_shape circle)
        (gr_poly (pts
           (xy 0.5 0.4) (xy 0.5 -9.6) (xy -10.5 -9.6) (xy -10.5 -5.6) (xy -11.5 -5.6)
           (xy -11.5 -9.6) (xy -14.5 -9.6) (xy -14.5 -5.6) (xy -15.5 -5.6) (xy -15.5 -9.6)
           (xy -19.5 -9.6) (xy -19.5 -4.6) (xy -17.5 -4.6) (xy -17.5 -8.6) (xy -16.5 -8.6)
           (xy -16.5 -4.6) (xy -13.5 -4.6) (xy -13.5 -8.6) (xy -12.5 -8.6) (xy -12.5 -4.6)
           (xy -9.5 -4.6) (xy -9.5 -8.6) (xy -7.5 -8.6) (xy -7.5 0.4) (xy -6.5 0.4)
           (xy -6.5 -8.6) (xy -0.5 -8.6) (xy -0.5 0.4)) (width 0.2))
      ))
  )

  (module Diodes_SMD:DO-214AB (layer F.Cu) (tedit 589B2E08) (tstamp 56A72D3C)
    (at 138.176 106.68)
    (descr "Jedec DO-214AB diode package. Designed according to Fairchild SS32 datasheet.")
    (tags "DO-214AB diode")
    (path /56A7CEC8)
    (attr smd)
    (fp_text reference R2 (at 0 -4.2) (layer F.SilkS)
      (effects (font (size 1 1) (thickness 0.15)))
    )
    (fp_text value R (at 0 4.6) (layer F.Fab)
      (effects (font (size 1 1) (thickness 0.15)))
    )
    (fp_line (start -5.15 -3.45) (end 5.15 -3.45) (layer F.CrtYd) (width 0.05))
    (fp_line (start 5.15 -3.45) (end 5.15 3.45) (layer F.CrtYd) (width 0.05))
    (fp_line (start 5.15 3.45) (end -5.15 3.45) (layer F.CrtYd) (width 0.05))
    (fp_line (start -5.15 3.45) (end -5.15 -3.45) (layer F.CrtYd) (width 0.05))
    (fp_line (start 3.5 3.2) (end -4.8 3.2) (layer F.SilkS) (width 0.15))
    (fp_line (start -4.8 -3.2) (end 3.5 -3.2) (layer F.SilkS) (width 0.15))
    (pad 1 smd roundrect (at -3.6 0) (size 2.6 3.2) (layers F.Cu F.Paste F.Mask)(roundrect_rratio 0.1)
      (net 2 /PAD1))
    (pad 2 smd circle (at 3.048 -1.524) (size 2.6 2.6) (layers F.Cu F.Paste F.Mask)
      (net 1 /PAD2))
    (model Diodes_SMD.3dshapes/DO-214AB.wrl
      (at (xyz 0 0 0))
      (scale (xyz 0.39 0.39 0.39))
      (rotate (xyz 0 0 180))
    )
  )

  (gr_line (start 61 138) (end 61 48) (angle 90) (layer Edge.Cuts) (width 0.15))
  (gr_line (start 179 138) (end 61 138) (angle 90) (layer Edge.Cuts) (width 0.15))
  (gr_line (start 179 48) (end 179 138) (angle 90) (layer Edge.Cuts) (width 0.15))
  (gr_line (start 61 48) (end 179 48) (angle 90) (layer Edge.Cuts) (width 0.15))
  (gr_line (start 2.9 0.7) (end 2.9 16.5) (layer Eco1.User) (width 2))
  (gr_line (start -3.1 0.8) (end -3.1 16.6) (layer Eco1.User) (width 2))
  (gr_line (start 5.9 2.1) (end 5.9 14.1) (layer Cmts.User) (width 2))
  (gr_line (start -6.1 2.1) (end -6.1 14.1) (layer Cmts.User) (width 2))
  (gr_line (start -0.1 0.1) (end -0.1 17.1) (layer Cmts.User) (width 2))
  (gr_arc (start -0.1 10.1) (end -10 8.1) (angle 156.7190291) (layer Cmts.User) (width 2))

  (segment (start 133.531 101.4) (end 139.7 101.4) (width 0.5) (layer F.Cu) (net 1))
  (segment (start 141 102.7) (end 139.7 101.4) (width 0.5) (layer F.Cu) (net 1))
  (segment (start 141 102.7) (end 141 104.932) (width 0.5) (layer F.Cu) (net 1))
  (segment (start 133.531 101.4) (end 133.431 101.3) (width 0.5) (layer F.Cu) (net 1) (tstamp 596F8A9A))
  (segment (start 133.431 101.3) (end 133.3 101.3) (width 0.5) (layer F.Cu) (net 1) (tstamp 596F8A9B))
  (segment (start 133.3 101.3) (end 133.3 101.169) (width 0.5) (layer F.Cu) (net 1) (tstamp 596F8A9C))
  (segment (start 141.224 105.156) (end 141 104.932) (width 0.5) (layer F.Cu) (net 1))
  (segment (start 133.531 101.4) (end 133.3 101.169) (width 0.5) (layer F.Cu) (net 1))
  (segment (start 133.3 101.169) (end 131.826 99.695) (width 0.5) (layer F.Cu) (net 1) (tstamp 596F8A9D))
  (segment (start 131.826 99.695) (end 114.808 99.695) (width 0.5) (layer F.Cu) (net 1))
  (segment (start 119.3 111.224235) (end 96.324235 111.224235) (width 0.5) (layer F.Cu) (net 2))
  (segment (start 128.675765 111.224235) (end 119.3 111.224235) (width 0.5) (layer F.Cu) (net 2))
  (segment (start 93.799 99.72) (end 90.526 99.72) (width 0.5) (layer F.Cu) (net 2))
  (segment (start 96.324235 111.224235) (end 94.841235 111.224235) (width 0.5) (layer F.Cu) (net 2) (tstamp 596F8A78))
  (segment (start 89.535 100.711) (end 90.526 99.72) (width 0.5) (layer F.Cu) (net 2))
  (segment (start 94.841235 111.224235) (end 89.535 105.918) (width 0.5) (layer F.Cu) (net 2))
  (segment (start 89.535 105.918) (end 89.535 100.711) (width 0.5) (layer F.Cu) (net 2))
  (segment (start 128.675765 111.224235) (end 133.8 106.1) (width 0.5) (layer F.Cu) (net 2))

  (zone (net 2) (net_name /PAD1) (layer F.Cu) (tstamp 589B2DB1) (hatch edge 0.508)
    (connect_pads (clearance 0.5))
    (min_thickness 0.254)
    (fill yes (arc_segments 16) (thermal_gap 0.508) (thermal_bridge_width 0.508))
    (polygon
      (pts
        (xy 62.992 48.768) (xy 177.8 48.768) (xy 177.8 136.652) (xy 62.992 137.16)
      )
    )
    (filled_polygon
      (pts
        (xy 153.151578 48.987968) (xy 153.15041 48.991592) (xy 153.148935 48.9963) (xy 153.14791 48.999672) (xy 153.123527 49.115146)
        (xy 153.122874 49.119412) (xy 153.122443 49.123085) (xy 153.121902 49.12807) (xy 153.117932 49.195474) (xy 153.117929 49.195838)
        (xy 153.117927 49.196172) (xy 153.117916 49.2) (xy 153.117916 54.2) (xy 153.120964 54.262355) (xy 153.121438 54.267358)
        (xy 153.121764 54.270491) (xy 153.145254 54.391361) (xy 153.146162 54.394517) (xy 153.147565 54.399219) (xy 153.14895 54.403747)
        (xy 153.194257 54.514816) (xy 153.196512 54.519167) (xy 153.198825 54.523554) (xy 153.200387 54.526452) (xy 153.267967 54.628978)
        (xy 153.270136 54.631706) (xy 153.273234 54.635531) (xy 153.275344 54.638089) (xy 153.361853 54.725792) (xy 153.364222 54.727806)
        (xy 153.368047 54.730991) (xy 153.372843 54.734935) (xy 153.469739 54.800784) (xy 153.475224 54.80382) (xy 153.479498 54.806151)
        (xy 153.482989 54.808018) (xy 153.595168 54.855622) (xy 165.595168 59.855622) (xy 165.598792 59.85679) (xy 165.6035 59.858265)
        (xy 165.606872 59.85929) (xy 165.722346 59.883673) (xy 165.726612 59.884326) (xy 165.730285 59.884757) (xy 165.73527 59.885298)
        (xy 165.802674 59.889268) (xy 165.803038 59.889271) (xy 165.803372 59.889273) (xy 165.8072 59.889284) (xy 173.8072 59.889284)
        (xy 173.869555 59.886236) (xy 173.874558 59.885762) (xy 173.877691 59.885436) (xy 173.998561 59.861946) (xy 174.001717 59.861038)
        (xy 174.006419 59.859635) (xy 174.010947 59.85825) (xy 174.122016 59.812943) (xy 174.126367 59.810688) (xy 174.130754 59.808375)
        (xy 174.133652 59.806813) (xy 174.236178 59.739233) (xy 174.238906 59.737064) (xy 174.242731 59.733966) (xy 174.245289 59.731856)
        (xy 174.332992 59.645347) (xy 174.335006 59.642978) (xy 174.338191 59.639153) (xy 174.342135 59.634357) (xy 174.407984 59.537461)
        (xy 174.41102 59.531976) (xy 174.413351 59.527702) (xy 174.415218 59.524211) (xy 174.462822 59.412032) (xy 174.46399 59.408408)
        (xy 174.465465 59.4037) (xy 174.46649 59.400328) (xy 174.490873 59.284854) (xy 174.491526 59.280588) (xy 174.491957 59.276915)
        (xy 174.492498 59.27193) (xy 174.496468 59.204526) (xy 174.496471 59.204162) (xy 174.496473 59.203828) (xy 174.496484 59.2)
        (xy 174.496484 49.2) (xy 174.493436 49.137645) (xy 174.492962 49.132642) (xy 174.492636 49.129509) (xy 174.469146 49.008639)
        (xy 174.468238 49.005483) (xy 174.466835 49.000781) (xy 174.46545 48.996253) (xy 174.424147 48.895) (xy 177.673 48.895)
        (xy 177.673 136.52556) (xy 63.119 137.032437) (xy 63.119 99.831375) (xy 91.963576 99.831375) (xy 91.966354 99.898242)
        (xy 91.967663 99.912143) (xy 91.968096 99.916578) (xy 92.166571 101.877736) (xy 92.175888 101.939498) (xy 92.208708 102.108675)
        (xy 92.22442 102.173725) (xy 92.228404 102.187107) (xy 92.229692 102.191378) (xy 92.80531 104.076635) (xy 92.826445 104.13541)
        (xy 92.891502 104.294996) (xy 92.919563 104.355781) (xy 92.926071 104.368134) (xy 92.928149 104.372046) (xy 93.858987 106.109593)
        (xy 93.891135 106.163141) (xy 93.985953 106.307055) (xy 94.025269 106.361211) (xy 94.034052 106.372065) (xy 94.036866 106.375517)
        (xy 95.287467 107.899172) (xy 95.329405 107.945458) (xy 95.450364 108.06821) (xy 95.499463 108.113709) (xy 95.510187 108.12265)
        (xy 95.513608 108.125482) (xy 97.036339 109.37721) (xy 97.086468 109.414468) (xy 97.22897 109.51139) (xy 97.285972 109.546485)
        (xy 97.298229 109.553173) (xy 97.302133 109.555286) (xy 99.038992 110.487408) (xy 99.095404 110.51422) (xy 99.254016 110.581616)
        (xy 99.316737 110.604967) (xy 99.330059 110.609147) (xy 99.33431 110.610465) (xy 101.219139 111.187478) (xy 101.279685 111.202822)
        (xy 101.470986 111.241468) (xy 101.595105 111.254122) (xy 101.79027 111.254876) (xy 101.91449 111.24318) (xy 102.106084 111.206011)
        (xy 102.161291 111.189576) (xy 105.528525 115.656769) (xy 105.651626 115.808215) (xy 105.739392 115.896888) (xy 105.889563 116.021539)
        (xy 105.992885 116.091479) (xy 106.164409 116.184588) (xy 106.279346 116.233127) (xy 106.465688 116.291147) (xy 106.587861 116.316436)
        (xy 106.781924 116.337158) (xy 106.906688 116.338236) (xy 107.10108 116.320869) (xy 107.167356 116.311429) (xy 107.181057 116.308739)
        (xy 107.185405 116.307869) (xy 109.305828 115.876258) (xy 109.366347 115.860826) (xy 109.49088 115.825223) (xy 109.554613 115.804753)
        (xy 109.567665 115.799793) (xy 109.571807 115.798202) (xy 112.325227 114.729924) (xy 112.382282 114.704515) (xy 112.536641 114.627873)
        (xy 112.595164 114.595426) (xy 112.607004 114.588026) (xy 112.61078 114.585647) (xy 115.104266 113.002906) (xy 115.155299 112.966899)
        (xy 115.291832 112.861734) (xy 115.342947 112.818531) (xy 115.353124 112.808972) (xy 115.356357 112.805913) (xy 117.494931 110.768994)
        (xy 117.537999 110.72376) (xy 117.651505 110.594079) (xy 117.693255 110.54177) (xy 117.701381 110.530417) (xy 117.703958 110.526789)
        (xy 119.406166 108.113278) (xy 119.43963 108.060536) (xy 119.525782 107.911285) (xy 119.556569 107.851878) (xy 119.562336 107.839162)
        (xy 119.564168 107.835083) (xy 119.951122 106.96575) (xy 132.641 106.96575) (xy 132.641 108.40631) (xy 132.737673 108.639699)
        (xy 132.916302 108.818327) (xy 133.149691 108.915) (xy 134.29025 108.915) (xy 134.449 108.75625) (xy 134.449 106.807)
        (xy 134.703 106.807) (xy 134.703 108.75625) (xy 134.86175 108.915) (xy 136.002309 108.915) (xy 136.235698 108.818327)
        (xy 136.414327 108.639699) (xy 136.511 108.40631) (xy 136.511 106.96575) (xy 136.35225 106.807) (xy 134.703 106.807)
        (xy 134.449 106.807) (xy 132.79975 106.807) (xy 132.641 106.96575) (xy 119.951122 106.96575) (xy 120.765169 105.13691)
        (xy 120.78775 105.078677) (xy 120.830286 104.95369) (xy 132.641 104.95369) (xy 132.641 106.39425) (xy 132.79975 106.553)
        (xy 134.449 106.553) (xy 134.449 104.60375) (xy 134.703 104.60375) (xy 134.703 106.553) (xy 136.35225 106.553)
        (xy 136.511 106.39425) (xy 136.511 104.95369) (xy 136.414327 104.720301) (xy 136.235698 104.541673) (xy 136.002309 104.445)
        (xy 134.86175 104.445) (xy 134.703 104.60375) (xy 134.449 104.60375) (xy 134.29025 104.445) (xy 133.149691 104.445)
        (xy 132.916302 104.541673) (xy 132.737673 104.720301) (xy 132.641 104.95369) (xy 120.830286 104.95369) (xy 120.843274 104.915527)
        (xy 120.861937 104.851264) (xy 120.865124 104.83767) (xy 120.866127 104.833326) (xy 121.520178 101.953263) (xy 121.531018 101.89175)
        (xy 121.553795 101.720928) (xy 121.559621 101.654268) (xy 121.560107 101.640315) (xy 121.560246 101.635851) (xy 121.589863 100.572)
        (xy 131.462734 100.572) (xy 132.480673 101.589938) (xy 132.489758 101.635613) (xy 132.679867 101.920133) (xy 132.964387 102.110242)
        (xy 133.080204 102.13328) (xy 133.081424 102.134095) (xy 133.195386 102.210242) (xy 133.531 102.277) (xy 139.336734 102.277)
        (xy 140.123 103.063265) (xy 140.123 103.532265) (xy 139.591322 104.063017) (xy 139.297335 104.771014) (xy 139.296666 105.537622)
        (xy 139.589416 106.246132) (xy 139.785628 106.442686) (xy 138.324416 107.23276) (xy 138.22098 107.302528) (xy 136.642012 108.608764)
        (xy 136.554097 108.697295) (xy 135.258917 110.285343) (xy 135.189873 110.389263) (xy 134.227813 112.198635) (xy 134.180268 112.313988)
        (xy 133.587972 114.275766) (xy 133.563738 114.398156) (xy 133.363767 116.437617) (xy 133.360778 116.508926) (xy 133.364872 116.802103)
        (xy 133.369851 116.873301) (xy 133.626689 118.906383) (xy 133.654331 119.028048) (xy 134.301172 120.972524) (xy 134.351919 121.086504)
        (xy 135.364125 122.868308) (xy 135.436044 122.97026) (xy 136.77506 124.521526) (xy 136.865413 124.607568) (xy 138.480237 125.869206)
        (xy 138.58558 125.936059) (xy 140.414703 126.860016) (xy 140.531026 126.905134) (xy 142.504778 127.456215) (xy 142.627649 127.477881)
        (xy 144.67085 127.635097) (xy 144.795589 127.632484) (xy 146.830415 127.389846) (xy 146.952271 127.363054) (xy 148.901215 126.729804)
        (xy 149.015546 126.679854) (xy 150.804373 125.680112) (xy 150.906825 125.608906) (xy 152.467401 124.280752) (xy 152.554071 124.191003)
        (xy 153.826952 122.585026) (xy 153.894539 122.480152) (xy 154.831243 120.657524) (xy 154.877172 120.541518) (xy 155.198841 119.419724)
        (xy 160.5056 119.419724) (xy 160.5056 120.200276) (xy 160.613265 120.741543) (xy 160.919868 121.200408) (xy 161.378733 121.507011)
        (xy 161.92 121.614676) (xy 162.461267 121.507011) (xy 162.920132 121.200408) (xy 163.19 120.796521) (xy 163.459868 121.200408)
        (xy 163.918733 121.507011) (xy 164.46 121.614676) (xy 165.001267 121.507011) (xy 165.460132 121.200408) (xy 165.73 120.796521)
        (xy 165.999868 121.200408) (xy 166.458733 121.507011) (xy 167 121.614676) (xy 167.541267 121.507011) (xy 168.000132 121.200408)
        (xy 168.27 120.796521) (xy 168.539868 121.200408) (xy 168.998733 121.507011) (xy 169.54 121.614676) (xy 170.081267 121.507011)
        (xy 170.540132 121.200408) (xy 170.846735 120.741543) (xy 170.882067 120.563918) (xy 171.050232 120.855189) (xy 171.414106 121.270107)
        (xy 171.909064 121.514195) (xy 172.459754 121.550288) (xy 172.982338 121.372895) (xy 173.397256 121.009021) (xy 173.536138 120.727399)
        (xy 173.746904 121.20921) (xy 173.880559 121.405041) (xy 174.087957 121.54362) (xy 174.3326 121.592283) (xy 174.9074 121.592283)
        (xy 175.140382 121.548317) (xy 175.350465 121.413843) (xy 175.493096 121.20921) (xy 176.493096 118.92321) (xy 176.546683 118.667)
        (xy 176.49802 118.422357) (xy 176.359441 118.214959) (xy 176.152043 118.07638) (xy 175.9074 118.027717) (xy 173.3326 118.027717)
        (xy 173.07639 118.081304) (xy 172.871757 118.223935) (xy 172.772044 118.379712) (xy 172.745894 118.349893) (xy 172.250936 118.105805)
        (xy 171.700246 118.069712) (xy 171.177662 118.247105) (xy 170.762744 118.610979) (xy 170.722517 118.692551) (xy 170.540132 118.419592)
        (xy 170.081267 118.112989) (xy 169.54 118.005324) (xy 168.998733 118.112989) (xy 168.539868 118.419592) (xy 168.27 118.823479)
        (xy 168.000132 118.419592) (xy 167.541267 118.112989) (xy 167 118.005324) (xy 166.458733 118.112989) (xy 165.999868 118.419592)
        (xy 165.73 118.823479) (xy 165.460132 118.419592) (xy 165.001267 118.112989) (xy 164.46 118.005324) (xy 163.918733 118.112989)
        (xy 163.459868 118.419592) (xy 163.19 118.823479) (xy 162.920132 118.419592) (xy 162.461267 118.112989) (xy 161.92 118.005324)
        (xy 161.378733 118.112989) (xy 160.919868 118.419592) (xy 160.613265 118.878457) (xy 160.5056 119.419724) (xy 155.198841 119.419724)
        (xy 155.442019 118.571661) (xy 155.464542 118.448946) (xy 155.612571 116.686136) (xy 155.636019 116.406889) (xy 155.634277 116.282137)
        (xy 155.40585 114.245667) (xy 155.37991 114.123627) (xy 154.78846 112.259141) (xy 157.944596 112.259141) (xy 157.956709 112.392236)
        (xy 157.987035 112.545395) (xy 158.023097 112.664839) (xy 158.082595 112.809191) (xy 158.141168 112.91935) (xy 158.22757 113.049396)
        (xy 158.306426 113.146084) (xy 158.416443 113.256872) (xy 158.512579 113.336402) (xy 158.642019 113.42371) (xy 158.751768 113.483051)
        (xy 158.895701 113.543555) (xy 159.014887 113.58045) (xy 159.16783 113.611845) (xy 159.291914 113.624886) (xy 159.448043 113.625976)
        (xy 159.572299 113.614668) (xy 159.725666 113.585411) (xy 159.845351 113.550185) (xy 159.990115 113.491697) (xy 160.100687 113.433892)
        (xy 160.231333 113.348399) (xy 160.328565 113.270223) (xy 160.440118 113.160983) (xy 160.520319 113.065402) (xy 160.583689 112.972852)
        (xy 160.613265 113.121543) (xy 160.919868 113.580408) (xy 161.378733 113.887011) (xy 161.92 113.994676) (xy 162.461267 113.887011)
        (xy 162.920132 113.580408) (xy 163.19 113.176521) (xy 163.459868 113.580408) (xy 163.918733 113.887011) (xy 164.46 113.994676)
        (xy 165.001267 113.887011) (xy 165.460132 113.580408) (xy 165.73 113.176521) (xy 165.999868 113.580408) (xy 166.458733 113.887011)
        (xy 167 113.994676) (xy 167.541267 113.887011) (xy 168.000132 113.580408) (xy 168.27 113.176521) (xy 168.539868 113.580408)
        (xy 168.998733 113.887011) (xy 169.54 113.994676) (xy 170.081267 113.887011) (xy 170.540132 113.580408) (xy 170.81 113.176521)
        (xy 171.079868 113.580408) (xy 171.538733 113.887011) (xy 172.08 113.994676) (xy 172.621267 113.887011) (xy 173.080132 113.580408)
        (xy 173.386735 113.121543) (xy 173.4944 112.580276) (xy 173.4944 111.799724) (xy 173.386735 111.258457) (xy 173.252127 111.057)
        (xy 173.773317 111.057) (xy 173.773317 113.343) (xy 173.82198 113.587643) (xy 173.960559 113.795041) (xy 174.167957 113.93362)
        (xy 174.4126 113.982283) (xy 175.9874 113.982283) (xy 176.232043 113.93362) (xy 176.439441 113.795041) (xy 176.57802 113.587643)
        (xy 176.626683 113.343) (xy 176.626683 111.057) (xy 176.57802 110.812357) (xy 176.439441 110.604959) (xy 176.232043 110.46638)
        (xy 175.9874 110.417717) (xy 174.4126 110.417717) (xy 174.167957 110.46638) (xy 173.960559 110.604959) (xy 173.82198 110.812357)
        (xy 173.773317 111.057) (xy 173.252127 111.057) (xy 173.080132 110.799592) (xy 172.621267 110.492989) (xy 172.08 110.385324)
        (xy 171.538733 110.492989) (xy 171.079868 110.799592) (xy 170.81 111.203479) (xy 170.540132 110.799592) (xy 170.081267 110.492989)
        (xy 169.54 110.385324) (xy 168.998733 110.492989) (xy 168.539868 110.799592) (xy 168.27 111.203479) (xy 168.000132 110.799592)
        (xy 167.541267 110.492989) (xy 167 110.385324) (xy 166.458733 110.492989) (xy 165.999868 110.799592) (xy 165.73 111.203479)
        (xy 165.460132 110.799592) (xy 165.001267 110.492989) (xy 164.46 110.385324) (xy 163.918733 110.492989) (xy 163.459868 110.799592)
        (xy 163.19 111.203479) (xy 162.920132 110.799592) (xy 162.461267 110.492989) (xy 161.92 110.385324) (xy 161.378733 110.492989)
        (xy 160.919868 110.799592) (xy 160.613265 111.258457) (xy 160.583579 111.4077) (xy 160.544317 111.346778) (xy 160.466818 111.248999)
        (xy 160.358359 111.136686) (xy 160.263344 111.055822) (xy 160.135136 110.966715) (xy 160.026223 110.905845) (xy 159.883149 110.843338)
        (xy 159.76449 110.804784) (xy 159.611999 110.771257) (xy 159.488112 110.756484) (xy 159.332014 110.753214) (xy 159.207615 110.762786)
        (xy 159.053854 110.789898) (xy 158.933684 110.82345) (xy 158.788118 110.879911) (xy 158.676752 110.936166) (xy 158.544925 111.019826)
        (xy 158.446607 111.096641) (xy 158.33354 111.204314) (xy 158.252017 111.29876) (xy 158.162017 111.426343) (xy 158.100389 111.534826)
        (xy 158.036884 111.67746) (xy 157.997502 111.795848) (xy 157.962911 111.9481) (xy 157.947086 112.080808) (xy 157.944596 112.259141)
        (xy 154.78846 112.259141) (xy 154.760281 112.17031) (xy 154.71113 112.055633) (xy 153.723901 110.259869) (xy 153.653412 110.156922)
        (xy 152.336185 108.587113) (xy 152.247043 108.499819) (xy 150.649992 107.215757) (xy 150.545592 107.147439) (xy 148.729547 106.198034)
        (xy 148.613866 106.151296) (xy 146.648001 105.57271) (xy 146.525444 105.549331) (xy 144.57259 105.364373) (xy 144.570309 105.36423)
        (xy 144.475025 105.36233) (xy 144.359874 105.364474) (xy 143.150708 105.491562) (xy 143.151334 104.774378) (xy 142.858584 104.065868)
        (xy 142.316983 103.523322) (xy 141.877 103.340624) (xy 141.877 102.700005) (xy 141.877001 102.7) (xy 141.810242 102.364387)
        (xy 141.707246 102.210242) (xy 141.620133 102.079867) (xy 141.62013 102.079865) (xy 140.320133 100.779867) (xy 140.035613 100.589758)
        (xy 139.7 100.523) (xy 133.894265 100.523) (xy 132.446133 99.074867) (xy 132.161613 98.884758) (xy 131.826 98.818)
        (xy 121.638692 98.818) (xy 121.642434 98.6836) (xy 121.641121 98.621155) (xy 121.630283 98.449155) (xy 121.623048 98.38262)
        (xy 121.620814 98.368837) (xy 121.620086 98.364448) (xy 121.127279 95.45246) (xy 121.113862 95.39146) (xy 121.069824 95.224843)
        (xy 121.049808 95.160994) (xy 121.04494 95.147908) (xy 121.043369 95.143729) (xy 119.994339 92.382918) (xy 119.969329 92.325687)
        (xy 119.893767 92.170798) (xy 119.861728 92.112046) (xy 119.854411 92.100155) (xy 119.85206 92.096365) (xy 118.286766 89.59189)
        (xy 118.251116 89.540607) (xy 118.146906 89.40334) (xy 118.104044 89.351908) (xy 118.094556 89.341665) (xy 118.091537 89.338428)
        (xy 116.069598 87.185685) (xy 116.024664 87.142301) (xy 115.89578 87.027894) (xy 115.84376 86.985778) (xy 115.832464 86.977573)
        (xy 115.828856 86.974972) (xy 113.427288 85.255958) (xy 113.374786 85.222129) (xy 113.226129 85.134931) (xy 113.16689 85.103708)
        (xy 113.154215 85.097854) (xy 113.150204 85.096018) (xy 110.460482 83.876209) (xy 110.402411 83.853223) (xy 110.239647 83.796559)
        (xy 110.175486 83.77744) (xy 110.161915 83.774159) (xy 110.157609 83.773134) (xy 107.282183 83.098993) (xy 107.220751 83.087724)
        (xy 107.027297 83.06193) (xy 106.902605 83.057587) (xy 106.707826 83.06986) (xy 106.584667 83.089819) (xy 106.39598 83.139691)
        (xy 106.279043 83.183193) (xy 106.103638 83.268764) (xy 105.997377 83.334149) (xy 105.841932 83.452161) (xy 105.750396 83.53694)
        (xy 105.620834 83.682896) (xy 102.133071 88.28214) (xy 102.037928 88.253104) (xy 101.846593 88.214624) (xy 101.722461 88.202078)
        (xy 101.527296 88.201494) (xy 101.403086 88.213298) (xy 101.211524 88.250634) (xy 101.146599 88.266857) (xy 101.133249 88.270946)
        (xy 101.128992 88.272266) (xy 99.265055 88.857418) (xy 99.206449 88.879014) (xy 99.048666 88.944705) (xy 98.988131 88.973162)
        (xy 98.975823 88.979755) (xy 98.971873 88.981889) (xy 97.240867 89.924835) (xy 97.187542 89.957358) (xy 97.0443 90.053173)
        (xy 96.990395 90.092886) (xy 96.979603 90.101745) (xy 96.976192 90.104565) (xy 95.461305 91.365772) (xy 95.415314 91.408031)
        (xy 95.293407 91.529847) (xy 95.248258 91.579256) (xy 95.239392 91.590042) (xy 95.236579 91.593489) (xy 93.995512 93.124921)
        (xy 93.958606 93.175308) (xy 93.862679 93.318487) (xy 93.827993 93.375713) (xy 93.821391 93.388015) (xy 93.819297 93.39195)
        (xy 92.899323 95.135273) (xy 92.872906 95.191869) (xy 92.806618 95.350949) (xy 92.783705 95.41383) (xy 92.779618 95.427181)
        (xy 92.778329 95.431445) (xy 92.214489 97.320258) (xy 92.199568 97.38091) (xy 92.165442 97.549832) (xy 92.15518 97.615961)
        (xy 92.153764 97.629851) (xy 92.153327 97.634289) (xy 91.967097 99.596647) (xy 91.964241 99.65904) (xy 91.963576 99.831375)
        (xy 63.119 99.831375) (xy 63.119 52.8) (xy 69.960716 52.8) (xy 69.960716 57.8) (xy 69.963793 57.862646)
        (xy 69.965714 57.882155) (xy 69.990169 58.005099) (xy 69.99586 58.023858) (xy 70.043812 58.13962) (xy 70.053053 58.156909)
        (xy 70.122671 58.261103) (xy 70.135107 58.276257) (xy 70.223743 58.364893) (xy 70.238897 58.377329) (xy 70.343091 58.446947)
        (xy 70.36038 58.456188) (xy 82.36038 63.456188) (xy 82.476142 63.50414) (xy 82.494901 63.509831) (xy 82.617845 63.534286)
        (xy 82.637354 63.536207) (xy 82.7 63.539284) (xy 90.7 63.539284) (xy 90.762646 63.536207) (xy 90.782155 63.534286)
        (xy 90.905099 63.509831) (xy 90.923858 63.50414) (xy 91.03962 63.456188) (xy 91.056909 63.446947) (xy 91.161103 63.377329)
        (xy 91.176257 63.364893) (xy 91.264893 63.276257) (xy 91.277329 63.261103) (xy 91.346947 63.156909) (xy 91.356188 63.13962)
        (xy 91.40414 63.023858) (xy 91.409831 63.005099) (xy 91.434286 62.882155) (xy 91.436207 62.862646) (xy 91.439284 62.8)
        (xy 91.439284 52.8) (xy 91.436207 52.737354) (xy 91.434286 52.717845) (xy 91.409831 52.594901) (xy 91.40414 52.576142)
        (xy 91.356188 52.46038) (xy 91.346947 52.443091) (xy 91.277329 52.338897) (xy 91.264893 52.323743) (xy 91.176257 52.235107)
        (xy 91.161103 52.222671) (xy 91.056909 52.153053) (xy 91.03962 52.143812) (xy 90.923858 52.09586) (xy 90.905099 52.090169)
        (xy 90.782155 52.065714) (xy 90.762646 52.063793) (xy 90.7 52.060716) (xy 70.7 52.060716) (xy 70.637354 52.063793)
        (xy 70.617845 52.065714) (xy 70.494901 52.090169) (xy 70.476142 52.09586) (xy 70.36038 52.143812) (xy 70.343091 52.153053)
        (xy 70.238897 52.222671) (xy 70.223743 52.235107) (xy 70.135107 52.323743) (xy 70.122671 52.338897) (xy 70.053053 52.443091)
        (xy 70.043812 52.46038) (xy 69.99586 52.576142) (xy 69.990169 52.594901) (xy 69.965714 52.717845) (xy 69.963793 52.737354)
        (xy 69.960716 52.8) (xy 63.119 52.8) (xy 63.119 48.895) (xy 153.19103 48.895)
      )
    )
  )
)