diff --git a/Documentation/doc/Documentation/packages.txt b/Documentation/doc/Documentation/packages.txt index f0d2d4bebd73..d78a92523f26 100644 --- a/Documentation/doc/Documentation/packages.txt +++ b/Documentation/doc/Documentation/packages.txt @@ -128,6 +128,7 @@ \package_listing{Surface_mesh_approximation} \package_listing{Heat_method_3} \package_listing{Surface_mesh_topology} +\package_listing{Feature_graph} \cgalPackageSection{PartPointSetProcessing,Point Set Processing} diff --git a/Feature_graph/doc/Feature_graph/CGAL/Feature_graph/Image_AmbrosioTortorelli.h b/Feature_graph/doc/Feature_graph/CGAL/Feature_graph/Image_AmbrosioTortorelli.h new file mode 100644 index 000000000000..f4ca4d596d2d --- /dev/null +++ b/Feature_graph/doc/Feature_graph/CGAL/Feature_graph/Image_AmbrosioTortorelli.h @@ -0,0 +1,71 @@ +namespace CGAL { + +namespace Feature_graph { + +/*! +* \ingroup PkgFeatureGraphNormalEstimator, PkgFeatureGraphSharpnessEstimator +* +* \brief Class that evaluates the Ambriosio-Tortorelli normals and sharpness measure from an image. +* Two estimators can then be retrieved to access the normal and sharpness estimations. +* +* \tparam Vector_3 the type of the normal vector model of `Kernel::Vector_3`. +* +*/ +template +struct Image_AmbrosioTortorelli +{ +public: + /// \name Types + /// @{ + + /*! + * The type of the normal vector. + */ + typedef Vector_3 Normal_type; + + /*! + * The type of the estimator that allow the user to retrieve the sharpness values. + * \cgalModels{SharpnessEstimator} + */ + typedef unspecified_type Sharpness_estimator; + /*! + * The type of the estimator that allow the user to retrieve the normals. + * \cgalModels{NormalEstimator} + */ + typedef unspecified_type Normal_estimator; + + /// @} + + /// \name Constructor + /// @{ + + /*! + * evaluates the normal and sharpness values using the Ambrosio-Tortorelli energy optimization. + * + * \param image the image domain. + * \param selection_threshold a threshold on the sharpness value. + * Elements with a sharpness value lower than this threshold are considered flat + * and will be given a negative value. + */ + Image_AmbrosioTortorelli(const CGAL::Image_3& image, const Sharpness_estimator::Sharpness_number_type& selection_threshold = Sharpness_estimator::Sharpness_number_type(0.25)); + + /// @} + + /// \name Estimators + /// @{ + + /*! + * returns the estimator that allow the user to retrieve the sharpness values. + */ + Sharpness_estimator sharpness_estimator() const; + /*! + * returns the estimator that allow the user to retrieve the normals. + */ + Normal_estimator normal_estimator() const; + + /// @} +}; + +} /* namespace Feature_graph */ + +} /* namespace CGAL */ \ No newline at end of file diff --git a/Feature_graph/doc/Feature_graph/CGAL/Feature_graph/Surface_normal_estimator.h b/Feature_graph/doc/Feature_graph/CGAL/Feature_graph/Surface_normal_estimator.h new file mode 100644 index 000000000000..0b272b165586 --- /dev/null +++ b/Feature_graph/doc/Feature_graph/CGAL/Feature_graph/Surface_normal_estimator.h @@ -0,0 +1,71 @@ +namespace CGAL { + +namespace Feature_graph { + +/*! +* \ingroup PkgFeatureGraphNormalEstimator +* +* \brief Estimator that assign a normal on elements of a surface. +* +* \tparam Vector_3 the type of the normal vector model of `Kernel::Vector_3`. +* +* \cgalModels{NormalEstimator} +*/ +template +struct Surface_normal_estimator +{ +public: + /// \name Types + /// @{ + + /*! + * The type of the normal vector. + */ + typedef Vector_3 Normal_type; + + /// @} + + /// \name Constructor + /// @{ + + /*! + * Constructor that pre-computes the normals on the surface. + * + * \tparam PolygonMesh a model of `FaceListGraph` that represents a surface mesh. + * + * \param pmesh the surface where the normals are evaluated. + */ + template + Surface_normal_estimator(const PolygonMesh& pmesh); + + /// @} + + /// \name Estimator + /// @{ + + /*! + * returns the normal vector of the surface element identified by a dimension and a descriptor. + * + * \tparam DimensionTag a tag that represent the element type. + * Can be `CGAL::Dimension_tag<0>`, `CGAL::Dimension_tag<1>` or `CGAL::Dimension_tag<2>` + * \tparam Descriptor the type of descriptor used to identify the element to evaluate, + * which can be a vertex, an edge, or a facet according to the DimensionTag. + * If the domain is of type `CGAL::Image_3`, it is a `std::size_t` for element with + * dimension 0, 1 and 2. If the domain is a model of `FaceListGraph`, it is a + * `vertex_descriptor` (resp. `halfedge_descriptor`; `face_descriptor `) for element with + * dimension 0 (resp. 1 ; 2). + * \tparam Domain the type of the surface where the element is embedded. + * Can be a `CGAL::Image_3`, or a model of `FaceListGraph` that represents a surface mesh. + * + * \param element_descriptor the descriptor of the element on the surface. + * \param domain the domain that contains the elements. + */ + template + Normal_type operator()(const Descriptor& element_descriptor, const Domain& domain) const; + + /// @} +}; + +} /* namespace Feature_graph */ + +} /* namespace CGAL */ \ No newline at end of file diff --git a/Feature_graph/doc/Feature_graph/CGAL/Feature_graph/Surface_sharpness_estimator.h b/Feature_graph/doc/Feature_graph/CGAL/Feature_graph/Surface_sharpness_estimator.h new file mode 100644 index 000000000000..1d61e3873245 --- /dev/null +++ b/Feature_graph/doc/Feature_graph/CGAL/Feature_graph/Surface_sharpness_estimator.h @@ -0,0 +1,72 @@ +namespace CGAL { + +namespace Feature_graph { + +/*! +* \ingroup PkgFeatureGraphSharpnessEstimator +* +* \brief Estimator that assign a sharpness value on elements of a surface. +* +* \cgalModels{SharpnessEstimator} +*/ +struct Surface_sharpness_estimator +{ +public: + /// \name Types + /// @{ + + /*! + * The type of the sharpness value. + */ + typedef double Sharpness_number_type; + + /// @} + + /// \name Constructor + /// @{ + + /*! + * Constructor that pre-computes the normals on the surface. + * + * \tparam PolygonMesh a model of `FaceListGraph` that represents a surface. + * \tparam FT a model of `RealEmbeddable` + * + * \param pmesh the surface where the normals are evaluated. + * \param selection_threshold a threshold on the sharpness value. + * Elements with a sharpness value lower than this threshold are considered flat + * and will be given a negative value. + */ + template + Surface_sharpness_estimator(const PolygonMesh& pmesh, const Sharpness_number_type& selection_threshold); + + /// @} + + /// \name Estimator + /// @{ + + /*! + * returns the sharpness value of the surface element described by a type and a descriptor. + * + * \tparam DimensionTag a tag that represent the element type. + * Can be `CGAL::Dimension_tag<0>`, `CGAL::Dimension_tag<1>` or `CGAL::Dimension_tag<2>` + * \tparam Descriptor the type of descriptor used to identify the element to evaluate, + * which can be a vertex, an edge, or a facet according to the DimensionTag. + * If the domain is of type `CGAL::Image_3`, it is a `std::size_t` for element with + * dimension 0, 1 and 2. If the domain is a model of `FaceListGraph`, it is a + * `vertex_descriptor` (resp. `halfedge_descriptor`; `face_descriptor `) for element with + * dimension 0 (resp. 1 ; 2). + * \tparam Domain the type of the surface where the element is embedded. + * Can be a `CGAL::Image_3`, or a model of `FaceListGraph` that represents a surface mesh. + * + * \param element_descriptor the descriptor of the element on the surface. + * \param domain the domain that contains the elements. + */ + template + Sharpness_number_type operator()(const Descriptor& element_descriptor, const Domain& domain) const; + + /// @} +}; + +} /* namespace Feature_graph */ + +} /* namespace CGAL */ \ No newline at end of file diff --git a/Feature_graph/doc/Feature_graph/CGAL/Feature_graph/detect_sharp_features.h b/Feature_graph/doc/Feature_graph/CGAL/Feature_graph/detect_sharp_features.h new file mode 100644 index 000000000000..36a19f3175ca --- /dev/null +++ b/Feature_graph/doc/Feature_graph/CGAL/Feature_graph/detect_sharp_features.h @@ -0,0 +1,395 @@ +namespace CGAL { + +namespace Feature_graph { + +/*! +* \ingroup PkgFeatureGraphDetector +* +* Detector for sharp feature extraction in labeled images. +* It constructs a feature graph model of `VertexAndEdgeListGraph`. +* +* \tparam K the requirements for the geometric objects, model of `Kernel`. +* +* \sa `Detect_sharp_features_on_surface` +*/ +template +struct Detect_sharp_features_on_labeled_image +{ + /// \name Types + /// @{ + + /*! + * Output feature graph point type + */ + typedef typename K::Point_3 Point_3; + + /*! + * Natural number type. + */ + typedef std::size_t Size; + + /*! + * Numerical type. + */ + typedef typename K::FT FT; + + /// @} + + /// \name Detector + /// @{ + + /*! + * \brief detects and constructs the feature graph from a labeled image + * + * The feature graph has polylines that lie on the + * sharp features of the surface defined by the image's subdomains. + * Each subdomain inside the bounding box + * of the input labeled image is defined as the set of voxels + * with the same value. The outside of the bounding box + * of the image is considered as a subdomain with voxel value + * specified by `parameters::value_outside`. + * + * \tparam NamedParameters a sequence of \ref bgl_namedparameters "Named Parameters" + * + * \param image the input image domain that represent a labeled image. + * + * \param np an optional sequence of \ref bgl_namedparameters "Named Parameters" among the ones listed below: + * \cgalNamedParamsBegin + * \cgalParamSectionBegin{value_outside} + * \cgalParamDescription{the value attached to voxels + * outside the domain where feature are extracted.} + * \cgalParamDefault{0} + * \cgalParamSectionEnd + * \cgalParamSectionBegin{sharpness_estimator} + * \cgalParamDescription{an estimator model of `SharpnessEstimator`. + * See \ref PkgFeatureGraphSharpnessEstimator for available estimators.} + * \cgalParamDefault{`CGAL::Feature_graph::Image_AmbrosioTortorelli(image).sharpness_estimator()`} + * \cgalParamSectionEnd + * + * \cgalParamSectionBegin{line_distance_threshold} + * \cgalParamDescription{the threshold on the distance between lines. + * In the regularization step, if the maximum distance of a line to another line + * is less than this threshold, then the line is collapsed. + * It can be a constant or a scalar field that return the threshold at a point on the surface. + * If it is a scalar field, it must implement + *
    + *
  • `template ` + *
    `FT operator()(const Point_3& point_in_space, const std::size_t& element_descriptor, const CGAL::Image_3& image) const` + *
+ *
  • The type `DimensionTag` represents the element type, it can either be `CGAL::Dimension_tag<0>`, `CGAL::Dimension_tag<1>` or `CGAL::Dimension_tag<2>`, + * which represent either a vertex element, an edge element, or a facet element respectively. + *
  • The parameter `element_descriptor` indicates the element of the image : + * from the centroid `(x,y,z)` of the point, line or surface element in the image space, + * and given the dimension of the image `(xdim, ydim, zdim)`, the descriptor is + * `2(z*xdim*ydim+y*xdim+x)`} + * \cgalParamDefault{`FT(4.0)`} + * \cgalParamExtra{This parameter sets a baseline distance and is overridden + * by the parameters `parameters::isthmus_line_distance_threshold`, `parameters::simple_line_distance_threshold` and `parameters::corner_line_distance_threshold` + * if they are set.} + * \cgalParamSectionEnd + * \cgalParamSectionBegin{isthmus_line_distance_threshold} + * \cgalParamDescription{the threshold on the distance between an isthmus line and any line. + * An isthmus line is bounded by a corner that is incident to only the same line. + * In the regularization step, if the maximum distance of a line to another line + * is less than this threshold, then the line is collapsed. + * It can be a constant or a scalar field that return the threshold at a point on the surface. + * If it is a scalar field, it must implement + *
      + *
    • `template ` + *
      `FT operator()(const Point_3& point_in_space, const std::size_t& element_descriptor, const CGAL::Image_3& image) const` + *
    + * See the description of `parameters::line_distance_threshold` for more details on this scalar field.} + * \cgalParamDefault{`FT(-1.0)`} + * \cgalParamExtra{Negative values implies the use of the parameter `parameters::line_distance_threshold`.} + * \cgalParamSectionEnd + * \cgalParamSectionBegin{simple_line_distance_threshold} + * \cgalParamDescription{the threshold on the distance between a simple line and any line. + * A simple line is a line that can be removed without splitting the graph of its neighbors. + * In the regularization step, if the maximum distance of a line to another line + * is less than this threshold, then the line is collapsed. + * It can be a constant or a scalar field that return the threshold at a point on the surface. + * If it is a scalar field, it must implement + *
      + *
    • `template ` + *
      `FT operator()(const Point_3& point_in_space, const std::size_t& element_descriptor, const CGAL::Image_3& image) const` + *
    + * See the description of `parameters::line_distance_threshold` for more details on this scalar field.} + * \cgalParamDefault{`FT(-1.0)`} + * \cgalParamExtra{Negative values implies the use of the parameter `parameters::line_distance_threshold`.} + * \cgalParamSectionEnd + * \cgalParamSectionBegin{corner_line_distance_threshold} + * \cgalParamDescription{the threshold on the distance between a corner line and any line. + * A corner line is neither isthmus nor simple. + * In the regularization step, if the maximum distance of a line to another line + * is less than this threshold, then the line is collapsed. + * It can be a constant or a scalar field that return the threshold at a point on the surface. + * If it is a scalar field, it must implement + *
      + *
    • `template ` + *
      `FT operator()(const Point_3& point_in_space, const Descriptor& element_descriptor, const CGAL::Image_3& image) const` + *
    + * See the description of `parameters::line_distance_threshold` for more details on this scalar field.} + * \cgalParamDefault{`FT(-1.0)`} + * \cgalParamExtra{Negative values implies the use of the parameter `parameters::line_distance_threshold`.} + * \cgalParamSectionEnd + * + * \cgalParamSectionBegin{do_optimize} + * \cgalParamDescription{a boolean indicating if the optimization step is called.} + * \cgalParamDefault{`true`} + * \cgalParamSectionEnd + * + * \cgalParamSectionBegin{maximum_number_of_iterations} + * \cgalParamDescription{the maximum number of iterations of the gradient descent during the optimization step.} + * \cgalParamDefault{`Size(20)`} + * \cgalParamSectionEnd + * \cgalParamSectionBegin{start_step_size} + * \cgalParamDescription{the step size at the first iteration of the gradient descent during the optimization step, + * expressed as the size of the maximum voxel edge size.} + * \cgalParamDefault{`FT(1.0)`} + * \cgalParamSectionEnd + * \cgalParamSectionBegin{end_step_size} + * \cgalParamDescription{the step size at the last iteration of the gradient descent during the optimization step, + * expressed as the size of the maximum voxel edge size.} + * \cgalParamDefault{`FT(0.125)`} + * \cgalParamSectionEnd + * \cgalParamSectionBegin{mininmum_energy_delta} + * \cgalParamDescription{the minimum energy change to stop the gradient descent iterations during the optimization step.} + * \cgalParamDefault{`FT(1.e-3)`} + * \cgalParamSectionEnd + * \cgalParamSectionBegin{collapse_distance} + * \cgalParamDescription{the distance to collapse adjacent points in a line during the gradient descent of the optimization step, + * expressed as the size of the maximum voxel edge size.} + * \cgalParamDefault{`FT(0.5)`} + * \cgalParamSectionEnd + * \cgalParamSectionBegin{smoothing_factor} + * \cgalParamDescription{the smoothing factor of the energy of the optimization step. + * 0 means no smoothing, + * 1 means that the energy will consider smoothing with the same weight + * as the displacement toward the sharp features of the surface.} + * \cgalParamDefault{`FT(1.0)`} + * \cgalParamSectionEnd + * \cgalParamSectionBegin{normal_refinement_distance} + * \cgalParamDescription{the distance to refine the normals of elements near the sharp features during the optimization step, + * expressed as the size of the maximum voxel edge size.} + * \cgalParamDefault{`FT(4.0)`} + * \cgalParamSectionEnd + * \cgalParamSectionBegin{plane_detection_distance} + * \cgalParamDescription{the distance to collect elements near the sharp features + * to determine the adjacent planes during the optimization step, + * expressed as the size of the maximum voxel edge size.} + * \cgalParamDefault{`FT(4.0)`} + * \cgalParamSectionEnd + * \cgalParamSectionBegin{normal_estimator} + * \cgalParamDescription{an estimator to evaluate the normals on elements.} + * \cgalParamDefault{`CGAL::Feature_graph::Image_AmbrosioTortorelli(image).normal_estimator()`} + * \cgalParamSectionEnd + * + * \cgalParamSectionBegin{point_to_element_output_map} + * \cgalParamDescription{an output property map that will be filled if supplied. + * It allow retrieving of the surface element where a feature graph point is embedded. + * It must be a model of `WritablePropertyMap`, + * and must implement `put(output_pmap, feature_vertex_descriptor, facet_descriptor)` + * where the key type is the `vertex_descriptor` of the feature graph, and the value type is + * a descriptor of an element of the surface, with type `std::size_t`. + * The facet descriptor correspond to a facet element with the tag `CGAL::DimensionTag<2>`} + * \cgalParamDefault{`parameters::default()`} + * \cgalParamSectionEnd + * \cgalNamedParamsEnd + * + * \returns a graph model of `VertexAndEdgeListGraph` + * containing the constructed features. + */ + template + unspecified_type operator()(const CGAL::Image_3& image, const CGAL_NP_CLASS& np = parameters::default_values()) const; + + /// @} +}; + +/*! +* \ingroup PkgFeatureGraphDetector +* +* Detector for sharp feature extraction in surfaces. +* It constructs a feature graph model of `VertexAndEdgeListGraph`. +* +* \tparam K the requirements for the geometric objects, model of `Kernel`. +* +* \sa `Detect_sharp_features_on_labeled_image` +*/ +template +struct Detect_sharp_features_on_surface +{ + /// \name Types + /// @{ + + /*! + * Output feature graph point type + */ + typedef typename K::Point_3 Point_3; + + /*! + * Natural number type. + */ + typedef std::size_t Size; + + /*! + * Numerical type. + */ + typedef typename K::FT FT; + + /// @} + + /// \name Detector + /// @{ + + /*! + * \brief detects and constructs the feature graph from a surface + * + * The feature graph has polylines that lie on the + * sharp features of the surface. + * + * \tparam PolygonMesh a model of `FaceListGraph` that represents a surface mesh. + * + * \param pmesh a polygon mesh from where the sharp features are extracted. + * + * \param np an optional sequence of \ref bgl_namedparameters "Named Parameters" among the ones listed below: + * \cgalNamedParamsBegin + * \cgalParamSectionBegin{sharpness_estimator} + * \cgalParamDescription{an estimator model of `SharpnessEstimator`. + * See \ref PkgFeatureGraphSharpnessEstimator for available estimators.} + * \cgalParamDefault{`CGAL::Feature_graph::Surface_sharpness_estimator(pmesh)`} + * \cgalParamSectionEnd + * + * \cgalParamSectionBegin{line_distance_threshold} + * \cgalParamDescription{the threshold on the distance between lines. + * In the regularization step, if the maximum distance of a line to another line + * is less than this threshold, then the line is collapsed. + * It can be a constant or a scalar field that return the threshold at a point on the surface. + * If it is a scalar field, it must implement + *
      + *
    • `template ` + *
      `FT operator()(const Point_3& point_in_space, const Descriptor& element_descriptor, const PolygonMesh& pmesh) const` + *
    + *
  • The type `DimensionTag` represents the element type, it can either be `CGAL::Dimension_tag<0>`, `CGAL::Dimension_tag<1>` or `CGAL::Dimension_tag<2>`, + * which represent either a vertex element, an edge element, or a facet element respectively. + *
  • The type `Descriptor` is either a `vertex_descriptor`, `halfedge_descriptor` or `face_descriptor` and + * is set respectivelly to the DimensionTag.} + * \cgalParamDefault{`FT(0.0)`} + * \cgalParamExtra{This parameter sets a baseline distance and is overridden + * by the parameters `parameters::isthmus_line_distance_threshold`, `parameters::simple_line_distance_threshold` and `parameters::corner_line_distance_threshold` + * if they are set.} + * \cgalParamSectionEnd + * \cgalParamSectionBegin{isthmus_line_distance_threshold} + * \cgalParamDescription{the threshold on the distance between an isthmus line and any line. + * An isthmus line is bounded by a corner that is incident to only the same line. + * In the regularization step, if the maximum distance of a line to another line + * is less than this threshold, then the line is collapsed. + * It can be a constant or a scalar field that return the threshold at a point on the surface. + * If it is a scalar field, it must implement + *
      + *
    • `template ` + *
      `FT operator()(const Point_3& point_in_space, const Descriptor& element_descriptor, const PolygonMesh& pmesh) const` + *
    + * See the description of `parameters::line_distance_threshold` for more details on this scalar field.} + * \cgalParamDefault{`FT(-1.0)`} + * \cgalParamExtra{Negative values implies the use of the parameter `parameters::line_distance_threshold`.} + * \cgalParamSectionEnd + * \cgalParamSectionBegin{simple_line_distance_threshold} + * \cgalParamDescription{the threshold on the distance between a simple line and any line. + * A simple line is a line that can be removed without splitting the graph of its neighbors. + * In the regularization step, if the maximum distance of a line to another line + * is less than this threshold, then the line is collapsed. + * It can be a constant or a scalar field that return the threshold at a point on the surface. + * If it is a scalar field, it must implement + *
      + *
    • `template ` + *
      `FT operator()(const Point_3& point_in_space, const Descriptor& element_descriptor, const PolygonMesh& pmesh) const` + *
    + * See the description of `parameters::line_distance_threshold` for more details on this scalar field.} + * \cgalParamDefault{`FT(-1.0)`} + * \cgalParamExtra{Negative values implies the use of the parameter `parameters::line_distance_threshold`.} + * \cgalParamSectionEnd + * \cgalParamSectionBegin{corner_line_distance_threshold} + * \cgalParamDescription{the threshold on the distance between a corner line and any line. + * A corner line is neither isthmus nor simple. + * In the regularization step, if the maximum distance of a line to another line + * is less than this threshold, then the line is collapsed. + * It can be a constant or a scalar field that return the threshold at a point on the surface. + * If it is a scalar field, it must implement + *
      + *
    • `template ` + *
      `FT operator()(const Point_3& point_in_space, const Descriptor& element_descriptor, const PolygonMesh& pmesh) const` + *
    + * See the description of `parameters::line_distance_threshold` for more details on this scalar field.} + * \cgalParamDefault{`FT(-1.0)`} + * \cgalParamExtra{Negative values implies the use of the parameter `parameters::line_distance_threshold`.} + * \cgalParamSectionEnd + * + * \cgalParamSectionBegin{do_optimize} + * \cgalParamDescription{a boolean indicating if the optimization step is called.} + * \cgalParamDefault{`true`} + * \cgalParamSectionEnd + * + * \cgalParamSectionBegin{maximum_number_of_iterations} + * \cgalParamDescription{the maximum number of iterations of the gradient descent during the optimization step.} + * \cgalParamDefault{`Size(20)`} + * \cgalParamSectionEnd + * \cgalParamSectionBegin{start_step_size} + * \cgalParamDescription{the step size at the first iteration of the gradient descent during the optimization step.} + * \cgalParamDefault{`FT(0.0)`} + * \cgalParamSectionEnd + * \cgalParamSectionBegin{end_step_size} + * \cgalParamDescription{the step size at the last iteration of the gradient descent during the optimization step.} + * \cgalParamDefault{`FT(0.0)`} + * \cgalParamSectionEnd + * \cgalParamSectionBegin{mininmum_energy_delta} + * \cgalParamDescription{the minimum energy change to stop the gradient descent iterations during the optimization step.} + * \cgalParamDefault{`FT(1.e-3)`} + * \cgalParamSectionEnd + * \cgalParamSectionBegin{collapse_distance} + * \cgalParamDescription{the distance to collapse adjacent points in a line during the gradient descent of the optimization step.} + * \cgalParamDefault{`FT(0.0)`} + * \cgalParamSectionEnd + * \cgalParamSectionBegin{smoothing_factor} + * \cgalParamDescription{the smoothing factor of the energy of the optimization step. + * 0 means no smoothing, + * 1 means that the energy will consider smoothing with the same weight + * as the displacement toward the sharp features of the surface.} + * \cgalParamDefault{`FT(1.0)`} + * \cgalParamSectionEnd + * \cgalParamSectionBegin{normal_refinement_distance} + * \cgalParamDescription{the distance to refine the normals of elements near the sharp features during the optimization step.} + * \cgalParamDefault{`FT(0.0)`} + * \cgalParamSectionEnd + * \cgalParamSectionBegin{plane_detection_distance} + * \cgalParamDescription{the distance to collect elements near the sharp features + * to determine the adjacent planes during the optimization step.} + * \cgalParamDefault{`FT(0.0)`} + * \cgalParamSectionEnd + * \cgalParamSectionBegin{normal_estimator} + * \cgalParamDescription{an estimator to evaluate the normals on elements.} + * \cgalParamDefault{`CGAL::Feature_graph::Surface_normal_estimator(pmesh)`} + * \cgalParamSectionEnd + * + * \cgalParamSectionBegin{point_to_element_output_map} + * \cgalParamDescription{an output property map that will be filled if supplied. + * It allow retrieving of the surface element where a feature graph point is embedded. + * It must be a model of `WritablePropertyMap`, + * and must implement `put(output_pmap, feature_vertex_descriptor, facet_descriptor)` + * where the key type is the `vertex_descriptor` of the feature graph, and the value type is + * the `facet_descriptor` of the polygon mesh.} + * \cgalParamDefault{`parameters::default()`} + * \cgalParamSectionEnd + * \cgalNamedParamsEnd + * + * \returns a graph model of `VertexAndEdgeListGraph` + * containing the constructed features. + */ + template + unspecified_type operator()(const PolygonMesh& pmesh, const CGAL_NP_CLASS& np = parameters::default_values()) const; + + /// @} +}; + +} /* namespace Feature_graph */ + +} /* namespace CGAL */ \ No newline at end of file diff --git a/Feature_graph/doc/Feature_graph/Concepts/NormalEstimator.h b/Feature_graph/doc/Feature_graph/Concepts/NormalEstimator.h new file mode 100644 index 000000000000..d8ad29366a97 --- /dev/null +++ b/Feature_graph/doc/Feature_graph/Concepts/NormalEstimator.h @@ -0,0 +1,54 @@ +/*! +* +* \ingroup PkgFeatureGraphConcepts +* \cgalConcept +* +* The concept `NormalEstimator` describes an estimator that +* extracts the normal for a surface element. +* +* \cgalHasModelsBegin +* \cgalHasModels{CGAL::Feature_graph::Image_AmbrosioTortorelli::Normal_estimator} +* \cgalHasModels{CGAL::Feature_graph::Surface_normal_estimator} +* \cgalHasModelsEnd +* +*/ + +class NormalEstimator { +public: + +/// \name Types +/// @{ + +/*! +* The type of the normal vector model of `Kernel::Vector_3` +*/ +typedef unspecified_type Normal_type; + +/// @} + +/// \name Estimator +/// @{ + +/*! +* \brief returns the normal vector of the surface element described by a dimension and a descriptor. +* +* \tparam DimensionTag a tag that represent the element type. +* Can be `CGAL::Dimension_tag<0>`, `CGAL::Dimension_tag<1>` or `CGAL::Dimension_tag<2>` +* \tparam Descriptor the type of descriptor used to identify the element to evaluate, +* which can be a vertex, an edge, or a facet according to the DimensionTag. +* If the domain is of type `CGAL::Image_3`, it is a `std::size_t` for element with +* dimension 0, 1 and 2. If the domain is a model of `FaceListGraph`, it is a +* `vertex_descriptor` (resp. `halfedge_descriptor`; `face_descriptor `) for element with +* dimension 0 (resp. 1 ; 2). +* \tparam Domain the type of the surface where the element is embedded. +* Can be a `CGAL::Image_3`, or a model of `FaceListGraph` that represents a surface mesh. +* +* \param element_descriptor the descriptor of the element on the surface. +* \param domain the domain that contains the elements. +*/ +template +Normal_type operator()(const Descriptor& element_descriptor, const Domain& domain) const; + +/// @} + +}; /* end Normal_estimator */ \ No newline at end of file diff --git a/Feature_graph/doc/Feature_graph/Concepts/SharpnessEstimator.h b/Feature_graph/doc/Feature_graph/Concepts/SharpnessEstimator.h new file mode 100644 index 000000000000..ec41c3c26b54 --- /dev/null +++ b/Feature_graph/doc/Feature_graph/Concepts/SharpnessEstimator.h @@ -0,0 +1,61 @@ +/*! +* \ingroup PkgFeatureGraphConcepts +* \cgalConcept +* +* The concept `SharpnessEstimator` describes an estimator that +* extracts the sharpness value for a surface element. +* +* \cgalHasModelsBegin +* \cgalHasModels{CGAL::Feature_graph::Image_AmbrosioTortorelli::Sharpness_estimator} +* \cgalHasModels{CGAL::Feature_graph::Surface_sharpness_estimator} +* \cgalHasModelsEnd +* +*/ + +class SharpnessEstimator { +public: + +/// \name Types +/// @{ + +/*! +* \brief The type of the sharpness value. +* The sharpness value is a positive or negative number that is embeddable on the real axis. +* \cgalModels{RealEmbeddable} +*/ +typedef unspecified_type Sharpness_number_type; + +/// @} + +/// \name Estimator +/// @{ + +/*! +* \brief returns the sharpness value of the surface element described by a type and a descriptor. +* A low sharpness value should represent a flat area, +* while a high value implies a sharp feature. +* For two sharpness values `A` and `B`, +* the value `A` is told to have a higher sharpness value iff `B < A`. +* Negative values represent smooth areas that should be erased in the +* selection step of the feature graph extraction method. +* +* \tparam DimensionTag a tag that represent the element type. +* Can be `CGAL::Dimension_tag<0>`, `CGAL::Dimension_tag<1>` or `CGAL::Dimension_tag<2>` +* \tparam Descriptor the type of descriptor used to identify the element to evaluate, +* which can be a vertex, an edge, or a facet according to the DimensionTag. +* If the domain is of type `CGAL::Image_3`, then it is a `std::size_t` for element with +* dimension 0, 1 and 2. If the domain is a model of `FaceListGraph`, then it is a +* `vertex_descriptor` (resp. `halfedge_descriptor`; `face_descriptor `) for element with +* dimension 0 (resp. 1 ; 2). +* \tparam Domain the type of the surface where the element is embedded. +* Can be a `CGAL::Image_3`, or a model of `FaceListGraph` that represents a surface mesh. +* +* \param element_descriptor the descriptor of the element on the surface. +* \param domain the domain that contains the elements. +*/ +template +Sharpness_number_type operator()(const Descriptor& element_descriptor, const Domain& domain) const; + +/// @} + +}; /* end Sharpness_estimator */ \ No newline at end of file diff --git a/Feature_graph/doc/Feature_graph/Doxyfile.in b/Feature_graph/doc/Feature_graph/Doxyfile.in new file mode 100644 index 000000000000..04220015ec53 --- /dev/null +++ b/Feature_graph/doc/Feature_graph/Doxyfile.in @@ -0,0 +1,3 @@ +@INCLUDE = ${CGAL_DOC_PACKAGE_DEFAULTS} + +PROJECT_NAME = "CGAL ${CGAL_DOC_VERSION} - Feature Graph" diff --git a/Feature_graph/doc/Feature_graph/Feature_graph.txt b/Feature_graph/doc/Feature_graph/Feature_graph.txt new file mode 100644 index 000000000000..fb101bacaf6b --- /dev/null +++ b/Feature_graph/doc/Feature_graph/Feature_graph.txt @@ -0,0 +1,31 @@ +namespace CGAL { +/*! + +\mainpage User Manual +\anchor Chapter_Feature_Graph +\anchor chaptermine +\cgalAutoToc +\author Ange Clément + +The manual will be completed later. + +This chapter describes the ... + +\section secmydefinitions Definitions + +Section on definitions here ... + +\section secExamples Examples + +\subsection exFromSegmentedImage Feature Graph Extraction from a Segmented Image + +The following example shows the extraction of the feature graph from a segmented image. + +\cgalExample{Feature_graph/feature_graph_from_segmented_image.cpp} + +\cgalFigureBegin{figPck,feature_graph_small.png} +Left: ... +\cgalFigureEnd + +*/ +} /* namespace CGAL */ diff --git a/Feature_graph/doc/Feature_graph/PackageDescription.txt b/Feature_graph/doc/Feature_graph/PackageDescription.txt new file mode 100644 index 000000000000..177e1c857782 --- /dev/null +++ b/Feature_graph/doc/Feature_graph/PackageDescription.txt @@ -0,0 +1,77 @@ +// PRETTY PACKAGE NAME should equal the project title in Doxyfile.in + +/// \defgroup PkgFeatureGraphRef Reference Manual + +/// \defgroup PkgFeatureGraphConcepts Concepts +/// \ingroup PkgFeatureGraphRef + +/// \defgroup PkgFeatureGraphDetector Feature Graph Detector +/// \ingroup PkgFeatureGraphRef +/// The detectors in this group allow the user to extract the feature graph from different types of surfaces. + +/// \defgroup PkgFeatureGraphSharpnessEstimator Sharpness Estimator +/// \ingroup PkgFeatureGraphRef +/// The detectors in this group allow the user to estimate the sharpness on surfaces. + +/// \defgroup PkgFeatureGraphNormalEstimator Normal Estimator +/// \ingroup PkgFeatureGraphRef +/// The detectors in this group allow the user to estimate the normal on surfaces. + +/*! +\addtogroup PkgFeatureGraphRef +\cgalPkgDescriptionBegin{Feature graph,PkgFeatureGraph} +\cgalPkgPicture{feature_graph_small.png} + +\cgalPkgSummaryBegin +\cgalPkgAuthors{Ange Clément} +\cgalPkgDesc{ +This package provides methods to extract a feature graph from three-dimensional surface data. +A feature graph is a data structure that represent the sharp lines on the surface. +The goal of the feature detection methods is to construct lines that can be used for future mesh generation.} +\cgalPkgManuals{Chapter_Feature_Graph,PkgFeatureGraphRef} +\cgalPkgSummaryEnd + +\cgalPkgShortInfoBegin +\cgalPkgSince{6.2} +\cgalPkgBib{cgal:c-fg} +\cgalPkgLicense{\ref licensesGPL "GPL"} +\cgalPkgShortInfoEnd +\cgalPkgDescriptionEnd + +The feature graph is extracted in multiple steps. +First, a sharpness evaluation is conducted on the surface elements. +Then, from this measure, smooth elements are discarded, +and a graph thinning process generates lines that +are guaranteed to be positioned along the highest values of the measure. +Finally, the result is refined with a correction step and an optimization phase +to ensure the correct placement of lines and corners along estimated normals. + +\cgalClassifedRefPages + +\cgalCRPSection{Concepts} + +Concept representing the input surface: + +- `FaceListGraph` + +Secondary concepts: + +- `SharpnessEstimator` +- `NormalEstimator` + +\cgalCRPSection{Feature Graph Detectors} + +- `CGAL::Feature_graph::Detect_sharp_features_on_labeled_image()` +- `CGAL::Feature_graph::Detect_sharp_features_on_surface()` + +\cgalCRPSection{Sharpness Estimators} + +- `CGAL::Feature_graph::Image_AmbrosioTortorelli::Sharpness_estimator` +- `CGAL::Feature_graph::Surface_sharpness_estimator` + +\cgalCRPSection{Normal Estimators} + +- `CGAL::Feature_graph::Image_AmbrosioTortorelli::Normal_estimator` +- `CGAL::Feature_graph::Surface_normal_estimator` + +*/ diff --git a/Feature_graph/doc/Feature_graph/dependencies b/Feature_graph/doc/Feature_graph/dependencies new file mode 100644 index 000000000000..a07b5ac7787e --- /dev/null +++ b/Feature_graph/doc/Feature_graph/dependencies @@ -0,0 +1,8 @@ +Manual +Kernel_23 +BGL +STL_Extension +Algebraic_foundations +Circulator +Stream_support +Mesh_3 diff --git a/Feature_graph/doc/Feature_graph/examples.txt b/Feature_graph/doc/Feature_graph/examples.txt new file mode 100644 index 000000000000..7b093c99b126 --- /dev/null +++ b/Feature_graph/doc/Feature_graph/examples.txt @@ -0,0 +1,3 @@ +/*! +\example Feature_graph/feature_graph_from_segmented_image.cpp +*/ \ No newline at end of file diff --git a/Feature_graph/doc/Feature_graph/fig/feature_graph_small.png b/Feature_graph/doc/Feature_graph/fig/feature_graph_small.png new file mode 100644 index 000000000000..ef198a931707 Binary files /dev/null and b/Feature_graph/doc/Feature_graph/fig/feature_graph_small.png differ diff --git a/Feature_graph/examples/Feature_graph/CMakeLists.txt b/Feature_graph/examples/Feature_graph/CMakeLists.txt new file mode 100644 index 000000000000..47c8e789e289 --- /dev/null +++ b/Feature_graph/examples/Feature_graph/CMakeLists.txt @@ -0,0 +1,61 @@ +cmake_minimum_required(VERSION 3.12...3.31) +project(Feature_graph_Examples) + +add_compile_definitions(CGAL_MESH_3_NO_DEPRECATED_SURFACE_INDEX + CGAL_MESH_3_NO_DEPRECATED_C3T3_ITERATORS) + +if(CGAL_MESH_3_VERBOSE) + add_compile_definitions(CGAL_MESH_3_VERBOSE) +endif() + +find_package(CGAL REQUIRED COMPONENTS ImageIO) + +option(CGAL_ACTIVATE_CONCURRENT_MESH_3 "Activate parallelism in Mesh_3" OFF) + +if(CGAL_ACTIVATE_CONCURRENT_MESH_3 OR "$ENV{CGAL_ACTIVATE_CONCURRENT_MESH_3}") + add_compile_definitions(CGAL_CONCURRENT_MESH_3) + find_package(TBB REQUIRED) + include(CGAL_TBB_support) +endif() + +# Use Eigen +find_package(Eigen3 QUIET) +include(CGAL_Eigen3_support) + +if(NOT TARGET CGAL::Eigen3_support) + message("NOTICE: All examples require the Eigen3 library, and will not be compiled.") + return() +endif() + +# bigobj +if (MSVC) + add_compile_options(/bigobj) +else () + add_compile_options(-Wa,-mbig-obj) +endif () + +if(TARGET CGAL::CGAL_ImageIO) + + if(CGAL_ImageIO_USE_ZLIB) + + create_single_source_cgal_program( + "feature_graph_from_segmented_image.cpp") + target_link_libraries(feature_graph_from_segmented_image + PUBLIC CGAL::Eigen3_support) + else() + message(STATUS "NOTICE: The example feature_graph_from_segmented_image.cpp need CGAL_ImageIO to be configured with ZLIB support, and will not be compiled.") + endif() + +else() + message(STATUS "NOTICE: Some examples need the CGAL_ImageIO library, and will not be compiled.") +endif() + +if(CGAL_ACTIVATE_CONCURRENT_MESH_3 AND TARGET CGAL::TBB_support) + foreach( + target + feature_graph_from_segmented_image) + if(TARGET ${target}) + target_link_libraries(${target} PRIVATE CGAL::TBB_support) + endif() + endforeach() +endif() diff --git a/Feature_graph/examples/Feature_graph/feature_graph_from_segmented_image.cpp b/Feature_graph/examples/Feature_graph/feature_graph_from_segmented_image.cpp new file mode 100644 index 000000000000..221984244f25 --- /dev/null +++ b/Feature_graph/examples/Feature_graph/feature_graph_from_segmented_image.cpp @@ -0,0 +1,127 @@ +// WARNING : non-functioning example. This exmaple is to understand how to create and use the feature graph for tetrahedral mesh creation. + +#include +#include + +// Meshing definition +#include +#include +#include + +#include +#include +#include +#include +#include + +// #include +#include +#include + +/// [Meshing definition] +#ifdef CGAL_CONCURRENT_MESH_3 +typedef CGAL::Parallel_tag Concurrency_tag; +#else +typedef CGAL::Sequential_tag Concurrency_tag; +#endif + +typedef CGAL::Exact_predicates_inexact_constructions_kernel K; +typedef CGAL::Labeled_mesh_domain_3 Image_domain; +typedef CGAL::Mesh_domain_with_polyline_features_3 Mesh_domain; + +typedef CGAL::Mesh_triangulation_3::type Tr; +typedef CGAL::Mesh_complex_3_in_triangulation_3 C3t3; + +typedef CGAL::Mesh_criteria_3 Mesh_criteria; +/// [Meshing definition] + +/// [Detector definition] +typedef CGAL::Feature_graph::Detect_sharp_features_on_labeled_image Feature_graph_detector; +/// [Detector definition] + +// To avoid verbose function and named parameters call +namespace params = CGAL::parameters; + +template +struct Polyline_visitor +{ + std::vector >& polylines; + G& graph; + Polyline_visitor(typename std::vector >& lines, G& p_graph) + : polylines(lines), graph(p_graph) + {} + + void start_new_polyline() + { + std::vector

    V; + polylines.push_back(V); + } + + void add_node(typename boost::graph_traits::vertex_descriptor vd) + { + std::vector

    & polyline = polylines.back(); + polyline.push_back(graph[vd]); + } + + void end_polyline() + { + // ignore degenerated polylines + if(polylines.back().size() < 2) + polylines.resize(polylines.size() - 1); + } +}; + +int main(int argc, char* argv[]) +{ + const std::string fname = (argc>1)?argv[1]:CGAL::data_file_path("images/quadDomainCube.inr"); + + /// [Loads image] + CGAL::Image_3 image; + if(!image.read(fname)){ + std::cerr << "Error: Cannot read file " << fname << std::endl; + return EXIT_FAILURE; + } + /// [Loads image] + + /// [Feature detection] + Feature_graph_detector feature_graph_detector; + const auto& feature_graph = feature_graph_detector(image); + /// [Feature detection] + + /// [Domain creation] + std::vector> feature_graph_polylines; + Polyline_visitor visitor(feature_graph_polylines, feature_graph); + split_graph_into_polylines(feature_graph, visitor); + Mesh_domain domain + = Mesh_domain::create_labeled_image_mesh_domain(image, + params::input_features = feature_graph_polylines); + /// [Domain creation] + + CGAL::Bbox_3 bbox = domain.bbox(); + double diag = CGAL::sqrt(CGAL::square(bbox.xmax() - bbox.xmin()) + + CGAL::square(bbox.ymax() - bbox.ymin()) + + CGAL::square(bbox.zmax() - bbox.zmin())); + double sizing_default = diag * 0.05; + + /// [Mesh criteria] + /// Note that `edge_size` is needed with 1D-features + Mesh_criteria criteria(params::edge_size = sizing_default, + params::facet_angle = 30, + params::facet_size = sizing_default, + params::facet_distance = sizing_default / 10, + params::cell_radius_edge_ratio = 0, + params::cell_size = 0 + ); + /// [Mesh criteria] + + /// [Meshing] + C3t3 c3t3 = CGAL::make_mesh_3(domain, criteria, + params::no_exude(), + params::no_perturb()); + /// [Meshing] + + // Output + CGAL::dump_c3t3(c3t3, "out"); + + return 0; +} \ No newline at end of file diff --git a/Feature_graph/include/CGAL/Feature_graph/Image_AmbrosioTortorelli.h b/Feature_graph/include/CGAL/Feature_graph/Image_AmbrosioTortorelli.h new file mode 100644 index 000000000000..06df0b769917 --- /dev/null +++ b/Feature_graph/include/CGAL/Feature_graph/Image_AmbrosioTortorelli.h @@ -0,0 +1,18 @@ +// Copyright (c) 2026 GeometryFactory +// All rights reserved. +// +// This file is part of CGAL (www.cgal.org). +// +// $URL$ +// $Id$ +// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial +// +// +// Author(s) : Ange Clement + +#ifndef CGAL_FEATURE_GRAPH_IMAGE_AMBROSIOTORTORELLI_H +#define CGAL_FEATURE_GRAPH_IMAGE_AMBROSIOTORTORELLI_H + +#include + +#endif // CGAL_FEATURE_GRAPH_IMAGE_AMBROSIOTORTORELLI_H \ No newline at end of file diff --git a/Feature_graph/include/CGAL/Feature_graph/Surface_normal_estimator.h b/Feature_graph/include/CGAL/Feature_graph/Surface_normal_estimator.h new file mode 100644 index 000000000000..31a5a7336f87 --- /dev/null +++ b/Feature_graph/include/CGAL/Feature_graph/Surface_normal_estimator.h @@ -0,0 +1,18 @@ +// Copyright (c) 2026 GeometryFactory +// All rights reserved. +// +// This file is part of CGAL (www.cgal.org). +// +// $URL$ +// $Id$ +// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial +// +// +// Author(s) : Ange Clement + +#ifndef CGAL_FEATURE_GRAPH_SURFACE_NORMAL_ESTIMATOR_H +#define CGAL_FEATURE_GRAPH_SURFACE_NORMAL_ESTIMATOR_H + +#include + +#endif // CGAL_FEATURE_GRAPH_SURFACE_NORMAL_ESTIMATOR_H \ No newline at end of file diff --git a/Feature_graph/include/CGAL/Feature_graph/Surface_sharpness_estimator.h b/Feature_graph/include/CGAL/Feature_graph/Surface_sharpness_estimator.h new file mode 100644 index 000000000000..c764e70f5629 --- /dev/null +++ b/Feature_graph/include/CGAL/Feature_graph/Surface_sharpness_estimator.h @@ -0,0 +1,18 @@ +// Copyright (c) 2026 GeometryFactory +// All rights reserved. +// +// This file is part of CGAL (www.cgal.org). +// +// $URL$ +// $Id$ +// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial +// +// +// Author(s) : Ange Clement + +#ifndef CGAL_FEATURE_GRAPH_SURFACE_SHARPNESS_ESTIMATOR_H +#define CGAL_FEATURE_GRAPH_SURFACE_SHARPNESS_ESTIMATOR_H + +#include + +#endif // CGAL_FEATURE_GRAPH_SURFACE_SHARPNESS_ESTIMATOR_H \ No newline at end of file diff --git a/Feature_graph/include/CGAL/Feature_graph/detect_sharp_features.h b/Feature_graph/include/CGAL/Feature_graph/detect_sharp_features.h new file mode 100644 index 000000000000..c1c28ff21b7c --- /dev/null +++ b/Feature_graph/include/CGAL/Feature_graph/detect_sharp_features.h @@ -0,0 +1,50 @@ +// Copyright (c) 2026 GeometryFactory +// All rights reserved. +// +// This file is part of CGAL (www.cgal.org). +// +// $URL$ +// $Id$ +// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial +// +// +// Author(s) : Ange Clement + +#ifndef CGAL_FEATURE_GRAPH_DETECT_SHARP_FEATURES_H +#define CGAL_FEATURE_GRAPH_DETECT_SHARP_FEATURES_H + +#include + +#include + +#include + +namespace CGAL +{ + +namespace Feature_graph +{ + +template +struct Detect_sharp_features_on_labeled_image +{ + typedef typename K::Point_3 Point_3; + typedef std::size_t Size; + typedef typename K::FT FT; + + typedef Point_3 VertexProperty; + typedef boost::adjacency_list Feature_graph; + + template + Feature_graph operator()(const Image& image, const CGAL_NP_CLASS& np = parameters::default_values()) const + { + // do nothing for now + return Feature_graph(); + } +}; + +} // end namespace Feature_graph + +} // end namespace CGAL + +#endif // CGAL_FEATURE_GRAPH_DETECT_SHARP_FEATURES_H \ No newline at end of file diff --git a/Feature_graph/package_info/Feature_graph/copyright b/Feature_graph/package_info/Feature_graph/copyright new file mode 100644 index 000000000000..82b520cf64cb --- /dev/null +++ b/Feature_graph/package_info/Feature_graph/copyright @@ -0,0 +1 @@ +GeometryFactory \ No newline at end of file diff --git a/Feature_graph/package_info/Feature_graph/dependencies b/Feature_graph/package_info/Feature_graph/dependencies new file mode 100644 index 000000000000..76331fefe0d7 --- /dev/null +++ b/Feature_graph/package_info/Feature_graph/dependencies @@ -0,0 +1,2 @@ +Installation +STL_Extension diff --git a/Feature_graph/package_info/Feature_graph/description.txt b/Feature_graph/package_info/Feature_graph/description.txt new file mode 100644 index 000000000000..9fc446083b61 --- /dev/null +++ b/Feature_graph/package_info/Feature_graph/description.txt @@ -0,0 +1 @@ +Sharp feature detection methods. \ No newline at end of file diff --git a/Feature_graph/package_info/Feature_graph/license.txt b/Feature_graph/package_info/Feature_graph/license.txt new file mode 100644 index 000000000000..8bb8efcb72b0 --- /dev/null +++ b/Feature_graph/package_info/Feature_graph/license.txt @@ -0,0 +1 @@ +GPL (v3 or later) diff --git a/Feature_graph/package_info/Feature_graph/long_description.txt b/Feature_graph/package_info/Feature_graph/long_description.txt new file mode 100644 index 000000000000..a904f24b5a22 --- /dev/null +++ b/Feature_graph/package_info/Feature_graph/long_description.txt @@ -0,0 +1,5 @@ +The Feature_graph package provides sharp feature detection methods. +From an input surface, a feature graph is constructed, +that represent the sharp lines in 3D space. +These lines are placed following a sharpness measure as an oracle, +and are then optimized to better fit the surface features. \ No newline at end of file diff --git a/Feature_graph/package_info/Feature_graph/maintainer b/Feature_graph/package_info/Feature_graph/maintainer new file mode 100644 index 000000000000..65d74d034673 --- /dev/null +++ b/Feature_graph/package_info/Feature_graph/maintainer @@ -0,0 +1 @@ +Ange Clément \ No newline at end of file diff --git a/Installation/include/CGAL/license/Feature_graph.h b/Installation/include/CGAL/license/Feature_graph.h new file mode 100644 index 000000000000..1ba152da9262 --- /dev/null +++ b/Installation/include/CGAL/license/Feature_graph.h @@ -0,0 +1,54 @@ +// Copyright (c) 2016 GeometryFactory SARL (France). +// All rights reserved. +// +// This file is part of CGAL (www.cgal.org) +// +// $URL$ +// $Id$ +// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial +// +// Author(s) : Andreas Fabri +// +// Warning: this file is generated, see include/CGAL/license/README.md + +#ifndef CGAL_LICENSE_FEATURE_GRAPH_H +#define CGAL_LICENSE_FEATURE_GRAPH_H + +#include +#include + +#ifdef CGAL_FEATURE_GRAPH_COMMERCIAL_LICENSE + +# if CGAL_FEATURE_GRAPH_COMMERCIAL_LICENSE < CGAL_RELEASE_DATE + +# if defined(CGAL_LICENSE_WARNING) + + CGAL_pragma_warning("Your commercial license for CGAL does not cover " + "this release of the Feature Graph package.") +# endif + +# ifdef CGAL_LICENSE_ERROR +# error "Your commercial license for CGAL does not cover this release \ + of the Feature Graph package. \ + You get this error, as you defined CGAL_LICENSE_ERROR." +# endif // CGAL_LICENSE_ERROR + +# endif // CGAL_FEATURE_GRAPH_COMMERCIAL_LICENSE < CGAL_RELEASE_DATE + +#else // no CGAL_FEATURE_GRAPH_COMMERCIAL_LICENSE + +# if defined(CGAL_LICENSE_WARNING) + CGAL_pragma_warning("\nThe macro CGAL_FEATURE_GRAPH_COMMERCIAL_LICENSE is not defined." + "\nYou use the CGAL Feature Graph package under " + "the terms of the GPLv3+.") +# endif // CGAL_LICENSE_WARNING + +# ifdef CGAL_LICENSE_ERROR +# error "The macro CGAL_FEATURE_GRAPH_COMMERCIAL_LICENSE is not defined.\ + You use the CGAL Feature Graph package under the terms of \ + the GPLv3+. You get this error, as you defined CGAL_LICENSE_ERROR." +# endif // CGAL_LICENSE_ERROR + +#endif // no CGAL_FEATURE_GRAPH_COMMERCIAL_LICENSE + +#endif // CGAL_LICENSE_FEATURE_GRAPH_H diff --git a/Installation/include/CGAL/license/gpl_package_list.txt b/Installation/include/CGAL/license/gpl_package_list.txt index 20247498f17d..8f6ffeea2e68 100644 --- a/Installation/include/CGAL/license/gpl_package_list.txt +++ b/Installation/include/CGAL/license/gpl_package_list.txt @@ -22,6 +22,7 @@ Convex_hull_3 3D Convex Hulls Convex_hull_d dD Convex Hulls and Delaunay Triangulations Envelope_2 2D Envelopes Envelope_3 3D Envelopes +Feature_graph Feature Graph Frechet_distance dD Frechet Distance GraphicsView CGAL and the Qt Graphics View Framework Heat_method_3 3D Heat Method