CGAL 6.3 - Feature Graph
Loading...
Searching...
No Matches
CGAL::Feature_graph::Detect_sharp_features_on_surface< K > Struct Template Reference

#include <CGAL/Feature_graph/detect_sharp_features.h>

Definition

template<typename K>
struct CGAL::Feature_graph::Detect_sharp_features_on_surface< K >

Detector for sharp feature extraction in surfaces.

It constructs a feature graph model of VertexAndEdgeListGraph.

Template Parameters
Kthe requirements for the geometric objects, model of Kernel.
See also
Detect_sharp_features_on_labeled_image

Types

typedef K::Point_3 Point_3
 Output feature graph point type.
typedef std::size_t Size
 Natural number type.
typedef K::FT FT
 Numerical type.

Detector

template<typename PolygonMesh, typename NamedParameters = CGAL::parameters::Default_named_parameters>
unspecified_type operator() (const PolygonMesh &pmesh, const NamedParameters &np=parameters::default_values()) const
 detects and constructs the feature graph from a surface

Member Function Documentation

◆ operator()()

template<typename K>
template<typename PolygonMesh, typename NamedParameters = CGAL::parameters::Default_named_parameters>
unspecified_type CGAL::Feature_graph::Detect_sharp_features_on_surface< K >::operator() ( const PolygonMesh & pmesh,
const NamedParameters & np = parameters::default_values() ) const

detects and constructs the feature graph from a surface

The feature graph has polylines that lie on the sharp features of the surface.

Template Parameters
PolygonMesha model of FaceListGraph that represents a surface mesh.
Parameters
pmesha polygon mesh from where the sharp features are extracted.
npan optional sequence of Named Parameters among the ones listed below:
Optional Named Parameters
  • 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 <typename DimensionTag, typename Descriptor>
      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.
  • Default: FT(0.0)
  • Extra: 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.
  • 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 <typename DimensionTag, typename Descriptor>
      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.
  • Default: FT(-1.0)
  • Extra: Negative values implies the use of the parameter parameters::line_distance_threshold.
  • 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 <typename DimensionTag, typename Descriptor>
      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.
  • Default: FT(-1.0)
  • Extra: Negative values implies the use of the parameter parameters::line_distance_threshold.
  • 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 <typename DimensionTag, typename Descriptor>
      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.
  • Default: FT(-1.0)
  • Extra: Negative values implies the use of the parameter parameters::line_distance_threshold.
  • a boolean indicating if the optimization step is called.
  • Default: true
  • the maximum number of iterations of the gradient descent during the optimization step.
  • Default: Size(20)
  • the step size at the first iteration of the gradient descent during the optimization step.
  • Default: FT(0.0)
  • the step size at the last iteration of the gradient descent during the optimization step.
  • Default: FT(0.0)
  • the minimum energy change to stop the gradient descent iterations during the optimization step.
  • Default: FT(1.e-3)
  • the distance to collapse adjacent points in a line during the gradient descent of the optimization step.
  • Default: FT(0.0)
  • 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.
  • Default: FT(1.0)
  • the distance to refine the normals of elements near the sharp features during the optimization step.
  • Default: FT(0.0)
  • the distance to collect elements near the sharp features to determine the adjacent planes during the optimization step.
  • Default: FT(0.0)
  • 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.
  • Default: parameters::default()
Returns
a graph model of VertexAndEdgeListGraph containing the constructed features.