Analysis Situs // SDK
asiAlgo_SampleFace Class Reference

#include <asiAlgo_SampleFace.h>

Inheritance diagram for asiAlgo_SampleFace:
Collaboration diagram for asiAlgo_SampleFace:

Public Types

enum  PmcAlgo { PmcAlgo_Precise, PmcAlgo_Haines, PmcAlgo_Discrete }
 PMC algorithm to use. More...
 

Public Member Functions

asiAlgo_EXPORT asiAlgo_SampleFace (const TopoDS_Face &face, ActAPI_ProgressEntry progress=nullptr, ActAPI_PlotterEntry plotter=nullptr)
 
asiAlgo_EXPORT void SetSquare (const bool square)
 
asiAlgo_EXPORT void SetPmcAlgo (const PmcAlgo algo)
 
asiAlgo_EXPORT bool Perform (const int numBins)
 
const asiAlgo_EXPORT Handle_asiAlgo_UniformGrid< float > & GetResult () const
 
asiAlgo_EXPORT Handle_asiAlgo_BaseCloud< double > GetResult3d () const
 
const asiAlgo_EXPORT Handle_asiAlgo::discr::Model & GetDiscrModel () const
 
- Public Member Functions inherited from ActAPI_IAlgorithm
ActAPI_ProgressEntryGetProgress () const
 
ActAPI_PlotterEntryGetPlotter () const
 
void SetStatusFlags (const Standard_Integer status)
 
Standard_Integer GetStatusFlags () const
 
void AddStatusFlag (const Standard_Integer statBit)
 
Standard_Boolean HasStatusFlag (const Standard_Integer statBit) const
 

Static Public Member Functions

static asiAlgo_EXPORT bool Wire2Polygon (const TopoDS_Wire &wire, const TopoDS_Face &face, std::vector< gp_XY > &polygon)
 Converts the passed wire of the given face to a polygon.
 

Protected Member Functions

asiAlgo_Membership classify (const gp_Pnt2d &PonS)
 
- Protected Member Functions inherited from ActAPI_IAlgorithm
ActData_EXPORT ActAPI_IAlgorithm (ActAPI_ProgressEntry progress, ActAPI_PlotterEntry plotter)
 

Protected Attributes

bool m_bSquare
 Indicates whether the uniform grid we construct should be a square.
 
PmcAlgo m_algo
 Classification algorithm.
 
TopoDS_Face m_face
 Face to sample.
 
double m_fUmin
 Parametric bounds of the sampled face.
 
double m_fUmax
 
double m_fVmin
 
double m_fVmax
 
IntTools_FClass2d m_class
 Precise classifier.
 
Handle_asiAlgo::discr::Classifier2d m_discrClass
 Discrete classifier.
 
Handle_asiAlgo_UniformGrid< float > m_grid
 Uniform grid which is the result of the uniform sampling.
 
std::vector< gp_XY > m_polygon
 Discretized polygon.
 
Handle_asiAlgo::discr::Model m_discrModel
 Discrete model.
 
- Protected Attributes inherited from ActAPI_IAlgorithm
ActAPI_ProgressEntry m_progress
 Progress Notifier.
 
ActAPI_PlotterEntry m_plotter
 Imperative Plotter.
 
Standard_Integer m_iStatusFlags
 

Detailed Description

Samples the UV domain of a face by overlaying a uniform grid.

Member Enumeration Documentation

◆ PmcAlgo

PMC algorithm to use.

Enumerator
PmcAlgo_Precise 

Precise OpenCascade-based classifier.

PmcAlgo_Haines 

Discrete Haines algorithm.

PmcAlgo_Discrete 

Discrete row-based algorithm.

Constructor & Destructor Documentation

◆ asiAlgo_SampleFace()

asiAlgo_EXPORT asiAlgo_SampleFace::asiAlgo_SampleFace ( const TopoDS_Face &  face,
ActAPI_ProgressEntry  progress = nullptr,
ActAPI_PlotterEntry  plotter = nullptr 
)

Ctor.

Parameters
[in]facethe face in question.
[in]progressthe progress notifier.
[in]plotterthe imperative plotter.

Member Function Documentation

◆ classify()

asiAlgo_Membership asiAlgo_SampleFace::classify ( const gp_Pnt2d &  PonS)
protected

Performs point-face classification.

Parameters
[in]PonSthe point to classify.
Returns
classification result.

◆ GetDiscrModel()

const asiAlgo_EXPORT Handle_asiAlgo::discr::Model& asiAlgo_SampleFace::GetDiscrModel ( ) const
Returns
discrete model.

◆ GetResult()

const asiAlgo_EXPORT Handle_asiAlgo_UniformGrid<float>& asiAlgo_SampleFace::GetResult ( ) const
Returns
resulting grid.

◆ GetResult3d()

asiAlgo_EXPORT Handle_asiAlgo_BaseCloud<double> asiAlgo_SampleFace::GetResult3d ( ) const
Returns
the sampled points in the modeling space.

◆ Perform()

asiAlgo_EXPORT bool asiAlgo_SampleFace::Perform ( const int  numBins)

Performs face sampling.

Parameters
[in]numBinsthe number of discretization steps.
Returns
true in case of success, false – otherwise.

◆ SetPmcAlgo()

asiAlgo_EXPORT void asiAlgo_SampleFace::SetPmcAlgo ( const PmcAlgo  algo)

Sets the PMC algorithm to use.

Parameters
[in]algothe algorithm to set.

◆ SetSquare()

asiAlgo_EXPORT void asiAlgo_SampleFace::SetSquare ( const bool  square)

Sets a Boolean flag indicating whether the planar decomposition we are constructing should be a square.

Parameters
[in]squarethe Boolean value to set.

The documentation for this class was generated from the following file: