diff --git a/Alpha_wrap_2/demo/Alpha_wrap_2/scene.h b/Alpha_wrap_2/demo/Alpha_wrap_2/scene.h index b1705ab2b8de..26557288896a 100644 --- a/Alpha_wrap_2/demo/Alpha_wrap_2/scene.h +++ b/Alpha_wrap_2/demo/Alpha_wrap_2/scene.h @@ -325,9 +325,9 @@ class Scene // look for the opposite vertex to get the direction where the triangulation is finite Edge mirror_boundary_edge = tr.mirror_edge(boundary_edge); - Vertex_handle oposite_vertex = n->vertex(mirror_boundary_edge.second); - Point_2 oposite_vertex_projection = perpendicular.projection(tr.point(oposite_vertex)); - Vector_2 infinite_cc_unit_vec = (cc1 - oposite_vertex_projection); + Vertex_handle opposite_vertex = n->vertex(mirror_boundary_edge.second); + Point_2 opposite_vertex_projection = perpendicular.projection(tr.point(opposite_vertex)); + Vector_2 infinite_cc_unit_vec = (cc1 - opposite_vertex_projection); infinite_cc_unit_vec /= CGAL::sqrt(CGAL::to_double(infinite_cc_unit_vec.squared_length())); cc1 = (cc1 + (infinite_cc_unit_vec * 1e5)); } @@ -343,9 +343,9 @@ class Scene // look for the opposite vertex to get the direction where the triangulation is finite Edge mirror_boundary_edge = tr.mirror_edge(boundary_edge); - Vertex_handle oposite_vertex = f->vertex(mirror_boundary_edge.second); - Point_2 oposite_vertex_projection = perpendicular.projection(tr.point(oposite_vertex)); - Vector_2 infinite_cc_unit_vec = (cc2-oposite_vertex_projection); + Vertex_handle opposite_vertex = f->vertex(mirror_boundary_edge.second); + Point_2 opposite_vertex_projection = perpendicular.projection(tr.point(opposite_vertex)); + Vector_2 infinite_cc_unit_vec = (cc2-opposite_vertex_projection); infinite_cc_unit_vec /= CGAL::sqrt(CGAL::to_double(infinite_cc_unit_vec.squared_length())); cc2 = (cc2 + (infinite_cc_unit_vec * 1e5)); } diff --git a/Alpha_wrap_2/include/CGAL/Alpha_wrap_2/internal/Alpha_wrap_2.h b/Alpha_wrap_2/include/CGAL/Alpha_wrap_2/internal/Alpha_wrap_2.h index c361061ac533..f60df0aa805d 100644 --- a/Alpha_wrap_2/include/CGAL/Alpha_wrap_2/internal/Alpha_wrap_2.h +++ b/Alpha_wrap_2/include/CGAL/Alpha_wrap_2/internal/Alpha_wrap_2.h @@ -18,7 +18,7 @@ #define CGAL_ALPHA_WRAP_2_INTERNAL_ALPHA_WRAP_2_H // @todo -// - Handle degerate inputs? +// - Handle degenerate inputs? // - Add a "full triangle" oracle? // - bench sorted/unsorted queues @@ -666,7 +666,7 @@ class Alpha_wrapper_2 std::cout << "> Extract wrap..." << std::endl; std::cout << m_tr.number_of_vertices() << " vertices, " << m_tr.number_of_faces() << " faces" << std::endl; - dump_triangulation("pre_labelling.off"); + dump_triangulation("pre_labeling.off"); #endif using Polygon_with_holes_2 = typename MultipolygonWithHoles::Polygon_with_holes_2; @@ -718,7 +718,7 @@ class Alpha_wrapper_2 }; // Exterior gets label -1, ccw polygons get positive labels, holes get negative labels - std::stack > to_check; // 'int' is the label of the neighbhoring cell + std::stack > to_check; // 'int' is the label of the neighboring cell label_region(m_tr.infinite_face(), -1, to_check); // Label region of front element to_check list @@ -1114,11 +1114,14 @@ class Alpha_wrapper_2 #endif #ifdef CGAL_AW2_COMPUTE_AND_STORE_STEINER_INFO_AT_GATE_CREATION - Point_2 steiner_point; - Steiner_status steiner_status = compute_steiner_point(new_gate, steiner_point); - new_gate.m_steiner_status = steiner_status; - if (steiner_status == Steiner_status::RULE_1 || steiner_status == Steiner_status::RULE_2) - new_gate.m_steiner_point = steiner_point; + if(status != Edge_status::HAS_INFINITE_NEIGHBOR) + { + Point_2 steiner_point; + Steiner_status steiner_status = compute_steiner_point(new_gate, steiner_point); + new_gate.m_steiner_status = steiner_status; + if (steiner_status == Steiner_status::RULE_1 || steiner_status == Steiner_status::RULE_2) + new_gate.m_steiner_point = steiner_point; + } #endif #ifdef CGAL_AW2_USE_SORTED_PRIORITY_QUEUE diff --git a/Alpha_wrap_3/include/CGAL/Alpha_wrap_3/internal/Alpha_wrap_3.h b/Alpha_wrap_3/include/CGAL/Alpha_wrap_3/internal/Alpha_wrap_3.h index 966ce0144ef4..90f350a682aa 100644 --- a/Alpha_wrap_3/include/CGAL/Alpha_wrap_3/internal/Alpha_wrap_3.h +++ b/Alpha_wrap_3/include/CGAL/Alpha_wrap_3/internal/Alpha_wrap_3.h @@ -1141,12 +1141,15 @@ class Alpha_wrapper_3 Gate new_gate(f, m_tr); #endif -#ifdef CGAL_AW2_COMPUTE_AND_STORE_STEINER_INFO_AT_GATE_CREATION - Point_3 steiner_point; - Steiner_status steiner_status = compute_steiner_point(new_gate, steiner_point); - new_gate.m_steiner_status = steiner_status; - if(steiner_status == Steiner_status::RULE_1 || steiner_status == Steiner_status::RULE_2) - new_gate.m_steiner_point = steiner_point; +#ifdef CGAL_AW3_COMPUTE_AND_STORE_STEINER_INFO_AT_GATE_CREATION + if(status != Facet_status::HAS_INFINITE_NEIGHBOR) + { + Point_3 steiner_point; + Steiner_status steiner_status = compute_steiner_point(new_gate, steiner_point); + new_gate.m_steiner_status = steiner_status; + if(steiner_status == Steiner_status::RULE_1 || steiner_status == Steiner_status::RULE_2) + new_gate.m_steiner_point = steiner_point; + } #endif #ifdef CGAL_AW3_USE_SORTED_PRIORITY_QUEUE diff --git a/Alpha_wrap_3/include/CGAL/Alpha_wrap_3/internal/Point_set_oracle.h b/Alpha_wrap_3/include/CGAL/Alpha_wrap_3/internal/Point_set_oracle.h index 5ccc18d1e598..d2182dfeb08c 100644 --- a/Alpha_wrap_3/include/CGAL/Alpha_wrap_3/internal/Point_set_oracle.h +++ b/Alpha_wrap_3/include/CGAL/Alpha_wrap_3/internal/Point_set_oracle.h @@ -130,11 +130,11 @@ class Point_set_oracle // So if one wanted to bench the flood fill runtime, it would be skewed by the time it takes // to accelerate the tree. this->tree().accelerate_distance_queries(); - } -#ifdef CGAL_AW2_DEBUG +#ifdef CGAL_AW3_DEBUG std::cout << "PS Tree: " << this->tree().size() << " primitives" << std::endl; #endif + } }; } // namespace internal diff --git a/Alpha_wrap_3/include/CGAL/Alpha_wrap_3/internal/gate_priority_queue.h b/Alpha_wrap_3/include/CGAL/Alpha_wrap_3/internal/gate_priority_queue.h index c8701de2969e..17b1fb4ee005 100644 --- a/Alpha_wrap_3/include/CGAL/Alpha_wrap_3/internal/gate_priority_queue.h +++ b/Alpha_wrap_3/include/CGAL/Alpha_wrap_3/internal/gate_priority_queue.h @@ -30,13 +30,13 @@ namespace internal { enum class Steiner_status { - UNKONWN = 0, + UNKNOWN = 0, NO_STEINER_POINT, RULE_1, RULE_2 }; -#ifdef CGAL_AW2_COMPUTE_AND_STORE_STEINER_INFO_AT_GATE_CREATION +#ifdef CGAL_AW3_COMPUTE_AND_STORE_STEINER_INFO_AT_GATE_CREATION template struct Gate_steiner_info { @@ -60,7 +60,7 @@ struct Gate_steiner_info // Represents an alpha-traversable facet in the mutable priority queue template class Gate -#ifdef CGAL_AW2_COMPUTE_AND_STORE_STEINER_INFO_AT_GATE_CREATION +#ifdef CGAL_AW3_COMPUTE_AND_STORE_STEINER_INFO_AT_GATE_CREATION : public Gate_steiner_info #endif { @@ -128,7 +128,7 @@ struct Less_gate // Represents an alpha-traversable facet in the mutable priority queue template class Gate -#ifdef CGAL_AW2_COMPUTE_AND_STORE_STEINER_INFO_AT_GATE_CREATION +#ifdef CGAL_AW3_COMPUTE_AND_STORE_STEINER_INFO_AT_GATE_CREATION : public Gate_steiner_info #endif { diff --git a/Alpha_wrap_3/include/CGAL/Alpha_wrap_3/internal/offset_intersection.h b/Alpha_wrap_3/include/CGAL/Alpha_wrap_3/internal/offset_intersection.h index 1a863031465e..cb61e473f013 100644 --- a/Alpha_wrap_3/include/CGAL/Alpha_wrap_3/internal/offset_intersection.h +++ b/Alpha_wrap_3/include/CGAL/Alpha_wrap_3/internal/offset_intersection.h @@ -216,7 +216,7 @@ class Offset_intersection const Point_3& t, Point_3& output_pt) { -#ifdef CGAL_AW2_DEBUG_SPHERE_MARCHING +#ifdef CGAL_AW3_DEBUG_SPHERE_MARCHING std::cout << "Sphere march between " << s << " and " << t << std::endl; #endif @@ -240,7 +240,7 @@ class Offset_intersection for(;;) { -#ifdef CGAL_AW2_DEBUG_SPHERE_MARCHING +#ifdef CGAL_AW3_DEBUG_SPHERE_MARCHING std::cout << "current point " << current_pt << std::endl; std::cout << "current dist " << current_dist << std::endl; #endif diff --git a/Alpha_wrap_3/test/Alpha_wrap_3/test_AW3_manifoldness.cpp b/Alpha_wrap_3/test/Alpha_wrap_3/test_AW3_manifoldness.cpp index 328931007304..2aa0d22bd257 100644 --- a/Alpha_wrap_3/test/Alpha_wrap_3/test_AW3_manifoldness.cpp +++ b/Alpha_wrap_3/test/Alpha_wrap_3/test_AW3_manifoldness.cpp @@ -4,6 +4,7 @@ //#define CGAL_AW3_DEBUG_STEINER_COMPUTATION //#define CGAL_AW3_DEBUG_INITIALIZATION //#define CGAL_AW3_DEBUG_QUEUE +#define CGAL_AW3_COMPUTE_AND_STORE_STEINER_INFO_AT_GATE_CREATION #include #include