Fixed duplicate collinear edge bug
This commit is contained in:
@@ -279,17 +279,22 @@ public class MeshingTest2 extends JPanel {
|
||||
Mesh< RegionSimple > mesh = new Mesh< RegionSimple >( () -> { return new RegionSimple( GluWindingRule.ODD ); } );
|
||||
|
||||
mesh.addPolygon( new Polygon( Arrays.asList(
|
||||
new Point( -1, -1 ),
|
||||
new Point( -1, 0 ),
|
||||
new Point( 1, -2 ),
|
||||
new Point( 1, -1 ),
|
||||
new Point( 1, 1 ),
|
||||
new Point( -1, 1 )
|
||||
new Point( 2, -1 ),
|
||||
new Point( 1, 0 ),
|
||||
new Point( 1, 1 )
|
||||
) ), RegionRuleWinding.CLOCKWISE );
|
||||
|
||||
mesh.simplify();
|
||||
|
||||
mesh.generateRegions();
|
||||
|
||||
return mesh.mesh();
|
||||
final Collection< EdgePolygon > polys = mesh.mesh();
|
||||
chains = mesh.chains;
|
||||
|
||||
return polys;
|
||||
}
|
||||
|
||||
private static List< Facet > generateFacetsFor( AABB box ) {
|
||||
|
||||
Reference in New Issue
Block a user