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
This commit is contained in:
parent
40a3b4a533
commit
8999f4604f
|
@ -827,6 +827,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;
|
||||
|
||||
|
@ -850,6 +852,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,
|
||||
|
@ -857,7 +863,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