diff --git a/Nef_2/include/CGAL/Nef_2/Segment_overlay_traits.h b/Nef_2/include/CGAL/Nef_2/Segment_overlay_traits.h index 1eecd047efd7..639b4781d6e3 100644 --- a/Nef_2/include/CGAL/Nef_2/Segment_overlay_traits.h +++ b/Nef_2/include/CGAL/Nef_2/Segment_overlay_traits.h @@ -627,6 +627,7 @@ class stl_seg_overlay_traits { out << "SweepStatus:\n"; typename SweepStatus::iterator sit3; for( sit3 = YS.begin(); *sit3 != &sh; ++sit3 ) { + if (*sit3==&sl) continue; int b = orientation(sit3, p_sweep); if(*sit3 == &sl) out << " 1"; else if(*sit3 == &sh) out <<"-1"; diff --git a/Nef_3/include/CGAL/Nef_3/K3_tree.h b/Nef_3/include/CGAL/Nef_3/K3_tree.h index 3bec191d7c23..15392c5d5b96 100644 --- a/Nef_3/include/CGAL/Nef_3/K3_tree.h +++ b/Nef_3/include/CGAL/Nef_3/K3_tree.h @@ -517,7 +517,7 @@ Node_handle build_kdtree(Vertex_list& V, Halfedge_list& E, Halffacet_list& F, int coord = depth%3; Point_3 point_on_plane = find_median_point(V, coord); - CGAL_NEF_TRACEN("build_kdtree: plane: "< CGAL_forall_iterators(it,M4) { // progress++; it->second.sort(Halfedge_key_lt()); - CGAL_NEF_TRACEN("search opposite "<first); + CGAL_NEF_TRACEN("search opposite (M4) "<first); typename Halfedge_list::iterator itl; CGAL_forall_iterators(itl,it->second) { Halfedge_handle e1 = itl->e; @@ -482,7 +482,7 @@ class SNC_external_structure_base : public SNC_decorator Halfedge_handle e2 = itl->e; CGAL_NEF_TRACEN(" " << e1->source()->point() << " -> " << e2->source()->point()); - CGAL_NEF_TRACEN(e1->vector()<<" -> "<<-e2->vector()); + CGAL_NEF_TRACEN(" " << e1->vector()<<" -> "<<-e2->vector()); make_twins(e1,e2); CGAL_assertion(e1->mark()==e2->mark()); @@ -493,7 +493,7 @@ class SNC_external_structure_base : public SNC_decorator CGAL_forall_iterators(it,M3) { // progress++; it->second.sort(Halfedge_key_lt()); - CGAL_NEF_TRACEN("search opposite "<first); + CGAL_NEF_TRACEN("search opposite (M3) "<first); typename Halfedge_list::iterator itl; CGAL_forall_iterators(itl,it->second) { Halfedge_handle e1 = itl->e; @@ -502,7 +502,7 @@ class SNC_external_structure_base : public SNC_decorator Halfedge_handle e2 = itl->e; CGAL_NEF_TRACEN(" " << e1->source()->point() << " -> " << e2->source()->point()); - CGAL_NEF_TRACEN(e1->vector()<<" -> "<<-e2->vector()); + CGAL_NEF_TRACEN(" " << e1->vector()<<" -> "<<-e2->vector()); make_twins(e1,e2); CGAL_assertion(e1->mark()==e2->mark()); @@ -513,7 +513,7 @@ class SNC_external_structure_base : public SNC_decorator CGAL_forall_iterators(it,M2) { // progress++; it->second.sort(Halfedge_key_lt()); - CGAL_NEF_TRACEN("search opposite "<first); + CGAL_NEF_TRACEN("search opposite (M2) "<first); typename Halfedge_list::iterator itl; CGAL_forall_iterators(itl,it->second) { Halfedge_handle e1 = itl->e; @@ -522,7 +522,7 @@ class SNC_external_structure_base : public SNC_decorator Halfedge_handle e2 = itl->e; CGAL_NEF_TRACEN(" " << e1->source()->point() << " -> " << e2->source()->point()); - CGAL_NEF_TRACEN(e1->vector()<<" -> "<<-e2->vector()); + CGAL_NEF_TRACEN(" " << e1->vector()<<" -> "<<-e2->vector()); make_twins(e1,e2); CGAL_assertion(e1->mark()==e2->mark()); @@ -533,7 +533,7 @@ class SNC_external_structure_base : public SNC_decorator CGAL_forall_iterators(it,M) { // progress++; it->second.sort(Halfedge_key_lt()); - CGAL_NEF_TRACEN("search opposite "<first); + CGAL_NEF_TRACEN("search opposite (M) "<first); typename Halfedge_list::iterator itl; CGAL_forall_iterators(itl,it->second) { Halfedge_handle e1 = itl->e; @@ -542,7 +542,7 @@ class SNC_external_structure_base : public SNC_decorator Halfedge_handle e2 = itl->e; CGAL_NEF_TRACEN(" " << e1->source()->point() << " -> " << e2->source()->point()); - CGAL_NEF_TRACEN(e1->vector()<<" -> "<< -e2->vector()); + CGAL_NEF_TRACEN(" " << e1->vector()<<" -> "<< -e2->vector()); CGAL_assertion(e1->source()->point() != e2->source()->point()); CGAL_assertion(e1->mark()==e2->mark()); make_twins(e1,e2); @@ -585,10 +585,16 @@ class SNC_external_structure_base : public SNC_decorator break; } else #endif + CGAL_assertion_code(bool found = false;) CGAL_For_all(cet,cete) if ( cet->circle() == ce->circle().opposite() && cet->source()->twin() == ce->source() ) + { + found = true; break; + } + + CGAL_assertion(found); #ifdef CGAL_USE_TRACE if( cet->circle() != ce->circle().opposite() ) diff --git a/Nef_3/include/CGAL/Nef_3/SNC_intersection.h b/Nef_3/include/CGAL/Nef_3/SNC_intersection.h index a3a26fb30415..be8345069e2f 100644 --- a/Nef_3/include/CGAL/Nef_3/SNC_intersection.h +++ b/Nef_3/include/CGAL/Nef_3/SNC_intersection.h @@ -139,7 +139,7 @@ class SNC_intersection { if( !CGAL::assign( p, o)) return false; CGAL_NEF_TRACEN( "-> intersection point: " << p ); - CGAL_NEF_TRACEN( "-> point in facet interior? "< point in facet interior? "< intersection point: " << p ); - CGAL_NEF_TRACEN( "-> point in facet interior? "< point in facet interior? "<source()->point() << "->" << e->twin()->source()->point()); if (SNC_intersection::does_contain_internally(e->source()->point(), e->twin()->source()->point(), p)) { - _CGAL_NEF_TRACEN("found on edge "<< ss); +// _CGAL_NEF_TRACEN("found on edge "<< ss); return make_object(e); } if((e->source() != v) && (e->twin()->source() != v) && @@ -557,7 +557,7 @@ class SNC_point_locator_by_spatial_subdivision : if(SNC_intersection::does_intersect_internally( s, *f, q) ) { q = normalized(q); call_back( e0, *f, q); - _CGAL_NEF_TRACEN("edge intersects facet on plane "<plane()<<" on "<plane()<<" on "< #include #include @@ -8,12 +6,10 @@ #include #include -#define DATA_DIR std::string("./data/")+ +using AFT=CGAL::Exact_rational; +using AExtended_kernel=CGAL::Extended_cartesian; +using ANef_polyhedron_3=CGAL::Nef_polyhedron_3; -/////////////////////////////////////////////////////////////////////////////// -using AFT=CGAL::Exact_rational; //CGAL::Gmpzf; CGAL::Exact_rational CGAL::Exact_integer -using AExtended_kernel=CGAL::Extended_cartesian; //CGAL::Exact_predicates_exact_constructions_kernel ; //CGAL::Filtered_extended_homogeneous; -using ANef_polyhedron_3=CGAL::Nef_polyhedron_3;//CGAL::Exact_predicates_exact_constructions_kernel>; template void compute_volume_kernel_surface_mesh(SM& sm, ANef_polyhedron_3& res) @@ -30,7 +26,7 @@ void compute_volume_kernel_surface_mesh(SM& sm, res*=ANef_polyhedron_3(eplane); } } -//////////////////////////////////////////////////////////////////////////////// + void test_sm(const std::string& filename, bool rev) { CGAL::Surface_mesh sm; @@ -45,18 +41,17 @@ void test_sm(const std::string& filename, bool rev) compute_volume_kernel_surface_mesh(sm, res); if(res.is_empty()) - { std::cout<<"["<; using Nef = CGAL::Nef_polyhedron_3; -int main(int argc, char ** argv) +int main() { Nef hspace_1(Nef::Plane_3(1.0, 0.0, 0.0, 0.0), Nef::INCLUDED); Nef hspace_2(Nef::Plane_3(1.0, 0.0, 0.0, 1.0), Nef::INCLUDED); Nef hspace_3(Nef::Plane_3(0.0, 0.0, 1.0, 1.0), Nef::INCLUDED); - Nef intersection_1 = hspace_1*hspace_2; // Line 14. Works fine. - Nef intersection_2 = hspace_2*hspace_3; // Line 15. Assertion failure. - + Nef intersection_1 = hspace_1*hspace_2; + Nef intersection_2 = hspace_2*hspace_3; + return 0; }