diff options
author | don bright <hugh.m.bright@gmail.com> | 2012-10-28 17:43:53 (GMT) |
---|---|---|
committer | don bright <hugh.m.bright@gmail.com> | 2012-10-28 17:43:53 (GMT) |
commit | 0473a0eff3ccaaf8632c41b4ee9ced2fd716ed3a (patch) | |
tree | 970d6d8b8902521903049f58a9f889972949ffbd /src/PolySetCGALEvaluator.cc | |
parent | 434ebe017df92dadf9a8e75bca3f540131398ae2 (diff) |
put eps and inf back in
Diffstat (limited to 'src/PolySetCGALEvaluator.cc')
-rw-r--r-- | src/PolySetCGALEvaluator.cc | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/PolySetCGALEvaluator.cc b/src/PolySetCGALEvaluator.cc index 245e97a..225ff05 100644 --- a/src/PolySetCGALEvaluator.cc +++ b/src/PolySetCGALEvaluator.cc @@ -28,6 +28,9 @@ This class converts one or more already 'flat' Nef3 polyhedra into a Nef2 polyhedron by stripping off the 'z' coordinates from the vertices. The resulting Nef2 poly is accumulated in the 'output_nefpoly2d' member variable. +The 'z' coordinates will either be all 0s, for an xy-plane intersected Nef3, +or, they will be a mixture of -eps and +eps, for a thin-box intersected Nef3. + Notes on CGAL's Nef Polyhedron2: 1. The 'mark' on a 2d Nef face is important when doing unions/intersections. @@ -160,8 +163,10 @@ PolySet *PolySetCGALEvaluator::evaluatePolySet(const ProjectionNode &node) PRINT("Trying alternative intersection using very large thin box: "); std::vector<CGAL_Point_3> pts; // dont use z of 0. there are bugs in CGAL. - CGAL_Point_3 minpt( -1e8, -1e8, -0.001 ); - CGAL_Point_3 maxpt( 1e8, 1e8, 0.001 ); + double inf = 1e8; + double eps = 0.001; + CGAL_Point_3 minpt( -inf, -inf, -eps ); + CGAL_Point_3 maxpt( inf, inf, eps ); CGAL_Iso_cuboid_3 bigcuboid( minpt, maxpt ); for ( int i=0;i<8;i++ ) pts.push_back( bigcuboid.vertex(i) ); CGAL_Polyhedron bigbox; |