3d-viewer: Require simplified polygons
3d viewer requires simplified polygons not just for triangulation but
also for its own internal routines.
Fixes: lp:1793085
* https://bugs.launchpad.net/kicad/+bug/1793085
(cherry picked from commit 8999f4604f
)
This commit is contained in:
parent
48b4a897af
commit
0a9aedda8b
|
@ -820,6 +820,8 @@ void CINFO3D_VISU::AddShapeWithClearanceToContainer( const DRAWSEGMENT* aDrawSeg
|
|||
aDrawSegment->TransformShapeWithClearanceToPolygon( polyList, aClearanceValue,
|
||||
segcountforcircle, correctionFactor );
|
||||
|
||||
polyList.Simplify( SHAPE_POLY_SET::PM_FAST );
|
||||
|
||||
if( polyList.IsEmpty() ) // Just for caution
|
||||
break;
|
||||
|
||||
|
@ -846,6 +848,10 @@ void CINFO3D_VISU::AddSolidAreasShapesToContainer( const ZONE_CONTAINER* aZoneCo
|
|||
{
|
||||
// Copy the polys list because we have to simplify it
|
||||
SHAPE_POLY_SET polyList = SHAPE_POLY_SET(aZoneContainer->GetFilledPolysList());
|
||||
polyList.Simplify( SHAPE_POLY_SET::PM_FAST );
|
||||
|
||||
if( polyList.IsEmpty() )
|
||||
return;
|
||||
|
||||
// This convert the poly in outline and holes
|
||||
Convert_shape_line_polygon_to_triangles( polyList,
|
||||
|
@ -853,7 +859,6 @@ void CINFO3D_VISU::AddSolidAreasShapesToContainer( const ZONE_CONTAINER* aZoneCo
|
|||
m_biuTo3Dunits,
|
||||
*aZoneContainer );
|
||||
|
||||
|
||||
// add filled areas outlines, which are drawn with thick lines segments
|
||||
// /////////////////////////////////////////////////////////////////////////
|
||||
for( int i = 0; i < polyList.OutlineCount(); ++i )
|
||||
|
|
Loading…
Reference in New Issue