diff --git a/3d-viewer/3d_canvas/create_3Dgraphic_brd_items.cpp b/3d-viewer/3d_canvas/create_3Dgraphic_brd_items.cpp index 8051a17db0..3818043fbc 100644 --- a/3d-viewer/3d_canvas/create_3Dgraphic_brd_items.cpp +++ b/3d-viewer/3d_canvas/create_3Dgraphic_brd_items.cpp @@ -491,6 +491,25 @@ void CINFO3D_VISU::createNewPadWithClearance( const D_PAD* aPad, } break; + case PAD_SHAPE_CHAMFERED_RECT: + { + wxSize shapesize( aPad->GetSize() ); + shapesize.x += aClearanceValue.x * 2; + shapesize.y += aClearanceValue.y * 2; + + SHAPE_POLY_SET polyList; // Will contain the pad outlines in board coordinates + + int corner_radius = aPad->GetRoundRectCornerRadius( shapesize ); + TransformRoundChamferedRectToPolygon( polyList, PadShapePos, shapesize, aPad->GetOrientation(), + corner_radius, aPad->GetChamferRectRatio(), + aPad->GetChamferPositions(), 32 ); + + // Add the PAD polygon + Convert_shape_line_polygon_to_triangles( polyList, *aDstContainer, m_biuTo3Dunits, *aPad ); + + } + break; + case PAD_SHAPE_CUSTOM: { SHAPE_POLY_SET polyList; // Will contain the pad outlines in board coordinates @@ -575,6 +594,7 @@ void CINFO3D_VISU::createNewPad( const D_PAD* aPad, case PAD_SHAPE_CIRCLE: case PAD_SHAPE_OVAL: case PAD_SHAPE_ROUNDRECT: + case PAD_SHAPE_CHAMFERED_RECT: case PAD_SHAPE_CUSTOM: createNewPadWithClearance( aPad, aDstContainer, aInflateValue ); break; diff --git a/3d-viewer/3d_canvas/create_layer_poly.cpp b/3d-viewer/3d_canvas/create_layer_poly.cpp index 28630fd4c9..f4add3f547 100644 --- a/3d-viewer/3d_canvas/create_layer_poly.cpp +++ b/3d-viewer/3d_canvas/create_layer_poly.cpp @@ -52,6 +52,7 @@ void CINFO3D_VISU::buildPadShapePolygon( const D_PAD* aPad, case PAD_SHAPE_CIRCLE: case PAD_SHAPE_OVAL: case PAD_SHAPE_ROUNDRECT: + case PAD_SHAPE_CHAMFERED_RECT: { // We are using TransformShapeWithClearanceToPolygon to build the shape. // Currently, this method uses only the same inflate value for X and Y dirs. diff --git a/common/convert_basic_shapes_to_polygon.cpp b/common/convert_basic_shapes_to_polygon.cpp index cf68cb2286..fd65e5e45f 100644 --- a/common/convert_basic_shapes_to_polygon.cpp +++ b/common/convert_basic_shapes_to_polygon.cpp @@ -207,24 +207,19 @@ void GetRoundRectCornerCenters( wxPoint aCenters[4], int aRadius, aCenters[ii] += aPosition; } -/** - * Function TransformRoundRectToPolygon - * convert a rectangle with rounded corners to a polygon - * Convert arcs to multiple straight lines - * @param aCornerBuffer = a buffer to store the polygon - * @param aPosition = the coordinate of the center of the rectangle - * @param aSize = the size of the rectangle - * @param aCornerRadius = radius of rounded corners - * @param aRotation = rotation in 0.1 degrees of the rectangle - * @param aCircleToSegmentsCount = the number of segments to approximate a circle - */ -void TransformRoundRectToPolygon( SHAPE_POLY_SET& aCornerBuffer, + +void TransformRoundChamferedRectToPolygon( SHAPE_POLY_SET& aCornerBuffer, const wxPoint& aPosition, const wxSize& aSize, double aRotation, int aCornerRadius, + double aChamferRatio, int aChamferCorners, int aCircleToSegmentsCount ) { + // Build the basic shape in orientation 0.0, position 0,0 for chamfered corners + // or in actual position/orientation for round rect only wxPoint corners[4]; - GetRoundRectCornerCenters( corners, aCornerRadius, aPosition, aSize, aRotation ); + GetRoundRectCornerCenters( corners, aCornerRadius, + aChamferCorners ? wxPoint( 0, 0 ) : aPosition, + aSize, aChamferCorners ? 0.0 : aRotation ); SHAPE_POLY_SET outline; outline.NewOutline(); @@ -234,6 +229,68 @@ void TransformRoundRectToPolygon( SHAPE_POLY_SET& aCornerBuffer, outline.Inflate( aCornerRadius, aCircleToSegmentsCount ); + if( aChamferCorners == RECT_NO_CHAMFER ) // no chamfer + { + // Add the outline: + aCornerBuffer.Append( outline ); + return; + } + + // Now we have the round rect outline, in position 0,0 orientation 0.0. + // Chamfer the corner(s). + int chamfer_value = aChamferRatio * std::min( aSize.x, aSize.y ); + + SHAPE_POLY_SET chamfered_corner; // corner shape for the current corner to chamfer + + int corner_id[4] = + { + RECT_CHAMFER_TOP_LEFT, RECT_CHAMFER_TOP_RIGHT, + RECT_CHAMFER_BOTTOM_LEFT, RECT_CHAMFER_BOTTOM_RIGHT + }; + // Depending on the corner position, signX[] and signY[] give the sign of chamfer + // coordinates relative to the corner position + // The first corner is the top left corner, then top right, bottom left and bottom right + int signX[4] = {1, -1, 1,-1 }; + int signY[4] = {1, 1, -1,-1 }; + + for( int ii = 0; ii < 4; ii++ ) + { + if( (corner_id[ii] & aChamferCorners) == 0 ) + continue; + + VECTOR2I corner_pos( -signX[ii]*aSize.x/2, -signY[ii]*aSize.y/2 ); + + if( aCornerRadius ) + { + // We recreate a rectangular area covering the full rounded corner (max size = aSize/2) + // to rebuild the corner before chamfering, to be sure the rounded corner shape does not + // overlap the chamfered corner shape: + chamfered_corner.RemoveAllContours(); + chamfered_corner.NewOutline(); + chamfered_corner.Append( 0, 0 ); + chamfered_corner.Append( 0, signY[ii]*aSize.y/2 ); + chamfered_corner.Append( signX[ii]*aSize.x/2, signY[ii]*aSize.y/2 ); + chamfered_corner.Append( signX[ii]*aSize.x/2, 0 ); + chamfered_corner.Move( corner_pos ); + outline.BooleanAdd( chamfered_corner, SHAPE_POLY_SET::PM_STRICTLY_SIMPLE ); + } + + // Now chamfer this corner + chamfered_corner.RemoveAllContours(); + chamfered_corner.NewOutline(); + chamfered_corner.Append( 0, 0 ); + chamfered_corner.Append( 0, signY[ii]*chamfer_value ); + chamfered_corner.Append( signX[ii]*chamfer_value, 0 ); + chamfered_corner.Move( corner_pos ); + outline.BooleanSubtract( chamfered_corner, SHAPE_POLY_SET::PM_STRICTLY_SIMPLE ); + } + + // Rotate and move the outline: + if( aRotation != 0.0 ) + outline.Rotate( DECIDEG2RAD( -aRotation ), VECTOR2I( 0, 0 ) ); + + outline.Move( VECTOR2I( aPosition ) ); + // Add the outline: aCornerBuffer.Append( outline ); } diff --git a/common/pcb.keywords b/common/pcb.keywords index 1998f9ab53..8f312cc9a6 100644 --- a/common/pcb.keywords +++ b/common/pcb.keywords @@ -44,8 +44,11 @@ blind blind_buried_vias_allowed bold bottom +bottom_left +bottom_right center chamfer +chamfer_ratio circle clearance comment @@ -176,6 +179,8 @@ thermal_gap thermal_bridge_width thickness top +top_left +top_right trace_width tracks trace_min diff --git a/common/plotters/DXF_plotter.cpp b/common/plotters/DXF_plotter.cpp index 5def33435b..f7e5cad46b 100644 --- a/common/plotters/DXF_plotter.cpp +++ b/common/plotters/DXF_plotter.cpp @@ -747,8 +747,8 @@ void DXF_PLOTTER::FlashPadRoundRect( const wxPoint& aPadPos, const wxSize& aSize { SHAPE_POLY_SET outline; const int segmentToCircleCount = 64; - TransformRoundRectToPolygon( outline, aPadPos, aSize, aOrient, - aCornerRadius, segmentToCircleCount ); + TransformRoundChamferedRectToPolygon( outline, aPadPos, aSize, aOrient, + aCornerRadius, 0.0, 0, segmentToCircleCount ); // TransformRoundRectToPolygon creates only one convex polygon SHAPE_LINE_CHAIN& poly = outline.Outline( 0 ); diff --git a/common/plotters/GERBER_plotter.cpp b/common/plotters/GERBER_plotter.cpp index 2d0314116c..08f0402dc8 100644 --- a/common/plotters/GERBER_plotter.cpp +++ b/common/plotters/GERBER_plotter.cpp @@ -842,8 +842,8 @@ void GERBER_PLOTTER::FlashPadRoundRect( const wxPoint& aPadPos, const wxSize& aS // TODO: use Aperture macro and flash it SHAPE_POLY_SET outline; const int segmentToCircleCount = 64; - TransformRoundRectToPolygon( outline, aPadPos, aSize, aOrient, - aCornerRadius, segmentToCircleCount ); + TransformRoundChamferedRectToPolygon( outline, aPadPos, aSize, aOrient, + aCornerRadius, 0.0, 0, segmentToCircleCount ); if( aTraceMode != FILLED ) outline.Inflate( -GetCurrentLineWidth()/2, 16 ); diff --git a/common/plotters/HPGL_plotter.cpp b/common/plotters/HPGL_plotter.cpp index 3213292ca0..0e2d194fe3 100644 --- a/common/plotters/HPGL_plotter.cpp +++ b/common/plotters/HPGL_plotter.cpp @@ -642,8 +642,8 @@ void HPGL_PLOTTER::FlashPadRoundRect( const wxPoint& aPadPos, const wxSize& aSiz aCornerRadius = std::min( aCornerRadius, std::min( size.x, size.y ) /2 ); } - TransformRoundRectToPolygon( outline, aPadPos, size, aOrient, - aCornerRadius, segmentToCircleCount ); + TransformRoundChamferedRectToPolygon( outline, aPadPos, size, aOrient, + aCornerRadius, 0.0, 0, segmentToCircleCount ); // TransformRoundRectToPolygon creates only one convex polygon std::vector< wxPoint > cornerList; diff --git a/common/plotters/PS_plotter.cpp b/common/plotters/PS_plotter.cpp index 8e62faf296..5c9301125f 100644 --- a/common/plotters/PS_plotter.cpp +++ b/common/plotters/PS_plotter.cpp @@ -201,8 +201,8 @@ void PSLIKE_PLOTTER::FlashPadRoundRect( const wxPoint& aPadPos, const wxSize& aS SHAPE_POLY_SET outline; const int segmentToCircleCount = 64; - TransformRoundRectToPolygon( outline, aPadPos, size, aOrient, - aCornerRadius, segmentToCircleCount ); + TransformRoundChamferedRectToPolygon( outline, aPadPos, size, aOrient, + aCornerRadius, 0.0, 0, segmentToCircleCount ); std::vector< wxPoint > cornerList; cornerList.reserve( segmentToCircleCount + 5 ); diff --git a/include/convert_basic_shapes_to_polygon.h b/include/convert_basic_shapes_to_polygon.h index eac92db8d3..2755a0a431 100644 --- a/include/convert_basic_shapes_to_polygon.h +++ b/include/convert_basic_shapes_to_polygon.h @@ -36,6 +36,21 @@ #include #include + +// The chamfer positions of chamfered rect shape. +// the position is relative to a pad with orientation = 0 +// we can have 1 to 4 chamfered corners (0 corner = roundrect) +// The position list is the OR of corner to chamfer +enum RECT_CHAMFER_POSITIONS +{ + RECT_NO_CHAMFER = 0, + RECT_CHAMFER_TOP_LEFT = 1, + RECT_CHAMFER_TOP_RIGHT = 2, + RECT_CHAMFER_BOTTOM_LEFT = 4, + RECT_CHAMFER_BOTTOM_RIGHT = 8, +}; + + /** * Function TransformCircleToPolygon * convert a circle to a polygon, using multiple straight lines @@ -86,20 +101,29 @@ void TransformOvalClearanceToPolygon( SHAPE_POLY_SET& aCornerBuffer, void GetRoundRectCornerCenters( wxPoint aCenters[4], int aRadius, const wxPoint& aPosition, const wxSize& aSize, double aRotation ); + /** - * Function TransformRoundRectToPolygon - * convert a rectangle with rounded corners to a polygon - * Convert arcs to multiple straight lines + * convert a rectangle with rounded corners and/or chamfered corners to a polygon + * Convert rounded corners arcs to multiple straight lines * @param aCornerBuffer = a buffer to store the polygon * @param aPosition = the coordinate of the center of the rectangle * @param aSize = the size of the rectangle - * @param aCornerRadius = radius of rounded corners + * @param aCornerRadius = radius of rounded corners (can be 0) * @param aRotation = rotation in 0.1 degrees of the rectangle + * @param aChamferRatio = ratio between smaller rect size and chamfer value + * @param aChamferCorners = identifier of the corners to chamfer: + * 0 = no chamfer + * 1 = TOP_LEFT + * 2 = TOP_RIGHT + * 4 = BOTTOM_LEFT + * 8 = BOTTOM_RIGHT + * One can have more than one chamfered corner by ORing the corner identifers * @param aCircleToSegmentsCount = the number of segments to approximate a circle */ -void TransformRoundRectToPolygon( SHAPE_POLY_SET& aCornerBuffer, +void TransformRoundChamferedRectToPolygon( SHAPE_POLY_SET& aCornerBuffer, const wxPoint& aPosition, const wxSize& aSize, double aRotation, int aCornerRadius, + double aChamferRatio, int aChamferCorners, int aCircleToSegmentsCount ); /** diff --git a/include/pad_shapes.h b/include/pad_shapes.h index fb77b50fb3..8878b3646e 100644 --- a/include/pad_shapes.h +++ b/include/pad_shapes.h @@ -35,6 +35,7 @@ enum PAD_SHAPE_T PAD_SHAPE_OVAL, PAD_SHAPE_TRAPEZOID, PAD_SHAPE_ROUNDRECT, + PAD_SHAPE_CHAMFERED_RECT, // Rectangle with a champered corner ( and with rounded other corners) PAD_SHAPE_CUSTOM // A shape defined by user, using a set of basic shapes // (thick segments, circles, arcs, polygons }; diff --git a/pcbnew/board_items_to_polygon_shape_transform.cpp b/pcbnew/board_items_to_polygon_shape_transform.cpp index 925e8da4c6..ec9de9285b 100644 --- a/pcbnew/board_items_to_polygon_shape_transform.cpp +++ b/pcbnew/board_items_to_polygon_shape_transform.cpp @@ -767,18 +767,22 @@ void D_PAD::TransformShapeWithClearanceToPolygon( SHAPE_POLY_SET& aCornerBuffer, } break; + case PAD_SHAPE_CHAMFERED_RECT: case PAD_SHAPE_ROUNDRECT: { SHAPE_POLY_SET outline; - int pad_radius = GetRoundRectCornerRadius(); int clearance = int( aClearanceValue * aCorrectionFactor ); - int rounding_radius = pad_radius + clearance; + int rounding_radius = GetRoundRectCornerRadius() + clearance; wxSize shapesize( m_Size ); shapesize.x += clearance*2; shapesize.y += clearance*2; + bool doChamfer = GetShape() == PAD_SHAPE_CHAMFERED_RECT; - TransformRoundRectToPolygon( outline, padShapePos, shapesize, angle, - rounding_radius, aCircleToSegmentsCount ); + TransformRoundChamferedRectToPolygon( outline, padShapePos, shapesize, angle, + rounding_radius, + doChamfer ? GetChamferRectRatio() : 0.0, + doChamfer ? GetChamferPositions() : 0, + aCircleToSegmentsCount ); aCornerBuffer.Append( outline ); } @@ -819,6 +823,7 @@ void D_PAD::BuildPadShapePolygon( SHAPE_POLY_SET& aCornerBuffer, case PAD_SHAPE_CIRCLE: case PAD_SHAPE_OVAL: case PAD_SHAPE_ROUNDRECT: + case PAD_SHAPE_CHAMFERED_RECT: { // We are using TransformShapeWithClearanceToPolygon to build the shape. // Currently, this method uses only the same inflate value for X and Y dirs. @@ -1172,7 +1177,8 @@ void CreateThermalReliefPadPolygon( SHAPE_POLY_SET& aCornerBuffer, } break; - case PAD_SHAPE_ROUNDRECT: // thermal shape is the same for round rect and rect. + case PAD_SHAPE_CHAMFERED_RECT: + case PAD_SHAPE_ROUNDRECT: // thermal shape is the same for rectangular shapes. case PAD_SHAPE_RECT: { /* we create 4 copper holes and put them in position 1, 2, 3 and 4 diff --git a/pcbnew/class_pad.cpp b/pcbnew/class_pad.cpp index e343db491c..6f14a281be 100644 --- a/pcbnew/class_pad.cpp +++ b/pcbnew/class_pad.cpp @@ -78,11 +78,14 @@ D_PAD::D_PAD( MODULE* parent ) : m_LocalSolderPasteMargin = 0; m_LocalSolderPasteMarginRatio = 0.0; // Parameters for round rect only: - m_padRoundRectRadiusScale = 0.25; // from IPC-7351C standard + m_padRoundRectRadiusScale = 0.25; // from IPC-7351C standard + // Parameters for chamfered rect only: + m_padChamferRectScale = 0.2; // Size of chamfer: ratio of smallest of X,Y size + m_chamferPositions = RECT_NO_CHAMFER; // No chamfered corner - m_ZoneConnection = PAD_ZONE_CONN_INHERITED; // Use parent setting by default - m_ThermalWidth = 0; // Use parent setting by default - m_ThermalGap = 0; // Use parent setting by default + m_ZoneConnection = PAD_ZONE_CONN_INHERITED; // Use parent setting by default + m_ThermalWidth = 0; // Use parent setting by default + m_ThermalGap = 0; // Use parent setting by default m_customShapeClearanceArea = CUST_PAD_SHAPE_IN_ZONE_OUTLINE; @@ -169,6 +172,14 @@ int D_PAD::boundingRadius() const radius += 1 + KiROUND( EuclideanNorm( wxSize( x - radius, y - radius ))); break; + case PAD_SHAPE_CHAMFERED_RECT: + radius = GetRoundRectCornerRadius(); + x = m_Size.x >> 1; + y = m_Size.y >> 1; + radius += 1 + KiROUND( EuclideanNorm( wxSize( x - radius, y - radius ))); + // TODO: modify radius if the chamfer is smaller than corner radius + break; + case PAD_SHAPE_CUSTOM: radius = 0; @@ -293,6 +304,7 @@ const EDA_RECT D_PAD::GetBoundingBox() const case PAD_SHAPE_RECT: case PAD_SHAPE_ROUNDRECT: + case PAD_SHAPE_CHAMFERED_RECT: // Use two opposite corners and track their rotation // (use symmetry for other points) quadrant1.x = m_Size.x/2; @@ -919,17 +931,23 @@ bool D_PAD::HitTest( const wxPoint& aPosition ) const break; + case PAD_SHAPE_CHAMFERED_RECT: case PAD_SHAPE_ROUNDRECT: - { + { // Check for hit in polygon SHAPE_POLY_SET outline; const int segmentToCircleCount = ARC_APPROX_SEGMENTS_COUNT_HIGH_DEF; - TransformRoundRectToPolygon( outline, wxPoint(0,0), GetSize(), m_Orient, - GetRoundRectCornerRadius(), segmentToCircleCount ); + bool doChamfer = GetShape() == PAD_SHAPE_CHAMFERED_RECT; + + TransformRoundChamferedRectToPolygon( outline, wxPoint(0,0), GetSize(), m_Orient, + GetRoundRectCornerRadius(), + doChamfer ? GetChamferRectRatio() : 0.0, + doChamfer ? GetChamferPositions() : 0, + segmentToCircleCount ); const SHAPE_LINE_CHAIN &poly = outline.COutline( 0 ); return TestPointInsidePolygon( (const wxPoint*)&poly.CPoint(0), poly.PointCount(), delta ); - } + } break; case PAD_SHAPE_CUSTOM: @@ -978,6 +996,7 @@ bool D_PAD::HitTest( const EDA_RECT& aRect, bool aContained, int aAccuracy ) con return arect.IntersectsCircle( GetPosition(), GetBoundingRadius() ); case PAD_SHAPE_RECT: + case PAD_SHAPE_CHAMFERED_RECT: // TODO use a finer shape analysis shapeRect.SetOrigin( shapePos ); shapeRect.Inflate( m_Size.x / 2, m_Size.y / 2 ); return arect.Intersects( shapeRect, m_Orient ); @@ -1082,8 +1101,6 @@ bool D_PAD::HitTest( const EDA_RECT& aRect, bool aContained, int aAccuracy ) con * b) Test intersection of vertical rect * c) Test intersection of each corner */ - - r = GetRoundRectCornerRadius(); /* Test A - intersection of horizontal rect */ @@ -1224,6 +1241,9 @@ wxString D_PAD::ShowPadShape() const case PAD_SHAPE_ROUNDRECT: return _( "Roundrect" ); + case PAD_SHAPE_CHAMFERED_RECT: + return _( "Chamferedrect" ); + case PAD_SHAPE_CUSTOM: return _( "CustomShape" ); diff --git a/pcbnew/class_pad.h b/pcbnew/class_pad.h index 1f5f5cae63..e829a6636e 100644 --- a/pcbnew/class_pad.h +++ b/pcbnew/class_pad.h @@ -658,6 +658,48 @@ public: m_padRoundRectRadiusScale = std::min( aRadiusScale, 0.5 ); } + /** + * has meaning only for chamfered rect pads + * @return the ratio between the smaller Y or Y size and the radius + * of the rounded corners. + * Cannot be > 0.5 + */ + double GetChamferRectRatio() const + { + return m_padChamferRectScale; + } + + /** + * has meaning only for chamfered rect pads + * Set the ratio between the smaller Y or Y size and the radius + * of the rounded corners. + * Cannot be < 0.5 and obviously must be > 0 + */ + void SetChamferRectRatio( double aChamferScale ) + { + if( aChamferScale < 0.0 ) + aChamferScale = 0.0; + + m_padChamferRectScale = std::min( aChamferScale, 0.5 ); + } + + /** + * has meaning only for chamfered rect pads + * @return the position of the chamfer for a 0 orientation + */ + int GetChamferPositions() const { return m_chamferPositions; } + + /** + * has meaning only for chamfered rect pads + * set the position of the chamfer for a 0 orientation, one of + * PAD_CHAMFER_TOP_LEFT, PAD_CHAMFER_TOP_RIGHT, + * PAD_CHAMFER_BOTTOM_LEFT, PAD_CHAMFER_BOTTOM_RIGHT + */ + void SetChamferPositions( int aChamferPositions ) + { + m_chamferPositions = aChamferPositions; + } + /** * Function GetSubRatsnest * @return int - the netcode @@ -835,6 +877,9 @@ private: // Private variable members: double m_padRoundRectRadiusScale; ///< scaling factor from smallest m_Size coord ///< to corner radius, default 0.25 + double m_padChamferRectScale; ///< scaling factor from smallest m_Size coord + ///< to chamfer value, default 0.25 + int m_chamferPositions; ///< the positions of the chamfered position for a 0 orientation PAD_SHAPE_T m_anchorPadShape; ///< for custom shaped pads: shape of pad anchor, ///< PAD_SHAPE_RECT, PAD_SHAPE_CIRCLE diff --git a/pcbnew/dialogs/dialog_pad_properties.cpp b/pcbnew/dialogs/dialog_pad_properties.cpp index f4585a265a..200a6d195c 100644 --- a/pcbnew/dialogs/dialog_pad_properties.cpp +++ b/pcbnew/dialogs/dialog_pad_properties.cpp @@ -43,9 +43,13 @@ #include #include +#include + #include #include +#include // for enum RECT_CHAMFER_POSITIONS definition + // list of pad shapes, ordered like the pad shape wxChoice in dialog. static PAD_SHAPE_T code_shape[] = @@ -55,6 +59,7 @@ static PAD_SHAPE_T code_shape[] = PAD_SHAPE_RECT, PAD_SHAPE_TRAPEZOID, PAD_SHAPE_ROUNDRECT, + PAD_SHAPE_CHAMFERED_RECT, PAD_SHAPE_CUSTOM, // choice = CHOICE_SHAPE_CUSTOM_CIRC_ANCHOR PAD_SHAPE_CUSTOM // choice = PAD_SHAPE_CUSTOM_RECT_ANCHOR }; @@ -68,6 +73,7 @@ enum CODE_CHOICE CHOICE_SHAPE_RECT, CHOICE_SHAPE_TRAPEZOID, CHOICE_SHAPE_ROUNDRECT, + CHOICE_SHAPE_CHAMFERED_RECT, CHOICE_SHAPE_CUSTOM_CIRC_ANCHOR, CHOICE_SHAPE_CUSTOM_RECT_ANCHOR }; @@ -452,11 +458,15 @@ void DIALOG_PAD_PROPERTIES::updateRoundRectCornerValues() { // Note: use m_tcCornerSizeRatio->ChangeValue() to avoid generating a wxEVT_TEXT event - if( m_dummyPad->GetShape() == PAD_SHAPE_ROUNDRECT ) + if( m_dummyPad->GetShape() == PAD_SHAPE_ROUNDRECT || + m_dummyPad->GetShape() == PAD_SHAPE_CHAMFERED_RECT ) { auto ratio = wxString::Format( "%.1f", m_dummyPad->GetRoundRectRadiusRatio() * 100 ); m_tcCornerSizeRatio->ChangeValue( ratio ); m_cornerRadius.SetValue( m_dummyPad->GetRoundRectCornerRadius() ); + + ratio = wxString::Format( "%.1f", m_dummyPad->GetChamferRectRatio() * 100 ); + m_tcChamferRatio->ChangeValue( ratio ); } else if( m_dummyPad->GetShape() == PAD_SHAPE_RECT ) { @@ -473,7 +483,8 @@ void DIALOG_PAD_PROPERTIES::updateRoundRectCornerValues() void DIALOG_PAD_PROPERTIES::onCornerRadiusChange( wxCommandEvent& event ) { - if( m_dummyPad->GetShape() != PAD_SHAPE_ROUNDRECT ) + if( m_dummyPad->GetShape() != PAD_SHAPE_ROUNDRECT && + m_dummyPad->GetShape() != PAD_SHAPE_CHAMFERED_RECT ) return; wxString value = m_tcCornerRadius->GetValue(); @@ -499,27 +510,55 @@ void DIALOG_PAD_PROPERTIES::onCornerRadiusChange( wxCommandEvent& event ) void DIALOG_PAD_PROPERTIES::onCornerSizePercentChange( wxCommandEvent& event ) { - if( m_dummyPad->GetShape() != PAD_SHAPE_ROUNDRECT ) + if( m_dummyPad->GetShape() != PAD_SHAPE_ROUNDRECT && + m_dummyPad->GetShape() != PAD_SHAPE_CHAMFERED_RECT ) return; wxString value = m_tcCornerSizeRatio->GetValue(); - double rrRadiusRatioPercent; + double ratioPercent; - if( value.ToDouble( &rrRadiusRatioPercent ) ) + bool asChanged = false; + + if( value.ToDouble( &ratioPercent ) ) { - // Clamp rrRadiusRatioPercent to acceptable value (0.0 to 50.0) - if( rrRadiusRatioPercent < 0.0 ) + // Clamp ratioPercent to acceptable value (0.0 to 50.0) + if( ratioPercent < 0.0 ) { - rrRadiusRatioPercent = 0.0; + ratioPercent = 0.0; m_tcCornerSizeRatio->ChangeValue( "0.0" ); } - if( rrRadiusRatioPercent > 50.0 ) + if( ratioPercent > 50.0 ) { - rrRadiusRatioPercent = 0.5; + ratioPercent = 0.5; m_tcCornerSizeRatio->ChangeValue( "50.0" ); } + asChanged = true; + } + + value = m_tcChamferRatio->GetValue(); + + if( value.ToDouble( &ratioPercent ) ) + { + // Clamp ratioPercent to acceptable value (0.0 to 50.0) + if( ratioPercent < 0.0 ) + { + ratioPercent = 0.0; + m_tcChamferRatio->ChangeValue( "0.0" ); + } + + if( ratioPercent > 50.0 ) + { + ratioPercent = 0.5; + m_tcChamferRatio->ChangeValue( "50.0" ); + } + + asChanged = true; + } + + if( asChanged ) + { transferDataToPad( m_dummyPad ); m_cornerRadius.ChangeValue( m_dummyPad->GetRoundRectCornerRadius() ); redraw(); @@ -705,6 +744,7 @@ void DIALOG_PAD_PROPERTIES::initValues() case PAD_SHAPE_RECT: m_PadShape->SetSelection( CHOICE_SHAPE_RECT ); break; case PAD_SHAPE_TRAPEZOID: m_PadShape->SetSelection( CHOICE_SHAPE_TRAPEZOID ); break; case PAD_SHAPE_ROUNDRECT: m_PadShape->SetSelection( CHOICE_SHAPE_ROUNDRECT ); break; + case PAD_SHAPE_CHAMFERED_RECT: m_PadShape->SetSelection( CHOICE_SHAPE_CHAMFERED_RECT ); break; case PAD_SHAPE_CUSTOM: if( m_dummyPad->GetAnchorPadShape() == PAD_SHAPE_RECT ) @@ -714,6 +754,12 @@ void DIALOG_PAD_PROPERTIES::initValues() break; } + + m_cbTopLeft->SetValue( (m_dummyPad->GetChamferPositions() & RECT_CHAMFER_TOP_LEFT) ); + m_cbTopRight->SetValue( (m_dummyPad->GetChamferPositions() & RECT_CHAMFER_TOP_RIGHT) ); + m_cbBottomLeft->SetValue( (m_dummyPad->GetChamferPositions() & RECT_CHAMFER_BOTTOM_LEFT) ); + m_cbBottomRight->SetValue( (m_dummyPad->GetChamferPositions() & RECT_CHAMFER_BOTTOM_RIGHT) ); + enablePrimitivePage( PAD_SHAPE_CUSTOM == m_dummyPad->GetShape() ); // Type of pad selection @@ -866,6 +912,7 @@ void DIALOG_PAD_PROPERTIES::onChangePadMode( wxCommandEvent& event ) } + void DIALOG_PAD_PROPERTIES::OnPadShapeSelection( wxCommandEvent& event ) { bool is_custom = false; @@ -909,6 +956,7 @@ void DIALOG_PAD_PROPERTIES::OnPadShapeSelection( wxCommandEvent& event ) break; case CHOICE_SHAPE_ROUNDRECT: + case CHOICE_SHAPE_CHAMFERED_RECT: m_trapDelta.Enable( false ); m_trapAxisLabel->Enable( false ); m_trapAxisCtrl->Enable( false ); @@ -934,11 +982,20 @@ void DIALOG_PAD_PROPERTIES::OnPadShapeSelection( wxCommandEvent& event ) enablePrimitivePage( is_custom ); - // A few widgets are enabled only for rounded rect pads: - m_staticTextCornerSizeRatio->Enable( m_PadShape->GetSelection() == CHOICE_SHAPE_ROUNDRECT ); - m_tcCornerSizeRatio->Enable( m_PadShape->GetSelection() == CHOICE_SHAPE_ROUNDRECT ); - m_staticTextCornerSizeRatioUnit->Enable( m_PadShape->GetSelection() == CHOICE_SHAPE_ROUNDRECT ); - m_cornerRadius.Enable( m_PadShape->GetSelection() == CHOICE_SHAPE_ROUNDRECT ); + // A few widgets are enabled only for rounded rect and chamfered pads: + bool chamfered_rect_enable = m_PadShape->GetSelection() == CHOICE_SHAPE_CHAMFERED_RECT; + bool round_rect_enable = m_PadShape->GetSelection() == CHOICE_SHAPE_ROUNDRECT || + chamfered_rect_enable; + m_staticTextCornerSizeRatio->Enable( round_rect_enable ); + m_tcCornerSizeRatio->Enable( round_rect_enable ); + m_staticTextCornerSizeRatioUnit->Enable( round_rect_enable ); + m_cornerRadius.Enable( round_rect_enable ); + + m_cbTopLeft->Enable( chamfered_rect_enable ); + m_cbTopRight->Enable( chamfered_rect_enable ); + m_cbBottomLeft->Enable( chamfered_rect_enable ); + m_cbBottomRight->Enable( chamfered_rect_enable ); + m_tcChamferRatio->Enable( chamfered_rect_enable ); // PAD_SHAPE_CUSTOM type has constraints for zone connection and thermal shape: // only not connected or solid connection is allowed to avoid destroying the shape. @@ -1223,7 +1280,8 @@ bool DIALOG_PAD_PROPERTIES::padValuesOK() } - if( m_dummyPad->GetShape() == PAD_SHAPE_ROUNDRECT ) + if( m_dummyPad->GetShape() == PAD_SHAPE_ROUNDRECT || + m_dummyPad->GetShape() == PAD_SHAPE_CHAMFERED_RECT ) { wxString value = m_tcCornerSizeRatio->GetValue(); double rrRadiusRatioPercent; @@ -1494,6 +1552,8 @@ bool DIALOG_PAD_PROPERTIES::TransferDataFromWindow() m_currentPad->SetThermalWidth( m_padMaster->GetThermalWidth() ); m_currentPad->SetThermalGap( m_padMaster->GetThermalGap() ); m_currentPad->SetRoundRectRadiusRatio( m_padMaster->GetRoundRectRadiusRatio() ); + m_currentPad->SetChamferRectRatio( m_padMaster->GetChamferRectRatio() ); + m_currentPad->SetChamferPositions( m_padMaster->GetChamferPositions() ); if( m_currentPad->GetShape() == PAD_SHAPE_CUSTOM ) { @@ -1664,6 +1724,22 @@ bool DIALOG_PAD_PROPERTIES::transferDataToPad( D_PAD* aPad ) aPad->SetName( m_PadNumCtrl->GetValue() ); aPad->SetNetCode( m_PadNetSelector->GetSelectedNetcode() ); + int chamfers = 0; + + if( m_cbTopLeft->GetValue() ) + chamfers |= RECT_CHAMFER_TOP_LEFT; + + if( m_cbTopRight->GetValue() ) + chamfers |= RECT_CHAMFER_TOP_RIGHT; + + if( m_cbBottomLeft->GetValue() ) + chamfers |= RECT_CHAMFER_BOTTOM_LEFT; + + if( m_cbBottomRight->GetValue() ) + chamfers |= RECT_CHAMFER_BOTTOM_RIGHT; + + aPad->SetChamferPositions( chamfers ); + // Clear some values, according to the pad type and shape switch( aPad->GetShape() ) { @@ -1684,6 +1760,7 @@ bool DIALOG_PAD_PROPERTIES::transferDataToPad( D_PAD* aPad ) break; case PAD_SHAPE_ROUNDRECT: + case PAD_SHAPE_CHAMFERED_RECT: aPad->SetDelta( wxSize( 0, 0 ) ); break; @@ -1737,13 +1814,18 @@ bool DIALOG_PAD_PROPERTIES::transferDataToPad( D_PAD* aPad ) break; } - if( aPad->GetShape() == PAD_SHAPE_ROUNDRECT ) + if( aPad->GetShape() == PAD_SHAPE_ROUNDRECT || aPad->GetShape() == PAD_SHAPE_CHAMFERED_RECT ) { wxString value = m_tcCornerSizeRatio->GetValue(); - double rrRadiusRatioPercent; + double ratioPercent; - if( value.ToDouble( &rrRadiusRatioPercent ) ) - aPad->SetRoundRectRadiusRatio( rrRadiusRatioPercent / 100.0 ); + if( value.ToDouble( &ratioPercent ) ) + aPad->SetRoundRectRadiusRatio( ratioPercent / 100.0 ); + + value = m_tcChamferRatio->GetValue(); + + if( value.ToDouble( &ratioPercent ) ) + aPad->SetChamferRectRatio( ratioPercent / 100.0 ); } LSET padLayerMask; diff --git a/pcbnew/dialogs/dialog_pad_properties_base.cpp b/pcbnew/dialogs/dialog_pad_properties_base.cpp index 20c2cc7c39..6b981b6832 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 Dec 30 2017) +// C++ code generated with wxFormBuilder (version Dec 1 2018) // http://www.wxformbuilder.org/ // // PLEASE DO *NOT* EDIT THIS FILE! @@ -15,354 +15,390 @@ DIALOG_PAD_PROPERTIES_BASE::DIALOG_PAD_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( wxSize( -1,-1 ), wxDefaultSize ); - + wxBoxSizer* m_MainSizer; m_MainSizer = new wxBoxSizer( wxVERTICAL ); - + wxBoxSizer* bSizerUpper; bSizerUpper = new wxBoxSizer( wxHORIZONTAL ); - + m_notebook = new wxNotebook( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 ); m_notebook->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE ) ); - + m_panelGeneral = new wxPanel( m_notebook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); wxBoxSizer* bGeneralSizer; bGeneralSizer = new wxBoxSizer( wxHORIZONTAL ); - + wxBoxSizer* m_LeftBoxSizer; m_LeftBoxSizer = new wxBoxSizer( wxVERTICAL ); - + wxFlexGridSizer* fgSizerShapeType; fgSizerShapeType = new wxFlexGridSizer( 0, 3, 2, 0 ); fgSizerShapeType->AddGrowableCol( 1 ); fgSizerShapeType->SetFlexibleDirection( wxBOTH ); fgSizerShapeType->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); - + m_PadNumText = new wxStaticText( m_panelGeneral, wxID_ANY, _("Pad number:"), wxDefaultPosition, wxDefaultSize, 0 ); m_PadNumText->Wrap( -1 ); fgSizerShapeType->Add( m_PadNumText, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxTOP, 3 ); - + m_PadNumCtrl = new wxTextCtrl( m_panelGeneral, wxID_PADNUMCTRL, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); fgSizerShapeType->Add( m_PadNumCtrl, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 3 ); - - + + fgSizerShapeType->Add( 0, 0, 1, wxEXPAND, 5 ); - + m_PadNameText = new wxStaticText( m_panelGeneral, wxID_ANY, _("Net name:"), wxDefaultPosition, wxDefaultSize, 0 ); m_PadNameText->Wrap( -1 ); fgSizerShapeType->Add( m_PadNameText, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT|wxTOP, 3 ); - - m_PadNetSelector = new NET_SELECTOR( m_panelGeneral, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 ); + + m_PadNetSelector = new NET_SELECTOR( m_panelGeneral, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 ); fgSizerShapeType->Add( m_PadNetSelector, 0, wxTOP|wxLEFT|wxEXPAND, 3 ); - - + + fgSizerShapeType->Add( 0, 0, 1, wxEXPAND, 5 ); - + m_staticText44 = new wxStaticText( m_panelGeneral, wxID_ANY, _("Pad type:"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticText44->Wrap( -1 ); fgSizerShapeType->Add( m_staticText44, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 3 ); - + wxString m_PadTypeChoices[] = { _("Through-hole"), _("SMD"), _("Connector"), _("NPTH, Mechanical"), _("Aperture") }; int m_PadTypeNChoices = sizeof( m_PadTypeChoices ) / sizeof( wxString ); m_PadType = new wxChoice( m_panelGeneral, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_PadTypeNChoices, m_PadTypeChoices, 0 ); m_PadType->SetSelection( 0 ); fgSizerShapeType->Add( m_PadType, 0, wxEXPAND|wxALL, 3 ); - - + + fgSizerShapeType->Add( 0, 0, 1, wxEXPAND, 5 ); - + m_staticText45 = new wxStaticText( m_panelGeneral, wxID_ANY, _("Shape:"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticText45->Wrap( -1 ); fgSizerShapeType->Add( m_staticText45, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 3 ); - - wxString m_PadShapeChoices[] = { _("Circular"), _("Oval"), _("Rectangular"), _("Trapezoidal"), _("Rounded Rectangle"), _("Custom (Circ. Anchor)"), _("Custom (Rect. Anchor)") }; + + wxString m_PadShapeChoices[] = { _("Circular"), _("Oval"), _("Rectangular"), _("Trapezoidal"), _("Rounded Rectangle"), _("Chamfered Rectangle"), _("Custom (Circ. Anchor)"), _("Custom (Rect. 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 ); fgSizerShapeType->Add( m_PadShape, 0, wxEXPAND|wxALL, 3 ); - - + + fgSizerShapeType->Add( 0, 0, 1, wxEXPAND, 5 ); - + m_posXLabel = new wxStaticText( m_panelGeneral, wxID_ANY, _("Position X:"), wxDefaultPosition, wxDefaultSize, 0 ); m_posXLabel->Wrap( -1 ); fgSizerShapeType->Add( m_posXLabel, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxLEFT, 3 ); - + m_posXCtrl = new wxTextCtrl( m_panelGeneral, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); fgSizerShapeType->Add( m_posXCtrl, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 3 ); - + m_posXUnits = new wxStaticText( m_panelGeneral, wxID_ANY, _("Inch"), wxDefaultPosition, wxDefaultSize, 0 ); m_posXUnits->Wrap( -1 ); fgSizerShapeType->Add( m_posXUnits, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxRIGHT, 3 ); - + m_posYLabel = new wxStaticText( m_panelGeneral, wxID_ANY, _("Position Y:"), wxDefaultPosition, wxDefaultSize, 0 ); m_posYLabel->Wrap( -1 ); fgSizerShapeType->Add( m_posYLabel, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxTOP, 3 ); - + m_posYCtrl = new wxTextCtrl( m_panelGeneral, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); fgSizerShapeType->Add( m_posYCtrl, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 3 ); - + m_posYUnits = new wxStaticText( m_panelGeneral, wxID_ANY, _("Inch"), wxDefaultPosition, wxDefaultSize, 0 ); m_posYUnits->Wrap( -1 ); fgSizerShapeType->Add( m_posYUnits, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxRIGHT, 3 ); - + m_sizeXLabel = new wxStaticText( m_panelGeneral, wxID_ANY, _("Size X:"), wxDefaultPosition, wxDefaultSize, 0 ); m_sizeXLabel->Wrap( -1 ); fgSizerShapeType->Add( m_sizeXLabel, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxTOP, 3 ); - + m_sizeXCtrl = new wxTextCtrl( m_panelGeneral, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); fgSizerShapeType->Add( m_sizeXCtrl, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 3 ); - + m_sizeXUnits = new wxStaticText( m_panelGeneral, wxID_ANY, _("Inch"), wxDefaultPosition, wxDefaultSize, 0 ); m_sizeXUnits->Wrap( -1 ); fgSizerShapeType->Add( m_sizeXUnits, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxRIGHT, 3 ); - + m_sizeYLabel = new wxStaticText( m_panelGeneral, wxID_ANY, _("Size Y:"), wxDefaultPosition, wxDefaultSize, 0 ); m_sizeYLabel->Wrap( -1 ); fgSizerShapeType->Add( m_sizeYLabel, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 3 ); - + m_sizeYCtrl = new wxTextCtrl( m_panelGeneral, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); fgSizerShapeType->Add( m_sizeYCtrl, 0, wxEXPAND|wxALL, 3 ); - + m_sizeYUnits = new wxStaticText( m_panelGeneral, wxID_ANY, _("Inch"), wxDefaultPosition, wxDefaultSize, 0 ); m_sizeYUnits->Wrap( -1 ); fgSizerShapeType->Add( m_sizeYUnits, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 3 ); - + m_PadOrientText = new wxStaticText( m_panelGeneral, wxID_ANY, _("Orientation:"), wxDefaultPosition, wxDefaultSize, 0 ); m_PadOrientText->Wrap( -1 ); fgSizerShapeType->Add( m_PadOrientText, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 3 ); - + m_orientation = new wxComboBox( m_panelGeneral, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 ); m_orientation->Append( _("0") ); m_orientation->Append( _("90") ); m_orientation->Append( _("-90") ); m_orientation->Append( _("180") ); fgSizerShapeType->Add( m_orientation, 0, wxALL|wxEXPAND, 5 ); - + m_staticText491 = new wxStaticText( m_panelGeneral, wxID_ANY, _("deg"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticText491->Wrap( -1 ); fgSizerShapeType->Add( m_staticText491, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 3 ); - + m_offsetXLabel = new wxStaticText( m_panelGeneral, wxID_ANY, _("Shape offset X:"), wxDefaultPosition, wxDefaultSize, 0 ); m_offsetXLabel->Wrap( -1 ); fgSizerShapeType->Add( m_offsetXLabel, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxTOP, 3 ); - + m_offsetXCtrl = new wxTextCtrl( m_panelGeneral, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); fgSizerShapeType->Add( m_offsetXCtrl, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 3 ); - + m_offsetXUnits = new wxStaticText( m_panelGeneral, wxID_ANY, _("Inch"), wxDefaultPosition, wxDefaultSize, 0 ); m_offsetXUnits->Wrap( -1 ); fgSizerShapeType->Add( m_offsetXUnits, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxRIGHT, 3 ); - + m_offsetYLabel = new wxStaticText( m_panelGeneral, wxID_ANY, _("Shape offset Y:"), wxDefaultPosition, wxDefaultSize, 0 ); m_offsetYLabel->Wrap( -1 ); fgSizerShapeType->Add( m_offsetYLabel, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxTOP, 3 ); - + m_offsetYCtrl = new wxTextCtrl( m_panelGeneral, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); fgSizerShapeType->Add( m_offsetYCtrl, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 3 ); - + m_offsetYUnits = new wxStaticText( m_panelGeneral, wxID_ANY, _("Inch"), wxDefaultPosition, wxDefaultSize, 0 ); m_offsetYUnits->Wrap( -1 ); fgSizerShapeType->Add( m_offsetYUnits, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxRIGHT, 3 ); - + m_padToDieLabel = new wxStaticText( m_panelGeneral, wxID_ANY, _("Pad to die length:"), wxDefaultPosition, wxDefaultSize, 0 ); m_padToDieLabel->Wrap( -1 ); m_padToDieLabel->SetToolTip( _("Wire length from pad to die on chip ( used to calculate actual track length)") ); - + fgSizerShapeType->Add( m_padToDieLabel, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT|wxTOP, 3 ); - + m_padToDieCtrl = new wxTextCtrl( m_panelGeneral, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); fgSizerShapeType->Add( m_padToDieCtrl, 0, wxEXPAND|wxALL, 3 ); - + m_padToDieUnits = new wxStaticText( m_panelGeneral, wxID_ANY, _("Inch"), wxDefaultPosition, wxDefaultSize, 0 ); m_padToDieUnits->Wrap( -1 ); fgSizerShapeType->Add( m_padToDieUnits, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 3 ); - + m_trapDeltaLabel = new wxStaticText( m_panelGeneral, wxID_ANY, _("Trapezoid delta:"), wxDefaultPosition, wxDefaultSize, 0 ); m_trapDeltaLabel->Wrap( -1 ); fgSizerShapeType->Add( m_trapDeltaLabel, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 3 ); - + m_trapDeltaCtrl = new wxTextCtrl( m_panelGeneral, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); fgSizerShapeType->Add( m_trapDeltaCtrl, 0, wxEXPAND|wxALL, 3 ); - + m_trapDeltaUnits = new wxStaticText( m_panelGeneral, wxID_ANY, _("Inch"), wxDefaultPosition, wxDefaultSize, 0 ); m_trapDeltaUnits->Wrap( -1 ); fgSizerShapeType->Add( m_trapDeltaUnits, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 3 ); - + m_trapAxisLabel = new wxStaticText( m_panelGeneral, wxID_ANY, _("Trapezoid axis:"), wxDefaultPosition, wxDefaultSize, 0 ); m_trapAxisLabel->Wrap( -1 ); fgSizerShapeType->Add( m_trapAxisLabel, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 3 ); - + wxString m_trapAxisCtrlChoices[] = { _("Horizontal"), _("Vertical") }; int m_trapAxisCtrlNChoices = sizeof( m_trapAxisCtrlChoices ) / sizeof( wxString ); m_trapAxisCtrl = new wxChoice( m_panelGeneral, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_trapAxisCtrlNChoices, m_trapAxisCtrlChoices, 0 ); m_trapAxisCtrl->SetSelection( 0 ); fgSizerShapeType->Add( m_trapAxisCtrl, 0, wxEXPAND|wxALL, 3 ); - - + + fgSizerShapeType->Add( 0, 0, 1, wxEXPAND|wxTOP, 15 ); - + m_staticTextCornerSizeRatio = new wxStaticText( m_panelGeneral, wxID_ANY, _("Corner size:"), 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.") ); - + fgSizerShapeType->Add( m_staticTextCornerSizeRatio, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 3 ); - + m_tcCornerSizeRatio = new TEXT_CTRL_EVAL( m_panelGeneral, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); fgSizerShapeType->Add( m_tcCornerSizeRatio, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL|wxALL, 3 ); - + m_staticTextCornerSizeRatioUnit = new wxStaticText( m_panelGeneral, wxID_ANY, _("%"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticTextCornerSizeRatioUnit->Wrap( -1 ); fgSizerShapeType->Add( m_staticTextCornerSizeRatioUnit, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 3 ); - + m_cornerRadiusLabel = new wxStaticText( m_panelGeneral, wxID_ANY, _("Corner radius:"), wxDefaultPosition, wxDefaultSize, 0 ); m_cornerRadiusLabel->Wrap( -1 ); m_cornerRadiusLabel->SetToolTip( _("Corner radius.\nCan be no more than half pad width.\nThe width is the smaller value between size X and size Y.\nNote: IPC norm gives a max value = 0.25mm.") ); - - fgSizerShapeType->Add( m_cornerRadiusLabel, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 3 ); - + + fgSizerShapeType->Add( m_cornerRadiusLabel, 0, wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 3 ); + m_tcCornerRadius = new wxTextCtrl( m_panelGeneral, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); - m_tcCornerRadius->SetToolTip( _("Corner radius.\nCan be no more than half pad width.\nThe width is the smaller value between size X and size Y\nNote: IPC norm gives a max value = 0.25mm") ); - - fgSizerShapeType->Add( m_tcCornerRadius, 0, wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND, 3 ); - + fgSizerShapeType->Add( m_tcCornerRadius, 0, wxALL|wxEXPAND, 3 ); + m_cornerRadiusUnits = new wxStaticText( m_panelGeneral, wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 ); m_cornerRadiusUnits->Wrap( -1 ); fgSizerShapeType->Add( m_cornerRadiusUnits, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 3 ); - - + + m_staticTextChamferRatio = new wxStaticText( m_panelGeneral, wxID_ANY, _("Chamfer size:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextChamferRatio->Wrap( -1 ); + m_staticTextChamferRatio->SetToolTip( _("Chamfer size in percent of the pad width.\nThe width is the smaller value between size X and size Y.\nThe max value is 50 percent.") ); + + fgSizerShapeType->Add( m_staticTextChamferRatio, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 ); + + m_tcChamferRatio = new TEXT_CTRL_EVAL( m_panelGeneral, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + fgSizerShapeType->Add( m_tcChamferRatio, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 3 ); + + m_staticTextChamferRatioUnit = new wxStaticText( m_panelGeneral, wxID_ANY, _("%"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextChamferRatioUnit->Wrap( -1 ); + fgSizerShapeType->Add( m_staticTextChamferRatioUnit, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 ); + + m_staticTextChamferCorner = new wxStaticText( m_panelGeneral, wxID_ANY, _("Chamfered corner:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextChamferCorner->Wrap( -1 ); + m_staticTextChamferCorner->SetToolTip( _("Chamfered corners. The position is relative to a pad orientation 0 degree.") ); + + fgSizerShapeType->Add( m_staticTextChamferCorner, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 ); + + wxBoxSizer* bSizerChamferedCorners; + bSizerChamferedCorners = new wxBoxSizer( wxVERTICAL ); + + m_cbTopLeft = new wxCheckBox( m_panelGeneral, wxID_ANY, _("Top left"), wxDefaultPosition, wxDefaultSize, 0 ); + m_cbTopLeft->SetValue(true); + bSizerChamferedCorners->Add( m_cbTopLeft, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); + + m_cbTopRight = new wxCheckBox( m_panelGeneral, wxID_ANY, _("Top right"), wxDefaultPosition, wxDefaultSize, 0 ); + bSizerChamferedCorners->Add( m_cbTopRight, 0, wxRIGHT|wxLEFT, 5 ); + + m_cbBottomLeft = new wxCheckBox( m_panelGeneral, wxID_ANY, _("Bottom left"), wxDefaultPosition, wxDefaultSize, 0 ); + bSizerChamferedCorners->Add( m_cbBottomLeft, 0, wxRIGHT|wxLEFT, 5 ); + + m_cbBottomRight = new wxCheckBox( m_panelGeneral, wxID_ANY, _("Bottom right"), wxDefaultPosition, wxDefaultSize, 0 ); + bSizerChamferedCorners->Add( m_cbBottomRight, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 ); + + + fgSizerShapeType->Add( bSizerChamferedCorners, 0, wxEXPAND, 5 ); + + m_LeftBoxSizer->Add( fgSizerShapeType, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 ); - - + + bGeneralSizer->Add( m_LeftBoxSizer, 0, wxALL|wxEXPAND, 5 ); - + wxBoxSizer* bSizer10; bSizer10 = new wxBoxSizer( wxVERTICAL ); - + wxFlexGridSizer* fgSizerGeometry; fgSizerGeometry = new wxFlexGridSizer( 14, 3, 0, 0 ); fgSizerGeometry->AddGrowableCol( 1 ); fgSizerGeometry->SetFlexibleDirection( wxBOTH ); fgSizerGeometry->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); - + m_holeShapeLabel = new wxStaticText( m_panelGeneral, wxID_ANY, _("Hole shape:"), wxDefaultPosition, wxDefaultSize, 0 ); m_holeShapeLabel->Wrap( -1 ); fgSizerGeometry->Add( m_holeShapeLabel, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxLEFT, 5 ); - + wxString m_holeShapeCtrlChoices[] = { _("Circular"), _("Oval") }; int m_holeShapeCtrlNChoices = sizeof( m_holeShapeCtrlChoices ) / sizeof( wxString ); m_holeShapeCtrl = new wxChoice( m_panelGeneral, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_holeShapeCtrlNChoices, m_holeShapeCtrlChoices, 0 ); m_holeShapeCtrl->SetSelection( 0 ); fgSizerGeometry->Add( m_holeShapeCtrl, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxLEFT|wxTOP, 5 ); - + m_staticText51 = new wxStaticText( m_panelGeneral, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); m_staticText51->Wrap( -1 ); fgSizerGeometry->Add( m_staticText51, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT|wxTOP, 5 ); - + m_holeXLabel = new wxStaticText( m_panelGeneral, wxID_ANY, _("Hole size X:"), wxDefaultPosition, wxDefaultSize, 0 ); m_holeXLabel->Wrap( -1 ); fgSizerGeometry->Add( m_holeXLabel, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxTOP, 5 ); - + m_holeXCtrl = new wxTextCtrl( m_panelGeneral, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); fgSizerGeometry->Add( m_holeXCtrl, 0, wxEXPAND|wxLEFT|wxTOP, 5 ); - + m_holeXUnits = new wxStaticText( m_panelGeneral, wxID_ANY, _("Inch"), wxDefaultPosition, wxDefaultSize, 0 ); m_holeXUnits->Wrap( -1 ); fgSizerGeometry->Add( m_holeXUnits, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxRIGHT, 5 ); - + m_holeYLabel = new wxStaticText( m_panelGeneral, wxID_ANY, _("Hole size Y:"), wxDefaultPosition, wxDefaultSize, 0 ); m_holeYLabel->Wrap( -1 ); fgSizerGeometry->Add( m_holeYLabel, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT|wxTOP, 5 ); - + m_holeYCtrl = new wxTextCtrl( m_panelGeneral, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); fgSizerGeometry->Add( m_holeYCtrl, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxTOP, 5 ); - + m_holeYUnits = new wxStaticText( m_panelGeneral, wxID_ANY, _("Inch"), wxDefaultPosition, wxDefaultSize, 0 ); m_holeYUnits->Wrap( -1 ); fgSizerGeometry->Add( m_holeYUnits, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 5 ); - - + + bSizer10->Add( fgSizerGeometry, 0, wxEXPAND, 5 ); - + wxStaticBoxSizer* m_LayersSizer; m_LayersSizer = new wxStaticBoxSizer( new wxStaticBox( m_panelGeneral, wxID_ANY, wxEmptyString ), wxVERTICAL ); - + m_FlippedWarningSizer = new wxBoxSizer( wxHORIZONTAL ); - + m_FlippedWarningIcon = new wxStaticBitmap( m_LayersSizer->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 48,48 ), 0 ); m_FlippedWarningIcon->SetMinSize( wxSize( 48,48 ) ); - + m_FlippedWarningSizer->Add( m_FlippedWarningIcon, 0, wxALIGN_TOP|wxBOTTOM|wxTOP, 4 ); - + m_staticText86 = new wxStaticText( m_LayersSizer->GetStaticBox(), wxID_ANY, _("Parent footprint on board is flipped.\nLayers will be reversed."), wxDefaultPosition, wxDefaultSize, 0 ); m_staticText86->Wrap( 150 ); m_FlippedWarningSizer->Add( m_staticText86, 1, wxALIGN_TOP|wxBOTTOM|wxLEFT|wxRIGHT, 8 ); - - + + m_LayersSizer->Add( m_FlippedWarningSizer, 1, wxEXPAND, 5 ); - + wxBoxSizer* bSizer11; bSizer11 = new wxBoxSizer( wxHORIZONTAL ); - + m_staticText511 = new wxStaticText( m_LayersSizer->GetStaticBox(), wxID_ANY, _("Copper:"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticText511->Wrap( -1 ); bSizer11->Add( m_staticText511, 0, wxALIGN_CENTER_VERTICAL|wxALL|wxTOP, 4 ); - + wxString m_rbCopperLayersSelChoices[] = { _("Front layer"), _("Back layer"), _("All copper layers"), _("None") }; int m_rbCopperLayersSelNChoices = sizeof( m_rbCopperLayersSelChoices ) / sizeof( wxString ); m_rbCopperLayersSel = new wxChoice( m_LayersSizer->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_rbCopperLayersSelNChoices, m_rbCopperLayersSelChoices, 0 ); m_rbCopperLayersSel->SetSelection( 0 ); bSizer11->Add( m_rbCopperLayersSel, 1, wxALL|wxEXPAND|wxTOP, 4 ); - - + + m_LayersSizer->Add( bSizer11, 0, wxEXPAND, 5 ); - + m_techLayersLabel = new wxStaticText( m_LayersSizer->GetStaticBox(), wxID_ANY, _("Technical layers:"), wxDefaultPosition, wxDefaultSize, 0 ); m_techLayersLabel->Wrap( -1 ); m_techLayersLabel->SetFont( wxFont( 11, wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL, false, wxEmptyString ) ); - + m_LayersSizer->Add( m_techLayersLabel, 0, wxALL, 5 ); - + m_PadLayerAdhCmp = new wxCheckBox( m_LayersSizer->GetStaticBox(), wxID_ANY, _("Front adhesive"), wxDefaultPosition, wxDefaultSize, 0 ); m_LayersSizer->Add( m_PadLayerAdhCmp, 0, wxLEFT|wxRIGHT, 4 ); - + m_PadLayerAdhCu = new wxCheckBox( m_LayersSizer->GetStaticBox(), wxID_ANY, _("Back adhesive"), wxDefaultPosition, wxDefaultSize, 0 ); m_LayersSizer->Add( m_PadLayerAdhCu, 0, wxTOP|wxRIGHT|wxLEFT, 4 ); - + m_PadLayerPateCmp = new wxCheckBox( m_LayersSizer->GetStaticBox(), wxID_ANY, _("Front solder paste"), wxDefaultPosition, wxDefaultSize, 0 ); m_LayersSizer->Add( m_PadLayerPateCmp, 0, wxTOP|wxRIGHT|wxLEFT, 4 ); - + m_PadLayerPateCu = new wxCheckBox( m_LayersSizer->GetStaticBox(), wxID_ANY, _("Back solder paste"), wxDefaultPosition, wxDefaultSize, 0 ); m_LayersSizer->Add( m_PadLayerPateCu, 0, wxTOP|wxRIGHT|wxLEFT, 4 ); - + m_PadLayerSilkCmp = new wxCheckBox( m_LayersSizer->GetStaticBox(), wxID_ANY, _("Front silk screen"), wxDefaultPosition, wxDefaultSize, 0 ); m_LayersSizer->Add( m_PadLayerSilkCmp, 0, wxTOP|wxRIGHT|wxLEFT, 4 ); - + m_PadLayerSilkCu = new wxCheckBox( m_LayersSizer->GetStaticBox(), wxID_ANY, _("Back silk screen"), wxDefaultPosition, wxDefaultSize, 0 ); m_LayersSizer->Add( m_PadLayerSilkCu, 0, wxTOP|wxRIGHT|wxLEFT, 4 ); - + m_PadLayerMaskCmp = new wxCheckBox( m_LayersSizer->GetStaticBox(), wxID_ANY, _("Front solder mask"), wxDefaultPosition, wxDefaultSize, 0 ); m_LayersSizer->Add( m_PadLayerMaskCmp, 0, wxTOP|wxRIGHT|wxLEFT, 4 ); - + m_PadLayerMaskCu = new wxCheckBox( m_LayersSizer->GetStaticBox(), wxID_ANY, _("Back solder mask"), wxDefaultPosition, wxDefaultSize, 0 ); m_LayersSizer->Add( m_PadLayerMaskCu, 0, wxTOP|wxRIGHT|wxLEFT, 4 ); - + m_PadLayerDraft = new wxCheckBox( m_LayersSizer->GetStaticBox(), wxID_ANY, _("Drafting notes"), wxDefaultPosition, wxDefaultSize, 0 ); m_LayersSizer->Add( m_PadLayerDraft, 0, wxTOP|wxRIGHT|wxLEFT, 4 ); - + m_PadLayerECO1 = new wxCheckBox( m_LayersSizer->GetStaticBox(), wxID_ANY, _("E.C.O.1"), wxDefaultPosition, wxDefaultSize, 0 ); m_LayersSizer->Add( m_PadLayerECO1, 0, wxTOP|wxRIGHT|wxLEFT, 4 ); - + m_PadLayerECO2 = new wxCheckBox( m_LayersSizer->GetStaticBox(), wxID_ANY, _("E.C.O.2"), wxDefaultPosition, wxDefaultSize, 0 ); m_LayersSizer->Add( m_PadLayerECO2, 0, wxALL, 4 ); - - + + bSizer10->Add( m_LayersSizer, 1, wxEXPAND|wxLEFT|wxRIGHT|wxTOP, 5 ); - - + + bGeneralSizer->Add( bSizer10, 0, wxALL|wxEXPAND, 5 ); - - + + m_panelGeneral->SetSizer( bGeneralSizer ); m_panelGeneral->Layout(); bGeneralSizer->Fit( m_panelGeneral ); @@ -370,106 +406,106 @@ DIALOG_PAD_PROPERTIES_BASE::DIALOG_PAD_PROPERTIES_BASE( wxWindow* parent, wxWind m_localSettingsPanel = new wxPanel( m_notebook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); wxBoxSizer* bSizerPanelClearance; bSizerPanelClearance = new wxBoxSizer( wxVERTICAL ); - + wxBoxSizer* bSizerClearance; bSizerClearance = new wxBoxSizer( wxVERTICAL ); - + wxStaticBoxSizer* sbClearancesSizer; sbClearancesSizer = new wxStaticBoxSizer( new wxStaticBox( m_localSettingsPanel, wxID_ANY, _("Clearances") ), wxVERTICAL ); - + wxStaticText* m_staticTextHint; m_staticTextHint = new wxStaticText( sbClearancesSizer->GetStaticBox(), wxID_ANY, _("Set values to 0 to use parent footprint or netclass values."), wxDefaultPosition, wxDefaultSize, 0 ); m_staticTextHint->Wrap( -1 ); m_staticTextHint->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL, false, wxEmptyString ) ); - + sbClearancesSizer->Add( m_staticTextHint, 0, wxRIGHT, 10 ); - + m_staticTextInfoPosValue = new wxStaticText( sbClearancesSizer->GetStaticBox(), wxID_ANY, _("Positive clearance means area bigger than the pad (usual for mask clearance)."), wxDefaultPosition, wxDefaultSize, 0 ); m_staticTextInfoPosValue->Wrap( -1 ); m_staticTextInfoPosValue->SetFont( wxFont( 12, wxFONTFAMILY_DEFAULT, wxFONTSTYLE_ITALIC, wxFONTWEIGHT_NORMAL, false, wxEmptyString ) ); - + sbClearancesSizer->Add( m_staticTextInfoPosValue, 0, wxTOP|wxRIGHT, 10 ); - + m_staticTextInfoNegVal = new wxStaticText( sbClearancesSizer->GetStaticBox(), wxID_ANY, _("Negative clearance means area smaller than the pad (usual for paste clearance)."), wxDefaultPosition, wxDefaultSize, 0 ); m_staticTextInfoNegVal->Wrap( -1 ); m_staticTextInfoNegVal->SetFont( wxFont( 12, wxFONTFAMILY_DEFAULT, wxFONTSTYLE_ITALIC, wxFONTWEIGHT_NORMAL, false, wxEmptyString ) ); - + sbClearancesSizer->Add( m_staticTextInfoNegVal, 0, wxBOTTOM|wxRIGHT, 10 ); - + wxFlexGridSizer* fgClearancesGridSizer; fgClearancesGridSizer = new wxFlexGridSizer( 4, 3, 0, 0 ); fgClearancesGridSizer->AddGrowableCol( 1 ); fgClearancesGridSizer->SetFlexibleDirection( wxBOTH ); fgClearancesGridSizer->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); - + m_clearanceLabel = new wxStaticText( sbClearancesSizer->GetStaticBox(), wxID_ANY, _("Pad clearance:"), wxDefaultPosition, wxDefaultSize, 0 ); m_clearanceLabel->Wrap( -1 ); m_clearanceLabel->SetToolTip( _("This is the local net clearance for this pad.\nIf 0, the footprint local value or the Netclass value is used.") ); - + fgClearancesGridSizer->Add( m_clearanceLabel, 0, wxALIGN_CENTER_VERTICAL, 5 ); - + m_clearanceCtrl = new wxTextCtrl( sbClearancesSizer->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); fgClearancesGridSizer->Add( m_clearanceCtrl, 0, wxEXPAND|wxTOP|wxLEFT, 5 ); - + m_clearanceUnits = new wxStaticText( sbClearancesSizer->GetStaticBox(), wxID_ANY, _("Inch"), wxDefaultPosition, wxDefaultSize, 0 ); m_clearanceUnits->Wrap( -1 ); fgClearancesGridSizer->Add( m_clearanceUnits, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxRIGHT|wxLEFT, 5 ); - + m_maskClearanceLabel = new wxStaticText( sbClearancesSizer->GetStaticBox(), wxID_ANY, _("Solder mask clearance:"), wxDefaultPosition, wxDefaultSize, 0 ); m_maskClearanceLabel->Wrap( -1 ); m_maskClearanceLabel->SetToolTip( _("This is the local clearance between this pad and the solder mask.\nIf 0, the footprint local value or the global value is used.") ); - + fgClearancesGridSizer->Add( m_maskClearanceLabel, 0, wxALIGN_CENTER_VERTICAL|wxTOP, 5 ); - + m_maskClearanceCtrl = new wxTextCtrl( sbClearancesSizer->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); fgClearancesGridSizer->Add( m_maskClearanceCtrl, 0, wxEXPAND|wxLEFT|wxTOP, 5 ); - + m_maskClearanceUnits = new wxStaticText( sbClearancesSizer->GetStaticBox(), wxID_ANY, _("Inch"), wxDefaultPosition, wxDefaultSize, 0 ); m_maskClearanceUnits->Wrap( -1 ); fgClearancesGridSizer->Add( m_maskClearanceUnits, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT|wxTOP, 5 ); - + m_pasteClearanceLabel = new wxStaticText( sbClearancesSizer->GetStaticBox(), wxID_ANY, _("Solder paste clearance:"), wxDefaultPosition, wxDefaultSize, 0 ); m_pasteClearanceLabel->Wrap( -1 ); m_pasteClearanceLabel->SetToolTip( _("This is the local clearance between this pad and the solder paste.\nIf 0, the footprint value or the global value is used.\nThe final clearance value is the sum of this value and the clearance value ratio.\nA negative value means a smaller mask size than pad size.") ); - + fgClearancesGridSizer->Add( m_pasteClearanceLabel, 0, wxALIGN_CENTER_VERTICAL|wxTOP, 5 ); - + m_pasteClearanceCtrl = new wxTextCtrl( sbClearancesSizer->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); fgClearancesGridSizer->Add( m_pasteClearanceCtrl, 0, wxEXPAND|wxLEFT|wxTOP, 5 ); - + m_pasteClearanceUnits = new wxStaticText( sbClearancesSizer->GetStaticBox(), wxID_ANY, _("Inch"), wxDefaultPosition, wxDefaultSize, 0 ); m_pasteClearanceUnits->Wrap( -1 ); fgClearancesGridSizer->Add( m_pasteClearanceUnits, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT|wxTOP, 5 ); - + m_staticTextRatio = new wxStaticText( sbClearancesSizer->GetStaticBox(), wxID_ANY, _("Solder paste ratio clearance:"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticTextRatio->Wrap( -1 ); m_staticTextRatio->SetToolTip( _("This is the local clearance ratio in percent between this pad and the solder paste.\nA value of 10 means the clearance value is 10 percent of the pad size.\nIf 0, the footprint value or the global value is used.\nThe final clearance value is the sum of this value and the clearance value.\nA negative value means a smaller mask size than pad size.") ); - + fgClearancesGridSizer->Add( m_staticTextRatio, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM, 5 ); - + m_SolderPasteMarginRatioCtrl = new TEXT_CTRL_EVAL( sbClearancesSizer->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); fgClearancesGridSizer->Add( m_SolderPasteMarginRatioCtrl, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxTOP, 5 ); - + m_SolderPasteRatioMarginUnits = new wxStaticText( sbClearancesSizer->GetStaticBox(), wxID_ANY, _("%"), wxDefaultPosition, wxDefaultSize, 0 ); m_SolderPasteRatioMarginUnits->Wrap( -1 ); fgClearancesGridSizer->Add( m_SolderPasteRatioMarginUnits, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); - - + + sbClearancesSizer->Add( fgClearancesGridSizer, 0, wxEXPAND, 5 ); - + m_nonCopperWarningBook = new wxSimplebook( sbClearancesSizer->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 ); wxPanel* notePanel; notePanel = new wxPanel( m_nonCopperWarningBook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); wxBoxSizer* bNoteSizer; bNoteSizer = new wxBoxSizer( wxVERTICAL ); - + m_nonCopperNote = new wxStaticText( notePanel, wxID_ANY, _("Note: solder mask and paste values are used only for pads on copper layers."), wxDefaultPosition, wxDefaultSize, 0 ); m_nonCopperNote->Wrap( -1 ); m_nonCopperNote->SetFont( wxFont( 12, wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL, false, wxEmptyString ) ); - + bNoteSizer->Add( m_nonCopperNote, 0, wxTOP|wxRIGHT, 15 ); - - + + notePanel->SetSizer( bNoteSizer ); notePanel->Layout(); bNoteSizer->Fit( notePanel ); @@ -478,237 +514,237 @@ DIALOG_PAD_PROPERTIES_BASE::DIALOG_PAD_PROPERTIES_BASE( wxWindow* parent, wxWind warningPanel = new wxPanel( m_nonCopperWarningBook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); wxBoxSizer* bWarningSizer; bWarningSizer = new wxBoxSizer( wxHORIZONTAL ); - - bWarningSizer->SetMinSize( wxSize( -1,50 ) ); + + bWarningSizer->SetMinSize( wxSize( -1,50 ) ); m_nonCopperWarningIcon = new wxStaticBitmap( warningPanel, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 48,48 ), 0 ); m_nonCopperWarningIcon->SetMinSize( wxSize( 48,48 ) ); - + bWarningSizer->Add( m_nonCopperWarningIcon, 0, wxALL, 5 ); - + m_nonCopperWarningText = new wxStaticText( warningPanel, wxID_ANY, _("Note: solder mask and paste values are used only for pads on copper layers."), wxDefaultPosition, wxDefaultSize, 0 ); m_nonCopperWarningText->Wrap( -1 ); m_nonCopperWarningText->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL, false, wxEmptyString ) ); - + bWarningSizer->Add( m_nonCopperWarningText, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); - - + + warningPanel->SetSizer( bWarningSizer ); warningPanel->Layout(); bWarningSizer->Fit( warningPanel ); m_nonCopperWarningBook->AddPage( warningPanel, _("a page"), false ); - + sbClearancesSizer->Add( m_nonCopperWarningBook, 1, wxEXPAND|wxTOP|wxBOTTOM|wxRIGHT, 5 ); - - + + bSizerClearance->Add( sbClearancesSizer, 0, wxALL|wxEXPAND, 5 ); - + m_sbSizerZonesSettings = new wxStaticBoxSizer( new wxStaticBox( m_localSettingsPanel, wxID_ANY, _("Connection to Copper Zones") ), wxVERTICAL ); - + wxFlexGridSizer* fgSizerCopperZonesOpts; fgSizerCopperZonesOpts = new wxFlexGridSizer( 0, 3, 0, 0 ); fgSizerCopperZonesOpts->AddGrowableCol( 1 ); fgSizerCopperZonesOpts->SetFlexibleDirection( wxBOTH ); fgSizerCopperZonesOpts->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); - + m_staticText40 = new wxStaticText( m_sbSizerZonesSettings->GetStaticBox(), wxID_ANY, _("Pad connection:"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticText40->Wrap( -1 ); fgSizerCopperZonesOpts->Add( m_staticText40, 0, wxALIGN_CENTER_VERTICAL, 5 ); - + wxString m_ZoneConnectionChoiceChoices[] = { _("From parent footprint"), _("Solid"), _("Thermal relief"), _("None") }; int m_ZoneConnectionChoiceNChoices = sizeof( m_ZoneConnectionChoiceChoices ) / sizeof( wxString ); m_ZoneConnectionChoice = new wxChoice( m_sbSizerZonesSettings->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_ZoneConnectionChoiceNChoices, m_ZoneConnectionChoiceChoices, 0 ); m_ZoneConnectionChoice->SetSelection( 0 ); fgSizerCopperZonesOpts->Add( m_ZoneConnectionChoice, 0, wxEXPAND|wxLEFT, 5 ); - - + + fgSizerCopperZonesOpts->Add( 0, 0, 1, wxEXPAND, 5 ); - + m_spokeWidthLabel = new wxStaticText( m_sbSizerZonesSettings->GetStaticBox(), wxID_ANY, _("Thermal relief spoke width:"), wxDefaultPosition, wxDefaultSize, 0 ); m_spokeWidthLabel->Wrap( -1 ); fgSizerCopperZonesOpts->Add( m_spokeWidthLabel, 0, wxALIGN_CENTER_VERTICAL|wxTOP, 5 ); - + m_spokeWidthCtrl = new wxTextCtrl( m_sbSizerZonesSettings->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); fgSizerCopperZonesOpts->Add( m_spokeWidthCtrl, 0, wxEXPAND|wxLEFT|wxTOP, 5 ); - + m_spokeWidthUnits = new wxStaticText( m_sbSizerZonesSettings->GetStaticBox(), wxID_ANY, _("Inch"), wxDefaultPosition, wxDefaultSize, 0 ); m_spokeWidthUnits->Wrap( -1 ); fgSizerCopperZonesOpts->Add( m_spokeWidthUnits, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT|wxTOP, 5 ); - + m_thermalGapLabel = new wxStaticText( m_sbSizerZonesSettings->GetStaticBox(), wxID_ANY, _("Thermal relief gap:"), wxDefaultPosition, wxDefaultSize, 0 ); m_thermalGapLabel->Wrap( -1 ); fgSizerCopperZonesOpts->Add( m_thermalGapLabel, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM, 5 ); - + m_thermalGapCtrl = new wxTextCtrl( m_sbSizerZonesSettings->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); fgSizerCopperZonesOpts->Add( m_thermalGapCtrl, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxTOP, 5 ); - + m_thermalGapUnits = new wxStaticText( m_sbSizerZonesSettings->GetStaticBox(), wxID_ANY, _("Inch"), wxDefaultPosition, wxDefaultSize, 0 ); m_thermalGapUnits->Wrap( -1 ); fgSizerCopperZonesOpts->Add( m_thermalGapUnits, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); - - + + m_sbSizerZonesSettings->Add( fgSizerCopperZonesOpts, 0, wxEXPAND, 5 ); - - + + bSizerClearance->Add( m_sbSizerZonesSettings, 0, wxALL|wxEXPAND, 5 ); - + m_sbSizerCustomShapedZonesSettings = new wxStaticBoxSizer( new wxStaticBox( m_localSettingsPanel, wxID_ANY, _("Connection to Copper Zones") ), wxVERTICAL ); - + wxFlexGridSizer* fgSizerCustomShapedCopperZonesOpts; fgSizerCustomShapedCopperZonesOpts = new wxFlexGridSizer( 0, 2, 0, 0 ); fgSizerCustomShapedCopperZonesOpts->AddGrowableCol( 1 ); fgSizerCustomShapedCopperZonesOpts->SetFlexibleDirection( wxBOTH ); fgSizerCustomShapedCopperZonesOpts->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); - + m_staticTextCsZconnTitle = new wxStaticText( m_sbSizerCustomShapedZonesSettings->GetStaticBox(), wxID_ANY, _("Pad connection:"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticTextCsZconnTitle->Wrap( -1 ); fgSizerCustomShapedCopperZonesOpts->Add( m_staticTextCsZconnTitle, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM, 5 ); - + wxString m_ZoneConnectionCustomChoices[] = { _("None"), _("Solid") }; int m_ZoneConnectionCustomNChoices = sizeof( m_ZoneConnectionCustomChoices ) / sizeof( wxString ); m_ZoneConnectionCustom = new wxChoice( m_sbSizerCustomShapedZonesSettings->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_ZoneConnectionCustomNChoices, m_ZoneConnectionCustomChoices, 0 ); m_ZoneConnectionCustom->SetSelection( 0 ); fgSizerCustomShapedCopperZonesOpts->Add( m_ZoneConnectionCustom, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); - + m_staticTextcps = new wxStaticText( m_sbSizerCustomShapedZonesSettings->GetStaticBox(), wxID_ANY, _("Custom pad shape in zone:"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticTextcps->Wrap( -1 ); fgSizerCustomShapedCopperZonesOpts->Add( m_staticTextcps, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT, 5 ); - + wxString m_ZoneCustomPadShapeChoices[] = { _("Use pad shape"), _("Use pad convex hull") }; int m_ZoneCustomPadShapeNChoices = sizeof( m_ZoneCustomPadShapeChoices ) / sizeof( wxString ); m_ZoneCustomPadShape = new wxChoice( m_sbSizerCustomShapedZonesSettings->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_ZoneCustomPadShapeNChoices, m_ZoneCustomPadShapeChoices, 0 ); m_ZoneCustomPadShape->SetSelection( 0 ); fgSizerCustomShapedCopperZonesOpts->Add( m_ZoneCustomPadShape, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); - - + + m_sbSizerCustomShapedZonesSettings->Add( fgSizerCustomShapedCopperZonesOpts, 0, wxEXPAND, 5 ); - - + + bSizerClearance->Add( m_sbSizerCustomShapedZonesSettings, 1, wxEXPAND|wxALL, 5 ); - - + + bSizerPanelClearance->Add( bSizerClearance, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); - - + + m_localSettingsPanel->SetSizer( bSizerPanelClearance ); m_localSettingsPanel->Layout(); bSizerPanelClearance->Fit( m_localSettingsPanel ); m_notebook->AddPage( m_localSettingsPanel, _("Local Clearance and Settings"), false ); m_panelCustomShapePrimitives = new wxPanel( m_notebook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); m_bSizerPanelPrimitives = new wxBoxSizer( wxVERTICAL ); - + m_staticTextPrimitivesList = new wxStaticText( m_panelCustomShapePrimitives, wxID_ANY, _("Primitives list"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticTextPrimitivesList->Wrap( -1 ); m_staticTextPrimitivesList->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_ITALIC, wxFONTWEIGHT_BOLD, false, wxEmptyString ) ); - + m_bSizerPanelPrimitives->Add( m_staticTextPrimitivesList, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 ); - + m_staticTextPrimitiveListWarning = new wxStaticText( m_panelCustomShapePrimitives, wxID_ANY, _("Coordinates are relative to anchor pad, orientation 0"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticTextPrimitiveListWarning->Wrap( -1 ); m_staticTextPrimitiveListWarning->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) ); - + m_bSizerPanelPrimitives->Add( m_staticTextPrimitiveListWarning, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 ); - + m_listCtrlPrimitives = new wxListView( m_panelCustomShapePrimitives, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_HRULES|wxLC_NO_HEADER|wxLC_REPORT ); m_bSizerPanelPrimitives->Add( m_listCtrlPrimitives, 1, wxALL|wxEXPAND, 5 ); - + wxBoxSizer* bSizerButtons; bSizerButtons = new wxBoxSizer( wxVERTICAL ); - + wxBoxSizer* bSizerButtonsUpper; bSizerButtonsUpper = new wxBoxSizer( wxHORIZONTAL ); - + m_buttonDel = new wxButton( m_panelCustomShapePrimitives, wxID_ANY, _("Delete Primitive"), wxDefaultPosition, wxDefaultSize, 0 ); bSizerButtonsUpper->Add( m_buttonDel, 0, wxALL, 5 ); - + m_buttonEditShape = new wxButton( m_panelCustomShapePrimitives, wxID_ANY, _("Edit Primitive"), wxDefaultPosition, wxDefaultSize, 0 ); bSizerButtonsUpper->Add( m_buttonEditShape, 0, wxALL, 5 ); - + m_buttonAddShape = new wxButton( m_panelCustomShapePrimitives, wxID_ANY, _("Add Primitive"), wxDefaultPosition, wxDefaultSize, 0 ); bSizerButtonsUpper->Add( m_buttonAddShape, 0, wxALL, 5 ); - + m_buttonDup = new wxButton( m_panelCustomShapePrimitives, wxID_ANY, _("Duplicate Primitive"), wxDefaultPosition, wxDefaultSize, 0 ); bSizerButtonsUpper->Add( m_buttonDup, 0, wxALL, 5 ); - + m_buttonGeometry = new wxButton( m_panelCustomShapePrimitives, wxID_ANY, _("Transform Primitive"), wxDefaultPosition, wxDefaultSize, 0 ); bSizerButtonsUpper->Add( m_buttonGeometry, 0, wxALL, 5 ); - - + + bSizerButtons->Add( bSizerButtonsUpper, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); - - + + m_bSizerPanelPrimitives->Add( bSizerButtons, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); - - + + m_panelCustomShapePrimitives->SetSizer( m_bSizerPanelPrimitives ); m_panelCustomShapePrimitives->Layout(); m_bSizerPanelPrimitives->Fit( m_panelCustomShapePrimitives ); m_notebook->AddPage( m_panelCustomShapePrimitives, _("Custom Shape Primitives"), false ); - + bSizerUpper->Add( m_notebook, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 ); - + wxBoxSizer* bSizerDisplayPad; bSizerDisplayPad = new wxBoxSizer( wxVERTICAL ); - - + + bSizerDisplayPad->Add( 0, 0, 0, wxBOTTOM|wxEXPAND|wxTOP, 3 ); - + m_parentInfoLine1 = new wxStaticText( this, wxID_ANY, _("Footprint name"), wxDefaultPosition, wxDefaultSize, 0 ); m_parentInfoLine1->Wrap( -1 ); m_parentInfoLine1->SetFont( wxFont( 11, wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL, false, wxEmptyString ) ); - + bSizerDisplayPad->Add( m_parentInfoLine1, 0, wxTOP, 8 ); - + m_parentInfoLine2 = new wxStaticText( this, wxID_ANY, _("side and rotation"), wxDefaultPosition, wxDefaultSize, 0 ); m_parentInfoLine2->Wrap( -1 ); m_parentInfoLine2->SetFont( wxFont( 11, wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL, false, wxEmptyString ) ); - + bSizerDisplayPad->Add( m_parentInfoLine2, 0, wxRIGHT, 3 ); - - + + bSizerDisplayPad->Add( 0, 0, 1, wxEXPAND, 5 ); - + m_panelShowPad = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxSize( -1,-1 ), wxFULL_REPAINT_ON_RESIZE|wxBORDER_SIMPLE ); m_panelShowPad->SetBackgroundColour( wxColour( 0, 0, 0 ) ); m_panelShowPad->SetMinSize( wxSize( 280,-1 ) ); - + bSizerDisplayPad->Add( m_panelShowPad, 12, wxEXPAND|wxALL, 5 ); - + m_panelShowPadGal = new PCB_DRAW_PANEL_GAL( this, -1, wxPoint( 0, 0 ), wxDefaultSize, m_galOptions, EDA_DRAW_PANEL_GAL::GAL_TYPE_CAIRO); m_panelShowPadGal->SetMinSize( wxSize( 280,-1 ) ); - + bSizerDisplayPad->Add( m_panelShowPadGal, 12, wxEXPAND|wxALL, 5 ); - + m_cbShowPadOutline = new wxCheckBox( this, wxID_ANY, _("Show pad in outline mode"), wxDefaultPosition, wxDefaultSize, 0 ); bSizerDisplayPad->Add( m_cbShowPadOutline, 0, wxBOTTOM|wxRIGHT|wxTOP, 5 ); - - + + bSizerDisplayPad->Add( 0, 0, 1, wxEXPAND, 5 ); - + m_staticline13 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); bSizerDisplayPad->Add( m_staticline13, 0, wxEXPAND|wxTOP|wxBOTTOM, 10 ); - - + + bSizerUpper->Add( bSizerDisplayPad, 1, wxEXPAND|wxTOP|wxRIGHT, 10 ); - - + + m_MainSizer->Add( bSizerUpper, 1, wxEXPAND, 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(); - + m_MainSizer->Add( m_sdbSizer, 0, wxEXPAND|wxALL, 5 ); - - + + this->SetSizer( m_MainSizer ); this->Layout(); m_MainSizer->Fit( this ); - + this->Centre( wxBOTH ); - + // Connect Events this->Connect( wxEVT_INIT_DIALOG, wxInitDialogEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnInitDialog ) ); m_panelGeneral->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnUpdateUI ), NULL, this ); @@ -725,6 +761,11 @@ DIALOG_PAD_PROPERTIES_BASE::DIALOG_PAD_PROPERTIES_BASE( wxWindow* parent, wxWind m_trapAxisCtrl->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnSetLayers ), NULL, this ); m_tcCornerSizeRatio->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::onCornerSizePercentChange ), NULL, this ); m_tcCornerRadius->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::onCornerRadiusChange ), NULL, this ); + m_tcChamferRatio->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::onCornerSizePercentChange ), NULL, this ); + m_cbTopLeft->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnValuesChanged ), NULL, this ); + m_cbTopRight->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnValuesChanged ), NULL, this ); + m_cbBottomLeft->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnValuesChanged ), NULL, this ); + m_cbBottomRight->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnValuesChanged ), NULL, this ); m_holeShapeCtrl->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnDrillShapeSelected ), NULL, this ); m_holeXCtrl->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnValuesChanged ), NULL, this ); m_holeYCtrl->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnValuesChanged ), NULL, this ); @@ -773,6 +814,11 @@ DIALOG_PAD_PROPERTIES_BASE::~DIALOG_PAD_PROPERTIES_BASE() m_trapAxisCtrl->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnSetLayers ), NULL, this ); m_tcCornerSizeRatio->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::onCornerSizePercentChange ), NULL, this ); m_tcCornerRadius->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::onCornerRadiusChange ), NULL, this ); + m_tcChamferRatio->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::onCornerSizePercentChange ), NULL, this ); + m_cbTopLeft->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnValuesChanged ), NULL, this ); + m_cbTopRight->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnValuesChanged ), NULL, this ); + m_cbBottomLeft->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnValuesChanged ), NULL, this ); + m_cbBottomRight->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnValuesChanged ), NULL, this ); m_holeShapeCtrl->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnDrillShapeSelected ), NULL, this ); m_holeXCtrl->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnValuesChanged ), NULL, this ); m_holeYCtrl->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnValuesChanged ), NULL, this ); @@ -801,141 +847,141 @@ DIALOG_PAD_PROPERTIES_BASE::~DIALOG_PAD_PROPERTIES_BASE() m_panelShowPad->Disconnect( wxEVT_PAINT, wxPaintEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnPaintShowPanel ), NULL, this ); m_cbShowPadOutline->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::onChangePadMode ), NULL, this ); m_sdbSizerCancel->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PAD_PROPERTIES_BASE::OnCancel ), NULL, this ); - + } DIALOG_PAD_PRIMITIVES_PROPERTIES_BASE::DIALOG_PAD_PRIMITIVES_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 ); - + wxFlexGridSizer* fgSizerShapeProperties; fgSizerShapeProperties = new wxFlexGridSizer( 0, 7, 3, 0 ); fgSizerShapeProperties->AddGrowableCol( 2 ); fgSizerShapeProperties->AddGrowableCol( 4 ); fgSizerShapeProperties->SetFlexibleDirection( wxBOTH ); fgSizerShapeProperties->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); - + m_staticTextPosStart = new wxStaticText( this, wxID_ANY, _("Start point"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticTextPosStart->Wrap( -1 ); fgSizerShapeProperties->Add( m_staticTextPosStart, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 ); - + m_startXLabel = new wxStaticText( this, wxID_ANY, _("X:"), wxDefaultPosition, wxDefaultSize, 0 ); m_startXLabel->Wrap( -1 ); fgSizerShapeProperties->Add( m_startXLabel, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxLEFT, 5 ); - - m_startXCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + + m_startXCtrl = new TEXT_CTRL_EVAL( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); fgSizerShapeProperties->Add( m_startXCtrl, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT|wxLEFT, 5 ); - + m_startXUnits = new wxStaticText( this, wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 ); m_startXUnits->Wrap( -1 ); fgSizerShapeProperties->Add( m_startXUnits, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 10 ); - + m_startYLabel = new wxStaticText( this, wxID_ANY, _("Y:"), wxDefaultPosition, wxDefaultSize, 0 ); m_startYLabel->Wrap( -1 ); fgSizerShapeProperties->Add( m_startYLabel, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxLEFT, 5 ); - - m_startYCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + + m_startYCtrl = new TEXT_CTRL_EVAL( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); fgSizerShapeProperties->Add( m_startYCtrl, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 ); - + m_startYUnits = new wxStaticText( this, wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 ); m_startYUnits->Wrap( -1 ); fgSizerShapeProperties->Add( m_startYUnits, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); - + m_staticTextPosEnd = new wxStaticText( this, wxID_ANY, _("End point"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticTextPosEnd->Wrap( -1 ); fgSizerShapeProperties->Add( m_staticTextPosEnd, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 ); - + m_endXLabel = new wxStaticText( this, wxID_ANY, _("X:"), wxDefaultPosition, wxDefaultSize, 0 ); m_endXLabel->Wrap( -1 ); fgSizerShapeProperties->Add( m_endXLabel, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxLEFT, 5 ); - - m_endXCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + + m_endXCtrl = new TEXT_CTRL_EVAL( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); fgSizerShapeProperties->Add( m_endXCtrl, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 ); - + m_endXUnits = new wxStaticText( this, wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 ); m_endXUnits->Wrap( -1 ); fgSizerShapeProperties->Add( m_endXUnits, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); - + m_endYLabel = new wxStaticText( this, wxID_ANY, _("Y:"), wxDefaultPosition, wxDefaultSize, 0 ); m_endYLabel->Wrap( -1 ); fgSizerShapeProperties->Add( m_endYLabel, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxLEFT, 5 ); - - m_endYCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + + m_endYCtrl = new TEXT_CTRL_EVAL( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); fgSizerShapeProperties->Add( m_endYCtrl, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT|wxLEFT, 5 ); - + m_endYUnits = new wxStaticText( this, wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 ); m_endYUnits->Wrap( -1 ); fgSizerShapeProperties->Add( m_endYUnits, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); - + m_radiusLabel = new wxStaticText( this, wxID_ANY, _("Radius:"), wxDefaultPosition, wxDefaultSize, 0 ); m_radiusLabel->Wrap( -1 ); fgSizerShapeProperties->Add( m_radiusLabel, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 ); - - + + fgSizerShapeProperties->Add( 0, 0, 1, wxEXPAND, 5 ); - - m_radiusCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + + m_radiusCtrl = new TEXT_CTRL_EVAL( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); fgSizerShapeProperties->Add( m_radiusCtrl, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT|wxLEFT, 5 ); - + m_radiusUnits = new wxStaticText( this, wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 ); m_radiusUnits->Wrap( -1 ); fgSizerShapeProperties->Add( m_radiusUnits, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); - - + + fgSizerShapeProperties->Add( 0, 0, 1, wxEXPAND, 5 ); - - + + fgSizerShapeProperties->Add( 0, 0, 1, wxEXPAND, 5 ); - - + + fgSizerShapeProperties->Add( 0, 0, 1, wxEXPAND, 5 ); - + m_thicknessLabel = new wxStaticText( this, wxID_ANY, _("Thickness:"), wxDefaultPosition, wxDefaultSize, 0 ); m_thicknessLabel->Wrap( -1 ); fgSizerShapeProperties->Add( m_thicknessLabel, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT, 5 ); - - + + fgSizerShapeProperties->Add( 0, 0, 1, wxEXPAND, 5 ); - + m_thicknessCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); fgSizerShapeProperties->Add( m_thicknessCtrl, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); - + m_thicknessUnits = new wxStaticText( this, wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 ); m_thicknessUnits->Wrap( -1 ); fgSizerShapeProperties->Add( m_thicknessUnits, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT, 5 ); - - + + fgSizerShapeProperties->Add( 0, 0, 1, wxEXPAND, 5 ); - - + + bSizermain->Add( fgSizerShapeProperties, 1, wxEXPAND|wxALL, 10 ); - + m_staticTextInfo = new wxStaticText( this, wxID_ANY, _("Set thickness to 0 for a filled circle."), wxDefaultPosition, wxDefaultSize, 0 ); m_staticTextInfo->Wrap( -1 ); m_staticTextInfo->SetFont( wxFont( 11, wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL, false, wxEmptyString ) ); - + bSizermain->Add( m_staticTextInfo, 0, wxRIGHT|wxLEFT, 15 ); - + m_staticline1 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); bSizermain->Add( m_staticline1, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 10 ); - + 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, wxALL|wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 ); - - + + this->SetSizer( bSizermain ); this->Layout(); bSizermain->Fit( this ); - + this->Centre( wxBOTH ); } @@ -946,121 +992,121 @@ DIALOG_PAD_PRIMITIVES_PROPERTIES_BASE::~DIALOG_PAD_PRIMITIVES_PROPERTIES_BASE() DIALOG_PAD_PRIMITIVES_TRANSFORM_BASE::DIALOG_PAD_PRIMITIVES_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* fgSizerShapeProperties1; fgSizerShapeProperties1 = new wxFlexGridSizer( 0, 7, 3, 0 ); fgSizerShapeProperties1->AddGrowableCol( 2 ); fgSizerShapeProperties1->AddGrowableCol( 4 ); fgSizerShapeProperties1->SetFlexibleDirection( wxBOTH ); fgSizerShapeProperties1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); - + m_staticTextMove = new wxStaticText( this, wxID_ANY, _("Move vector"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticTextMove->Wrap( -1 ); fgSizerShapeProperties1->Add( m_staticTextMove, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 ); - + m_xLabel = new wxStaticText( this, wxID_ANY, _("X:"), wxDefaultPosition, wxDefaultSize, 0 ); m_xLabel->Wrap( -1 ); fgSizerShapeProperties1->Add( m_xLabel, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxLEFT, 5 ); - - m_xCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + + m_xCtrl = new TEXT_CTRL_EVAL( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); fgSizerShapeProperties1->Add( m_xCtrl, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT|wxLEFT, 5 ); - + m_xUnits = new wxStaticText( this, wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 ); m_xUnits->Wrap( -1 ); fgSizerShapeProperties1->Add( m_xUnits, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 10 ); - + m_yLabel = new wxStaticText( this, wxID_ANY, _("Y:"), wxDefaultPosition, wxDefaultSize, 0 ); m_yLabel->Wrap( -1 ); fgSizerShapeProperties1->Add( m_yLabel, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxLEFT, 5 ); - - m_yCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + + m_yCtrl = new TEXT_CTRL_EVAL( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); fgSizerShapeProperties1->Add( m_yCtrl, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 ); - + m_yUnits = new wxStaticText( this, wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 ); m_yUnits->Wrap( -1 ); fgSizerShapeProperties1->Add( m_yUnits, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); - + m_rotationLabel = new wxStaticText( this, wxID_ANY, _("Rotation:"), wxDefaultPosition, wxDefaultSize, 0 ); m_rotationLabel->Wrap( -1 ); fgSizerShapeProperties1->Add( m_rotationLabel, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 ); - - + + fgSizerShapeProperties1->Add( 0, 0, 1, wxEXPAND, 5 ); - - m_rotationCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + + m_rotationCtrl = new TEXT_CTRL_EVAL( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); fgSizerShapeProperties1->Add( m_rotationCtrl, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 ); - + m_rotationUnits = new wxStaticText( this, wxID_ANY, _("deg"), wxDefaultPosition, wxDefaultSize, 0 ); m_rotationUnits->Wrap( -1 ); fgSizerShapeProperties1->Add( m_rotationUnits, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); - - + + fgSizerShapeProperties1->Add( 0, 0, 1, wxEXPAND, 5 ); - - + + fgSizerShapeProperties1->Add( 0, 0, 1, wxEXPAND, 5 ); - - + + fgSizerShapeProperties1->Add( 0, 0, 1, wxEXPAND, 5 ); - + m_scaleLabel = new wxStaticText( this, wxID_ANY, _("Scaling factor:"), wxDefaultPosition, wxDefaultSize, 0 ); m_scaleLabel->Wrap( -1 ); fgSizerShapeProperties1->Add( m_scaleLabel, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 ); - - + + fgSizerShapeProperties1->Add( 0, 0, 1, wxEXPAND, 5 ); - + m_scaleCtrl = new TEXT_CTRL_EVAL( this, wxID_ANY, _("1"), wxDefaultPosition, wxDefaultSize, 0 ); fgSizerShapeProperties1->Add( m_scaleCtrl, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT|wxLEFT, 5 ); - - + + fgSizerShapeProperties1->Add( 0, 0, 1, wxEXPAND, 5 ); - - + + fgSizerShapeProperties1->Add( 0, 0, 1, wxEXPAND, 5 ); - - + + fgSizerShapeProperties1->Add( 0, 0, 1, wxEXPAND, 5 ); - - + + fgSizerShapeProperties1->Add( 0, 0, 1, wxEXPAND, 5 ); - + m_staticTextDupCnt = new wxStaticText( this, wxID_ANY, _("Duplicate:"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticTextDupCnt->Wrap( -1 ); fgSizerShapeProperties1->Add( m_staticTextDupCnt, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); - - + + fgSizerShapeProperties1->Add( 0, 0, 1, wxEXPAND, 5 ); - + m_spinCtrlDuplicateCount = new wxSpinCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 1, 100, 1 ); fgSizerShapeProperties1->Add( m_spinCtrlDuplicateCount, 0, wxALL|wxEXPAND, 5 ); - - + + fgSizerShapeProperties1->Add( 0, 0, 1, wxEXPAND, 5 ); - - + + bSizermain->Add( fgSizerShapeProperties1, 1, wxALL|wxEXPAND, 10 ); - + m_staticline1 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); bSizermain->Add( m_staticline1, 0, wxEXPAND|wxRIGHT|wxLEFT, 10 ); - + 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, wxALL|wxEXPAND, 5 ); - - + + this->SetSizer( bSizermain ); this->Layout(); bSizermain->Fit( this ); - + this->Centre( wxBOTH ); } @@ -1071,25 +1117,25 @@ DIALOG_PAD_PRIMITIVES_TRANSFORM_BASE::~DIALOG_PAD_PRIMITIVES_TRANSFORM_BASE() DIALOG_PAD_PRIMITIVE_POLY_PROPS_BASE::DIALOG_PAD_PRIMITIVE_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 ); - + wxBoxSizer* bSizerUpper; bSizerUpper = new wxBoxSizer( wxHORIZONTAL ); - + wxBoxSizer* bLeftSizer; bLeftSizer = new wxBoxSizer( wxVERTICAL ); - + m_gridCornersList = new WX_GRID( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxBORDER_SIMPLE ); - + // 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->SetColSize( 0, 100 ); m_gridCornersList->SetColSize( 1, 100 ); @@ -1098,141 +1144,141 @@ DIALOG_PAD_PRIMITIVE_POLY_PROPS_BASE::DIALOG_PAD_PRIMITIVE_POLY_PROPS_BASE( wxWi m_gridCornersList->SetColLabelSize( 22 ); m_gridCornersList->SetColLabelValue( 0, _("Pos X") ); m_gridCornersList->SetColLabelValue( 1, _("Pos Y") ); - m_gridCornersList->SetColLabelAlignment( wxALIGN_CENTRE, wxALIGN_CENTRE ); - + m_gridCornersList->SetColLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER ); + // Rows m_gridCornersList->AutoSizeRows(); m_gridCornersList->EnableDragRowSize( false ); m_gridCornersList->SetRowLabelSize( 80 ); - m_gridCornersList->SetRowLabelAlignment( wxALIGN_CENTRE, wxALIGN_CENTRE ); - + m_gridCornersList->SetRowLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER ); + // Label Appearance - + // Cell Defaults m_gridCornersList->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_TOP ); bLeftSizer->Add( m_gridCornersList, 1, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 10 ); - + wxBoxSizer* bSizerRightButts; bSizerRightButts = new wxBoxSizer( wxHORIZONTAL ); - - m_addButton = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); + + m_addButton = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 ); m_addButton->SetMinSize( wxSize( 30,30 ) ); - + bSizerRightButts->Add( m_addButton, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); - - + + bSizerRightButts->Add( 0, 0, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 ); - - m_deleteButton = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); + + m_deleteButton = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 ); m_deleteButton->SetMinSize( wxSize( 30,30 ) ); - + bSizerRightButts->Add( m_deleteButton, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); - - + + bLeftSizer->Add( bSizerRightButts, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT|wxLEFT, 5 ); - + wxFlexGridSizer* fgSizerThickness; fgSizerThickness = new wxFlexGridSizer( 0, 5, 0, 0 ); fgSizerThickness->AddGrowableCol( 1 ); fgSizerThickness->SetFlexibleDirection( wxBOTH ); fgSizerThickness->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); - + m_thicknessLabel = new wxStaticText( this, wxID_ANY, _("Outline thickness:"), wxDefaultPosition, wxDefaultSize, 0 ); m_thicknessLabel->Wrap( -1 ); fgSizerThickness->Add( m_thicknessLabel, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 5 ); - - m_thicknessCtrl = new wxTextCtrl( this, wxID_ANY, _("0"), wxDefaultPosition, wxDefaultSize, 0 ); + + m_thicknessCtrl = new TEXT_CTRL_EVAL( this, wxID_ANY, _("0"), wxDefaultPosition, wxDefaultSize, 0 ); fgSizerThickness->Add( m_thicknessCtrl, 0, wxALL|wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 ); - + m_thicknessUnits = new wxStaticText( this, wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 ); m_thicknessUnits->Wrap( -1 ); fgSizerThickness->Add( m_thicknessUnits, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 5 ); - - + + bLeftSizer->Add( fgSizerThickness, 0, wxALL|wxEXPAND, 10 ); - - + + bSizerUpper->Add( bLeftSizer, 1, wxEXPAND, 5 ); - + wxBoxSizer* bRightSizer; bRightSizer = new wxBoxSizer( wxVERTICAL ); - + m_panelPoly = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); m_panelPoly->SetBackgroundColour( wxColour( 0, 0, 0 ) ); m_panelPoly->SetMinSize( wxSize( 290,290 ) ); - + bRightSizer->Add( m_panelPoly, 1, wxEXPAND|wxTOP|wxRIGHT, 10 ); - + wxBoxSizer* m_warningSizer; m_warningSizer = new wxBoxSizer( wxHORIZONTAL ); - + m_warningIcon = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); m_warningIcon->SetMinSize( wxSize( 50,50 ) ); - + m_warningSizer->Add( m_warningIcon, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); - + m_warningText = new wxStaticText( this, wxID_ANY, _("MyLabel"), wxDefaultPosition, wxDefaultSize, 0 ); m_warningText->Wrap( -1 ); m_warningSizer->Add( m_warningText, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM, 5 ); - - + + m_warningSizer->Add( 5, 88, 0, 0, 5 ); - - + + bRightSizer->Add( m_warningSizer, 0, wxEXPAND|wxRIGHT, 10 ); - - + + bSizerUpper->Add( bRightSizer, 1, wxEXPAND, 5 ); - - + + bSizerMain->Add( bSizerUpper, 1, wxEXPAND, 5 ); - + m_staticline3 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); bSizerMain->Add( m_staticline3, 0, wxEXPAND|wxRIGHT|wxLEFT, 10 ); - + wxBoxSizer* bSizer24; bSizer24 = new wxBoxSizer( wxHORIZONTAL ); - + wxBoxSizer* bSizer25; bSizer25 = new wxBoxSizer( wxVERTICAL ); - - + + bSizer25->Add( 0, 0, 0, wxEXPAND|wxTOP|wxBOTTOM, 4 ); - + m_statusLine1 = new wxStaticText( this, wxID_ANY, _("Coordinates are relative to anchor pad, rotated 0.0 deg."), wxDefaultPosition, wxDefaultSize, 0 ); m_statusLine1->Wrap( -1 ); m_statusLine1->SetFont( wxFont( 11, wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL, false, wxEmptyString ) ); - + bSizer25->Add( m_statusLine1, 0, 0, 5 ); - + m_statusLine2 = new wxStaticText( this, wxID_ANY, _("Set thickness to 0 for a filled polygon."), wxDefaultPosition, wxSize( -1,-1 ), 0 ); m_statusLine2->Wrap( -1 ); m_statusLine2->SetFont( wxFont( 11, wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL, false, wxEmptyString ) ); - + bSizer25->Add( m_statusLine2, 0, wxTOP, 2 ); - - + + bSizer24->Add( bSizer25, 1, wxEXPAND|wxLEFT, 10 ); - + 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(); - + bSizer24->Add( m_sdbSizer, 0, wxEXPAND|wxALL, 5 ); - - + + bSizerMain->Add( bSizer24, 0, wxEXPAND, 5 ); - - + + this->SetSizer( bSizerMain ); this->Layout(); bSizerMain->Fit( this ); - + this->Centre( wxBOTH ); - + // Connect Events m_gridCornersList->Connect( wxEVT_GRID_RANGE_SELECT, wxGridRangeSelectEventHandler( DIALOG_PAD_PRIMITIVE_POLY_PROPS_BASE::onGridSelect ), NULL, this ); m_gridCornersList->Connect( wxEVT_GRID_SELECT_CELL, wxGridEventHandler( DIALOG_PAD_PRIMITIVE_POLY_PROPS_BASE::onCellSelect ), NULL, this ); @@ -1251,5 +1297,5 @@ DIALOG_PAD_PRIMITIVE_POLY_PROPS_BASE::~DIALOG_PAD_PRIMITIVE_POLY_PROPS_BASE() m_deleteButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PAD_PRIMITIVE_POLY_PROPS_BASE::OnButtonDelete ), NULL, this ); m_panelPoly->Disconnect( wxEVT_PAINT, wxPaintEventHandler( DIALOG_PAD_PRIMITIVE_POLY_PROPS_BASE::onPaintPolyPanel ), NULL, this ); m_panelPoly->Disconnect( wxEVT_SIZE, wxSizeEventHandler( DIALOG_PAD_PRIMITIVE_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 f99d0cc6d8..43459d80cf 100644 --- a/pcbnew/dialogs/dialog_pad_properties_base.fbp +++ b/pcbnew/dialogs/dialog_pad_properties_base.fbp @@ -1,8 +1,8 @@ - + - + C++ 1 source_name @@ -14,11 +14,12 @@ dialog_pad_properties_base 1000 none + 1 dialog_pad_properties_base - + . - + 1 1 1 @@ -29,67 +30,80 @@ 0 wxAUI_MGR_DEFAULT - + wxBOTH - + 1 1 impl_virtual - - - + + + 0 wxID_DIALOG_EDIT_PAD - + -1,-1 DIALOG_PAD_PROPERTIES_BASE - + -1,-1 wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER DIALOG_SHIM; dialog_shim.h Pad Properties - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + OnInitDialog - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + - + m_MainSizer wxVERTICAL none @@ -98,7 +112,7 @@ wxEXPAND 1 - + bSizerUpper wxHORIZONTAL none @@ -111,81 +125,88 @@ 1 1 1 - - - - - + + + + + wxSYS_COLOUR_BTNFACE - - + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY - + 0 - - + + 0 - + 1 m_notebook 1 - - + + protected 1 - + Resizable 1 - - - + + + 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + General 1 @@ -193,77 +214,84 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY - + 0 - - + + 0 - + 1 m_panelGeneral 1 - - + + protected 1 - + Resizable 1 - - + + 0 - - - + + + wxTAB_TRAVERSAL - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OnUpdateUI - + bGeneralSizer wxHORIZONTAL none @@ -272,7 +300,7 @@ wxALL|wxEXPAND 0 - + m_LeftBoxSizer wxVERTICAL none @@ -284,9 +312,9 @@ 3 wxBOTH 1 - + 0 - + fgSizerShapeType wxFLEX_GROWMODE_SPECIFIED none @@ -301,78 +329,86 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY Pad number: - + 0 + 0 - - + + 0 - + 1 m_PadNumText 1 - - + + protected 1 - + Resizable 1 - - - + + + 0 - - - - + + + + -1 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -384,86 +420,93 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_PADNUMCTRL - + 0 - + 0 - + 0 - + 1 m_PadNumCtrl 1 - - + + protected 1 - + Resizable 1 - - - + + + 0 - - + + wxFILTER_NONE wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OnValuesChanged - - - - + + + + @@ -485,78 +528,86 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY Net name: - + 0 + 0 - - + + 0 - + 1 m_PadNameText 1 - - + + protected 1 - + Resizable 1 - - - + + + 0 - - - - + + + + -1 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -568,80 +619,87 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 NET_SELECTOR 1 - - + + 1 - + 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY #include <widgets/net_selector.h> - + 0 - - + + 0 - + 1 m_PadNetSelector 1 - - + + protected 1 - + Resizable - + 1 - + ; forward_declare 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -663,78 +721,86 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY Pad type: - + 0 + 0 - - + + 0 - + 1 m_staticText44 1 - - + + protected 1 - + Resizable 1 - - - + + + 0 - - - - + + + + -1 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -746,83 +812,90 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 "Through-hole" "SMD" "Connector" "NPTH, Mechanical" "Aperture" 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY - + 0 - - + + 0 - + 1 m_PadType 1 - - + + protected 1 - + Resizable 0 1 - - - + + + 0 - - + + wxFILTER_NONE wxDefaultValidator - - - - - + + + + + + + + + + + + PadTypeSelected - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + @@ -844,78 +917,86 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY Shape: - + 0 + 0 - - + + 0 - + 1 m_staticText45 1 - - + + protected 1 - + Resizable 1 - - - + + + 0 - - - - + + + + -1 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -927,83 +1008,90 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 - "Circular" "Oval" "Rectangular" "Trapezoidal" "Rounded Rectangle" "Custom (Circ. Anchor)" "Custom (Rect. Anchor)" + "Circular" "Oval" "Rectangular" "Trapezoidal" "Rounded Rectangle" "Chamfered Rectangle" "Custom (Circ. Anchor)" "Custom (Rect. Anchor)" 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY - + 0 - - + + 0 - + 1 m_PadShape 1 - - + + protected 1 - + Resizable 0 1 - - - + + + 0 - - + + wxFILTER_NONE wxDefaultValidator - - - - - + + + + + + + + + + + + OnPadShapeSelection - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + @@ -1025,78 +1113,86 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY Position X: - + 0 + 0 - - + + 0 - + 1 m_posXLabel 1 - - + + protected 1 - + Resizable 1 - - - + + + 0 - - - - + + + + -1 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -1108,86 +1204,93 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY - + 0 - + 0 - + 0 - + 1 m_posXCtrl 1 - - + + protected 1 - + Resizable 1 - - + + ; ; forward_declare 0 - - + + wxFILTER_NONE wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -1199,78 +1302,86 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY Inch - + 0 + 0 - - + + 0 - + 1 m_posXUnits 1 - - + + protected 1 - + Resizable 1 - - - + + + 0 - - - - + + + + -1 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -1282,78 +1393,86 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY Position Y: - + 0 + 0 - - + + 0 - + 1 m_posYLabel 1 - - + + protected 1 - + Resizable 1 - - - + + + 0 - - - - + + + + -1 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -1365,86 +1484,93 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY - + 0 - + 0 - + 0 - + 1 m_posYCtrl 1 - - + + protected 1 - + Resizable 1 - - + + ; ; forward_declare 0 - - + + wxFILTER_NONE wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -1456,78 +1582,86 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY Inch - + 0 + 0 - - + + 0 - + 1 m_posYUnits 1 - - + + protected 1 - + Resizable 1 - - - + + + 0 - - - - + + + + -1 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -1539,78 +1673,86 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY Size X: - + 0 + 0 - - + + 0 - + 1 m_sizeXLabel 1 - - + + protected 1 - + Resizable 1 - - - + + + 0 - - - - + + + + -1 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -1622,86 +1764,93 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY - + 0 - + 0 - + 0 - + 1 m_sizeXCtrl 1 - - + + protected 1 - + Resizable 1 - - + + ; ; forward_declare 0 - - + + wxFILTER_NONE wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OnValuesChanged - - - - + + + + @@ -1713,78 +1862,86 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY Inch - + 0 + 0 - - + + 0 - + 1 m_sizeXUnits 1 - - + + protected 1 - + Resizable 1 - - - + + + 0 - - - - + + + + -1 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -1796,78 +1953,86 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY Size Y: - + 0 + 0 - - + + 0 - + 1 m_sizeYLabel 1 - - + + protected 1 - + Resizable 1 - - - + + + 0 - - - - + + + + -1 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -1879,86 +2044,93 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY - + 0 - + 0 - + 0 - + 1 m_sizeYCtrl 1 - - + + protected 1 - + Resizable 1 - - + + ; ; forward_declare 0 - - + + wxFILTER_NONE wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OnValuesChanged - - - - + + + + @@ -1970,78 +2142,86 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY Inch - + 0 + 0 - - + + 0 - + 1 m_sizeYUnits 1 - - + + protected 1 - + Resizable 1 - - - + + + 0 - - - - + + + + -1 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2053,78 +2233,86 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY Orientation: - + 0 + 0 - - + + 0 - + 1 m_PadOrientText 1 - - + + protected 1 - + Resizable 1 - - - + + + 0 - - - - + + + + -1 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2136,88 +2324,95 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 "0" "90" "-90" "180" 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY - + 0 - - + + 0 - + 1 m_orientation 1 - - + + protected 1 - + Resizable -1 1 - - + + ; forward_declare 0 - - + + wxFILTER_NONE wxDefaultValidator - - - - - - + + + + + + + + + + + + + PadOrientEvent - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + PadOrientEvent - - + + @@ -2229,78 +2424,86 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY deg - + 0 + 0 - - + + 0 - + 1 m_staticText491 1 - - + + protected 1 - + Resizable 1 - - - + + + 0 - - - - + + + + -1 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2312,78 +2515,86 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY Shape offset X: - + 0 + 0 - - + + 0 - + 1 m_offsetXLabel 1 - - + + protected 1 - + Resizable 1 - - - + + + 0 - - - - + + + + -1 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2395,86 +2606,93 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY - + 0 - + 0 - + 0 - + 1 m_offsetXCtrl 1 - - + + protected 1 - + Resizable 1 - - + + ; ; forward_declare 0 - - + + wxFILTER_NONE wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OnValuesChanged - - - - + + + + @@ -2486,78 +2704,86 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY Inch - + 0 + 0 - - + + 0 - + 1 m_offsetXUnits 1 - - + + protected 1 - + Resizable 1 - - - + + + 0 - - - - + + + + -1 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2569,78 +2795,86 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY Shape offset Y: - + 0 + 0 - - + + 0 - + 1 m_offsetYLabel 1 - - + + protected 1 - + Resizable 1 - - - + + + 0 - - - - + + + + -1 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2652,86 +2886,93 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY - + 0 - + 0 - + 0 - + 1 m_offsetYCtrl 1 - - + + protected 1 - + Resizable 1 - - + + ; ; forward_declare 0 - - + + wxFILTER_NONE wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OnValuesChanged - - - - + + + + @@ -2743,78 +2984,86 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY Inch - + 0 + 0 - - + + 0 - + 1 m_offsetYUnits 1 - - + + protected 1 - + Resizable 1 - - - + + + 0 - - - - + + + + -1 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2826,78 +3075,86 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY Pad to die length: - + 0 + 0 - - + + 0 - + 1 m_padToDieLabel 1 - - + + protected 1 - + Resizable 1 - - - + + + 0 Wire length from pad to die on chip ( used to calculate actual track length) - - - + + + -1 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2909,86 +3166,93 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY - + 0 - + 0 - + 0 - + 1 m_padToDieCtrl 1 - - + + protected 1 - + Resizable 1 - - + + ; ; forward_declare 0 - - + + wxFILTER_NONE wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -3000,78 +3264,86 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY Inch - + 0 + 0 - - + + 0 - + 1 m_padToDieUnits 1 - - + + protected 1 - + Resizable 1 - - - + + + 0 - - - - + + + + -1 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -3083,78 +3355,86 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY Trapezoid delta: - + 0 + 0 - - + + 0 - + 1 m_trapDeltaLabel 1 - - + + protected 1 - + Resizable 1 - - - + + + 0 - - - - + + + + -1 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -3166,86 +3446,93 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY - + 0 - + 0 - + 0 - + 1 m_trapDeltaCtrl 1 - - + + protected 1 - + Resizable 1 - - + + ; ; forward_declare 0 - - + + wxFILTER_NONE wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OnValuesChanged - - - - + + + + @@ -3257,78 +3544,86 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY Inch - + 0 + 0 - - + + 0 - + 1 m_trapDeltaUnits 1 - - + + protected 1 - + Resizable 1 - - - + + + 0 - - - - + + + + -1 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -3340,78 +3635,86 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY Trapezoid axis: - + 0 + 0 - - + + 0 - + 1 m_trapAxisLabel 1 - - + + protected 1 - + Resizable 1 - - - + + + 0 - - - - + + + + -1 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -3423,83 +3726,90 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 "Horizontal" "Vertical" 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY - + 0 - - + + 0 - + 1 m_trapAxisCtrl 1 - - + + protected 1 - + Resizable 0 1 - - - + + + 0 - - + + wxFILTER_NONE wxDefaultValidator - - - - - + + + + + + + + + + + + OnSetLayers - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + @@ -3521,78 +3831,86 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY Corner size: - + 0 + 0 - - + + 0 - + 1 m_staticTextCornerSizeRatio 1 - - + + protected 1 - + Resizable 1 - - - + + + 0 Corner radius in percent of the pad width. The width is the smaller value between size X and size Y. The max value is 50 percent. - - - + + + -1 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -3604,86 +3922,93 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY - + 0 - + 0 - + 0 - + 1 m_tcCornerSizeRatio 1 - - + + protected 1 - + Resizable 1 - - + + TEXT_CTRL_EVAL; widgets/text_ctrl_eval.h 0 - - + + wxFILTER_NONE wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + onCornerSizePercentChange - - - - + + + + @@ -3695,252 +4020,275 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY % - + 0 + 0 - - + + 0 - + 1 m_staticTextCornerSizeRatioUnit 1 - - + + protected 1 - + Resizable 1 - - - + + + 0 - - - - + + + + -1 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 3 - wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT + wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL 0 1 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY Corner radius: - + 0 + 0 - - + + 0 - + 1 m_cornerRadiusLabel 1 - - + + protected 1 - + Resizable 1 - - - + + + 0 Corner radius. Can be no more than half pad width. The width is the smaller value between size X and size Y. Note: IPC norm gives a max value = 0.25mm. - - - + + + -1 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 3 - wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND + wxALL|wxEXPAND 0 1 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY - + 0 - - 0 - + + + 0 - + 1 m_tcCornerRadius 1 - - + + protected 1 - + Resizable 1 - - - ; ; forward_declare + + + ; forward_declare 0 - Corner radius. Can be no more than half pad width. The width is the smaller value between size X and size Y Note: IPC norm gives a max value = 0.25mm - + + wxFILTER_NONE wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + onCornerRadiusChange - - - - + + + + @@ -3952,78 +4300,848 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY unit - + 0 + 0 - - + + 0 - + 1 m_cornerRadiusUnits 1 - - + + protected 1 - + Resizable 1 - - - + + + 0 - - - - + + + + -1 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Chamfer size: + 0 + + 0 + + + 0 + + 1 + m_staticTextChamferRatio + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + Chamfer size in percent of the pad width. The width is the smaller value between size X and size Y. The max value is 50 percent. + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 3 + wxEXPAND|wxTOP|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + 0 + + 0 + + 1 + m_tcChamferRatio + 1 + + + protected + 1 + + Resizable + 1 + + + TEXT_CTRL_EVAL; widgets/text_ctrl_eval.h + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + onCornerSizePercentChange + + + + + + + + 5 + wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + % + 0 + + 0 + + + 0 + + 1 + m_staticTextChamferRatioUnit + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Chamfered corner: + 0 + + 0 + + + 0 + + 1 + m_staticTextChamferCorner + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + Chamfered corners. The position is relative to a pad orientation 0 degree. + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND + 0 + + + bSizerChamferedCorners + wxVERTICAL + none + + 5 + wxTOP|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Top left + + 0 + + + 0 + + 1 + m_cbTopLeft + 1 + + + protected + 1 + + Resizable + 1 + + + ; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + OnValuesChanged + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Top right + + 0 + + + 0 + + 1 + m_cbTopRight + 1 + + + protected + 1 + + Resizable + 1 + + + ; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + OnValuesChanged + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Bottom left + + 0 + + + 0 + + 1 + m_cbBottomLeft + 1 + + + protected + 1 + + Resizable + 1 + + + ; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + OnValuesChanged + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxBOTTOM|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Bottom right + + 0 + + + 0 + + 1 + m_cbBottomRight + 1 + + + protected + 1 + + Resizable + 1 + + + ; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + OnValuesChanged + + + + + + + + + + + + + + + + + + + + + + + + @@ -4034,8 +5152,8 @@ 5 wxALL|wxEXPAND 0 - - + + bSizer10 wxVERTICAL none @@ -4047,9 +5165,9 @@ 3 wxBOTH 1 - + 0 - + fgSizerGeometry wxFLEX_GROWMODE_SPECIFIED none @@ -4064,78 +5182,86 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY Hole shape: - + 0 + 0 - - + + 0 - + 1 m_holeShapeLabel 1 - - + + protected 1 - + Resizable 1 - - - + + + 0 - - - - + + + + -1 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -4147,83 +5273,90 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 "Circular" "Oval" 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY - + 0 - - + + 0 - + 1 m_holeShapeCtrl 1 - - + + protected 1 - + Resizable 0 1 - - - + + + 0 - - + + wxFILTER_NONE wxDefaultValidator - - - - - + + + + + + + + + + + + OnDrillShapeSelected - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + @@ -4235,78 +5368,86 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY - - + + 0 + 0 - - + + 0 - + 1 m_staticText51 1 - - + + protected 1 - + Resizable 1 - - - + + + 0 - - - - + + + + -1 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -4318,78 +5459,86 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY Hole size X: - + 0 + 0 - - + + 0 - + 1 m_holeXLabel 1 - - + + protected 1 - + Resizable 1 - - - + + + 0 - - - - + + + + -1 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -4401,86 +5550,93 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY - + 0 - + 0 - + 0 - + 1 m_holeXCtrl 1 - - + + protected 1 - + Resizable 1 - - + + ; ; forward_declare 0 - - + + wxFILTER_NONE wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OnValuesChanged - - - - + + + + @@ -4492,78 +5648,86 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY Inch - + 0 + 0 - - + + 0 - + 1 m_holeXUnits 1 - - + + protected 1 - + Resizable 1 - - - + + + 0 - - - - + + + + -1 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -4575,78 +5739,86 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY Hole size Y: - + 0 + 0 - - + + 0 - + 1 m_holeYLabel 1 - - + + protected 1 - + Resizable 1 - - - + + + 0 - - - - + + + + -1 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -4658,86 +5830,93 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY - + 0 - + 0 - + 0 - + 1 m_holeYCtrl 1 - - + + protected 1 - + Resizable 1 - - + + ; ; forward_declare 0 - - + + wxFILTER_NONE wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OnValuesChanged - - - - + + + + @@ -4749,101 +5928,109 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY Inch - + 0 + 0 - - + + 0 - + 1 m_holeYUnits 1 - - + + protected 1 - + Resizable 1 - - - + + + 0 - - - - + + + + -1 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + 5 wxEXPAND|wxLEFT|wxRIGHT|wxTOP 1 - + wxID_ANY - + -1,-1 m_LayersSizer wxVERTICAL 1 none - + 5 wxEXPAND 1 - + m_FlippedWarningSizer wxHORIZONTAL protected @@ -4856,76 +6043,83 @@ 1 1 1 - - - - - - - - + + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY - + 0 - - + + 0 48,48 1 m_FlippedWarningIcon 1 - - + + protected 1 - + Resizable 1 48,48 ; forward_declare 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -4937,88 +6131,96 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY Parent footprint on board is flipped. Layers will be reversed. - + 0 + 0 - - + + 0 -1,-1 1 m_staticText86 1 - - + + protected 1 - + Resizable 1 - - + + ; forward_declare 0 - - - - + + + + 150 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + 5 wxEXPAND 0 - - + + bSizer11 wxHORIZONTAL none @@ -5031,78 +6233,86 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY Copper: - + 0 + 0 - - + + 0 - + 1 m_staticText511 1 - - + + protected 1 - + Resizable 1 - - - + + + 0 - - - - + + + + -1 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -5114,83 +6324,90 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 "Front layer" "Back layer" "All copper layers" "None" 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY - + 0 - - + + 0 - + 1 m_rbCopperLayersSel 1 - - + + protected 1 - + Resizable 0 1 - - - + + + 0 - - + + wxFILTER_NONE wxDefaultValidator - - - - - + + + + + + + + + + + + OnSetLayers - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + @@ -5204,78 +6421,86 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 ,90,90,11,70,0 0 0 wxID_ANY Technical layers: - + 0 + 0 - - + + 0 - + 1 m_techLayersLabel 1 - - + + protected 1 - + Resizable 1 - - + + ; forward_declare 0 - - - - + + + + -1 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -5287,83 +6512,90 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY Front adhesive - + 0 - - + + 0 - + 1 m_PadLayerAdhCmp 1 - - + + protected 1 - + Resizable 1 - - - + + + 0 - - + + wxFILTER_NONE wxDefaultValidator - - - - - + + + + + + + + + + + + OnSetLayers - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + @@ -5375,83 +6607,90 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY Back adhesive - + 0 - - + + 0 - + 1 m_PadLayerAdhCu 1 - - + + protected 1 - + Resizable 1 - - - + + + 0 - - + + wxFILTER_NONE wxDefaultValidator - - - - - + + + + + + + + + + + + OnSetLayers - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + @@ -5463,83 +6702,90 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY Front solder paste - + 0 - - + + 0 - + 1 m_PadLayerPateCmp 1 - - + + protected 1 - + Resizable 1 - - - + + + 0 - - + + wxFILTER_NONE wxDefaultValidator - - - - - + + + + + + + + + + + + OnSetLayers - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + @@ -5551,83 +6797,90 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY Back solder paste - + 0 - - + + 0 - + 1 m_PadLayerPateCu 1 - - + + protected 1 - + Resizable 1 - - - + + + 0 - - + + wxFILTER_NONE wxDefaultValidator - - - - - + + + + + + + + + + + + OnSetLayers - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + @@ -5639,83 +6892,90 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY Front silk screen - + 0 - - + + 0 - + 1 m_PadLayerSilkCmp 1 - - + + protected 1 - + Resizable 1 - - - + + + 0 - - + + wxFILTER_NONE wxDefaultValidator - - - - - + + + + + + + + + + + + OnSetLayers - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + @@ -5727,83 +6987,90 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY Back silk screen - + 0 - - + + 0 - + 1 m_PadLayerSilkCu 1 - - + + protected 1 - + Resizable 1 - - - + + + 0 - - + + wxFILTER_NONE wxDefaultValidator - - - - - + + + + + + + + + + + + OnSetLayers - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + @@ -5815,83 +7082,90 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY Front solder mask - + 0 - - + + 0 - + 1 m_PadLayerMaskCmp 1 - - + + protected 1 - + Resizable 1 - - - + + + 0 - - + + wxFILTER_NONE wxDefaultValidator - - - - - + + + + + + + + + + + + OnSetLayers - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + @@ -5903,83 +7177,90 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY Back solder mask - + 0 - - + + 0 - + 1 m_PadLayerMaskCu 1 - - + + protected 1 - + Resizable 1 - - - + + + 0 - - + + wxFILTER_NONE wxDefaultValidator - - - - - + + + + + + + + + + + + OnSetLayers - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + @@ -5991,83 +7272,90 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY Drafting notes - + 0 - - + + 0 - + 1 m_PadLayerDraft 1 - - + + protected 1 - + Resizable 1 - - - + + + 0 - - + + wxFILTER_NONE wxDefaultValidator - - - - - + + + + + + + + + + + + OnSetLayers - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + @@ -6079,83 +7367,90 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY E.C.O.1 - + 0 - - + + 0 - + 1 m_PadLayerECO1 1 - - + + protected 1 - + Resizable 1 - - - + + + 0 - - + + wxFILTER_NONE wxDefaultValidator - - - - - + + + + + + + + + + + + OnSetLayers - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + @@ -6167,83 +7462,90 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY E.C.O.2 - + 0 - - + + 0 - + 1 m_PadLayerECO2 1 - - + + protected 1 - + Resizable 1 - - - + + + 0 - - + + wxFILTER_NONE wxDefaultValidator - - - - - + + + + + + + + + + + + OnSetLayers - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + @@ -6254,110 +7556,117 @@ - + Local Clearance and Settings 0 - + 1 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY - + 0 - - + + 0 - + 1 m_localSettingsPanel 1 - - + + protected 1 - + Resizable 1 - - + + 0 - - - + + + wxTAB_TRAVERSAL - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + bSizerPanelClearance wxVERTICAL none - + 5 wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT 0 - - + + bSizerClearance wxVERTICAL none - + 5 wxALL|wxEXPAND 0 - + wxID_ANY Clearances - + sbClearancesSizer wxVERTICAL 1 none - + 10 wxRIGHT @@ -6367,257 +7676,281 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 ,90,90,-1,70,0 0 0 wxID_ANY Set values to 0 to use parent footprint or netclass values. - + 0 + 0 - - + + 0 - + 1 m_staticTextHint 1 - - + + none 1 - + Resizable 1 - - - + + + 0 - - - - + + + + -1 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + 10 wxTOP|wxRIGHT 0 - + 1 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 ,93,90,12,70,0 0 0 wxID_ANY Positive clearance means area bigger than the pad (usual for mask clearance). - + 0 + 0 - - + + 0 - + 1 m_staticTextInfoPosValue 1 - - + + protected 1 - + Resizable 1 - - - + + + 0 - - - - + + + + -1 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + 10 wxBOTTOM|wxRIGHT 0 - + 1 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 ,93,90,12,70,0 0 0 wxID_ANY Negative clearance means area smaller than the pad (usual for paste clearance). - + 0 + 0 - - + + 0 - + 1 m_staticTextInfoNegVal 1 - - + + protected 1 - + Resizable 1 - - - + + + 0 - - - - + + + + -1 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + 5 wxEXPAND 0 - + 3 wxBOTH 1 - + 0 - + fgClearancesGridSizer wxFLEX_GROWMODE_SPECIFIED none @@ -6632,78 +7965,86 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY Pad clearance: - + 0 + 0 - - + + 0 - + 1 m_clearanceLabel 1 - - + + protected 1 - + Resizable 1 - - - + + + 0 This is the local net clearance for this pad. If 0, the footprint local value or the Netclass value is used. - - - + + + -1 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -6715,86 +8056,93 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY - + 0 - + 0 - + 0 - + 1 m_clearanceCtrl 1 - - + + protected 1 - + Resizable 1 - - + + ; ; forward_declare 0 - - + + wxFILTER_NONE wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OnValuesChanged - - - - + + + + @@ -6806,78 +8154,86 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY Inch - + 0 + 0 - - + + 0 - + 1 m_clearanceUnits 1 - - + + protected 1 - + Resizable 1 - - - + + + 0 - - - - + + + + -1 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -6889,78 +8245,86 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY Solder mask clearance: - + 0 + 0 - - + + 0 - + 1 m_maskClearanceLabel 1 - - + + protected 1 - + Resizable 1 - - - + + + 0 This is the local clearance between this pad and the solder mask. If 0, the footprint local value or the global value is used. - - - + + + -1 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -6972,86 +8336,93 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY - + 0 - + 0 - + 0 - + 1 m_maskClearanceCtrl 1 - - + + protected 1 - + Resizable 1 - - + + ; ; forward_declare 0 - - + + wxFILTER_NONE wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -7063,78 +8434,86 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY Inch - + 0 + 0 - - + + 0 - + 1 m_maskClearanceUnits 1 - - + + protected 1 - + Resizable 1 - - - + + + 0 - - - - + + + + -1 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -7146,78 +8525,86 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY Solder paste clearance: - + 0 + 0 - - + + 0 - + 1 m_pasteClearanceLabel 1 - - + + protected 1 - + Resizable 1 - - - + + + 0 This is the local clearance between this pad and the solder paste. If 0, the footprint value or the global value is used. The final clearance value is the sum of this value and the clearance value ratio. A negative value means a smaller mask size than pad size. - - - + + + -1 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -7229,86 +8616,93 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY - + 0 - + 0 - + 0 - + 1 m_pasteClearanceCtrl 1 - - + + protected 1 - + Resizable 1 - - + + ; ; forward_declare 0 - - + + wxFILTER_NONE wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -7320,78 +8714,86 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY Inch - + 0 + 0 - - + + 0 - + 1 m_pasteClearanceUnits 1 - - + + protected 1 - + Resizable 1 - - - + + + 0 - - - - + + + + -1 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -7403,78 +8805,86 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY Solder paste ratio clearance: - + 0 + 0 - - + + 0 - + 1 m_staticTextRatio 1 - - + + protected 1 - + Resizable 1 - - - + + + 0 This is the local clearance ratio in percent between this pad and the solder paste. A value of 10 means the clearance value is 10 percent of the pad size. If 0, the footprint value or the global value is used. The final clearance value is the sum of this value and the clearance value. A negative value means a smaller mask size than pad size. - - - + + + -1 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -7486,86 +8896,93 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY - + 0 - + 0 - + 0 - + 1 m_SolderPasteMarginRatioCtrl 1 - - + + protected 1 - + Resizable 1 - - + + TEXT_CTRL_EVAL; widgets/text_ctrl_eval.h 0 - - + + wxFILTER_NONE wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -7577,574 +8994,626 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY % - + 0 + 0 - - + + 0 - + 1 m_SolderPasteRatioMarginUnits 1 - - + + protected 1 - + Resizable 1 - - - + + + 0 - - - - + + + + -1 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + 5 wxEXPAND|wxTOP|wxBOTTOM|wxRIGHT 1 - + 1 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY - + 0 - - + + 0 - + 1 m_nonCopperWarningBook 1 - - + + protected 1 - + Resizable 1 - + ; forward_declare 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OnUpdateUINonCopperWarning - + a page 0 - + 1 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY - + 0 - - + + 0 - + 1 notePanel 1 - - + + none 1 - + Resizable 1 - + ; forward_declare 0 - - - + + + wxTAB_TRAVERSAL - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + bNoteSizer wxVERTICAL none - + 15 wxTOP|wxRIGHT 0 - + 1 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 ,90,90,12,70,0 0 0 wxID_ANY Note: solder mask and paste values are used only for pads on copper layers. - + 0 + 0 - - + + 0 -1,-1 1 m_nonCopperNote 1 - - + + protected 1 - + Resizable 1 - - - + + + 0 - - - - + + + + -1 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + a page 0 - + 1 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY - + 0 - - + + 0 - + 1 warningPanel 1 - - + + none 1 - + Resizable 1 - + ; forward_declare 0 - - - + + + wxTAB_TRAVERSAL - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -1,50 bWarningSizer wxHORIZONTAL none - + 5 wxALL 0 - + 1 1 1 1 - - - - - - - - + + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY - + 0 - - + + 0 48,48 1 m_nonCopperWarningIcon 1 - - + + protected 1 - + Resizable 1 48,48 ; forward_declare 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + 5 wxALIGN_CENTER_VERTICAL|wxALL 0 - + 1 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 ,90,90,-1,70,0 0 0 wxID_ANY Note: solder mask and paste values are used only for pads on copper layers. - + 0 + 0 - - + + 0 - + 1 m_nonCopperWarningText 1 - - + + protected 1 - + Resizable 1 - - - + + + 0 - - - - + + + + -1 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -8154,30 +9623,30 @@ - + 5 wxALL|wxEXPAND 0 - + wxID_ANY Connection to Copper Zones - + m_sbSizerZonesSettings wxVERTICAL 1 protected - - + + 5 wxEXPAND 0 - + 3 wxBOTH 1 - + 0 - + fgSizerCopperZonesOpts wxFLEX_GROWMODE_SPECIFIED none @@ -8192,78 +9661,86 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY Pad connection: - + 0 + 0 - - + + 0 - + 1 m_staticText40 1 - - + + protected 1 - + Resizable 1 - - - + + + 0 - - - - + + + + -1 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -8275,83 +9752,90 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 "From parent footprint" "Solid" "Thermal relief" "None" 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY - + 0 - - + + 0 - + 1 m_ZoneConnectionChoice 1 - - + + protected 1 - + Resizable 0 1 - - - + + + 0 - - + + wxFILTER_NONE wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -8373,78 +9857,86 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY Thermal relief spoke width: - + 0 + 0 - - + + 0 - + 1 m_spokeWidthLabel 1 - - + + protected 1 - + Resizable 1 - - - + + + 0 - - - - + + + + -1 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -8456,86 +9948,93 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY - + 0 - + 0 - + 0 - + 1 m_spokeWidthCtrl 1 - - + + protected 1 - + Resizable 1 - - + + ; ; forward_declare 0 - - + + wxFILTER_NONE wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -8547,78 +10046,86 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY Inch - + 0 + 0 - - + + 0 - + 1 m_spokeWidthUnits 1 - - + + protected 1 - + Resizable 1 - - - + + + 0 - - - - + + + + -1 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -8630,78 +10137,86 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY Thermal relief gap: - + 0 + 0 - - + + 0 - + 1 m_thermalGapLabel 1 - - + + protected 1 - + Resizable 1 - - - + + + 0 - - - - + + + + -1 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -8713,86 +10228,93 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY - + 0 - + 0 - + 0 - + 1 m_thermalGapCtrl 1 - - + + protected 1 - + Resizable 1 - - + + ; ; forward_declare 0 - - + + wxFILTER_NONE wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -8804,78 +10326,86 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY Inch - + 0 + 0 - - + + 0 - + 1 m_thermalGapUnits 1 - - + + protected 1 - + Resizable 1 - - - + + + 0 - - - - + + + + -1 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -8889,12 +10419,12 @@ wxID_ANY Connection to Copper Zones - + m_sbSizerCustomShapedZonesSettings wxVERTICAL 1 protected - + 5 wxEXPAND @@ -8903,9 +10433,9 @@ 2 wxBOTH 1 - + 0 - + fgSizerCustomShapedCopperZonesOpts wxFLEX_GROWMODE_SPECIFIED none @@ -8920,249 +10450,86 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY Pad connection: - + 0 + 0 - - + + 0 - + 1 m_staticTextCsZconnTitle 1 - - + + protected 1 - + Resizable 1 - - - + + + 0 - - - - + + + + -1 - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - "None" "Solid" - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - - 0 - - - 0 - - 1 - m_ZoneConnectionCustom - 1 - - - protected - 1 - - Resizable - 0 - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Custom pad shape in zone: - - 0 - - - 0 - - 1 - m_staticTextcps - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - - - -1 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -9174,83 +10541,276 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 - "Use pad shape" "Use pad convex hull" + "None" "Solid" 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY - + 0 - - + + 0 - + 1 - m_ZoneCustomPadShape + m_ZoneConnectionCustom 1 - - + + protected 1 - + Resizable 0 1 - - - + + + 0 - - + + wxFILTER_NONE wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Custom pad shape in zone: + 0 + + 0 + + + 0 + + 1 + m_staticTextcps + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + "Use pad shape" "Use pad convex hull" + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + 0 + + 1 + m_ZoneCustomPadShape + 1 + + + protected + 1 + + Resizable + 0 + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -9263,85 +10823,92 @@ - + Custom Shape Primitives 0 - + 1 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY - + 0 - - + + 0 - + 1 m_panelCustomShapePrimitives 1 - - + + protected 1 - + Resizable 1 - + ; 0 - - - + + + wxTAB_TRAVERSAL - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + m_bSizerPanelPrimitives wxVERTICAL protected @@ -9354,78 +10921,86 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 ,93,92,-1,70,0 0 0 wxID_ANY Primitives list - + 0 + 0 - - + + 0 - + 1 m_staticTextPrimitivesList 1 - - + + protected 1 - + Resizable 1 - - - + + + 0 - - - - + + + + -1 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -9437,78 +11012,86 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 ,90,92,-1,70,0 0 0 wxID_ANY Coordinates are relative to anchor pad, orientation 0 - + 0 + 0 - - + + 0 - + 1 m_staticTextPrimitiveListWarning 1 - - + + protected 1 - + Resizable 1 - - - + + + 0 - - - - + + + + -1 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -9520,117 +11103,124 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY - + 0 - - + + 0 - + 1 m_listCtrlPrimitives 1 - - + + protected 1 - + Resizable 1 - + wxLC_HRULES|wxLC_NO_HEADER|wxLC_REPORT wxListView; 0 - - + + wxFILTER_NONE wxDefaultValidator - - - - - - - - - - - + + + + + + + + + + + + + + + + + + onPrimitiveDClick - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + OnPrimitiveSelection - - - + + + OnPrimitiveSelection - - - - - - - - - - - - - - + + + + + + + + + + + + + + - + 5 wxALIGN_CENTER_HORIZONTAL 0 - - + + bSizerButtons wxVERTICAL none - + 5 wxALIGN_CENTER_HORIZONTAL 0 - - + + bSizerButtonsUpper wxHORIZONTAL none @@ -9643,83 +11233,98 @@ 1 1 1 - - - - - - - + + + + + + + + 1 0 1 - + 1 + 0 0 + Dock 0 Left 1 - + 1 - + + 0 0 wxID_ANY Delete Primitive - + + 0 + 0 - - + + 0 - + 1 m_buttonDel 1 - - + + protected 1 - + + + Resizable 1 - - - + + + 0 - - + + wxFILTER_NONE wxDefaultValidator - - - - + + + + + + + + + + onDeletePrimitive - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + @@ -9731,83 +11336,98 @@ 1 1 1 - - - - - - - + + + + + + + + 1 0 1 - + 1 + 0 0 + Dock 0 Left 1 - + 1 - + + 0 0 wxID_ANY Edit Primitive - + + 0 + 0 - - + + 0 - + 1 m_buttonEditShape 1 - - + + protected 1 - + + + Resizable 1 - - - + + + 0 - - + + wxFILTER_NONE wxDefaultValidator - - - - + + + + + + + + + + onEditPrimitive - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + @@ -9819,83 +11439,98 @@ 1 1 1 - - - - - - - + + + + + + + + 1 0 1 - + 1 + 0 0 + Dock 0 Left 1 - + 1 - + + 0 0 wxID_ANY Add Primitive - + + 0 + 0 - - + + 0 - + 1 m_buttonAddShape 1 - - + + protected 1 - + + + Resizable 1 - - - + + + 0 - - + + wxFILTER_NONE wxDefaultValidator - - - - + + + + + + + + + + onAddPrimitive - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + @@ -9907,83 +11542,98 @@ 1 1 1 - - - - - - - + + + + + + + + 1 0 1 - + 1 + 0 0 + Dock 0 Left 1 - + 1 - + + 0 0 wxID_ANY Duplicate Primitive - + + 0 + 0 - - + + 0 - + 1 m_buttonDup 1 - - + + protected 1 - + + + Resizable 1 - - - + + + 0 - - + + wxFILTER_NONE wxDefaultValidator - - - - + + + + + + + + + + onDuplicatePrimitive - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + @@ -9995,83 +11645,98 @@ 1 1 1 - - - - - - - + + + + + + + + 1 0 1 - + 1 + 0 0 + Dock 0 Left 1 - + 1 - + + 0 0 wxID_ANY Transform Primitive - + + 0 + 0 - - + + 0 - + 1 m_buttonGeometry 1 - - + + protected 1 - + + + Resizable 1 - - - + + + 0 - - + + wxFILTER_NONE wxDefaultValidator - - - - + + + + + + + + + + onGeometryTransform - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + @@ -10111,78 +11776,86 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 ,90,90,11,70,0 0 0 wxID_ANY Footprint name - + 0 + 0 - - + + 0 - + 1 m_parentInfoLine1 1 - - + + protected 1 - + Resizable 1 - - + + ; forward_declare 0 - - - - + + + + -1 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -10194,78 +11867,86 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 ,90,90,11,70,0 0 0 wxID_ANY side and rotation - + 0 + 0 - - + + 0 - + 1 m_parentInfoLine2 1 - - + + protected 1 - + Resizable 1 - - + + ; forward_declare 0 - - - - + + + + -1 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -10287,75 +11968,82 @@ 1 1 1 - - - - - + + + + + 0,0,0 - + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY - + 0 - - + + 0 280,-1 1 m_panelShowPad 1 - - + + protected 1 - + Resizable 1 -1,-1 - + 0 - - - + + + wxFULL_REPAINT_ON_RESIZE|wxBORDER_SIMPLE - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + OnPaintShowPanel - - - - - - + + + + + + @@ -10367,19 +12055,19 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 PCB_DRAW_PANEL_GAL 1 m_panelShowPadGal = new PCB_DRAW_PANEL_GAL( this, -1, wxPoint( 0, 0 ), wxDefaultSize, m_galOptions, EDA_DRAW_PANEL_GAL::GAL_TYPE_CAIRO); - + 1 PCB_DRAW_PANEL_GAL* m_panelShowPadGal; KIGFX::GAL_DISPLAY_OPTIONS m_galOptions; 0 @@ -10387,60 +12075,67 @@ 0 Left 1 - + 1 - + 0 0 wxID_ANY #include <pcb_base_frame.h> #include <pcb_draw_panel_gal.h> - + 0 - - + + 0 280,-1 1 m_panelShowPadGal 1 - - + + protected 1 - + Resizable - + 1 - - + + 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -10452,83 +12147,90 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY Show pad in outline mode - + 0 - - + + 0 -1,-1 1 m_cbShowPadOutline 1 - - + + protected 1 - + Resizable 1 - - - + + + 0 - - + + wxFILTER_NONE wxDefaultValidator - - - - - + + + + + + + + + + + + onChangePadMode - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + @@ -10550,76 +12252,83 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY - + 0 - - + + 0 - + 1 m_staticline13 1 - - + + protected 1 - + Resizable 1 - + wxLI_HORIZONTAL ; forward_declare 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -10639,17 +12348,17 @@ 1 0 0 - + m_sdbSizer protected - + OnCancel - - - - - - + + + + + + @@ -10657,81 +12366,94 @@ 0 wxAUI_MGR_DEFAULT - + wxBOTH - + 1 1 impl_virtual - - - + + + 0 wxID_ANY - - + + DIALOG_PAD_PRIMITIVES_PROPERTIES_BASE - + -1,-1 wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER DIALOG_SHIM; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + bSizermain wxVERTICAL none - + 10 wxEXPAND|wxALL 1 - + 7 wxBOTH 2,4 - + 0 - + fgSizerShapeProperties wxFLEX_GROWMODE_SPECIFIED none @@ -10746,78 +12468,86 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY Start point - + 0 + 0 - - + + 0 - + 1 m_staticTextPosStart 1 - - + + protected 1 - + Resizable 1 - - - + + + 0 - - - - + + + + -1 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -10829,78 +12559,86 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY X: - + 0 + 0 - - + + 0 - + 1 m_startXLabel 1 - - + + protected 1 - + Resizable 1 - - - + + + 0 - - - - + + + + -1 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -10912,86 +12650,93 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY - + 0 - + 0 - + 0 - + 1 m_startXCtrl 1 - - + + protected 1 - + Resizable 1 - - - ; ; forward_declare + + + TEXT_CTRL_EVAL; widgets/text_ctrl_eval.h 0 - - + + wxFILTER_NONE wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -11003,78 +12748,86 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY unit - + 0 + 0 - - + + 0 - + 1 m_startXUnits 1 - - + + protected 1 - + Resizable 1 - - + + ; forward_declare 0 - - - - + + + + -1 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -11086,78 +12839,86 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY Y: - + 0 + 0 - - + + 0 - + 1 m_startYLabel 1 - - + + protected 1 - + Resizable 1 - - - + + + 0 - - - - + + + + -1 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -11169,86 +12930,93 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY - + 0 - + 0 - + 0 - + 1 m_startYCtrl 1 - - + + protected 1 - + Resizable 1 - - - ; ; forward_declare + + + TEXT_CTRL_EVAL; widgets/text_ctrl_eval.h 0 - - + + wxFILTER_NONE wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -11260,78 +13028,86 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY unit - + 0 + 0 - - + + 0 - + 1 m_startYUnits 1 - - + + protected 1 - + Resizable 1 - - - + + + 0 - - - - + + + + -1 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -11343,78 +13119,86 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY End point - + 0 + 0 - - + + 0 - + 1 m_staticTextPosEnd 1 - - + + protected 1 - + Resizable 1 - - - + + + 0 - - - - + + + + -1 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -11426,78 +13210,86 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY X: - + 0 + 0 - - + + 0 - + 1 m_endXLabel 1 - - + + protected 1 - + Resizable 1 - - - + + + 0 - - - - + + + + -1 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -11509,86 +13301,93 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY - + 0 - + 0 - + 0 - + 1 m_endXCtrl 1 - - + + protected 1 - + Resizable 1 - - - ; ; forward_declare + + + TEXT_CTRL_EVAL; widgets/text_ctrl_eval.h 0 - - + + wxFILTER_NONE wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -11600,78 +13399,86 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY unit - + 0 + 0 - - + + 0 - + 1 m_endXUnits 1 - - + + protected 1 - + Resizable 1 - - + + ; forward_declare 0 - - - - + + + + -1 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -11683,78 +13490,86 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY Y: - + 0 + 0 - - + + 0 - + 1 m_endYLabel 1 - - + + protected 1 - + Resizable 1 - - - + + + 0 - - - - + + + + -1 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -11766,86 +13581,93 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY - + 0 - + 0 - + 0 - + 1 m_endYCtrl 1 - - + + protected 1 - + Resizable 1 - - - ; ; forward_declare + + + TEXT_CTRL_EVAL; widgets/text_ctrl_eval.h 0 - - + + wxFILTER_NONE wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -11857,78 +13679,86 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY unit - + 0 + 0 - - + + 0 - + 1 m_endYUnits 1 - - + + protected 1 - + Resizable 1 - - - + + + 0 - - - - + + + + -1 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -11940,78 +13770,86 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY Radius: - + 0 + 0 - - + + 0 - + 1 m_radiusLabel 1 - - + + protected 1 - + Resizable 1 - - - + + + 0 - - - - + + + + -1 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -12033,86 +13871,93 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY - + 0 - + 0 - + 0 - + 1 m_radiusCtrl 1 - - + + protected 1 - + Resizable 1 - - - ; ; forward_declare + + + TEXT_CTRL_EVAL; widgets/text_ctrl_eval.h 0 - - + + wxFILTER_NONE wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -12124,78 +13969,86 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY unit - + 0 + 0 - - + + 0 - + 1 m_radiusUnits 1 - - + + protected 1 - + Resizable 1 - - - + + + 0 - - - - + + + + -1 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -12237,78 +14090,86 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY Thickness: - + 0 + 0 - - + + 0 - + 1 m_thicknessLabel 1 - - + + protected 1 - + Resizable 1 - - - + + + 0 - - - - + + + + -1 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -12330,86 +14191,93 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY - + 0 - + 0 - + 0 - + 1 m_thicknessCtrl 1 - - + + protected 1 - + Resizable 1 - - - + + + 0 - - + + wxFILTER_NONE wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -12421,78 +14289,86 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY unit - + 0 + 0 - - + + 0 - + 1 m_thicknessUnits 1 - - + + protected 1 - + Resizable 1 - - - + + + 0 - - - - + + + + -1 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -12516,78 +14392,86 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 ,90,90,11,70,0 0 0 wxID_ANY Set thickness to 0 for a filled circle. - + 0 + 0 - - + + 0 - + 1 m_staticTextInfo 1 - - + + protected 1 - + Resizable 1 - - - + + + 0 - - - - + + + + -1 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -12599,76 +14483,83 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY - + 0 - - + + 0 - + 1 m_staticline1 1 - - + + protected 1 - + Resizable 1 - + wxLI_HORIZONTAL - + 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -12684,17 +14575,17 @@ 1 0 0 - + m_sdbSizer protected - - - - - - - - + + + + + + + + @@ -12702,67 +14593,80 @@ 0 wxAUI_MGR_DEFAULT - + wxBOTH - + 1 1 impl_virtual - - - + + + 0 wxID_ANY - - + + DIALOG_PAD_PRIMITIVES_TRANSFORM_BASE - + -1,-1 wxDEFAULT_DIALOG_STYLE DIALOG_SHIM; Pad Custom Shape Geometry Transform - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + bSizermain wxVERTICAL none @@ -12774,9 +14678,9 @@ 7 wxBOTH 2,4 - + 0 - + fgSizerShapeProperties1 wxFLEX_GROWMODE_SPECIFIED none @@ -12791,78 +14695,86 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY Move vector - + 0 + 0 - - + + 0 - + 1 m_staticTextMove 1 - - + + protected 1 - + Resizable 1 - - - + + + 0 - - - - + + + + -1 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -12874,78 +14786,86 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY X: - + 0 + 0 - - + + 0 - + 1 m_xLabel 1 - - + + protected 1 - + Resizable 1 - - - + + + 0 - - - - + + + + -1 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -12957,86 +14877,93 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY - + 0 - + 0 - + 0 - + 1 m_xCtrl 1 - - + + protected 1 - + Resizable 1 - - - ; ; forward_declare + + + TEXT_CTRL_EVAL; widgets/text_ctrl_eval.h 0 - - + + wxFILTER_NONE wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -13048,78 +14975,86 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY unit - + 0 + 0 - - + + 0 - + 1 m_xUnits 1 - - + + protected 1 - + Resizable 1 - - + + ; forward_declare 0 - - - - + + + + -1 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -13131,78 +15066,86 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY Y: - + 0 + 0 - - + + 0 - + 1 m_yLabel 1 - - + + protected 1 - + Resizable 1 - - - + + + 0 - - - - + + + + -1 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -13214,86 +15157,93 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY - + 0 - + 0 - + 0 - + 1 m_yCtrl 1 - - + + protected 1 - + Resizable 1 - - - ; ; forward_declare + + + TEXT_CTRL_EVAL; widgets/text_ctrl_eval.h 0 - - + + wxFILTER_NONE wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -13305,78 +15255,86 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY unit - + 0 + 0 - - + + 0 - + 1 m_yUnits 1 - - + + protected 1 - + Resizable 1 - - - + + + 0 - - - - + + + + -1 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -13388,78 +15346,86 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY Rotation: - + 0 + 0 - - + + 0 - + 1 m_rotationLabel 1 - - + + protected 1 - + Resizable 1 - - - + + + 0 - - - - + + + + -1 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -13481,86 +15447,93 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY - + 0 - + 0 - + 0 - + 1 m_rotationCtrl 1 - - + + protected 1 - + Resizable 1 - - - ; ; forward_declare + + + TEXT_CTRL_EVAL; widgets/text_ctrl_eval.h 0 - - + + wxFILTER_NONE wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -13572,78 +15545,86 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY deg - + 0 + 0 - - + + 0 - + 1 m_rotationUnits 1 - - + + protected 1 - + Resizable 1 - - + + ; forward_declare 0 - - - - + + + + -1 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -13685,78 +15666,86 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY Scaling factor: - + 0 + 0 - - + + 0 - + 1 m_scaleLabel 1 - - + + protected 1 - + Resizable 1 - - - + + + 0 - - - - + + + + -1 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -13778,86 +15767,93 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY - + 0 - + 0 - + 0 - + 1 m_scaleCtrl 1 - - + + protected 1 - + Resizable 1 - - + + TEXT_CTRL_EVAL; widgets/text_ctrl_eval.h 0 - - + + wxFILTER_NONE wxDefaultValidator - + 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -13909,78 +15905,86 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY Duplicate: - + 0 + 0 - - + + 0 - + 1 m_staticTextDupCnt 1 - - + + protected 1 - + Resizable 1 - - - + + + 0 - - - - + + + + -1 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -14002,83 +16006,90 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY 1 100 - + 0 - + 1 - + 0 - + 1 m_spinCtrlDuplicateCount 1 - - + + protected 1 - + Resizable 1 - + wxSP_ARROW_KEYS - + 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -14102,76 +16113,83 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY - + 0 - - + + 0 - + 1 m_staticline1 1 - - + + protected 1 - + Resizable 1 - + wxLI_HORIZONTAL - + 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -14187,17 +16205,17 @@ 1 0 0 - + m_sdbSizer protected - - - - - - - - + + + + + + + + @@ -14205,85 +16223,98 @@ 0 wxAUI_MGR_DEFAULT - + wxBOTH - + 1 1 impl_virtual - - - + + + 0 wxID_ANY - - + + DIALOG_PAD_PRIMITIVE_POLY_PROPS_BASE - + -1,-1 wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER DIALOG_SHIM; Basic Shape Polygon - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + bSizerMain wxVERTICAL none - + 5 wxEXPAND 1 - - + + bSizerUpper wxHORIZONTAL none - + 5 wxEXPAND 1 - - + + bLeftSizer wxVERTICAL none @@ -14296,30 +16327,30 @@ 1 1 1 - - - - + + + + 0 1 - - - + + + 1 - - + + wxALIGN_LEFT - + wxALIGN_TOP 0 1 - wxALIGN_CENTRE + wxALIGN_CENTER 22 "Pos X" "Pos Y" - wxALIGN_CENTRE + wxALIGN_CENTER 2 100,100 - + 1 0 Dock @@ -14331,111 +16362,118 @@ 0 1 1 - + 1 - - + + 1 0 0 wxID_ANY - - - + + + 0 0 - + 0 - - + + 0 - + 1 m_gridCornersList 1 - - + + protected 1 - + Resizable - wxALIGN_CENTRE + wxALIGN_CENTER 80 - - wxALIGN_CENTRE - + + wxALIGN_CENTER + 1 1 - + WX_GRID; widgets/wx_grid.h; forward_declare 0 - - - + + + wxBORDER_SIMPLE - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + onGridSelect - + onCellSelect - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + - + 5 wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT|wxLEFT 0 - - + + bSizerRightButts wxHORIZONTAL none @@ -14448,95 +16486,105 @@ 1 1 1 - - - - - - - - + + + + + + + + 1 0 1 - + 1 + 0 0 - + Dock 0 Left 1 - + 1 - - + + 0 0 - wxID_ANY Add Corner - + + 0 + 0 - - + + 0 30,30 1 m_addButton 1 - - + + protected 1 - + + + Resizable - 1 - - + + ; forward_declare 0 - - + + wxFILTER_NONE wxDefaultValidator - - - - + + + + + + + + + + OnButtonAdd - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + - + 5 wxEXPAND|wxRIGHT|wxLEFT 0 - + 0 protected 0 @@ -14551,88 +16599,98 @@ 1 1 1 - - - - - - - - + + + + + + + + 1 0 1 - + 1 + 0 0 - + Dock 0 Left 1 - + 1 - - + + 0 0 - wxID_ANY Delete Corner - + + 0 + 0 - - + + 0 30,30 1 m_deleteButton 1 - - + + protected 1 - + + + Resizable - 1 - - + + ; forward_declare 0 - - + + wxFILTER_NONE wxDefaultValidator - - - - + + + + + + + + + + OnButtonDelete - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + @@ -14645,9 +16703,9 @@ 5 wxBOTH 1 - + 0 - + fgSizerThickness wxFLEX_GROWMODE_SPECIFIED none @@ -14662,78 +16720,86 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY Outline thickness: - + 0 + 0 - - + + 0 - + 1 m_thicknessLabel 1 - - + + protected 1 - + Resizable 1 - - - + + + 0 - - - - + + + + -1 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -14745,86 +16811,93 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY - + 0 - + 0 - + 0 - + 1 m_thicknessCtrl 1 - - + + protected 1 - + Resizable 1 - - - ; ; forward_declare + + + TEXT_CTRL_EVAL; widgets/text_ctrl_eval.h 0 - - + + wxFILTER_NONE wxDefaultValidator - + 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -14836,78 +16909,86 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY unit - + 0 + 0 - - + + 0 - + 1 m_thicknessUnits 1 - - + + protected 1 - + Resizable 1 - - - + + + 0 - - - - + + + + -1 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -14919,7 +17000,7 @@ wxEXPAND 1 - + bRightSizer wxVERTICAL none @@ -14932,75 +17013,82 @@ 1 1 1 - - - - - + + + + + 0,0,0 - + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY - + 0 - - + + 0 290,290 1 m_panelPoly 1 - - + + protected 1 - + Resizable 1 - - + + 0 - - - + + + wxTAB_TRAVERSAL - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + onPaintPolyPanel - - - - + + + + onPolyPanelResize - + @@ -15021,76 +17109,83 @@ 1 1 1 - - - - - - - - + + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY - + 0 - - + + 0 50,50 1 m_warningIcon 1 - - + + protected 1 - + Resizable 1 - + ; forward_declare 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -15102,83 +17197,91 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY MyLabel - + 0 + 0 - - + + 0 - + 1 m_warningText 1 - - + + protected 1 - + Resizable 1 - - + + ; forward_declare 0 - - - - + + + + -1 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 - + 0 88 @@ -15201,76 +17304,83 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY - + 0 - - + + 0 - + 1 m_staticline3 1 - - + + protected 1 - + Resizable 1 - + wxLI_HORIZONTAL - + 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -15278,7 +17388,7 @@ wxEXPAND 0 - + bSizer24 wxHORIZONTAL none @@ -15287,7 +17397,7 @@ wxEXPAND|wxLEFT 1 - + bSizer25 wxVERTICAL none @@ -15303,85 +17413,93 @@ 5 - + 0 1 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 ,90,90,11,70,0 0 0 wxID_ANY Coordinates are relative to anchor pad, rotated 0.0 deg. - + 0 + 0 - - + + 0 - + 1 m_statusLine1 1 - - + + protected 1 - + Resizable 1 - - - + + + 0 - - - - + + + + -1 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -15393,78 +17511,86 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 ,90,90,11,70,0 0 0 wxID_ANY Set thickness to 0 for a filled polygon. - + 0 + 0 - - + + 0 - + 1 m_statusLine2 1 - - + + protected 1 - + Resizable 1 -1,-1 - + ; forward_declare 0 - - - - + + + + -1 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -15482,17 +17608,17 @@ 1 0 0 - + m_sdbSizer protected - - - - - - - - + + + + + + + + diff --git a/pcbnew/dialogs/dialog_pad_properties_base.h b/pcbnew/dialogs/dialog_pad_properties_base.h index cba82c4b31..ea1cd67458 100644 --- a/pcbnew/dialogs/dialog_pad_properties_base.h +++ b/pcbnew/dialogs/dialog_pad_properties_base.h @@ -1,12 +1,11 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Dec 30 2017) +// C++ code generated with wxFormBuilder (version Dec 1 2018) // http://www.wxformbuilder.org/ // // PLEASE DO *NOT* EDIT THIS FILE! /////////////////////////////////////////////////////////////////////////// -#ifndef __DIALOG_PAD_PROPERTIES_BASE_H__ -#define __DIALOG_PAD_PROPERTIES_BASE_H__ +#pragma once #include #include @@ -25,12 +24,12 @@ class WX_GRID; #include #include #include +#include #include #include #include #include #include -#include #include #include #include @@ -53,20 +52,20 @@ class WX_GRID; class DIALOG_PAD_PROPERTIES_BASE : public DIALOG_SHIM { private: - + protected: enum { wxID_DIALOG_EDIT_PAD = 1000, wxID_PADNUMCTRL }; - + wxNotebook* m_notebook; wxPanel* m_panelGeneral; wxStaticText* m_PadNumText; wxTextCtrl* m_PadNumCtrl; wxStaticText* m_PadNameText; - NET_SELECTOR* m_PadNetSelector; + NET_SELECTOR* m_PadNetSelector; wxStaticText* m_staticText44; wxChoice* m_PadType; wxStaticText* m_staticText45; @@ -106,6 +105,14 @@ class DIALOG_PAD_PROPERTIES_BASE : public DIALOG_SHIM wxStaticText* m_cornerRadiusLabel; wxTextCtrl* m_tcCornerRadius; wxStaticText* m_cornerRadiusUnits; + wxStaticText* m_staticTextChamferRatio; + TEXT_CTRL_EVAL* m_tcChamferRatio; + wxStaticText* m_staticTextChamferRatioUnit; + wxStaticText* m_staticTextChamferCorner; + wxCheckBox* m_cbTopLeft; + wxCheckBox* m_cbTopRight; + wxCheckBox* m_cbBottomLeft; + wxCheckBox* m_cbBottomRight; wxStaticText* m_holeShapeLabel; wxChoice* m_holeShapeCtrl; wxStaticText* m_staticText51; @@ -185,7 +192,7 @@ class DIALOG_PAD_PROPERTIES_BASE : public DIALOG_SHIM wxStdDialogButtonSizer* m_sdbSizer; wxButton* m_sdbSizerOK; wxButton* m_sdbSizerCancel; - + // Virtual event handlers, overide them in your derived class virtual void OnInitDialog( wxInitDialogEvent& event ) { event.Skip(); } virtual void OnUpdateUI( wxUpdateUIEvent& event ) { event.Skip(); } @@ -208,13 +215,13 @@ class DIALOG_PAD_PROPERTIES_BASE : public DIALOG_SHIM virtual void OnPaintShowPanel( wxPaintEvent& event ) { event.Skip(); } virtual void onChangePadMode( wxCommandEvent& event ) { event.Skip(); } virtual void OnCancel( wxCommandEvent& event ) { event.Skip(); } - - + + public: - - DIALOG_PAD_PROPERTIES_BASE( wxWindow* parent, wxWindowID id = wxID_DIALOG_EDIT_PAD, const wxString& title = _("Pad Properties"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); + + DIALOG_PAD_PROPERTIES_BASE( wxWindow* parent, wxWindowID id = wxID_DIALOG_EDIT_PAD, const wxString& title = _("Pad Properties"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); ~DIALOG_PAD_PROPERTIES_BASE(); - + }; /////////////////////////////////////////////////////////////////////////////// @@ -223,24 +230,24 @@ class DIALOG_PAD_PROPERTIES_BASE : public DIALOG_SHIM class DIALOG_PAD_PRIMITIVES_PROPERTIES_BASE : public DIALOG_SHIM { private: - + protected: wxStaticText* m_staticTextPosStart; wxStaticText* m_startXLabel; - wxTextCtrl* m_startXCtrl; + TEXT_CTRL_EVAL* m_startXCtrl; wxStaticText* m_startXUnits; wxStaticText* m_startYLabel; - wxTextCtrl* m_startYCtrl; + TEXT_CTRL_EVAL* m_startYCtrl; wxStaticText* m_startYUnits; wxStaticText* m_staticTextPosEnd; wxStaticText* m_endXLabel; - wxTextCtrl* m_endXCtrl; + TEXT_CTRL_EVAL* m_endXCtrl; wxStaticText* m_endXUnits; wxStaticText* m_endYLabel; - wxTextCtrl* m_endYCtrl; + TEXT_CTRL_EVAL* m_endYCtrl; wxStaticText* m_endYUnits; wxStaticText* m_radiusLabel; - wxTextCtrl* m_radiusCtrl; + TEXT_CTRL_EVAL* m_radiusCtrl; wxStaticText* m_radiusUnits; wxStaticText* m_thicknessLabel; wxTextCtrl* m_thicknessCtrl; @@ -250,12 +257,12 @@ class DIALOG_PAD_PRIMITIVES_PROPERTIES_BASE : public DIALOG_SHIM wxStdDialogButtonSizer* m_sdbSizer; wxButton* m_sdbSizerOK; wxButton* m_sdbSizerCancel; - + public: - - DIALOG_PAD_PRIMITIVES_PROPERTIES_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); + + DIALOG_PAD_PRIMITIVES_PROPERTIES_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); ~DIALOG_PAD_PRIMITIVES_PROPERTIES_BASE(); - + }; /////////////////////////////////////////////////////////////////////////////// @@ -264,17 +271,17 @@ class DIALOG_PAD_PRIMITIVES_PROPERTIES_BASE : public DIALOG_SHIM class DIALOG_PAD_PRIMITIVES_TRANSFORM_BASE : public DIALOG_SHIM { private: - + protected: wxStaticText* m_staticTextMove; wxStaticText* m_xLabel; - wxTextCtrl* m_xCtrl; + TEXT_CTRL_EVAL* m_xCtrl; wxStaticText* m_xUnits; wxStaticText* m_yLabel; - wxTextCtrl* m_yCtrl; + TEXT_CTRL_EVAL* m_yCtrl; wxStaticText* m_yUnits; wxStaticText* m_rotationLabel; - wxTextCtrl* m_rotationCtrl; + TEXT_CTRL_EVAL* m_rotationCtrl; wxStaticText* m_rotationUnits; wxStaticText* m_scaleLabel; TEXT_CTRL_EVAL* m_scaleCtrl; @@ -284,12 +291,12 @@ class DIALOG_PAD_PRIMITIVES_TRANSFORM_BASE : public DIALOG_SHIM wxStdDialogButtonSizer* m_sdbSizer; wxButton* m_sdbSizerOK; wxButton* m_sdbSizerCancel; - + public: - - DIALOG_PAD_PRIMITIVES_TRANSFORM_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Pad Custom Shape Geometry Transform"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE ); + + DIALOG_PAD_PRIMITIVES_TRANSFORM_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Pad Custom Shape Geometry Transform"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE ); ~DIALOG_PAD_PRIMITIVES_TRANSFORM_BASE(); - + }; /////////////////////////////////////////////////////////////////////////////// @@ -298,13 +305,13 @@ class DIALOG_PAD_PRIMITIVES_TRANSFORM_BASE : public DIALOG_SHIM class DIALOG_PAD_PRIMITIVE_POLY_PROPS_BASE : public DIALOG_SHIM { private: - + protected: WX_GRID* m_gridCornersList; wxBitmapButton* m_addButton; wxBitmapButton* m_deleteButton; wxStaticText* m_thicknessLabel; - wxTextCtrl* m_thicknessCtrl; + TEXT_CTRL_EVAL* m_thicknessCtrl; wxStaticText* m_thicknessUnits; wxPanel* m_panelPoly; wxStaticBitmap* m_warningIcon; @@ -315,7 +322,7 @@ class DIALOG_PAD_PRIMITIVE_POLY_PROPS_BASE : public DIALOG_SHIM 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(); } @@ -323,13 +330,12 @@ class DIALOG_PAD_PRIMITIVE_POLY_PROPS_BASE : public DIALOG_SHIM virtual void OnButtonDelete( wxCommandEvent& event ) { event.Skip(); } virtual void onPaintPolyPanel( wxPaintEvent& event ) { event.Skip(); } virtual void onPolyPanelResize( wxSizeEvent& event ) { event.Skip(); } - - + + public: - - DIALOG_PAD_PRIMITIVE_POLY_PROPS_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Basic Shape Polygon"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); + + DIALOG_PAD_PRIMITIVE_POLY_PROPS_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Basic Shape Polygon"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); ~DIALOG_PAD_PRIMITIVE_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 d6273ecbd4..296963c6f8 100644 --- a/pcbnew/drc_clearance_test_functions.cpp +++ b/pcbnew/drc_clearance_test_functions.cpp @@ -898,7 +898,7 @@ bool DRC::checkClearancePadToPad( D_PAD* aRefPad, D_PAD* aPad ) // priority is aRefPad = ROUND then OVAL then RECT/ROUNDRECT then other if( aRefPad->GetShape() != aPad->GetShape() && aRefPad->GetShape() != PAD_SHAPE_CIRCLE ) { - // pad ref shape is here oval, rect, roundrect, trapezoid or custom + // pad ref shape is here oval, rect, roundrect, chamfered rect, trapezoid or custom switch( aPad->GetShape() ) { case PAD_SHAPE_CIRCLE: @@ -916,6 +916,7 @@ bool DRC::checkClearancePadToPad( D_PAD* aRefPad, D_PAD* aPad ) break; case PAD_SHAPE_TRAPEZOID: + case PAD_SHAPE_CHAMFERED_RECT: case PAD_SHAPE_CUSTOM: break; } @@ -962,6 +963,7 @@ bool DRC::checkClearancePadToPad( D_PAD* aRefPad, D_PAD* aPad ) case PAD_SHAPE_TRAPEZOID: case PAD_SHAPE_ROUNDRECT: + case PAD_SHAPE_CHAMFERED_RECT: case PAD_SHAPE_RECT: case PAD_SHAPE_CUSTOM: // pad_angle = pad orient relative to the aRefPad orient @@ -975,6 +977,17 @@ 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_CHAMFERED_RECT ) + { + // The reference pad can be rotated. calculate the rotated + // coordinates ( note, the ref pad position is the origin of + // coordinates for this drc test) + int padRadius = aRefPad->GetRoundRectCornerRadius(); + TransformRoundChamferedRectToPolygon( polysetref, wxPoint( 0, 0 ), aRefPad->GetSize(), + aRefPad->GetOrientation(), + padRadius, aRefPad->GetChamferRectRatio(), + aRefPad->GetChamferPositions(), 64 ); + } else if( aRefPad->GetShape() == PAD_SHAPE_CUSTOM ) { polysetref.Append( aRefPad->GetCustomShapeAsPolygon() ); @@ -996,6 +1009,7 @@ bool DRC::checkClearancePadToPad( D_PAD* aRefPad, D_PAD* aPad ) { case PAD_SHAPE_ROUNDRECT: case PAD_SHAPE_RECT: + case PAD_SHAPE_CHAMFERED_RECT: case PAD_SHAPE_TRAPEZOID: case PAD_SHAPE_CUSTOM: if( aPad->GetShape() == PAD_SHAPE_ROUNDRECT ) @@ -1005,6 +1019,17 @@ bool DRC::checkClearancePadToPad( D_PAD* aRefPad, D_PAD* aPad ) GetRoundRectCornerCenters( polycompare, padRadius, relativePadPos, aPad->GetSize(), aPad->GetOrientation() ); } + else if( aPad->GetShape() == PAD_SHAPE_CHAMFERED_RECT ) + { + // The reference pad can be rotated. calculate the rotated + // coordinates ( note, the ref pad position is the origin of + // coordinates for this drc test) + int padRadius = aPad->GetRoundRectCornerRadius(); + TransformRoundChamferedRectToPolygon( polysetcompare, relativePadPos, aPad->GetSize(), + aPad->GetOrientation(), + padRadius, aPad->GetChamferRectRatio(), + aPad->GetChamferPositions(), 64 ); + } else if( aPad->GetShape() == PAD_SHAPE_CUSTOM ) { polysetcompare.Append( aPad->GetCustomShapeAsPolygon() ); @@ -1375,6 +1400,36 @@ bool DRC::checkClearanceSegmToPad( const D_PAD* aPad, int aSegmentWidth, int aMi 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; + + case PAD_SHAPE_CHAMFERED_RECT: + { + SHAPE_POLY_SET polyset; + // 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 + int padRadius = aPad->GetRoundRectCornerRadius(); + TransformRoundChamferedRectToPolygon( polyset, m_padToTestPos, aPad->GetSize(), + aPad->GetOrientation(), + padRadius, aPad->GetChamferRectRatio(), + aPad->GetChamferPositions(), 64 ); + // Rotate also 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) + polyset.Rotate( DECIDEG2RAD( -m_segmAngle ), VECTOR2I( 0, 0 ) ); + + const SHAPE_LINE_CHAIN& refpoly = polyset.COutline( 0 ); + if( !poly2segmentDRC( (wxPoint*) &refpoly.CPoint( 0 ), refpoly.PointCount(), wxPoint( 0, 0 ), wxPoint(m_segmLength,0), diff --git a/pcbnew/exporters/export_vrml.cpp b/pcbnew/exporters/export_vrml.cpp index 3503a5d6d9..66cac34d72 100644 --- a/pcbnew/exporters/export_vrml.cpp +++ b/pcbnew/exporters/export_vrml.cpp @@ -1116,14 +1116,15 @@ static void export_vrml_padshape( MODEL_VRML& aModel, VRML_LAYER* aTinLayer, D_P break; case PAD_SHAPE_ROUNDRECT: + case PAD_SHAPE_CHAMFERED_RECT: { SHAPE_POLY_SET polySet; int segmentToCircleCount = ARC_APPROX_SEGMENTS_COUNT_HIGH_DEF; const int corner_radius = aPad->GetRoundRectCornerRadius( aPad->GetSize() ); - TransformRoundRectToPolygon( polySet, wxPoint( 0, 0 ), aPad->GetSize(), - 0.0, corner_radius, segmentToCircleCount ); + TransformRoundChamferedRectToPolygon( polySet, wxPoint( 0, 0 ), aPad->GetSize(), + 0.0, corner_radius, 0.0, 0, segmentToCircleCount ); std::vector< wxRealPoint > cornerList; - // TransformRoundRectToPolygon creates only one convex polygon + // TransformRoundChamferedRectToPolygon creates only one convex polygon SHAPE_LINE_CHAIN poly( polySet.Outline( 0 ) ); for( int ii = 0; ii < poly.PointCount(); ++ii ) @@ -1170,7 +1171,7 @@ static void export_vrml_padshape( MODEL_VRML& aModel, VRML_LAYER* aTinLayer, D_P pad_dy = 0; case PAD_SHAPE_TRAPEZOID: - { + { double coord[8] = { -pad_w + pad_dy, -pad_h - pad_dx, @@ -1209,10 +1210,7 @@ static void export_vrml_padshape( MODEL_VRML& aModel, VRML_LAYER* aTinLayer, D_P throw( std::runtime_error( aTinLayer->GetError() ) ); break; - } - - default: - break; + } } } diff --git a/pcbnew/kicad_plugin.cpp b/pcbnew/kicad_plugin.cpp index df0ec7a155..ee88dfa087 100644 --- a/pcbnew/kicad_plugin.cpp +++ b/pcbnew/kicad_plugin.cpp @@ -51,6 +51,7 @@ #include #include #include +#include // for enum RECT_CHAMFER_POSITIONS definition using namespace PCB_KEYS_T; @@ -1248,12 +1249,13 @@ void PCB_IO::format( D_PAD* aPad, int aNestLevel ) const switch( aPad->GetShape() ) { - case PAD_SHAPE_CIRCLE: shape = "circle"; break; - case PAD_SHAPE_RECT: shape = "rect"; break; - 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; + case PAD_SHAPE_CIRCLE: shape = "circle"; break; + case PAD_SHAPE_RECT: shape = "rect"; break; + case PAD_SHAPE_OVAL: shape = "oval"; break; + case PAD_SHAPE_TRAPEZOID: shape = "trapezoid"; break; + case PAD_SHAPE_CHAMFERED_RECT: + 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() ) ); @@ -1311,13 +1313,38 @@ void PCB_IO::format( D_PAD* aPad, int aNestLevel ) const formatLayers( aPad->GetLayerSet() ); - // Output the radius ratio for rounded rect pads - if( aPad->GetShape() == PAD_SHAPE_ROUNDRECT ) + // Output the radius ratio for rounded and chamfered rect pads + if( aPad->GetShape() == PAD_SHAPE_ROUNDRECT || aPad->GetShape() == PAD_SHAPE_CHAMFERED_RECT) { m_out->Print( 0, " (roundrect_rratio %s)", Double2Str( aPad->GetRoundRectRadiusRatio() ).c_str() ); } + // Output the chamfer corners for chamfered rect pads + if( aPad->GetShape() == PAD_SHAPE_CHAMFERED_RECT) + { + m_out->Print( 0, "\n" ); + + m_out->Print( aNestLevel+1, "(chamfer_ratio %s)", + Double2Str( aPad->GetChamferRectRatio() ).c_str() ); + + m_out->Print( 0, " (chamfer" ); + + if( ( aPad->GetChamferPositions() & RECT_CHAMFER_TOP_LEFT ) ) + m_out->Print( 0, " top_left" ); + + if( ( aPad->GetChamferPositions() & RECT_CHAMFER_TOP_RIGHT ) ) + m_out->Print( 0, " top_right" ); + + if( ( aPad->GetChamferPositions() & RECT_CHAMFER_BOTTOM_LEFT ) ) + m_out->Print( 0, " bottom_left" ); + + if( ( aPad->GetChamferPositions() & RECT_CHAMFER_BOTTOM_RIGHT ) ) + m_out->Print( 0, " bottom_right" ); + + m_out->Print( 0, ")" ); + } + std::string output; // Unconnected pad is default net so don't save it. diff --git a/pcbnew/pad_draw_functions.cpp b/pcbnew/pad_draw_functions.cpp index 5a0b5ffd47..bdbe42d57e 100644 --- a/pcbnew/pad_draw_functions.cpp +++ b/pcbnew/pad_draw_functions.cpp @@ -341,6 +341,7 @@ void D_PAD::Draw( EDA_DRAW_PANEL* aPanel, wxDC* aDC, GR_DRAWMODE aDraw_mode, void D_PAD::DrawShape( EDA_RECT* aClipBox, wxDC* aDC, PAD_DRAWINFO& aDrawInfo ) { + #define SEGCOUNT 32 // number of segments to approximate a circle wxPoint coord[12]; double angle = m_Orient; int seg_width; @@ -436,42 +437,29 @@ void D_PAD::DrawShape( EDA_RECT* aClipBox, wxDC* aDC, PAD_DRAWINFO& aDrawInfo ) } break; + case PAD_SHAPE_CHAMFERED_RECT: case PAD_SHAPE_ROUNDRECT: - { + { // Use solder[Paste/Mask]size or pad size to build pad shape to draw wxSize size( GetSize() ); size += aDrawInfo.m_Mask_margin * 2; int corner_radius = GetRoundRectCornerRadius( size ); + bool doChamfer = GetShape() == PAD_SHAPE_CHAMFERED_RECT; + + SHAPE_POLY_SET outline; + TransformRoundChamferedRectToPolygon( outline, shape_pos, size, GetOrientation(), + corner_radius, GetChamferRectRatio(), + doChamfer ? GetChamferPositions() : 0, + SEGCOUNT ); // Draw the polygon: Inflate creates only one convex polygon - SHAPE_POLY_SET outline; bool filled = aDrawInfo.m_ShowPadFilled; - if( filled ) - { - wxPoint centers[4]; - GetRoundRectCornerCenters( centers, corner_radius, shape_pos, - size, GetOrientation() ); - GRClosedPoly( aClipBox, aDC, 4, centers, true, corner_radius*2, - aDrawInfo.m_Color, aDrawInfo.m_Color ); - } - else - { - TransformRoundRectToPolygon( outline, shape_pos, size, GetOrientation(), - corner_radius, 64 ); + SHAPE_LINE_CHAIN& poly = outline.Outline( 0 ); - if( outline.OutlineCount() > 0 ) - { - SHAPE_LINE_CHAIN& poly = outline.Outline( 0 ); - - if( poly.PointCount() > 0 ) - { - GRClosedPoly( aClipBox, aDC, poly.PointCount(), - (wxPoint*)&poly.Point( 0 ), aDrawInfo.m_ShowPadFilled, 0, - aDrawInfo.m_Color, aDrawInfo.m_Color ); - } - } - } + GRClosedPoly( aClipBox, aDC, poly.PointCount(), + (wxPoint*)&poly.Point( 0 ), filled, 0, + aDrawInfo.m_Color, aDrawInfo.m_Color ); if( aDrawInfo.m_PadClearance ) { @@ -481,27 +469,23 @@ void D_PAD::DrawShape( EDA_RECT* aClipBox, wxDC* aDC, PAD_DRAWINFO& aDrawInfo ) size.y += aDrawInfo.m_PadClearance * 2; corner_radius = GetRoundRectCornerRadius() + aDrawInfo.m_PadClearance; - TransformRoundRectToPolygon( outline, shape_pos, size, GetOrientation(), - corner_radius, ARC_APPROX_SEGMENTS_COUNT_HIGH_DEF ); + TransformRoundChamferedRectToPolygon( outline, shape_pos, size, GetOrientation(), + corner_radius, GetChamferRectRatio(), + doChamfer ? GetChamferPositions() : 0, + SEGCOUNT ); - if( outline.OutlineCount() > 0 ) - { - // Draw the polygon: Inflate creates only one convex polygon - SHAPE_LINE_CHAIN& clearance_poly = outline.Outline( 0 ); + // Draw the polygon: Inflate creates only one convex polygon + SHAPE_LINE_CHAIN& clearance_poly = outline.Outline( 0 ); - if( clearance_poly.PointCount() > 0 ) - { - GRClosedPoly( aClipBox, aDC, clearance_poly.PointCount(), - (wxPoint*)&clearance_poly.Point( 0 ), false, 0, - aDrawInfo.m_Color, aDrawInfo.m_Color ); - } - } + GRClosedPoly( aClipBox, aDC, clearance_poly.PointCount(), + (wxPoint*)&clearance_poly.Point( 0 ), false, 0, + aDrawInfo.m_Color, aDrawInfo.m_Color ); + } } - } 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 @@ -586,10 +570,7 @@ void D_PAD::DrawShape( EDA_RECT* aClipBox, wxDC* aDC, PAD_DRAWINFO& aDrawInfo ) } } break; - } - - default: - break; + } } // Draw the pad hole diff --git a/pcbnew/pcb_painter.cpp b/pcbnew/pcb_painter.cpp index cc2a60c130..f35fdd5820 100644 --- a/pcbnew/pcb_painter.cpp +++ b/pcbnew/pcb_painter.cpp @@ -816,13 +816,17 @@ void PCB_PAINTER::draw( const D_PAD* aPad, int aLayer ) break; case PAD_SHAPE_ROUNDRECT: + case PAD_SHAPE_CHAMFERED_RECT: { SHAPE_POLY_SET polySet; - wxSize prsize( size.x * 2, size.y * 2 ); + wxSize prsize( size.x * 2, size.y * 2 ); // size is the half pad area size) const int segmentToCircleCount = 64; const int corner_radius = aPad->GetRoundRectCornerRadius( prsize ); - TransformRoundRectToPolygon( polySet, wxPoint( 0, 0 ), prsize, - 0.0, corner_radius, segmentToCircleCount ); + bool doChamfer = shape == PAD_SHAPE_CHAMFERED_RECT; + + TransformRoundChamferedRectToPolygon( polySet, wxPoint( 0, 0 ), prsize, + 0.0, corner_radius, aPad->GetChamferRectRatio(), + doChamfer ? aPad->GetChamferPositions() : 0, segmentToCircleCount ); m_gal->DrawPolygon( polySet ); break; } diff --git a/pcbnew/pcb_parser.cpp b/pcbnew/pcb_parser.cpp index 408a78132f..608b8e193b 100644 --- a/pcbnew/pcb_parser.cpp +++ b/pcbnew/pcb_parser.cpp @@ -49,6 +49,7 @@ #include #include #include +#include // for RECT_CHAMFER_POSITIONS definition using namespace PCB_KEYS_T; @@ -2455,6 +2456,8 @@ D_PAD* PCB_PARSER::parseD_PAD( MODULE* aParent ) break; case T_roundrect: + // Note: the shape can be PAD_SHAPE_ROUNDRECT or PAD_SHAPE_CHAMFERED_RECT + // (if champfer parameters are found later in pad descr.) pad->SetShape( PAD_SHAPE_ROUNDRECT ); break; @@ -2636,6 +2639,56 @@ D_PAD* PCB_PARSER::parseD_PAD( MODULE* aParent ) NeedRIGHT(); break; + case T_chamfer_ratio: + pad->SetChamferRectRatio( parseDouble( "chamfer ratio" ) ); + + if( pad->GetChamferRectRatio() > 0 ) + pad->SetShape( PAD_SHAPE_CHAMFERED_RECT ); + + NeedRIGHT(); + break; + + case T_chamfer: + { + int chamfers = 0; + bool end_list = false; + + while( !end_list ) + { + token = NextTok(); + switch( token ) + { + case T_top_left: + chamfers |= RECT_CHAMFER_TOP_LEFT; + break; + + case T_top_right: + chamfers |= RECT_CHAMFER_TOP_RIGHT; + break; + + case T_bottom_left: + chamfers |= RECT_CHAMFER_BOTTOM_LEFT; + break; + + case T_bottom_right: + chamfers |= RECT_CHAMFER_BOTTOM_RIGHT; + break; + + case T_RIGHT: + pad->SetChamferPositions( chamfers ); + end_list = true; + break; + + default: + Expecting( "chamfer_top_left chamfer_top_right chamfer_bottom_left or chamfer_bottom_right" ); + } + } + + if( pad->GetChamferPositions() != RECT_NO_CHAMFER ) + pad->SetShape( PAD_SHAPE_CHAMFERED_RECT ); + } + break; + case T_options: parseD_PAD_option( pad.get() ); break; diff --git a/pcbnew/plot_board_layers.cpp b/pcbnew/plot_board_layers.cpp index 166c913191..3f74551848 100644 --- a/pcbnew/plot_board_layers.cpp +++ b/pcbnew/plot_board_layers.cpp @@ -443,6 +443,7 @@ void PlotStandardLayer( BOARD *aBoard, PLOTTER* aPlotter, case PAD_SHAPE_TRAPEZOID: case PAD_SHAPE_RECT: case PAD_SHAPE_ROUNDRECT: + case PAD_SHAPE_CHAMFERED_RECT: pad->SetSize( padPlotsSize ); itemplotter.PlotPad( pad, color, plotMode ); break; diff --git a/pcbnew/plot_brditems_plotter.cpp b/pcbnew/plot_brditems_plotter.cpp index d26218647e..469febcb04 100644 --- a/pcbnew/plot_brditems_plotter.cpp +++ b/pcbnew/plot_brditems_plotter.cpp @@ -7,7 +7,7 @@ /* * This program source code file is part of KiCad, a free EDA CAD application. * - * Copyright (C) 1992-2017 KiCad Developers, see AUTHORS.txt for contributors. + * Copyright (C) 1992-2018 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 @@ -45,6 +45,7 @@ #include #include #include +#include #include #include @@ -186,6 +187,23 @@ void BRDITEMS_PLOTTER::PlotPad( D_PAD* aPad, COLOR4D aColor, EDA_DRAW_MODE_T aPl aPad->GetOrientation(), aPlotMode, &gbr_metadata ); break; + case PAD_SHAPE_CHAMFERED_RECT: + { + SHAPE_POLY_SET polygons; + const int segmentToCircleCount = 64; + const int corner_radius = aPad->GetRoundRectCornerRadius( aPad->GetSize() ); + TransformRoundChamferedRectToPolygon( polygons, shape_pos, aPad->GetSize(), + aPad->GetOrientation(), corner_radius, aPad->GetChamferRectRatio(), + aPad->GetChamferPositions(), segmentToCircleCount ); + + if( polygons.OutlineCount() == 0 ) + break; + + int min_dim = std::min( aPad->GetSize().x, aPad->GetSize().y ) /2; + m_plotter->FlashPadCustom( shape_pos,wxSize( min_dim, min_dim ), &polygons, aPlotMode, &gbr_metadata ); + } + break; + case PAD_SHAPE_CUSTOM: { SHAPE_POLY_SET polygons; diff --git a/pcbnew/router/pns_kicad_iface.cpp b/pcbnew/router/pns_kicad_iface.cpp index 20c2c6f195..65caf70a94 100644 --- a/pcbnew/router/pns_kicad_iface.cpp +++ b/pcbnew/router/pns_kicad_iface.cpp @@ -612,6 +612,7 @@ std::unique_ptr PNS_KICAD_IFACE::syncPad( D_PAD* aPad ) break; } + case PAD_SHAPE_CHAMFERED_RECT: case PAD_SHAPE_ROUNDRECT: { SHAPE_POLY_SET outline; @@ -624,9 +625,7 @@ std::unique_ptr PNS_KICAD_IFACE::syncPad( D_PAD* aPad ) SHAPE_SIMPLE* shape = new SHAPE_SIMPLE(); for( int ii = 0; ii < poly.PointCount(); ++ii ) - { - shape->Append( wxPoint( poly.Point( ii ).x, poly.Point( ii ).y ) ); - } + shape->Append( poly.Point( ii ) ); solid->SetShape( shape ); } @@ -708,6 +707,7 @@ std::unique_ptr PNS_KICAD_IFACE::syncPad( D_PAD* aPad ) break; } + case PAD_SHAPE_CHAMFERED_RECT: case PAD_SHAPE_ROUNDRECT: { SHAPE_POLY_SET outline; diff --git a/pcbnew/specctra_import_export/specctra_export.cpp b/pcbnew/specctra_import_export/specctra_export.cpp index 1b5ea27a89..54ea174b87 100644 --- a/pcbnew/specctra_import_export/specctra_export.cpp +++ b/pcbnew/specctra_import_export/specctra_export.cpp @@ -323,7 +323,6 @@ PADSTACK* SPECCTRA_DB::makePADSTACK( BOARD* aBoard, D_PAD* aPad ) switch( aPad->GetShape() ) { - default: case PAD_SHAPE_CIRCLE: { double diameter = scale( aPad->GetSize().x ); @@ -491,6 +490,7 @@ PADSTACK* SPECCTRA_DB::makePADSTACK( BOARD* aBoard, D_PAD* aPad ) } break; + case PAD_SHAPE_CHAMFERED_RECT: case PAD_SHAPE_ROUNDRECT: { // Export the shape as as polygon, round rect does not exist as primitive @@ -511,8 +511,13 @@ PADSTACK* SPECCTRA_DB::makePADSTACK( BOARD* aBoard, D_PAD* aPad ) psize.x += extra_clearance*2; psize.y += extra_clearance*2; rradius += extra_clearance; - TransformRoundRectToPolygon( cornerBuffer, wxPoint(0,0), psize, - 0, rradius, circleToSegmentsCount ); + bool doChamfer = aPad->GetShape() == PAD_SHAPE_CHAMFERED_RECT; + + TransformRoundChamferedRectToPolygon( cornerBuffer, wxPoint(0,0), psize, + 0, rradius, + aPad->GetChamferRectRatio(), + doChamfer ? aPad->GetChamferPositions() : 0, + circleToSegmentsCount ); SHAPE_LINE_CHAIN& polygonal_shape = cornerBuffer.Outline( 0 ); for( int ndx=0; ndx < reportedLayers; ++ndx )