From e6bf94b6ff0fcb918cc42dc26f3627382a50490c Mon Sep 17 00:00:00 2001 From: Don Bright Date: Sun, 15 Dec 2013 08:33:18 -0600 Subject: tab spaces diff --git a/src/dxftess-cgal.cc b/src/dxftess-cgal.cc index 9c4e6fe..a2d3cb3 100644 --- a/src/dxftess-cgal.cc +++ b/src/dxftess-cgal.cc @@ -410,11 +410,11 @@ projection_t find_good_projection( PolySet::Polygon pgon ) { NT3 qxz = pl.c()*pl.c()+pl.a()*pl.a(); NT3 min = std::min(qxy,std::min(qyz,qxz)); if (min==qxy) return XYPLANE; - else if (min==qyz) return YZPLANE; - return XZPLANE; + else if (min==qyz) return YZPLANE; + return XZPLANE; } -/* triangulate the given polygon using CGAL's 2d Constrained Delaunay +/* triangulate the given 3d polygon using CGAL's 2d Constrained Delaunay algorithm. Project the polygon's points into 2d using the given projection before performing the triangulation. This code assumes input polygon is simple, no holes, no self-intersections, no duplicate points, and is @@ -449,9 +449,9 @@ bool triangulate_polygon( const PolySet::Polygon &pgon, std::vector()); CDT::Finite_faces_iterator fit; - for( fit=cdt.finite_faces_begin(); fit!=cdt.finite_faces_end(); fit++ ) - { - if(fit->is_in_domain()) { + for( fit=cdt.finite_faces_begin(); fit!=cdt.finite_faces_end(); fit++ ) + { + if(fit->is_in_domain()) { CDTPoint p1 = cdt.triangle( fit )[0]; CDTPoint p2 = cdt.triangle( fit )[1]; CDTPoint p3 = cdt.triangle( fit )[2]; @@ -469,9 +469,9 @@ bool triangulate_polygon( const PolySet::Polygon &pgon, std::vector