diff --git a/.gitignore b/.gitignore index 0e72878b613..e1bfafd34af 100644 --- a/.gitignore +++ b/.gitignore @@ -428,60 +428,60 @@ Mesh_3/examples/Mesh_3/read_mesh Mesh_3/examples/Mesh_3/slivers_exuder Mesh_3/examples/Mesh_3/stat_mesh Mesh_3/examples/Mesh_3/test_off -Mesh_3/test/Mesh_3/*.cgal -Mesh_3/test/Mesh_3/*.maillage -Mesh_3/test/Mesh_3/*.mesh -Mesh_3/test/Mesh_3/*.off -Mesh_3/test/Mesh_3/*.out* -Mesh_3/test/Mesh_3/*.png -Mesh_3/test/Mesh_3/*.surface* -Mesh_3/test/Mesh_3/.*.deps -Mesh_3/test/Mesh_3/CTestTestfile.cmake -Mesh_3/test/Mesh_3/Makefile -Mesh_3/test/Mesh_3/a.lua -Mesh_3/test/Mesh_3/applications -Mesh_3/test/Mesh_3/cgal_test_with_cmake -Mesh_3/test/Mesh_3/cgal_to_medit -Mesh_3/test/Mesh_3/combined_spheres -Mesh_3/test/Mesh_3/combined_spheres-with-sphere-oracle -Mesh_3/test/Mesh_3/depends -Mesh_3/test/Mesh_3/display_distribution -Mesh_3/test/Mesh_3/filter_remove_tets_from_medit -Mesh_3/test/Mesh_3/lanteri -Mesh_3/test/Mesh_3/lanteri_output_tet_mesh -Mesh_3/test/Mesh_3/medit_to_cgal -Mesh_3/test/Mesh_3/multi_spheres -Mesh_3/test/Mesh_3/my_makefile -Mesh_3/test/Mesh_3/off_to_ghs -Mesh_3/test/Mesh_3/read_mesh -Mesh_3/test/Mesh_3/slivers_exuder -Mesh_3/test/Mesh_3/stat_mesh -Mesh_3/test/Mesh_3/test-tetgen.elem -Mesh_3/test/Mesh_3/test-tetgen.face -Mesh_3/test/Mesh_3/test-tetgen.node -Mesh_3/test/Mesh_3/test_backward_compatibility_MeshFoobarCriteria_3 -Mesh_3/test/Mesh_3/test_boost_has_xxx -Mesh_3/test/Mesh_3/test_c3t3 -Mesh_3/test/Mesh_3/test_c3t3_io -Mesh_3/test/Mesh_3/test_c3t3_with_features -Mesh_3/test/Mesh_3/test_criteria -Mesh_3/test/Mesh_3/test_domain_with_polyline_features -Mesh_3/test/Mesh_3/test_io_methods -Mesh_3/test/Mesh_3/test_mesh_criteria_creation -Mesh_3/test/Mesh_3/test_meshing_3D_image -Mesh_3/test/Mesh_3/test_meshing_implicit_function -Mesh_3/test/Mesh_3/test_meshing_polyhedron -Mesh_3/test/Mesh_3/test_meshing_polyhedron_with_features -Mesh_3/test/Mesh_3/test_meshing_polylines_only -Mesh_3/test/Mesh_3/test_off -Mesh_3/test/Mesh_3/test_robust_weighted_circumcenter +/Mesh_3/test/Mesh_3/a.lua +/Mesh_3/test/Mesh_3/applications +/Mesh_3/test/Mesh_3/*.cgal +/Mesh_3/test/Mesh_3/cgal_test_with_cmake +/Mesh_3/test/Mesh_3/cgal_to_medit +/Mesh_3/test/Mesh_3/combined_spheres +/Mesh_3/test/Mesh_3/combined_spheres-with-sphere-oracle +/Mesh_3/test/Mesh_3/CTestTestfile.cmake +/Mesh_3/test/Mesh_3/depends +/Mesh_3/test/Mesh_3/.*.deps +/Mesh_3/test/Mesh_3/display_distribution +/Mesh_3/test/Mesh_3/filter_remove_tets_from_medit +/Mesh_3/test/Mesh_3/lanteri +/Mesh_3/test/Mesh_3/lanteri_output_tet_mesh +/Mesh_3/test/Mesh_3/*.maillage +/Mesh_3/test/Mesh_3/Makefile +/Mesh_3/test/Mesh_3/medit_to_cgal +/Mesh_3/test/Mesh_3/*.mesh +/Mesh_3/test/Mesh_3/multi_spheres +/Mesh_3/test/Mesh_3/my_makefile +/Mesh_3/test/Mesh_3/*.off +/Mesh_3/test/Mesh_3/off_to_ghs +/Mesh_3/test/Mesh_3/*.out* +/Mesh_3/test/Mesh_3/*.png +/Mesh_3/test/Mesh_3/read_mesh +/Mesh_3/test/Mesh_3/slivers_exuder +/Mesh_3/test/Mesh_3/stat_mesh +/Mesh_3/test/Mesh_3/*.surface* /Mesh_3/test/Mesh_3/test_backward_compatibility +/Mesh_3/test/Mesh_3/test_backward_compatibility_MeshFoobarCriteria_3 +/Mesh_3/test/Mesh_3/test_boost_has_xxx +/Mesh_3/test/Mesh_3/test_c3t3 /Mesh_3/test/Mesh_3/test_c3t3_extract_subdomains_boundaries +/Mesh_3/test/Mesh_3/test_c3t3_io +/Mesh_3/test/Mesh_3/test_c3t3_with_features +/Mesh_3/test/Mesh_3/test_criteria +/Mesh_3/test/Mesh_3/test_domain_with_polyline_features /Mesh_3/test/Mesh_3/test_implicit_multi_domain_to_labeling_function_wrapper +/Mesh_3/test/Mesh_3/test_io_methods /Mesh_3/test/Mesh_3/test_labeled_mesh_domain_3 /Mesh_3/test/Mesh_3/test_mesh_3_implicit_vector_to_labeled_function_wrapper /Mesh_3/test/Mesh_3/test_mesh_3_labeled_mesh_domain_3 +/Mesh_3/test/Mesh_3/test_mesh_criteria_creation /Mesh_3/test/Mesh_3/test_meshing_3D_gray_image +/Mesh_3/test/Mesh_3/test_meshing_3D_image +/Mesh_3/test/Mesh_3/test_meshing_implicit_function +/Mesh_3/test/Mesh_3/test_meshing_polyhedron +/Mesh_3/test/Mesh_3/test_meshing_polyhedron_with_features +/Mesh_3/test/Mesh_3/test_meshing_polylines_only +/Mesh_3/test/Mesh_3/test_off +/Mesh_3/test/Mesh_3/test_robust_weighted_circumcenter +/Mesh_3/test/Mesh_3/test-tetgen.elem +/Mesh_3/test/Mesh_3/test-tetgen.face +/Mesh_3/test/Mesh_3/test-tetgen.node Min_annulus_d/*.aux Min_annulus_d/*.bbl Min_annulus_d/*.blg diff --git a/Installation/changes.html b/Installation/changes.html index 8488bf06e9d..3bdc0c58f81 100644 --- a/Installation/changes.html +++ b/Installation/changes.html @@ -171,6 +171,9 @@ and src/ directories).

3D Mesh Generation

diff --git a/Mesh_3/doc/Mesh_3/CGAL/refine_mesh_3.h b/Mesh_3/doc/Mesh_3/CGAL/refine_mesh_3.h index 481d8fc2de2..05d32314ea4 100644 --- a/Mesh_3/doc/Mesh_3/CGAL/refine_mesh_3.h +++ b/Mesh_3/doc/Mesh_3/CGAL/refine_mesh_3.h @@ -288,7 +288,7 @@ and the user does not want corners and curve segments to be accurately represented in the mesh. -Return a `Features_options` value that prevents the mesh generator +Returns a `Features_options` value that prevents the mesh generator to take into account 0 and 1-dimensional input features. \sa `CGAL::make_mesh_3()` diff --git a/Mesh_3/doc/Mesh_3/Concepts/IntersectionGeometricTraits_3.h b/Mesh_3/doc/Mesh_3/Concepts/IntersectionGeometricTraits_3.h index 1525a372d8f..f54104d4ce4 100644 --- a/Mesh_3/doc/Mesh_3/Concepts/IntersectionGeometricTraits_3.h +++ b/Mesh_3/doc/Mesh_3/Concepts/IntersectionGeometricTraits_3.h @@ -43,7 +43,7 @@ Partial model of `::Kernel::DoIntersect_3`. Provides the operators: - `bool operator()(Triangle_3 tr, Segment_3 seg)` -which return `true`, iff the triangle and the segment +which returns `true`, iff the triangle and the segment have a non empty intersection. */ typedef unspecified_type Do_intersect_3; diff --git a/Mesh_3/doc/Mesh_3/Concepts/MeshDomain_3.h b/Mesh_3/doc/Mesh_3/Concepts/MeshDomain_3.h index e91c09e2a4b..23923535102 100644 --- a/Mesh_3/doc/Mesh_3/Concepts/MeshDomain_3.h +++ b/Mesh_3/doc/Mesh_3/Concepts/MeshDomain_3.h @@ -108,7 +108,7 @@ Assignable, DefaultConstructible and EqualityComparable. typedef unspecified_type Index; /*! -Return type of `Construct_intersection` queries. +Returns type of `Construct_intersection` queries. `int` represents the dimension of the lower dimensional face of the input complex on which the intersection point lies and `%Index` is the index of this face. @@ -178,6 +178,15 @@ typedef unspecified_type Construct_intersection; /// @} +/// \name Bounding box +/// Since CGAL-4.8, a model of `MeshDomain_3` must provide a function +/// providing a bounding box of the domain. +/// @{ + +/// Returns a bounding box of the domain +Bbox_3 bbox() const; +/// @} + /// \name Operations /// The following functions give access to the function objects: /// @{ diff --git a/Mesh_3/include/CGAL/Implicit_mesh_domain_3.h b/Mesh_3/include/CGAL/Implicit_mesh_domain_3.h index 5adbe5b7e30..1801e8b3729 100644 --- a/Mesh_3/include/CGAL/Implicit_mesh_domain_3.h +++ b/Mesh_3/include/CGAL/Implicit_mesh_domain_3.h @@ -74,7 +74,7 @@ public: /// Destructor virtual ~Implicit_mesh_domain_3() {} - + using Base::bbox; private: // Disabled copy constructor & assignment operator typedef Implicit_mesh_domain_3 Self; diff --git a/Mesh_3/include/CGAL/Labeled_image_mesh_domain_3.h b/Mesh_3/include/CGAL/Labeled_image_mesh_domain_3.h index 19513ebad7c..c3c0f25e245 100644 --- a/Mesh_3/include/CGAL/Labeled_image_mesh_domain_3.h +++ b/Mesh_3/include/CGAL/Labeled_image_mesh_domain_3.h @@ -81,6 +81,7 @@ public: /// Destructor virtual ~Labeled_image_mesh_domain_3() {} + using Base::bbox; private: /// Returns a box enclosing image \c im diff --git a/Mesh_3/include/CGAL/Labeled_mesh_domain_3.h b/Mesh_3/include/CGAL/Labeled_mesh_domain_3.h index f7924b68188..7d85d1bad97 100644 --- a/Mesh_3/include/CGAL/Labeled_mesh_domain_3.h +++ b/Mesh_3/include/CGAL/Labeled_mesh_domain_3.h @@ -142,6 +142,13 @@ public: return Construct_initial_points(*this); } + /** + * Returns a bounding box of the domain + */ + Bbox_3 bbox() const { + return bbox_.bbox(); + } + /** * Returns true if point~\ccc{p} is in the domain. If \ccc{p} is in the * domain, the parameter index is set to the index of the subdomain diff --git a/Mesh_3/include/CGAL/Mesh_3/Labeled_mesh_domain_3.h b/Mesh_3/include/CGAL/Mesh_3/Labeled_mesh_domain_3.h index 39713d977c6..52e4c47cbc7 100644 --- a/Mesh_3/include/CGAL/Mesh_3/Labeled_mesh_domain_3.h +++ b/Mesh_3/include/CGAL/Mesh_3/Labeled_mesh_domain_3.h @@ -118,6 +118,13 @@ public: delete p_rng_; } + /** + * Returns a bounding box of the domain + */ + Bbox_3 bbox() const { + return this->bbox_.bbox(); + } + /** * Constructs a set of \ccc{n} points on the surface, and output them to * the output iterator \ccc{pts} whose value type is required to be diff --git a/Mesh_3/include/CGAL/Mesh_3/Mesher_3.h b/Mesh_3/include/CGAL/Mesh_3/Mesher_3.h index b9ef1c603c8..04a236ab8a4 100644 --- a/Mesh_3/include/CGAL/Mesh_3/Mesher_3.h +++ b/Mesh_3/include/CGAL/Mesh_3/Mesher_3.h @@ -484,27 +484,11 @@ initialize() #if defined(CGAL_LINKED_WITH_TBB) || \ defined(CGAL_SEQUENTIAL_MESH_3_ADD_OUTSIDE_POINTS_ON_A_FAR_SPHERE) - Bbox_3 estimated_bbox; - CGAL_assertion_code(bool is_estimated_bbox_initialized = false); - #ifndef CGAL_SEQUENTIAL_MESH_3_ADD_OUTSIDE_POINTS_ON_A_FAR_SPHERE if(boost::is_convertible::value) #endif // If that macro is defined, then estimated_bbox must be initialized { - typedef std::vector > Points_vector; - Points_vector random_points_on_surface; - r_oracle_.construct_initial_points_object()( - std::back_inserter(random_points_on_surface), 1000); - typename Points_vector::const_iterator - it = random_points_on_surface.begin(), - it_end = random_points_on_surface.end(); - estimated_bbox = it->first.bbox(); - ++it; - for( ; it != it_end ; ++it) - estimated_bbox = estimated_bbox + it->first.bbox(); - - Base::set_bbox(estimated_bbox); - CGAL_assertion_code(is_estimated_bbox_initialized = true); + Base::set_bbox(r_oracle_.bbox()); } #endif // CGAL_LINKED_WITH_TBB||"sequential use far sphere" @@ -523,8 +507,7 @@ initialize() if (r_c3t3_.number_of_far_points() == 0 && r_c3t3_.number_of_facets() == 0) { - CGAL_assertion(is_estimated_bbox_initialized); - const Bbox_3 &bbox = estimated_bbox; + const Bbox_3 &bbox = r_oracle_.bbox(); // Compute radius for far sphere const double xdelta = bbox.xmax()-bbox.xmin(); diff --git a/Mesh_3/include/CGAL/Polyhedral_mesh_domain_3.h b/Mesh_3/include/CGAL/Polyhedral_mesh_domain_3.h index 5e37b177149..13ffb75e30d 100644 --- a/Mesh_3/include/CGAL/Polyhedral_mesh_domain_3.h +++ b/Mesh_3/include/CGAL/Polyhedral_mesh_domain_3.h @@ -367,6 +367,14 @@ public: } + /** + * Returns a bounding box of the domain + */ + Bbox_3 bbox() const { + return tree_.bbox(); + } + + /** * Returns true if point~\ccc{p} is in the domain. If \ccc{p} is in the * domain, the parameter index is set to the index of the subdomain