Open CASCADE Technology  6.9.0
Public Member Functions

ShapeAnalysis_CheckSmallFace Class Reference

Analysis of the face size. More...

#include <ShapeAnalysis_CheckSmallFace.hxx>

Public Member Functions

 ShapeAnalysis_CheckSmallFace ()
 Creates an empty tool Checks a Shape i.e. each of its faces, records checks as diagnostics in the <infos> More...
 
Standard_Integer IsSpotFace (const TopoDS_Face &F, gp_Pnt &spot, Standard_Real &spotol, const Standard_Real tol=-1.0) const
 Checks if a Face is as a Spot Returns 0 if not, 1 if yes, 2 if yes and all vertices are the same By default, considers the tolerance zone of its vertices A given value <tol> may be given to check a spot of this size If a Face is a Spot, its location is returned in <spot>, and <spotol> returns an equivalent tolerance, which is computed as half of max dimension of min-max box of the face. More...
 
Standard_Boolean CheckSpotFace (const TopoDS_Face &F, const Standard_Real tol=-1.0)
 Acts as IsSpotFace, but records in <infos> a diagnostic "SpotFace" with the Pnt as value (data "Location") More...
 
Standard_Boolean IsStripSupport (const TopoDS_Face &F, const Standard_Real tol=-1.0)
 Checks if a Face lies on a Surface which is a strip So the Face is a strip. But a Face may be a strip elsewhere .. More...
 
Standard_Boolean CheckStripEdges (const TopoDS_Edge &E1, const TopoDS_Edge &E2, const Standard_Real tol, Standard_Real &dmax) const
 Checks if two edges define a strip, i.e. distance maxi below tolerance, given or some of those of E1 and E2. More...
 
Standard_Boolean FindStripEdges (const TopoDS_Face &F, TopoDS_Edge &E1, TopoDS_Edge &E2, const Standard_Real tol, Standard_Real &dmax)
 Searchs for two and only two edges up tolerance Returns True if OK, false if not 2 edges If True, returns the two edges and their maximum distance. More...
 
Standard_Boolean CheckSingleStrip (const TopoDS_Face &F, TopoDS_Edge &E1, TopoDS_Edge &E2, const Standard_Real tol=-1.0)
 Checks if a Face is a single strip, i.e. brings two great edges which are confused on their whole length, possible other edges are small or null length. More...
 
Standard_Boolean CheckStripFace (const TopoDS_Face &F, TopoDS_Edge &E1, TopoDS_Edge &E2, const Standard_Real tol=-1.0)
 Checks if a Face is as a Strip Returns 0 if not or non determined, 1 if in U, 2 if in V By default, considers the tolerance zone of its edges A given value <tol> may be given to check a strip of max this width. More...
 
Standard_Integer CheckSplittingVertices (const TopoDS_Face &F, TopTools_DataMapOfShapeListOfShape &MapEdges, ShapeAnalysis_DataMapOfShapeListOfReal &MapParam, TopoDS_Compound &theAllVert)
 Checks if a Face brings vertices which split it, either confused with non adjacent vertices, or confused with their projection on non adjacent edges Returns the count of found splitting vertices Each vertex then brings a diagnostic "SplittingVertex", with data : "Face" for the face, "Edge" for the split edge. More...
 
Standard_Boolean CheckPin (const TopoDS_Face &F, Standard_Integer &whatrow, Standard_Integer &sence)
 Checks if a Face has a pin, which can be edited No singularity : no pin, returns 0 If there is a pin, checked topics, with returned value : More...
 
Standard_Boolean CheckTwisted (const TopoDS_Face &F, Standard_Real &paramu, Standard_Real &paramv)
 Checks if a Face is twisted (apart from checking Pin, i.e. it does not give information on pin, only "it is twisted") More...
 
Standard_Boolean CheckPinFace (const TopoDS_Face &F, TopTools_DataMapOfShapeShape &mapEdges, const Standard_Real toler=-1.0)
 
Standard_Boolean CheckPinEdges (const TopoDS_Edge &theFirstEdge, const TopoDS_Edge &theSecondEdge, const Standard_Real coef1, const Standard_Real coef2, const Standard_Real toler) const
 
Standard_Boolean Status (const ShapeExtend_Status status) const
 Returns the status of last call to Perform() ShapeExtend_OK : face was OK, nothing done ShapeExtend_DONE1: some wires are fixed ShapeExtend_DONE2: orientation of wires fixed ShapeExtend_DONE3: missing seam added ShapeExtend_DONE4: small area wire removed ShapeExtend_DONE5: natural bounds added ShapeExtend_FAIL1: some fails during fixing wires ShapeExtend_FAIL2: cannot fix orientation of wires ShapeExtend_FAIL3: cannot add missing seam ShapeExtend_FAIL4: cannot remove small area wire. More...
 
void SetTolerance (const Standard_Real tol)
 Sets a fixed Tolerance to check small face By default, local tolerance zone is considered Sets a fixed MaxTolerance to check small face Sets a fixed Tolerance to check small face By default, local tolerance zone is considered Unset fixed tolerance, comes back to local tolerance zones Unset fixed tolerance, comes back to local tolerance zones. More...
 
Standard_Real Tolerance () const
 Returns the tolerance to check small faces, negative value if local tolerances zones are to be considered. More...
 
Standard_Boolean StatusSpot (const ShapeExtend_Status status) const
 
Standard_Boolean StatusStrip (const ShapeExtend_Status status) const
 
Standard_Boolean StatusPin (const ShapeExtend_Status status) const
 
Standard_Boolean StatusTwisted (const ShapeExtend_Status status) const
 
Standard_Boolean StatusSplitVert (const ShapeExtend_Status status) const
 
Standard_Boolean StatusPinFace (const ShapeExtend_Status status) const
 
Standard_Boolean StatusPinEdges (const ShapeExtend_Status status) const
 

Detailed Description

Analysis of the face size.

Constructor & Destructor Documentation

ShapeAnalysis_CheckSmallFace::ShapeAnalysis_CheckSmallFace ( )

Creates an empty tool Checks a Shape i.e. each of its faces, records checks as diagnostics in the <infos>

If <infos> has not been set before, no check is done

For faces which are in a Shell, topological data are recorded to allow recovering connectivities after fixing or removing the small faces or parts of faces Enchains various checks on a face inshell : to compute more informations, relevant to topology

Member Function Documentation

Standard_Boolean ShapeAnalysis_CheckSmallFace::CheckPin ( const TopoDS_Face F,
Standard_Integer whatrow,
Standard_Integer sence 
)

Checks if a Face has a pin, which can be edited No singularity : no pin, returns 0 If there is a pin, checked topics, with returned value :

  • 0 : nothing to do more
  • 1 : "smooth", i.e. not a really sharp pin -> diagnostic "SmoothPin"
  • 2 : stretched pin, i.e. is possible to relimit the face by another vertex, so that this vertex still gives a pin -> diagnostic "StretchedPin" with location of vertex (Pnt)
Standard_Boolean ShapeAnalysis_CheckSmallFace::CheckPinEdges ( const TopoDS_Edge theFirstEdge,
const TopoDS_Edge theSecondEdge,
const Standard_Real  coef1,
const Standard_Real  coef2,
const Standard_Real  toler 
) const
Standard_Boolean ShapeAnalysis_CheckSmallFace::CheckPinFace ( const TopoDS_Face F,
TopTools_DataMapOfShapeShape mapEdges,
const Standard_Real  toler = -1.0 
)
Standard_Boolean ShapeAnalysis_CheckSmallFace::CheckSingleStrip ( const TopoDS_Face F,
TopoDS_Edge E1,
TopoDS_Edge E2,
const Standard_Real  tol = -1.0 
)

Checks if a Face is a single strip, i.e. brings two great edges which are confused on their whole length, possible other edges are small or null length.

Returns 0 if not a strip support, 1 strip in U, 2 strip in V Records diagnostic in info if it is a single strip

Standard_Integer ShapeAnalysis_CheckSmallFace::CheckSplittingVertices ( const TopoDS_Face F,
TopTools_DataMapOfShapeListOfShape MapEdges,
ShapeAnalysis_DataMapOfShapeListOfReal MapParam,
TopoDS_Compound theAllVert 
)

Checks if a Face brings vertices which split it, either confused with non adjacent vertices, or confused with their projection on non adjacent edges Returns the count of found splitting vertices Each vertex then brings a diagnostic "SplittingVertex", with data : "Face" for the face, "Edge" for the split edge.

Standard_Boolean ShapeAnalysis_CheckSmallFace::CheckSpotFace ( const TopoDS_Face F,
const Standard_Real  tol = -1.0 
)

Acts as IsSpotFace, but records in <infos> a diagnostic "SpotFace" with the Pnt as value (data "Location")

Standard_Boolean ShapeAnalysis_CheckSmallFace::CheckStripEdges ( const TopoDS_Edge E1,
const TopoDS_Edge E2,
const Standard_Real  tol,
Standard_Real dmax 
) const

Checks if two edges define a strip, i.e. distance maxi below tolerance, given or some of those of E1 and E2.

Standard_Boolean ShapeAnalysis_CheckSmallFace::CheckStripFace ( const TopoDS_Face F,
TopoDS_Edge E1,
TopoDS_Edge E2,
const Standard_Real  tol = -1.0 
)

Checks if a Face is as a Strip Returns 0 if not or non determined, 1 if in U, 2 if in V By default, considers the tolerance zone of its edges A given value <tol> may be given to check a strip of max this width.

If a Face is determined as a Strip, it is delinited by two lists of edges. These lists are recorded in diagnostic Diagnostic "StripFace" brings data "Direction" (U or V), "List1" , "List2" (if they could be computed)

Standard_Boolean ShapeAnalysis_CheckSmallFace::CheckTwisted ( const TopoDS_Face F,
Standard_Real paramu,
Standard_Real paramv 
)

Checks if a Face is twisted (apart from checking Pin, i.e. it does not give information on pin, only "it is twisted")

Standard_Boolean ShapeAnalysis_CheckSmallFace::FindStripEdges ( const TopoDS_Face F,
TopoDS_Edge E1,
TopoDS_Edge E2,
const Standard_Real  tol,
Standard_Real dmax 
)

Searchs for two and only two edges up tolerance Returns True if OK, false if not 2 edges If True, returns the two edges and their maximum distance.

Standard_Integer ShapeAnalysis_CheckSmallFace::IsSpotFace ( const TopoDS_Face F,
gp_Pnt spot,
Standard_Real spotol,
const Standard_Real  tol = -1.0 
) const

Checks if a Face is as a Spot Returns 0 if not, 1 if yes, 2 if yes and all vertices are the same By default, considers the tolerance zone of its vertices A given value <tol> may be given to check a spot of this size If a Face is a Spot, its location is returned in <spot>, and <spotol> returns an equivalent tolerance, which is computed as half of max dimension of min-max box of the face.

Standard_Boolean ShapeAnalysis_CheckSmallFace::IsStripSupport ( const TopoDS_Face F,
const Standard_Real  tol = -1.0 
)

Checks if a Face lies on a Surface which is a strip So the Face is a strip. But a Face may be a strip elsewhere ..

A given value <tol> may be given to check max width By default, considers the tolerance zone of its edges Returns 0 if not a strip support, 1 strip in U, 2 strip in V

void ShapeAnalysis_CheckSmallFace::SetTolerance ( const Standard_Real  tol)

Sets a fixed Tolerance to check small face By default, local tolerance zone is considered Sets a fixed MaxTolerance to check small face Sets a fixed Tolerance to check small face By default, local tolerance zone is considered Unset fixed tolerance, comes back to local tolerance zones Unset fixed tolerance, comes back to local tolerance zones.

Standard_Boolean ShapeAnalysis_CheckSmallFace::Status ( const ShapeExtend_Status  status) const

Returns the status of last call to Perform() ShapeExtend_OK : face was OK, nothing done ShapeExtend_DONE1: some wires are fixed ShapeExtend_DONE2: orientation of wires fixed ShapeExtend_DONE3: missing seam added ShapeExtend_DONE4: small area wire removed ShapeExtend_DONE5: natural bounds added ShapeExtend_FAIL1: some fails during fixing wires ShapeExtend_FAIL2: cannot fix orientation of wires ShapeExtend_FAIL3: cannot add missing seam ShapeExtend_FAIL4: cannot remove small area wire.

Standard_Boolean ShapeAnalysis_CheckSmallFace::StatusPin ( const ShapeExtend_Status  status) const
Standard_Boolean ShapeAnalysis_CheckSmallFace::StatusPinEdges ( const ShapeExtend_Status  status) const
Standard_Boolean ShapeAnalysis_CheckSmallFace::StatusPinFace ( const ShapeExtend_Status  status) const
Standard_Boolean ShapeAnalysis_CheckSmallFace::StatusSplitVert ( const ShapeExtend_Status  status) const
Standard_Boolean ShapeAnalysis_CheckSmallFace::StatusSpot ( const ShapeExtend_Status  status) const
Standard_Boolean ShapeAnalysis_CheckSmallFace::StatusStrip ( const ShapeExtend_Status  status) const
Standard_Boolean ShapeAnalysis_CheckSmallFace::StatusTwisted ( const ShapeExtend_Status  status) const
Standard_Real ShapeAnalysis_CheckSmallFace::Tolerance ( ) const

Returns the tolerance to check small faces, negative value if local tolerances zones are to be considered.


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