polygon_triangulation.h: fix a missing call to updateList() in TesselatePolygon.
This commit is contained in:
parent
6a233a1367
commit
2ec957a226
|
@ -624,6 +624,7 @@ public:
|
||||||
return;
|
return;
|
||||||
|
|
||||||
outerNode->updateList();
|
outerNode->updateList();
|
||||||
|
|
||||||
if( !earcutList( outerNode ) )
|
if( !earcutList( outerNode ) )
|
||||||
{
|
{
|
||||||
m_vertices.clear();
|
m_vertices.clear();
|
||||||
|
@ -635,9 +636,11 @@ public:
|
||||||
for( auto path : simplified )
|
for( auto path : simplified )
|
||||||
{
|
{
|
||||||
outerNode = createList( path );
|
outerNode = createList( path );
|
||||||
|
|
||||||
if( !outerNode )
|
if( !outerNode )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
outerNode->updateList();
|
||||||
earcutList( outerNode );
|
earcutList( outerNode );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -975,12 +975,11 @@ void PCB_PAINTER::draw( const DRAWSEGMENT* aSegment, int aLayer )
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
// On Opengl, a not convex filled polygon is usually drawn by using triangles as primitives.
|
// On Opengl, a not convex filled polygon is usually drawn by using triangles as primitives.
|
||||||
// Although using CacheTriangulation() to create basic triangle primitives
|
// Although CacheTriangulation() can create basic triangle primitives
|
||||||
// to draw the polygon solid shape on Opengl, it is not used because CacheTriangulation()
|
// to draw the polygon solid shape on Opengl, it is not used because it does not work fine
|
||||||
// does not work fine with any polygon.
|
// with any polygon. It must be a simple polygon.
|
||||||
// It must be a simple polygon.
|
|
||||||
// And unfortunately, calling shape.Simplify( PM_FAST) is very slow.
|
// And unfortunately, calling shape.Simplify( PM_FAST) is very slow.
|
||||||
// So we just use GLU tesselation (much slower, but works with any polygon)
|
// So for now we just use GLU tesselation (much slower, but works with any polygon)
|
||||||
// This section is left until a better way is found
|
// This section is left until a better way is found
|
||||||
if( !shape.IsTriangulationUpToDate() )
|
if( !shape.IsTriangulationUpToDate() )
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue