|
|
@ -47,6 +47,7 @@ |
|
|
|
#include <geometry/shape_segment.h>
|
|
|
|
#include <geometry/geometry_utils.h>
|
|
|
|
#include <geometry/shape_circle.h>
|
|
|
|
#include <geometry/roundrect.h>
|
|
|
|
#include <geometry/shape_rect.h>
|
|
|
|
#include <geometry/shape_simple.h>
|
|
|
|
#include <utility>
|
|
|
@ -648,6 +649,26 @@ void BOARD_ADAPTER::addShape( const PCB_SHAPE* aShape, CONTAINER_2D_BASE* aConta |
|
|
|
ConvertPolygonToTriangles( polyList, *aContainer, m_biuTo3Dunits, *aOwner ); |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
if( aShape->GetCornerRadius() > 0 ) |
|
|
|
{ |
|
|
|
ROUNDRECT rr( SHAPE_RECT( aShape->GetPosition(), |
|
|
|
aShape->GetRectangleWidth(), |
|
|
|
aShape->GetRectangleHeight() ), |
|
|
|
aShape->GetCornerRadius() ); |
|
|
|
SHAPE_POLY_SET poly; |
|
|
|
rr.TransformToPolygon( poly ); |
|
|
|
SHAPE_LINE_CHAIN& r_outline = poly.Outline( 0 ); |
|
|
|
r_outline.SetClosed( true ); |
|
|
|
|
|
|
|
for( int ii = 0; ii < r_outline.PointCount(); ii++ ) |
|
|
|
{ |
|
|
|
addROUND_SEGMENT_2D( aContainer, TO_SFVEC2F( r_outline.CPoint( ii ) ), |
|
|
|
TO_SFVEC2F( r_outline.CPoint( ii+1 ) ), |
|
|
|
linewidth3DU, *aOwner ); |
|
|
|
} |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
std::vector<VECTOR2I> pts = aShape->GetRectCorners(); |
|
|
|
|
|
|
@ -660,6 +681,7 @@ void BOARD_ADAPTER::addShape( const PCB_SHAPE* aShape, CONTAINER_2D_BASE* aConta |
|
|
|
addROUND_SEGMENT_2D( aContainer, TO_SFVEC2F( pts[3] ), TO_SFVEC2F( pts[0] ), |
|
|
|
linewidth3DU, *aOwner ); |
|
|
|
} |
|
|
|
} |
|
|
|
break; |
|
|
|
|
|
|
|
case SHAPE_T::ARC: |
|
|
|