|
Open CASCADE Technology
6.7.1
|
This operator allows to perform various fixes on face
and its wires: fixes provided by ShapeFix_Wire,
fixing orientation of wires, addition of natural bounds,
fixing of missing seam edge,
and detection and removal of null-area wires
More...
#include <ShapeFix_Face.hxx>

Public Member Functions | |
| ShapeFix_Face () | |
| Creates an empty tool More... | |
| ShapeFix_Face (const TopoDS_Face &face) | |
| Creates a tool and loads a face More... | |
| virtual void | ClearModes () |
| Sets all modes to default More... | |
| void | Init (const TopoDS_Face &face) |
| Loads a whole face already created, with its wires, sense and location More... | |
| void | Init (const Handle< Geom_Surface > &surf, const Standard_Real preci, const Standard_Boolean fwd=Standard_True) |
| Starts the creation of the face By default it will be FORWARD, or REVERSED if <fwd> is False More... | |
| void | Init (const Handle< ShapeAnalysis_Surface > &surf, const Standard_Real preci, const Standard_Boolean fwd=Standard_True) |
| Starts the creation of the face By default it will be FORWARD, or REVERSED if <fwd> is False More... | |
| virtual void | SetMsgRegistrator (const Handle< ShapeExtend_BasicMsgRegistrator > &msgreg) |
| Sets message registrator More... | |
| virtual void | SetPrecision (const Standard_Real preci) |
| Sets basic precision value (also to FixWireTool) More... | |
| virtual void | SetMinTolerance (const Standard_Real mintol) |
| Sets minimal allowed tolerance (also to FixWireTool) More... | |
| virtual void | SetMaxTolerance (const Standard_Real maxtol) |
| Sets maximal allowed tolerance (also to FixWireTool) More... | |
| Standard_Integer & | FixWireMode () |
| Returns (modifiable) the mode for applying fixes of ShapeFix_Wire, by default True. More... | |
| Standard_Integer & | FixOrientationMode () |
| Returns (modifiable) the fix orientation mode, by default True. If True, wires oriented to border limited square. More... | |
| Standard_Integer & | FixAddNaturalBoundMode () |
| Returns (modifiable) the add natural bound mode. If true, natural boundary is added on faces that miss them. Default is False for faces with single wire (they are handled by FixOrientation in that case) and True for others. More... | |
| Standard_Integer & | FixMissingSeamMode () |
| Returns (modifiable) the fix missing seam mode, by default True. If True, tries to insert seam is missed. More... | |
| Standard_Integer & | FixSmallAreaWireMode () |
| Returns (modifiable) the fix small area wire mode, by default False. If True, drops small wires. More... | |
| Standard_Integer & | FixIntersectingWiresMode () |
| Returns (modifiable) the fix intersecting wires mode by default True. More... | |
| Standard_Integer & | FixLoopWiresMode () |
| Returns (modifiable) the fix loop wires mode by default True. More... | |
| Standard_Integer & | FixSplitFaceMode () |
| Returns (modifiable) the fix split face mode by default True. More... | |
| Standard_Integer & | AutoCorrectPrecisionMode () |
| Returns (modifiable) the auto-correct precision mode by default False. More... | |
| Standard_Integer & | FixPeriodicDegeneratedMode () |
| Returns (modifiable) the activation flag for periodic degenerated fix. False by default. More... | |
| TopoDS_Face | Face () const |
Returns a face which corresponds to the current state <br> Warning: The finally produced face may be another one ... but with the | |
| TopoDS_Shape | Result () const |
| Returns resulting shape (Face or Shell if splitted) To be used instead of Face() if FixMissingSeam involved More... | |
| void | Add (const TopoDS_Wire &wire) |
| Add a wire to current face using BRep_Builder. Wire is added without taking into account orientation of face (as if face were FORWARD). More... | |
| Standard_Boolean | Perform () |
Performs all the fixes, depending on modes <br> Function Status returns the status of last call to Perform() | |
| Standard_Boolean | FixOrientation () |
| Fixes orientation of wires on the face It tries to make all wires lie outside all others (according to orientation) by reversing orientation of some of them. If face lying on sphere or torus has single wire and AddNaturalBoundMode is True, that wire is not reversed in any case (supposing that natural bound will be added). Returns True if wires were reversed More... | |
| Standard_Boolean | FixOrientation (TopTools_DataMapOfShapeListOfShape &MapWires) |
| Fixes orientation of wires on the face It tries to make all wires lie outside all others (according to orientation) by reversing orientation of some of them. If face lying on sphere or torus has single wire and AddNaturalBoundMode is True, that wire is not reversed in any case (supposing that natural bound will be added). Returns True if wires were reversed OutWires return information about out wires + list of internal wires for each (for performing split face). More... | |
| Standard_Boolean | FixAddNaturalBound () |
| Adds natural boundary on face if it is missing. Two cases are supported: More... | |
| Standard_Boolean | FixMissingSeam () |
| Detects and fixes the special case when face on a closed surface is given by two wires closed in 3d but with gap in 2d. In that case it creates a new wire from the two, and adds a missing seam edge Returns True if missing seam was added More... | |
| Standard_Boolean | FixSmallAreaWire () |
Detects wires with small area (that is less than <br>
100*Precision::PConfusion(). Removes these wires if they are internal. <br>
Returns : True if at least one small wire removed, | |
| Standard_Boolean | FixLoopWire (TopTools_SequenceOfShape &aResWires) |
| Detects if wire has a loop and fixes this situation by splitting on the few parts. if wire has a loops and it was splitted Status was set to value ShapeExtend_DONE6. More... | |
| Standard_Boolean | FixIntersectingWires () |
| Detects and fixes the special case when face has more than one wire and this wires have intersection point More... | |
| Standard_Boolean | FixWiresTwoCoincEdges () |
If wire contains two coincidence edges it must be removed <br> | |
| Standard_Boolean | FixSplitFace (const TopTools_DataMapOfShapeListOfShape &MapWires) |
| Split face if there are more than one out wire using inrormation after FixOrientation() More... | |
| Standard_Boolean | FixPeriodicDegenerated () |
| Fixes topology for a specific case when face is composed by a single wire belting a periodic surface. In that case a degenerated edge is reconstructed in the degenerated pole of the surface. Initial wire gets consistent orientation. Must be used in couple and before FixMissingSeam routine More... | |
| 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_DONE8: face may be splited 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... | |
| Handle_ShapeFix_Wire | FixWireTool () |
| Returns tool for fixing wires. More... | |
Public Member Functions inherited from ShapeFix_Root | |
| ShapeFix_Root () | |
| Empty Constructor (no context is created) More... | |
| virtual void | Set (const Handle< ShapeFix_Root > &Root) |
| Copy all fields from another Root object More... | |
| virtual void | SetContext (const Handle< ShapeBuild_ReShape > &context) |
| Sets context More... | |
| Handle_ShapeBuild_ReShape | Context () const |
| Returns context More... | |
| Handle_ShapeExtend_BasicMsgRegistrator | MsgRegistrator () const |
| Returns message registrator More... | |
| Standard_Real | Precision () const |
| Returns basic precision value More... | |
| Standard_Real | MinTolerance () const |
| Returns minimal allowed tolerance More... | |
| Standard_Real | MaxTolerance () const |
| Returns maximal allowed tolerance More... | |
| Standard_Real | LimitTolerance (const Standard_Real toler) const |
| Returns tolerance limited by [myMinTol,myMaxTol] More... | |
| void | SendMsg (const TopoDS_Shape &shape, const Message_Msg &message, const Message_Gravity gravity=Message_Info) const |
| Sends a message to be attached to the shape. Calls corresponding message of message registrator. More... | |
| void | SendMsg (const Message_Msg &message, const Message_Gravity gravity=Message_Info) const |
| Sends a message to be attached to myShape. Calls previous method. More... | |
| void | SendWarning (const TopoDS_Shape &shape, const Message_Msg &message) const |
| Sends a warning to be attached to the shape. Calls SendMsg with gravity set to Message_Warning. More... | |
| void | SendWarning (const Message_Msg &message) const |
| Calls previous method for myShape. More... | |
| void | SendFail (const TopoDS_Shape &shape, const Message_Msg &message) const |
| Sends a fail to be attached to the shape. Calls SendMsg with gravity set to Message_Fail. More... | |
| void | SendFail (const Message_Msg &message) const |
| Calls previous method for myShape. More... | |
Public Member Functions inherited from MMgt_TShared | |
| virtual void | Delete () const |
| Memory deallocator for transient classes. More... | |
Public Member Functions inherited from Standard_Transient | |
| Standard_Transient () | |
| Empty constructor. More... | |
| Standard_Transient (const Standard_Transient &) | |
| Copy constructor – does nothing. More... | |
| Standard_Transient & | operator= (const Standard_Transient &) |
| Assignment operator, needed to avoid copying reference counter. More... | |
| virtual | ~Standard_Transient () |
| Destructor must be virtual. More... | |
| virtual void | ShallowDump (Standard_OStream &) const |
| virtual const Handle_Standard_Type & | DynamicType () const |
| Returns a type information object about this object. More... | |
| Standard_Boolean | IsInstance (const Handle_Standard_Type &theType) const |
| Returns a true value if this is an instance of Type. More... | |
| Standard_Boolean | IsInstance (const Standard_CString theTypeName) const |
| Returns a true value if this is an instance of TypeName. More... | |
| Standard_Boolean | IsKind (const Handle_Standard_Type &theType) const |
| Returns true if this is an instance of Type or an instance of any class that inherits from Type. Note that multiple inheritance is not supported by OCCT RTTI mechanism. More... | |
| Standard_Boolean | IsKind (const Standard_CString theTypeName) const |
| Returns true if this is an instance of TypeName or an instance of any class that inherits from TypeName. Note that multiple inheritance is not supported by OCCT RTTI mechanism. More... | |
| virtual Handle_Standard_Transient | This () const |
| Returns a Handle which references this object. Must never be called to objects created in stack. More... | |
| Standard_Integer | GetRefCount () const |
| Get the reference counter of this object. More... | |
Protected Attributes | |
| Handle_ShapeAnalysis_Surface | mySurf |
| TopoDS_Face | myFace |
| TopoDS_Shape | myResult |
| Handle_ShapeFix_Wire | myFixWire |
| Standard_Boolean | myFwd |
| Standard_Integer | myStatus |
Protected Attributes inherited from ShapeFix_Root | |
| TopoDS_Shape | myShape |
Additional Inherited Members | |
Static Protected Member Functions inherited from ShapeFix_Root | |
| static Standard_Boolean | NeedFix (const Standard_Integer flag, const Standard_Boolean def=Standard_True) |
| Auxiliary method for work with three-position (on/off/default) flags (modes) in ShapeFix. More... | |
This operator allows to perform various fixes on face
and its wires: fixes provided by ShapeFix_Wire,
fixing orientation of wires, addition of natural bounds,
fixing of missing seam edge,
and detection and removal of null-area wires
| ShapeFix_Face::ShapeFix_Face | ( | ) |
Creates an empty tool
| ShapeFix_Face::ShapeFix_Face | ( | const TopoDS_Face & | face | ) |
Creates a tool and loads a face
| void ShapeFix_Face::Add | ( | const TopoDS_Wire & | wire | ) |
Add a wire to current face using BRep_Builder.
Wire is added without taking into account orientation of face
(as if face were FORWARD).
| Standard_Integer& ShapeFix_Face::AutoCorrectPrecisionMode | ( | ) |
Returns (modifiable) the auto-correct precision mode
by default False.
|
virtual |
Sets all modes to default
| TopoDS_Face ShapeFix_Face::Face | ( | ) | const |
Returns a face which corresponds to the current state <br>
Warning: The finally produced face may be another one ... but with the
same support
| Standard_Boolean ShapeFix_Face::FixAddNaturalBound | ( | ) |
Adds natural boundary on face if it is missing.
Two cases are supported:
| Standard_Integer& ShapeFix_Face::FixAddNaturalBoundMode | ( | ) |
Returns (modifiable) the add natural bound mode.
If true, natural boundary is added on faces that miss them.
Default is False for faces with single wire (they are
handled by FixOrientation in that case) and True for others.
| Standard_Boolean ShapeFix_Face::FixIntersectingWires | ( | ) |
Detects and fixes the special case when face has more than one wire
and this wires have intersection point
| Standard_Integer& ShapeFix_Face::FixIntersectingWiresMode | ( | ) |
Returns (modifiable) the fix intersecting wires mode
by default True.
| Standard_Boolean ShapeFix_Face::FixLoopWire | ( | TopTools_SequenceOfShape & | aResWires | ) |
Detects if wire has a loop and fixes this situation by splitting on the few parts.
if wire has a loops and it was splitted Status was set to value ShapeExtend_DONE6.
| Standard_Integer& ShapeFix_Face::FixLoopWiresMode | ( | ) |
Returns (modifiable) the fix loop wires mode
by default True.
| Standard_Boolean ShapeFix_Face::FixMissingSeam | ( | ) |
Detects and fixes the special case when face on a closed
surface is given by two wires closed in 3d but with gap in 2d.
In that case it creates a new wire from the two, and adds a
missing seam edge
Returns True if missing seam was added
| Standard_Integer& ShapeFix_Face::FixMissingSeamMode | ( | ) |
Returns (modifiable) the fix missing seam mode, by default
True. If True, tries to insert seam is missed.
| Standard_Boolean ShapeFix_Face::FixOrientation | ( | ) |
Fixes orientation of wires on the face
It tries to make all wires lie outside all others (according
to orientation) by reversing orientation of some of them.
If face lying on sphere or torus has single wire and
AddNaturalBoundMode is True, that wire is not reversed in
any case (supposing that natural bound will be added).
Returns True if wires were reversed
| Standard_Boolean ShapeFix_Face::FixOrientation | ( | TopTools_DataMapOfShapeListOfShape & | MapWires | ) |
Fixes orientation of wires on the face
It tries to make all wires lie outside all others (according
to orientation) by reversing orientation of some of them.
If face lying on sphere or torus has single wire and
AddNaturalBoundMode is True, that wire is not reversed in
any case (supposing that natural bound will be added).
Returns True if wires were reversed
OutWires return information about out wires + list of
internal wires for each (for performing split face).
| Standard_Integer& ShapeFix_Face::FixOrientationMode | ( | ) |
Returns (modifiable) the fix orientation mode, by default
True. If True, wires oriented to border limited square.
| Standard_Boolean ShapeFix_Face::FixPeriodicDegenerated | ( | ) |
Fixes topology for a specific case when face is composed
by a single wire belting a periodic surface. In that case
a degenerated edge is reconstructed in the degenerated pole
of the surface. Initial wire gets consistent orientation.
Must be used in couple and before FixMissingSeam routine
| Standard_Integer& ShapeFix_Face::FixPeriodicDegeneratedMode | ( | ) |
Returns (modifiable) the activation flag for periodic
degenerated fix. False by default.
| Standard_Boolean ShapeFix_Face::FixSmallAreaWire | ( | ) |
Detects wires with small area (that is less than <br>
100*Precision::PConfusion(). Removes these wires if they are internal. <br>
Returns : True if at least one small wire removed,
False if does nothing.
| Standard_Integer& ShapeFix_Face::FixSmallAreaWireMode | ( | ) |
Returns (modifiable) the fix small area wire mode, by default
False. If True, drops small wires.
| Standard_Boolean ShapeFix_Face::FixSplitFace | ( | const TopTools_DataMapOfShapeListOfShape & | MapWires | ) |
Split face if there are more than one out wire
using inrormation after FixOrientation()
| Standard_Integer& ShapeFix_Face::FixSplitFaceMode | ( | ) |
Returns (modifiable) the fix split face mode
by default True.
| Standard_Integer& ShapeFix_Face::FixWireMode | ( | ) |
Returns (modifiable) the mode for applying fixes of
ShapeFix_Wire, by default True.
| Standard_Boolean ShapeFix_Face::FixWiresTwoCoincEdges | ( | ) |
If wire contains two coincidence edges it must be removed <br>
Queries on status after Perform()
| Handle_ShapeFix_Wire ShapeFix_Face::FixWireTool | ( | ) |
Returns tool for fixing wires.
| void ShapeFix_Face::Init | ( | const TopoDS_Face & | face | ) |
Loads a whole face already created, with its wires, sense and
location
| void ShapeFix_Face::Init | ( | const Handle< Geom_Surface > & | surf, |
| const Standard_Real | preci, | ||
| const Standard_Boolean | fwd = Standard_True |
||
| ) |
Starts the creation of the face
By default it will be FORWARD, or REVERSED if <fwd> is False
| void ShapeFix_Face::Init | ( | const Handle< ShapeAnalysis_Surface > & | surf, |
| const Standard_Real | preci, | ||
| const Standard_Boolean | fwd = Standard_True |
||
| ) |
Starts the creation of the face
By default it will be FORWARD, or REVERSED if <fwd> is False
| Standard_Boolean ShapeFix_Face::Perform | ( | ) |
Performs all the fixes, depending on modes <br>
Function Status 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
| TopoDS_Shape ShapeFix_Face::Result | ( | ) | const |
Returns resulting shape (Face or Shell if splitted)
To be used instead of Face() if FixMissingSeam involved
|
virtual |
Sets maximal allowed tolerance (also to FixWireTool)
Reimplemented from ShapeFix_Root.
|
virtual |
Sets minimal allowed tolerance (also to FixWireTool)
Reimplemented from ShapeFix_Root.
|
virtual |
Sets message registrator
Reimplemented from ShapeFix_Root.
|
virtual |
Sets basic precision value (also to FixWireTool)
Reimplemented from ShapeFix_Root.
| Standard_Boolean ShapeFix_Face::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_DONE8: face may be splited
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
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
1.8.5