Browse Source

3D viewer: fix polygon contours of pads solder paste when solder paste ratio was not null.

(the oval and round rect pads 3D contours were incorrect)

Fixes: lp:1767209
https://bugs.launchpad.net/kicad/+bug/1767209
pull/17/head
jean-pierre charras 8 years ago
parent
commit
ccb668c105
  1. 13
      3d-viewer/3d_canvas/create_layer_poly.cpp

13
3d-viewer/3d_canvas/create_layer_poly.cpp

@ -52,8 +52,19 @@ void CINFO3D_VISU::buildPadShapePolygon( const D_PAD* aPad,
case PAD_SHAPE_CIRCLE:
case PAD_SHAPE_OVAL:
case PAD_SHAPE_ROUNDRECT:
aPad->TransformShapeWithClearanceToPolygon( aCornerBuffer, aInflateValue.x,
{
// We are using TransformShapeWithClearanceToPolygon to build the shape.
// Currently, this method uses only the same inflate value for X and Y dirs.
// so because here this is not the case, we use a inflated dummy pad to build
// the polygonal shape
// TODO: remove this dummy pad when TransformShapeWithClearanceToPolygon will use
// a wxSize to inflate the pad size
D_PAD dummy( *aPad );
wxSize new_size = aPad->GetSize() + aInflateValue + aInflateValue;
dummy.SetSize( new_size );
dummy.TransformShapeWithClearanceToPolygon( aCornerBuffer, 0,
aSegmentsPerCircle, aCorrectionFactor );
}
break;
case PAD_SHAPE_TRAPEZOID:

Loading…
Cancel
Save