diff --git a/.gitattributes b/.gitattributes index 35a3066ee9c..ccb9bc4d4b5 100644 --- a/.gitattributes +++ b/.gitattributes @@ -18,7 +18,6 @@ *.js text *.hmtl text *.bib text -*.sh text *.css text *.ui text *.qrc text @@ -36,6 +35,7 @@ *.pdb text # Declare files that will always have LF line endings on checkout. +*.sh text eol=lf Documentation/Doxyfile text eol=lf Documentation/pkglist_filter text eol=lf Installation/update_CHANGES text eol=lf diff --git a/.travis.yml b/.travis.yml index 67ef61cbf57..2c2fe62d3f4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -49,10 +49,10 @@ env: - PACKAGE='Surface_mesh_parameterization Surface_mesh_segmentation Surface_mesh_shortest_path ' - PACKAGE='Surface_mesh_simplification Surface_mesh_skeletonization Surface_mesh_topology ' - PACKAGE='Surface_mesher Surface_sweep_2 TDS_2 ' - - PACKAGE='TDS_3 Testsuite Three ' - - PACKAGE='Triangulation Triangulation_2 Triangulation_3 ' - - PACKAGE='Union_find Visibility_2 Voronoi_diagram_2 ' - - PACKAGE='wininst ' + - PACKAGE='TDS_3 Testsuite Tetrahedral_remeshing ' + - PACKAGE='Three Triangulation Triangulation_2 ' + - PACKAGE='Triangulation_3 Union_find Visibility_2 ' + - PACKAGE='Voronoi_diagram_2 wininst ' compiler: clang install: - echo "$PWD" diff --git a/.travis/packages.txt b/.travis/packages.txt index 69e4f85c73a..6e75cd0ad14 100644 --- a/.travis/packages.txt +++ b/.travis/packages.txt @@ -129,6 +129,7 @@ Surface_sweep_2 TDS_2 TDS_3 Testsuite +Tetrahedral_remeshing Three Triangulation Triangulation_2 diff --git a/AABB_tree/demo/AABB_tree/Scene.cpp b/AABB_tree/demo/AABB_tree/Scene.cpp index b28368d39a6..69ba683a21b 100644 --- a/AABB_tree/demo/AABB_tree/Scene.cpp +++ b/AABB_tree/demo/AABB_tree/Scene.cpp @@ -45,8 +45,7 @@ Scene::Scene() m_blue_ramp.build_blue(); m_max_distance_function = (FT)0.0; texture = new Texture(m_grid_size,m_grid_size); - startTimer(0); - ready_to_cut = false; + ready_to_cut = true; are_buffers_initialized = false; gl_init = false; @@ -519,6 +518,7 @@ void Scene::changed() compute_elements(_UNSIGNED); else compute_elements(_SIGNED); + ready_to_cut=false; are_buffers_initialized = false; } @@ -1226,12 +1226,16 @@ void Scene::cut_segment_plane() m_cut_plane = CUT_SEGMENTS; changed(); } +void Scene::updateCutPlane() +{ + ready_to_cut = true; + QTimer::singleShot(0,this,SLOT(cutting_plane())); +} void Scene::cutting_plane(bool override) { if(ready_to_cut || override) { - ready_to_cut = false; switch( m_cut_plane ) { case UNSIGNED_FACETS: @@ -1304,13 +1308,13 @@ void Scene::refine_loop() void Scene::activate_cutting_plane() { - connect(m_frame, SIGNAL(modified()), this, SLOT(cutting_plane())); + connect(m_frame, SIGNAL(modified()), this, SLOT(updateCutPlane())); m_view_plane = true; } void Scene::deactivate_cutting_plane() { - disconnect(m_frame, SIGNAL(modified()), this, SLOT(cutting_plane())); + disconnect(m_frame, SIGNAL(modified()), this, SLOT(updateCutPlane())); m_view_plane = false; } void Scene::initGL() @@ -1326,10 +1330,3 @@ void Scene::initGL() compile_shaders(); gl_init = true; } - -void Scene::timerEvent(QTimerEvent *) -{ - if(manipulatedFrame()->isSpinning()) - set_fast_distance(true); - ready_to_cut = true; -} diff --git a/AABB_tree/demo/AABB_tree/Scene.h b/AABB_tree/demo/AABB_tree/Scene.h index 4e9fabd735b..95ea74cdc33 100644 --- a/AABB_tree/demo/AABB_tree/Scene.h +++ b/AABB_tree/demo/AABB_tree/Scene.h @@ -173,6 +173,8 @@ private: void attrib_buffers(CGAL::QGLViewer*); void compile_shaders(); void compute_texture(int, int, Color_ramp, Color_ramp); +private slots: + void updateCutPlane(); public: // file menu @@ -251,8 +253,6 @@ public: void activate_cutting_plane(); void deactivate_cutting_plane(); - //timer sends a top when all the events are finished - void timerEvent(QTimerEvent *); public slots: diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_X_trapezoid.h b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_X_trapezoid.h index a52f91db9d2..e7202ffe935 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_X_trapezoid.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_X_trapezoid.h @@ -142,7 +142,7 @@ public: private: - Trpz_parameter_space* ptr() const { return (Trpz_parameter_space*)(PTR.p); } + Trpz_parameter_space* ptr() const { return (Trpz_parameter_space*)(PTR); } #ifndef CGAL_TD_DEBUG @@ -323,7 +323,7 @@ public: { //define the initial trapezoid: left, right, btm, top are at infinity. // its type is TD_TRAPEZOID ,it is on all boundaries, and has no neighbours - PTR.p = new Trpz_parameter_space + PTR = new Trpz_parameter_space (Traits::vtx_at_left_infinity(), Traits::vtx_at_right_infinity(), Traits::he_at_bottom_infinity(), @@ -353,7 +353,7 @@ public: else //tp == TD_VERTEX type_flag |= CGAL_TD_VERTEX; - PTR.p = new Trpz_parameter_space + PTR = new Trpz_parameter_space (l, r, b, t, type_flag | boundness_flag, lb, lt, rb, rt); m_dag_node = node; } @@ -370,7 +370,7 @@ public: Self* rb = 0, Self* rt = 0, Dag_node* node = 0) { - PTR.p = new Trpz_parameter_space + PTR = new Trpz_parameter_space (l ? *l : Traits::vtx_at_left_infinity(), r ? *r : Traits::vtx_at_right_infinity(), b ? *b : Traits::he_at_bottom_infinity(), @@ -436,7 +436,7 @@ public: /*! Access the trapezoid id (PTR). */ CGAL_TD_INLINE unsigned long id() const { - return (unsigned long) PTR.p; + return (unsigned long) PTR; } /*! Access trapezoid left. */ diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_active_edge.h b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_active_edge.h index 2cdeee6bca5..61259f33547 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_active_edge.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_active_edge.h @@ -135,7 +135,7 @@ public: private: - Data* ptr() const { return (Data*)(PTR.p); } + Data* ptr() const { return (Data*)(PTR); } #ifndef CGAL_TD_DEBUG @@ -194,7 +194,7 @@ public: Td_active_edge () { - PTR.p = new Data + PTR = new Data (Traits::empty_he_handle(), Td_map_item(0), nullptr); //m_dag_node = nullptr; } @@ -204,7 +204,7 @@ public: boost::optional next = boost::none) { - PTR.p = new Data(he, (next) ? *next : Td_map_item(0), node); + PTR = new Data(he, (next) ? *next : Td_map_item(0), node); //m_dag_node = node; } @@ -261,7 +261,7 @@ public: /*! Access the trapezoid id (PTR). */ CGAL_TD_INLINE unsigned long id() const { - return (unsigned long) PTR.p; + return (unsigned long) PTR; } diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_active_fictitious_vertex.h b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_active_fictitious_vertex.h index 6bfb3d5e6f2..b75de1b9d97 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_active_fictitious_vertex.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_active_fictitious_vertex.h @@ -129,7 +129,7 @@ public: }; private: - Data* ptr() const { return (Data*)(PTR.p); } + Data* ptr() const { return (Data*)(PTR); } Curve_end vtx_to_ce(Vertex_const_handle v) const { @@ -180,14 +180,14 @@ public: Td_active_fictitious_vertex() { - PTR.p = new Data(Traits::empty_vtx_handle(), Traits::empty_he_handle(), nullptr); + PTR = new Data(Traits::empty_vtx_handle(), Traits::empty_he_handle(), nullptr); } /*! Constructor given Vertex & Halfedge handles. */ Td_active_fictitious_vertex(Vertex_const_handle v, Halfedge_const_handle cw_he, Dag_node* node = 0) - { PTR.p = new Data(v, cw_he, node); } + { PTR = new Data(v, cw_he, node); } /*! Copy constructor. */ @@ -224,7 +224,7 @@ public: inline const Self& self() const { return *this; } /*! Access the trapezoid id (PTR). */ - inline unsigned long id() const { return (unsigned long) PTR.p; } + inline unsigned long id() const { return (unsigned long) PTR; } /*! Access trapezoid left. * filters out the infinite case which returns predefined dummy values diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_active_trapezoid.h b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_active_trapezoid.h index 2b565adba74..8b92b739626 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_active_trapezoid.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_active_trapezoid.h @@ -144,7 +144,7 @@ public: private: - Data* ptr() const { return (Data*)(PTR.p); } + Data* ptr() const { return (Data*)(PTR); } public: @@ -255,7 +255,7 @@ private: { //define the initial trapezoid: left, right, btm, top are at infinity. // has no neighbours - PTR.p = new Data + PTR = new Data (Traits::empty_vtx_handle(), Traits::empty_vtx_handle(), Traits::empty_he_handle(), @@ -274,7 +274,7 @@ private: boost::optional rt = boost::none, Dag_node* node = 0) { - PTR.p = new Data (l, r, b, t, (lb) ? *lb : Td_map_item(0), (lt) ? *lt : Td_map_item(0), + PTR = new Data (l, r, b, t, (lb) ? *lb : Td_map_item(0), (lt) ? *lt : Td_map_item(0), (rb) ? *rb : Td_map_item(0), (rt) ? *rt : Td_map_item(0), node); //m_dag_node = node; } @@ -332,7 +332,7 @@ private: /*! Access the trapezoid id (PTR). */ inline unsigned long id() const { - return (unsigned long) PTR.p; + return (unsigned long) PTR; } /*! Access trapezoid left. diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_active_vertex.h b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_active_vertex.h index de4000ebfd9..3b3e86aa0c6 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_active_vertex.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_active_vertex.h @@ -134,7 +134,7 @@ public: }; private: - Data* ptr() const { return (Data*)(PTR.p); } + Data* ptr() const { return (Data*)(PTR); } Curve_end vtx_to_ce(Vertex_const_handle v) const { @@ -184,14 +184,14 @@ public: Td_active_vertex() { - PTR.p = new Data(Traits::empty_vtx_handle(), Traits::empty_he_handle(), nullptr); + PTR = new Data(Traits::empty_vtx_handle(), Traits::empty_he_handle(), nullptr); } /*! Constructor given Vertex & Halfedge handles. */ Td_active_vertex(Vertex_const_handle v, Halfedge_const_handle cw_he, Dag_node* node = 0) - { PTR.p = new Data(v, cw_he, node); } + { PTR = new Data(v, cw_he, node); } /*! Copy constructor. */ @@ -228,7 +228,7 @@ public: inline const Self& self() const { return *this; } /*! Access the trapezoid id (PTR). */ - inline unsigned long id() const { return (unsigned long) PTR.p; } + inline unsigned long id() const { return (unsigned long) PTR; } inline Vertex_const_handle vertex() const { return ptr()->v; } diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_dag.h b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_dag.h index e5eee91e724..f8a47536c85 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_dag.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_dag.h @@ -41,14 +41,14 @@ public: //iddo (for CC-7.2) maybe protected? typedef const T & const_reference; protected: - void init() { PTR.p = 0; } + void init() { PTR = 0; } public: Td_dag_base() {init();} Td_dag_base(const Td_dag_base & x) : Handle(x) {} Td_dag_base & operator=(const Td_dag_base & x) {Handle::operator=(x); return *this; } - bool operator!() const { return PTR.p == 0; } + bool operator!() const { return PTR == 0; } }; template @@ -96,9 +96,9 @@ public: Td_dag(){} Td_dag(const Td_dag_handle& dag):Td_dag_handle(dag){} Td_dag(const Self& dag):Td_dag_handle(dag){} - Td_dag(const T& rootValue){PTR.p = new node(rootValue);} + Td_dag(const T& rootValue){PTR = new node(rootValue);} Td_dag(const T& rootValue, const Self& left, const Self& right) - {PTR.p = new node(rootValue, left, right); rebalance_depth();} + {PTR = new node(rootValue, left, right); rebalance_depth();} ~Td_dag(){} /* --------information retrieval -------*/ @@ -145,7 +145,7 @@ public: } bool operator==(const Self& b) const { - return PTR.p==b.PTR.p; + return PTR==b.PTR; } bool operator!=(const Self& b) const { @@ -189,7 +189,7 @@ public: // detach left son,redirect to dummy set_left(dummy); // set left son pointer to 0 - ptr()->leftPtr.PTR.p=0; + ptr()->leftPtr.PTR=0; // delete dummy Td_dag delete dummy.ptr(); } @@ -204,7 +204,7 @@ public: // detach right son,redirect to dummy set_right(dummy); // set right son pointer to 0 - ptr()->rightPtr.PTR.p=0; + ptr()->rightPtr.PTR=0; // delete dummy Td_dag delete dummy.ptr(); } @@ -371,7 +371,7 @@ protected: } #endif private: - node* ptr() const {return (node*)PTR.p;} + node* ptr() const {return (node*)PTR;} }; template @@ -441,7 +441,7 @@ template std::ostream& operator<<(std::ostream& out, tech notes: The code is Handle designed. left(),right() are designed to cope with Handle(Handle& x) - precondition x.PTR.p!=0 + precondition x.PTR!=0 operator=() performs shallow copy operator*() returns data type output is done as a binary tree. diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_dag_node.h b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_dag_node.h index bbf45831519..ec4a961d8f1 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_dag_node.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_dag_node.h @@ -39,7 +39,7 @@ template class Td_dag_node_base : public Handle { protected: - void init() { PTR.p = 0; } //MICHAL: I think it is not used - so need to be removed + void init() { PTR = 0; } //MICHAL: I think it is not used - so need to be removed public: //c'tors @@ -57,12 +57,12 @@ public: return *this; } - //bool operator!() const { return PTR.p == 0; } //MICHAL: maybe use ptr(), and also can change to is_null or something similar - bool is_null() const { return PTR.p == 0; } - Rep * ptr() const { return (Rep*) PTR.p; } + //bool operator!() const { return PTR == 0; } //MICHAL: maybe use ptr(), and also can change to is_null or something similar + bool is_null() const { return PTR == 0; } + Rep * ptr() const { return (Rep*) PTR; } protected: - //Rep *& ptr() { return (Rep*) PTR.p; } - void set_ptr(Rep* rep) { PTR.p = rep; } + //Rep *& ptr() { return (Rep*) PTR; } + void set_ptr(Rep* rep) { PTR = rep; } }; @@ -94,7 +94,7 @@ public: #ifndef CGAL_CFG_USING_BASE_MEMBER_BUG_2 public: - //using Td_dag_node_handle::PTR.p; + //using Td_dag_node_handle::PTR; //using Td_dag_node_handle::operator!; #endif //CGAL_CFG_USING_BASE_MEMBER_BUG_2 @@ -549,7 +549,7 @@ protected: private: - Node* node() const { return (Node*)Base::PTR.p; } + Node* node() const { return (Node*)Base::PTR; } }; @@ -629,7 +629,7 @@ std::ostream& operator<< (std::ostream& out, tech notes: The code is Handle designed. left_child(),right_child() are designed to cope with Handle(Handle& x) - precondition x.PTR.p!=0 + precondition x.PTR!=0 operator=() performs shallow copy operator*() returns data type output is done as a binary tree. diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_inactive_edge.h b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_inactive_edge.h index 0d85f93f148..bb57f7c6d1c 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_inactive_edge.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_inactive_edge.h @@ -128,7 +128,7 @@ public: private: - Data* ptr() const { return (Data*)(PTR.p); } + Data* ptr() const { return (Data*)(PTR); } #ifndef CGAL_TD_DEBUG @@ -161,7 +161,7 @@ public: /*! Constructor given Vertex & Halfedge handles. */ Td_inactive_edge (boost::shared_ptr& cv, Dag_node* node = nullptr) { - PTR.p = new Data(cv,node); + PTR = new Data(cv,node); } /*! Copy constructor. */ @@ -215,7 +215,7 @@ public: /*! Access the trapezoid id (PTR). */ inline unsigned long id() const { - return (unsigned long) PTR.p; + return (unsigned long) PTR; } inline X_monotone_curve_2& curve() const diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_inactive_fictitious_vertex.h b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_inactive_fictitious_vertex.h index cf2d75d79ec..03ca8d563c7 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_inactive_fictitious_vertex.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_inactive_fictitious_vertex.h @@ -133,7 +133,7 @@ public: private: - Data* ptr() const { return (Data*)(PTR.p); } + Data* ptr() const { return (Data*)(PTR); } Curve_end vtx_to_ce(Vertex_const_handle v) const { @@ -185,7 +185,7 @@ public: { Curve_end v_ce(vtx_to_ce(v_before_rem)); - PTR.p = new Data( v_ce.cv(), v_ce.ce(), node); + PTR = new Data( v_ce.cv(), v_ce.ce(), node); } @@ -241,7 +241,7 @@ public: /*! Access the trapezoid id (PTR). */ inline unsigned long id() const { - return (unsigned long) PTR.p; + return (unsigned long) PTR; } diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_inactive_vertex.h b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_inactive_vertex.h index 0c42b1e7669..409a6f576ee 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_inactive_vertex.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_inactive_vertex.h @@ -127,7 +127,7 @@ public: private: - Data* ptr() const { return (Data*)(PTR.p); } + Data* ptr() const { return (Data*)(PTR); } #ifndef CGAL_TD_DEBUG @@ -162,7 +162,7 @@ public: /*! Constructor given Vertex & Halfedge handles. */ Td_inactive_vertex (Vertex_const_handle v_before_rem, Dag_node* node = nullptr) { - PTR.p = new Data(v_before_rem->point(), node); + PTR = new Data(v_before_rem->point(), node); } @@ -217,7 +217,7 @@ public: /*! Access the trapezoid id (PTR). */ inline unsigned long id() const { - return (unsigned long) PTR.p; + return (unsigned long) PTR; } inline Point& point() const diff --git a/BGL/include/CGAL/boost/graph/parameters_interface.h b/BGL/include/CGAL/boost/graph/parameters_interface.h index aa6845ab917..75acf6a7b0d 100644 --- a/BGL/include/CGAL/boost/graph/parameters_interface.h +++ b/BGL/include/CGAL/boost/graph/parameters_interface.h @@ -178,6 +178,12 @@ CGAL_add_named_parameter(with_dihedral_angle_t, with_dihedral_angle, with_dihedr CGAL_add_named_parameter(optimize_anchor_location_t, optimize_anchor_location, optimize_anchor_location) CGAL_add_named_parameter(pca_plane_t, pca_plane, pca_plane) +// tetrahedral remeshing parameters +CGAL_add_named_parameter(remesh_boundaries_t, remesh_boundaries, remesh_boundaries) +CGAL_add_named_parameter(cell_selector_t, cell_selector, cell_selector) +CGAL_add_named_parameter(facet_is_constrained_t, facet_is_constrained, facet_is_constrained_map) +CGAL_add_named_parameter(remeshing_visitor_t, remeshing_visitor, remeshing_visitor) + // output parameters CGAL_add_named_parameter(face_proxy_map_t, face_proxy_map, face_proxy_map) CGAL_add_named_parameter(proxies_t, proxies, proxies) diff --git a/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/Polygon_2_curve_iterator.h b/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/Polygon_2_curve_iterator.h index 39a5e7dd34a..833f9afd571 100644 --- a/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/Polygon_2_curve_iterator.h +++ b/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/Polygon_2_curve_iterator.h @@ -60,9 +60,9 @@ public: Edge_const_iterator m_curr_edge; // points to the current edge iterator public: - Polygon_2_curve_iterator< X_monotone_curve_2_, Polygon_ >(){} + Polygon_2_curve_iterator(){} - Polygon_2_curve_iterator< X_monotone_curve_2_, Polygon_ > + Polygon_2_curve_iterator (const Polygon* pgn, Edge_const_iterator ci) : m_pgn(pgn), m_curr_edge(ci) {} diff --git a/Boolean_set_operations_2/include/CGAL/Gps_circle_segment_traits_2.h b/Boolean_set_operations_2/include/CGAL/Gps_circle_segment_traits_2.h index 1d29214e267..4b88536cf14 100644 --- a/Boolean_set_operations_2/include/CGAL/Gps_circle_segment_traits_2.h +++ b/Boolean_set_operations_2/include/CGAL/Gps_circle_segment_traits_2.h @@ -27,7 +27,7 @@ class Gps_circle_segment_traits_2 : public Gps_traits_2 > { public: - Gps_circle_segment_traits_2(bool use_cache = false) : + Gps_circle_segment_traits_2(bool use_cache = false) : Gps_traits_2 >() { this->m_use_cache = use_cache; diff --git a/Bounding_volumes/examples/Approximate_min_ellipsoid_d/CMakeLists.txt b/Bounding_volumes/examples/Approximate_min_ellipsoid_d/CMakeLists.txt index 5ea12f55be3..9c066bd6cf4 100644 --- a/Bounding_volumes/examples/Approximate_min_ellipsoid_d/CMakeLists.txt +++ b/Bounding_volumes/examples/Approximate_min_ellipsoid_d/CMakeLists.txt @@ -8,15 +8,18 @@ if ( CGAL_FOUND ) # Use Eigen find_package(Eigen3 3.1.0 QUIET) #(3.1.0 or greater) + include(CGAL_Eigen_support) # create a target per cppfile file(GLOB cppfiles RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*.cpp) foreach(cppfile ${cppfiles}) - if(NOT (${cppfile} STREQUAL "ellipsoid.cpp") OR EIGEN3_FOUND) - create_single_source_cgal_program( "${cppfile}" ) - if (EIGEN3_FOUND) - get_filename_component(target ${cppfile} NAME_WE) - CGAL_target_use_Eigen(${target}) + if(NOT (${cppfile} STREQUAL "ellipsoid.cpp") OR TARGET CGAL::Eigen_support) + get_filename_component(target ${cppfile} NAME_WE) + add_executable(${target} ${cppfile}) + if (TARGET CGAL::Eigen_support) + target_link_libraries(${target} CGAL::CGAL CGAL::Eigen_support) + else() + target_link_libraries(${target} CGAL::CGAL) endif() endif() endforeach() @@ -26,4 +29,3 @@ else() message(STATUS "This program requires the CGAL library, and will not be compiled.") endif() - diff --git a/Bounding_volumes/test/Bounding_volumes/CMakeLists.txt b/Bounding_volumes/test/Bounding_volumes/CMakeLists.txt index 804517aea26..5a29e19f887 100644 --- a/Bounding_volumes/test/Bounding_volumes/CMakeLists.txt +++ b/Bounding_volumes/test/Bounding_volumes/CMakeLists.txt @@ -14,15 +14,18 @@ if ( CGAL_FOUND ) # Use Eigen find_package(Eigen3 3.1.0 QUIET) #(3.1.0 or greater) + include(CGAL_Eigen_support) # create a target per cppfile file(GLOB cppfiles RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*.cpp) foreach(cppfile ${cppfiles}) - if(NOT (${cppfile} STREQUAL "Approximate_min_ellipsoid_d.cpp") OR EIGEN3_FOUND) - create_single_source_cgal_program( "${cppfile}" ) - if (EIGEN3_FOUND) - get_filename_component(target ${cppfile} NAME_WE) - CGAL_target_use_Eigen(${target}) + if(NOT (${cppfile} STREQUAL "Approximate_min_ellipsoid_d.cpp") OR TARGET CGAL::Eigen_support) + get_filename_component(target ${cppfile} NAME_WE) + add_executable(${target} ${cppfile}) + if (TARGET CGAL::Eigen_support) + target_link_libraries(${target} CGAL::CGAL CGAL::Eigen_support) + else() + target_link_libraries(${target} CGAL::CGAL) endif() endif() endforeach() @@ -32,4 +35,3 @@ else() message(STATUS "This program requires the CGAL library, and will not be compiled.") endif() - diff --git a/Box_intersection_d/test/Box_intersection_d/CMakeLists.txt b/Box_intersection_d/test/Box_intersection_d/CMakeLists.txt index 6f4ec1704ce..de7955c4208 100644 --- a/Box_intersection_d/test/Box_intersection_d/CMakeLists.txt +++ b/Box_intersection_d/test/Box_intersection_d/CMakeLists.txt @@ -8,6 +8,7 @@ project( Box_intersection_d_Tests ) find_package( CGAL QUIET ) find_package( TBB ) +include(CGAL_TBB_support) if ( CGAL_FOUND ) @@ -16,12 +17,11 @@ if ( CGAL_FOUND ) create_single_source_cgal_program( "random_set_test.cpp" ) create_single_source_cgal_program( "test_box_grid.cpp" ) - if( TBB_FOUND ) - CGAL_target_use_TBB( test_box_grid ) + if(TARGET CGAL::TBB_support) + target_link_libraries(test_box_grid PUBLIC CGAL::TBB_support) else() message( STATUS "NOTICE: Intel TBB was not found. Sequential code will be used." ) endif() else() message(STATUS "This program requires the CGAL library, and will not be compiled.") endif() - diff --git a/CGAL_ipelets/demo/CGAL_ipelets/CMakeLists.txt b/CGAL_ipelets/demo/CGAL_ipelets/CMakeLists.txt index 18e2f342352..6e6749d8619 100644 --- a/CGAL_ipelets/demo/CGAL_ipelets/CMakeLists.txt +++ b/CGAL_ipelets/demo/CGAL_ipelets/CMakeLists.txt @@ -27,7 +27,8 @@ if ( CGAL_FOUND ) include(${CGAL_USE_FILE}) find_package(Eigen3 3.1.0) #(requires 3.1.0 or greater) - if (NOT EIGEN3_FOUND) + include(CGAL_Eigen_support) + if (NOT TARGET CGAL::Eigen_support) message(STATUS "NOTICE: This project requires the Eigen library, and will not be compiled.") return() endif() @@ -140,8 +141,7 @@ if ( CGAL_FOUND ) foreach(IPELET ${CGAL_IPELETS}) add_library(CGAL_${IPELET} MODULE ${IPELET}.cpp) add_to_cached_list(CGAL_EXECUTABLE_TARGETS CGAL_${IPELET}) - target_link_libraries(CGAL_${IPELET} PRIVATE CGAL::CGAL ${IPE_LIBRARIES}) - CGAL_target_use_Eigen(CGAL_${IPELET}) + target_link_libraries(CGAL_${IPELET} PRIVATE CGAL::CGAL CGAL::Eigen_support ${IPE_LIBRARIES}) if ( IPELET_INSTALL_DIR ) install(TARGETS CGAL_${IPELET} DESTINATION ${IPELET_INSTALL_DIR}) if (WITH_IPE_7) @@ -151,14 +151,12 @@ if ( CGAL_FOUND ) cgal_add_compilation_test(CGAL_${IPELET}) endforeach(IPELET) if(CGAL_Core_FOUND) - target_link_libraries(CGAL_cone_spanners PRIVATE CGAL::CGAL_Core) - CGAL_target_use_Eigen(CGAL_cone_spanners) + target_link_libraries(CGAL_cone_spanners PRIVATE CGAL::CGAL_Core CGAL::Eigen_support) endif() #example in doc not installed add_library(simple_triangulation MODULE simple_triangulation.cpp) add_to_cached_list(CGAL_EXECUTABLE_TARGETS simple_triangulation) - target_link_libraries(simple_triangulation ${IPE_LIBRARIES}) - CGAL_target_use_Eigen(simple_triangulation) + target_link_libraries(simple_triangulation CGAL::Eigen_support ${IPE_LIBRARIES}) cgal_add_compilation_test(simple_triangulation) else() diff --git a/Classification/examples/Classification/CMakeLists.txt b/Classification/examples/Classification/CMakeLists.txt index d0f9f8c55a2..55211fcf0e3 100644 --- a/Classification/examples/Classification/CMakeLists.txt +++ b/Classification/examples/Classification/CMakeLists.txt @@ -24,32 +24,39 @@ endif() set(Classification_dependencies_met TRUE) find_package( Boost OPTIONAL_COMPONENTS serialization iostreams ) -if (NOT Boost_SERIALIZATION_FOUND) +include(CGAL_Boost_serialization_support) +include(CGAL_Boost_iostreams_support) + +if (NOT TARGET CGAL::Boost_serialization_support) message(STATUS "NOTICE: This project requires Boost Serialization, and will not be compiled.") set(Classification_dependencies_met FALSE) endif() -if (NOT Boost_IOSTREAMS_FOUND) +if (NOT TARGET CGAL::Boost_iostreams_support) message(STATUS "NOTICE: This project requires Boost IO Streams, and will not be compiled.") set(Classification_dependencies_met FALSE) endif() find_package(OpenCV QUIET COMPONENTS core ml) # Need core + machine learning -if (NOT OpenCV_FOUND) +include(CGAL_OpenCV_support) +if (NOT TARGET CGAL::OpenCV_support) message(STATUS "NOTICE: OpenCV was not found. OpenCV random forest predicate for classification won't be available.") endif() find_package(TensorFlow QUIET) -if (NOT TensorFlow_FOUND) +include(CGAL_TensorFlow_support) +if (NOT TARGET CGAL::TensorFlow_support) message(STATUS "NOTICE: TensorFlow was not found. TensorFlow neural network predicate for classification won't be available.") endif() find_package(Eigen3 3.1.0 REQUIRED) #(3.1.0 or greater) -if (NOT EIGEN3_FOUND) +include(CGAL_Eigen_support) +if (NOT TARGET CGAL::Eigen_support) message(STATUS "This project requires the Eigen library, and will not be compiled.") set(Classification_dependencies_met FALSE) endif() find_package(TBB QUIET) +include(CGAL_TBB_support) if (NOT Classification_dependencies_met) return() @@ -63,14 +70,14 @@ create_single_source_cgal_program( "example_mesh_classification.cpp" ) create_single_source_cgal_program( "example_cluster_classification.cpp" ) create_single_source_cgal_program( "gis_tutorial_example.cpp" ) -if (OpenCV_FOUND) +if (TARGET CGAL::OpenCV_support) create_single_source_cgal_program( "example_opencv_random_forest.cpp" ) - CGAL_target_use_OpenCV(example_opencv_random_forest) + target_link_libraries(example_opencv_random_forest PUBLIC CGAL::OpenCV_support) endif() -if (TensorFlow_FOUND) +if (TARGET CGAL::TensorFlow_support) create_single_source_cgal_program( "example_tensorflow_neural_network.cpp" ) - CGAL_target_use_TensorFlow(example_tensorflow_neural_network) + target_link_libraries(example_opencv_random_forest PUBLIC CGAL::TensorFlow_support) endif() foreach(target @@ -84,11 +91,12 @@ foreach(target example_tensorflow_neural_network gis_tutorial_example) if(TARGET ${target}) - CGAL_target_use_Eigen(${target}) - CGAL_target_use_Boost_IOStreams(${target}) - CGAL_target_use_Boost_Serialization(${target}) - if(TBB_FOUND) - CGAL_target_use_TBB(${target}) + target_link_libraries(${target} PUBLIC + CGAL::Eigen_support + CGAL::Boost_iostreams_support + CGAL::Boost_serialization_support) + if(TARGET CGAL::TBB_support) + target_link_libraries(${target} PUBLIC CGAL::TBB_support) endif() endif() endforeach() diff --git a/Classification/test/Classification/CMakeLists.txt b/Classification/test/Classification/CMakeLists.txt index 9dc6193801a..e9ad1a332dc 100644 --- a/Classification/test/Classification/CMakeLists.txt +++ b/Classification/test/Classification/CMakeLists.txt @@ -24,22 +24,27 @@ endif() set(Classification_dependencies_met TRUE) find_package( Boost OPTIONAL_COMPONENTS serialization iostreams ) -if (NOT Boost_SERIALIZATION_FOUND) +include(CGAL_Boost_serialization_support) +include(CGAL_Boost_iostreams_support) + +if (NOT TARGET CGAL::Boost_serialization_support) message(STATUS "NOTICE: This project requires Boost Serialization, and will not be compiled.") set(Classification_dependencies_met FALSE) endif() -if (NOT Boost_IOSTREAMS_FOUND) +if (NOT TARGET CGAL::Boost_iostreams_support) message(STATUS "NOTICE: This project requires Boost IO Streams, and will not be compiled.") set(Classification_dependencies_met FALSE) endif() find_package(Eigen3 3.1.0 REQUIRED) #(3.1.0 or greater) -if (NOT EIGEN3_FOUND) +include(CGAL_Eigen_support) +if (NOT TARGET CGAL::Eigen_support) message(STATUS "This project requires the Eigen library, and will not be compiled.") set(Classification_dependencies_met FALSE) endif() find_package(TBB QUIET) +include(CGAL_TBB_support) if (NOT Classification_dependencies_met) return() @@ -49,11 +54,11 @@ create_single_source_cgal_program( "test_classification_point_set.cpp" ) create_single_source_cgal_program( "test_classification_io.cpp" ) foreach(target test_classification_point_set test_classification_io) - CGAL_target_use_Eigen(${target}) - CGAL_target_use_Boost_IOStreams(${target}) - CGAL_target_use_Boost_Serialization(${target}) - if(TBB_FOUND) - CGAL_target_use_TBB(${target}) + target_link_libraries(${target} PUBLIC + CGAL::Eigen_support + CGAL::Boost_iostreams_support + CGAL::Boost_serialization_support) + if(TARGET CGAL::TBB_support) + target_link_libraries(${target} PUBLIC CGAL::TBB_support) endif() endforeach() - diff --git a/Combinatorial_map/include/CGAL/Cell_attribute.h b/Combinatorial_map/include/CGAL/Cell_attribute.h index 2154b9d1ffd..8fa4def7b3c 100644 --- a/Combinatorial_map/include/CGAL/Cell_attribute.h +++ b/Combinatorial_map/include/CGAL/Cell_attribute.h @@ -197,8 +197,8 @@ namespace CGAL { void * for_compact_container() const { return vp; } - void * & for_compact_container() - { return vp; } + void for_compact_container(void *p) + { vp = p; } private: /// Reference counting: the number of darts linked to this cell. @@ -310,8 +310,8 @@ namespace CGAL { void * for_compact_container() const { return mdart.for_compact_container(); } - void * & for_compact_container() - { return mdart.for_compact_container(); } + void for_compact_container(void *p) + { mdart.for_compact_container(p); } private: /// The dart handle associated with the cell. diff --git a/Combinatorial_map/include/CGAL/Dart.h b/Combinatorial_map/include/CGAL/Dart.h index eab9f898131..bfc21e7b25a 100644 --- a/Combinatorial_map/include/CGAL/Dart.h +++ b/Combinatorial_map/include/CGAL/Dart.h @@ -105,8 +105,8 @@ namespace CGAL { void * for_compact_container() const { return mf[0].for_compact_container(); } - void * & for_compact_container() - { return mf[0].for_compact_container(); } + void for_compact_container(void *p) + { mf[0].for_compact_container(p); } Dart_handle get_f(unsigned int i) const { diff --git a/Convex_hull_2/include/CGAL/IO/Tee_for_output_iterator.h b/Convex_hull_2/include/CGAL/IO/Tee_for_output_iterator.h index 3a298f6b6c0..26aee3bba75 100644 --- a/Convex_hull_2/include/CGAL/IO/Tee_for_output_iterator.h +++ b/Convex_hull_2/include/CGAL/IO/Tee_for_output_iterator.h @@ -39,7 +39,7 @@ class Tee_for_output_iterator public: Tee_for_output_iterator(const OutputIterator& o) : o_it(o) - { PTR.p = (Rep*) new _Tee_for_output_iterator_rep(); } + { PTR = (Rep*) new _Tee_for_output_iterator_rep(); } Tee_for_output_iterator& operator=(const T& value) @@ -82,7 +82,7 @@ public: _Tee_for_output_iterator_rep* ptr() - { return (_Tee_for_output_iterator_rep*)(PTR.p); } + { return (_Tee_for_output_iterator_rep*)PTR; } protected: OutputIterator o_it; diff --git a/Convex_hull_d/include/CGAL/Regular_complex_d.h b/Convex_hull_d/include/CGAL/Regular_complex_d.h index 753637ec1e5..4a5a32b1213 100644 --- a/Convex_hull_d/include/CGAL/Regular_complex_d.h +++ b/Convex_hull_d/include/CGAL/Regular_complex_d.h @@ -87,7 +87,7 @@ public: void* pp; void* for_compact_container() const { return pp; } - void* & for_compact_container() { return pp; } + void for_compact_container(void *p) { pp = p; } #ifdef CGAL_USE_LEDA LEDA_MEMORY(RC_vertex_d) @@ -153,7 +153,7 @@ public: void* pp; void* for_compact_container() const { return pp; } - void* & for_compact_container() { return pp; } + void for_compact_container(void *p) { pp = p; } #if 0 struct Point_const_iterator { diff --git a/Documentation/doc/Documentation/Developer_manual/create_and_use_a_cmakelist.txt b/Documentation/doc/Documentation/Developer_manual/create_and_use_a_cmakelist.txt index afc413a7dd7..0fffe791b9b 100644 --- a/Documentation/doc/Documentation/Developer_manual/create_and_use_a_cmakelist.txt +++ b/Documentation/doc/Documentation/Developer_manual/create_and_use_a_cmakelist.txt @@ -18,7 +18,7 @@ find_package(CGAL REQUIRED COMPONENTS Core) target_link_libraries(my_executable CGAL::CGAL CGAL::CGAL_Core) \endcode -There are also some cmake macros to link with \cgal dependencies that can be found in +There are also imported targets to link with \cgal dependencies that can be found in the section \subpage thirdparty. \note The \cgal targets define the following compiler flags: diff --git a/Documentation/doc/Documentation/Third_party.txt b/Documentation/doc/Documentation/Third_party.txt index 71e3c43d291..ea4987e97e5 100644 --- a/Documentation/doc/Documentation/Third_party.txt +++ b/Documentation/doc/Documentation/Third_party.txt @@ -132,8 +132,8 @@ sparse linear solvers and singular value decompositions. A package dependency over \sc{Eigen} is marked on the Package Overview page. In order to use Eigen in \cgal programs, the -provided CMake function `CGAL_target_use_Eigen()` should be -used. +executables should be linked with the CMake imported target +`CGAL::Eigen_support` provided in `CGAL_Eigen_support.cmake`. The \sc{Eigen} web site is `http://eigen.tuxfamily.org`. @@ -142,8 +142,7 @@ The \sc{Eigen} web site is `https://github.com/STORM-IRIT/OpenGR`. @@ -152,8 +151,10 @@ The \sc{OpenGR} web site is `http \sc{libpointmatcher} is a modular library implementing the Iterative Closest Point (ICP) algorithm for aligning point clouds, released under a permissive BSD license. \cgal provides wrappers for the ICP algorithm of \sc{libpointmatcher} in the \ref PkgPointSetProcessing3Ref -packages. In order to use \sc{libpointmatcher} in \cgal programs, the provided CMake function -`CGAL_target_use_pointmatcher()` should be used. +packages. In order to use \sc{libpointmatcher} in \cgal programs, the +executables should be linked with the CMake imported target +`CGAL::pointmatcher_support` provided in +`CGAL_pointmatcher_support.cmake`. The \sc{libpointmatcher} web site is `https://github.com/ethz-asl/libpointmatcher`. @@ -220,8 +221,9 @@ It can be downloaded from `http://esbtl. programs that take advantage of multi-core processors. In \cgal, \sc{Tbb} is used by the packages that offer parallel -code. In order to use \sc{Tbb} in \cgal programs, the provided CMake -function `CGAL_target_use_TBB()` should be used. +code. In order to use \sc{Tbb} in \cgal programs, the executables +should be linked with the CMake imported target `CGAL::TBB_support` +provided in `CGAL_TBB_support.cmake`. The \sc{Tbb} web site is `https://www.threadingbuildingblocks.org`. @@ -231,9 +233,10 @@ The \sc{Tbb} web site is `http the LAS format (or the compressed LAZ format). In \cgal, \sc{LASlib} is used to provide input and output functions in -the \ref PkgPointSetProcessing3 package. In order to use \sc{LASlib} in -\cgal programs, the provided CMake function -`CGAL_target_use_LASLIB()` should be used. +the \ref PkgPointSetProcessing3 package. In order to use \sc{LASlib} +in \cgal programs, the executables should be linked with the CMake +imported target `CGAL::LASLIB_support` provided in +`CGAL_LASLIB_support.cmake`. The \sc{LASlib} web site is `https://rapidlasso.com/lastools/`. \sc{LASlib} @@ -247,8 +250,9 @@ CMake based install procedure. vision, computer graphics and machine learning. In \cgal, \sc{OpenCV} is used by the \ref PkgClassification -package. In order to use \sc{OpenCV} in \cgal programs, the provided -CMake function `CGAL_target_use_OpenCV()` should be used. +package. In order to use \sc{OpenCV} in \cgal programs, the +executables should be linked with the CMake imported target +`CGAL::OpenCV_support` provided in `CGAL_OpenCV_support.cmake`. The \sc{OpenCV} web site is `https://opencv.org/`. @@ -266,8 +270,10 @@ enable and compile the following targets: - `tensorflow_BUILD_PYTHON_BINDINGS` - `tensorflow_BUILD_SHARED_LIB`. -In order to use \sc{TensorFlow} in \cgal programs, the provided CMake -function `CGAL_target_use_TensorFlow()` should be used. +In order to use \sc{TensorFlow} in \cgal programs, the executables +should be linked with the CMake imported target +`CGAL::TensorFlow_support` provided in +`CGAL_TensorFlow_support.cmake`. The \sc{TensorFlow} web site is `https://www.tensorflow.org/`. @@ -310,8 +316,9 @@ for more information. In \cgal, \sc{GLPK} provides an optional linear integer program solver in the \ref PkgPolygonalSurfaceReconstruction package. In order to use -\sc{GLPK} in \cgal programs, the provided CMake function -`CGAL_target_use_GLPK()` should be used. +\sc{GLPK} in \cgal programs, the executables should be linked with the +CMake imported target `CGAL::GLPK_support` provided in +`CGAL_GLPK_support.cmake`. The \sc{GLPK} web site is `https://www.gnu.org/software/glpk/`. @@ -321,8 +328,9 @@ The \sc{GLPK} web site is `https:// In \cgal, \sc{SCIP} provides an optional linear integer program solver in the \ref PkgPolygonalSurfaceReconstruction package. In order to use -\sc{SCIP} in \cgal programs, the provided CMake function -`CGAL_target_use_SCIP()` should be used. +\sc{SCIP} in \cgal programs, the executables should be linked with the +CMake imported target `CGAL::SCIP_support` provided in +`CGAL_SCIP_support.cmake`. The \sc{SCIP} web site is `http://scip.zib.de/`. diff --git a/Documentation/doc/Documentation/Usage.txt b/Documentation/doc/Documentation/Usage.txt index 38d2b257697..247348cab68 100644 --- a/Documentation/doc/Documentation/Usage.txt +++ b/Documentation/doc/Documentation/Usage.txt @@ -60,12 +60,6 @@ On most operating systems, package managers offer \cgal and its essential third On macOS, we recommend using of Homebrew in the following way: brew install cgal - brew install cgal-qt5 #(only for GUI) - -You should check that cgal and cgal-qt5 are correctly "linked", especially when upgrading from an old version. If not, run the following command: - - brew link cgal - brew link cgal-qt5 #(if you installed it) On Linux distributions such as `Debian`/`Ubuntu`/`Mint`, use `apt-get` in the following way: diff --git a/Documentation/doc/Documentation/packages.txt b/Documentation/doc/Documentation/packages.txt index 5fb6e1a5446..a18528a063d 100644 --- a/Documentation/doc/Documentation/packages.txt +++ b/Documentation/doc/Documentation/packages.txt @@ -90,6 +90,7 @@ \package_listing{Surface_mesher} \package_listing{Skin_surface_3} \package_listing{Mesh_3} +\package_listing{Tetrahedral_remeshing} \package_listing{Periodic_3_mesh_3} \cgalPackageSection{PartReconstruction,Shape Reconstruction} diff --git a/Documentation/doc/biblio/cgal_manual.bib b/Documentation/doc/biblio/cgal_manual.bib index e2a2fd57555..6dcd0e958c7 100644 --- a/Documentation/doc/biblio/cgal_manual.bib +++ b/Documentation/doc/biblio/cgal_manual.bib @@ -3127,6 +3127,14 @@ pages = "207--221" year={2012}, organization={Wiley Online Library} } + +@article{faraj2016mvr, + author = {Noura Faraj and Jean-Marc Thiery and Tamy Boubekeur}, + title = {Multi-Material Adaptive Volume Remesher}, + journal = {Compurer and Graphics Journal (proc. Shape Modeling International 2016)}, + year = {2016}, +} + % ---------------------------------------------------------------------------- % END OF BIBFILE % ---------------------------------------------------------------------------- diff --git a/Documentation/doc/resources/1.8.13/menu_version.js b/Documentation/doc/resources/1.8.13/menu_version.js index 36b298ee045..780aefa1246 100644 --- a/Documentation/doc/resources/1.8.13/menu_version.js +++ b/Documentation/doc/resources/1.8.13/menu_version.js @@ -3,10 +3,11 @@ var url_re = /(cgal\.geometryfactory\.com\/CGAL\/doc\/|doc\.cgal\.org\/)(master|latest|(\d\.\d+|\d\.\d+\.\d+))\//; var url_local = /.*\/doc_output\//; - var current_version_local = '5.1-dev' + var current_version_local = '5.1-beta1' var all_versions = [ 'master', 'latest', + '5.1-beta1', '5.0.2', '4.14.3', '4.13.2', @@ -23,6 +24,15 @@ ]; function build_select(current_version) { + if( current_version == 'master') { + let top_elt = document.getElementById("top"); + + let first_element = top_elt.childNodes[0]; + let new_div = document.createElement("p"); + new_div.innerHTML = '⚠️ This documentation corresponds to the master development branch of CGAL. It might diverge from the official releases.'; + new_div.style.cssText = "background-color: #ff9800; margin: 1ex auto 1ex 1em; padding: 1ex; border-radius: 1ex; display: inline-block;" + let OK = top_elt.insertBefore(new_div, first_element); + } var buf = ['']; $.each(all_versions, function(id) { var version = all_versions[id]; @@ -44,7 +54,7 @@ } function patch_url(url, new_version) { - if(url.includes("doc.cgal.org")||url.includes("cgal.geometryfactory.com")){ + if(url.includes("doc.cgal.org")||url.includes("cgal.geometryfactory.com")){ return url.replace(url_re, 'doc.cgal.org/' + new_version + '/'); } else{ @@ -65,7 +75,7 @@ var motherNode=$("#back-nav ul")[0]; var node = document.createElement("LI"); var spanNode = document.createElement("SPAN"); - var titleNode =document.createTextNode("CGAL Version: "); + var titleNode =document.createTextNode("CGAL Version: "); var textNode = document.createTextNode("x.y"); spanNode.setAttribute("class", "version_menu"); spanNode.appendChild(textNode); @@ -90,4 +100,4 @@ } } }); -})(); +})(); diff --git a/Documentation/doc/resources/1.8.4/menu_version.js b/Documentation/doc/resources/1.8.4/menu_version.js index 36b298ee045..780aefa1246 100644 --- a/Documentation/doc/resources/1.8.4/menu_version.js +++ b/Documentation/doc/resources/1.8.4/menu_version.js @@ -3,10 +3,11 @@ var url_re = /(cgal\.geometryfactory\.com\/CGAL\/doc\/|doc\.cgal\.org\/)(master|latest|(\d\.\d+|\d\.\d+\.\d+))\//; var url_local = /.*\/doc_output\//; - var current_version_local = '5.1-dev' + var current_version_local = '5.1-beta1' var all_versions = [ 'master', 'latest', + '5.1-beta1', '5.0.2', '4.14.3', '4.13.2', @@ -23,6 +24,15 @@ ]; function build_select(current_version) { + if( current_version == 'master') { + let top_elt = document.getElementById("top"); + + let first_element = top_elt.childNodes[0]; + let new_div = document.createElement("p"); + new_div.innerHTML = '⚠️ This documentation corresponds to the master development branch of CGAL. It might diverge from the official releases.'; + new_div.style.cssText = "background-color: #ff9800; margin: 1ex auto 1ex 1em; padding: 1ex; border-radius: 1ex; display: inline-block;" + let OK = top_elt.insertBefore(new_div, first_element); + } var buf = ['