Open CASCADE Technology Reference Manual 8.0.0
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | Protected Attributes
ShapeFix_Wire Class Reference

This class provides a set of tools for repairing a wire. More...

#include <ShapeFix_Wire.hxx>

Inheritance diagram for ShapeFix_Wire:
Inheritance graph
[legend]

Public Member Functions

 ShapeFix_Wire ()
 Empty Constructor, creates clear object with default flags.
 
 ShapeFix_Wire (const TopoDS_Wire &wire, const TopoDS_Face &face, const double prec)
 Create new object with default flags and prepare it for use (Loads analyzer with all the data for the wire and face)
 
void ClearModes ()
 Sets all modes to default.
 
void ClearStatuses ()
 Clears all statuses.
 
void Init (const TopoDS_Wire &wire, const TopoDS_Face &face, const double prec)
 Load analyzer with all the data for the wire and face and drops all fixing statuses.
 
void Init (const occ::handle< ShapeAnalysis_Wire > &saw)
 Load analyzer with all the data already prepared and drops all fixing statuses If analyzer contains face, there is no need to set it by SetFace or SetSurface.
 
void Load (const TopoDS_Wire &wire)
 Load data for the wire, and drops all fixing statuses.
 
void Load (const occ::handle< ShapeExtend_WireData > &sbwd)
 Load data for the wire, and drops all fixing statuses.
 
void SetFace (const TopoDS_Face &face)
 Set working face for the wire.
 
void SetFace (const TopoDS_Face &theFace, const occ::handle< ShapeAnalysis_Surface > &theSurfaceAnalysis)
 Set working face for the wire and surface analysis object.
 
void SetSurface (const occ::handle< ShapeAnalysis_Surface > &theSurfaceAnalysis)
 Set surface analysis for the wire.
 
void SetSurface (const occ::handle< Geom_Surface > &surf)
 Set surface for the wire.
 
void SetSurface (const occ::handle< Geom_Surface > &surf, const TopLoc_Location &loc)
 Set surface for the wire.
 
void SetPrecision (const double prec) override
 Set working precision (to root and to analyzer)
 
void SetMaxTailAngle (const double theMaxTailAngle)
 Sets the maximal allowed angle of the tails in radians.
 
void SetMaxTailWidth (const double theMaxTailWidth)
 Sets the maximal allowed width of the tails.
 
bool IsLoaded () const
 Tells if the wire is loaded.
 
bool IsReady () const
 Tells if the wire and face are loaded.
 
int NbEdges () const
 returns number of edges in the working wire
 
TopoDS_Wire Wire () const
 Makes the resulting Wire (by basic Brep_Builder)
 
TopoDS_Wire WireAPIMake () const
 Makes the resulting Wire (by BRepAPI_MakeWire)
 
occ::handle< ShapeAnalysis_WireAnalyzer () const
 returns field Analyzer (working tool)
 
const occ::handle< ShapeExtend_WireData > & WireData () const
 returns working wire
 
const TopoDS_FaceFace () const
 returns working face (Analyzer.Face())
 
boolModifyTopologyMode ()
 Returns (modifiable) the flag which defines whether it is allowed to modify topology of the wire during fixing (adding/removing edges etc.)
 
boolModifyGeometryMode ()
 Returns (modifiable) the flag which defines whether the Fix..() methods are allowed to modify geometry of the edges and vertices.
 
intModifyRemoveLoopMode ()
 Returns (modifiable) the flag which defines whether the Fix..() methods are allowed to modify RemoveLoop of the edges.
 
boolClosedWireMode ()
 Returns (modifiable) the flag which defines whether the wire is to be closed (by calling methods like FixDegenerated() and FixConnected() for last and first edges).
 
boolPreferencePCurveMode ()
 Returns (modifiable) the flag which defines whether the 2d (True) representation of the wire is preferable over 3d one (in the case of ambiguity in FixEdgeCurves).
 
boolFixGapsByRangesMode ()
 Returns (modifiable) the flag which defines whether tool tries to fix gaps first by changing curves ranges (i.e. using intersection, extrema, projections) or not.
 
intFixReorderMode ()
 
intFixSmallMode ()
 
intFixConnectedMode ()
 
intFixEdgeCurvesMode ()
 
intFixDegeneratedMode ()
 
intFixSelfIntersectionMode ()
 
intFixLackingMode ()
 
intFixGaps3dMode ()
 
intFixGaps2dMode ()
 Returns (modifiable) the flag for corresponding Fix..() method which defines whether this method will be called from the method APIFix(): -1 default 1 method will be called 0 method will not be called.
 
intFixReversed2dMode ()
 
intFixRemovePCurveMode ()
 
intFixAddPCurveMode ()
 
intFixRemoveCurve3dMode ()
 
intFixAddCurve3dMode ()
 
intFixSeamMode ()
 
intFixShiftedMode ()
 
intFixSameParameterMode ()
 
intFixVertexToleranceMode ()
 
intFixNotchedEdgesMode ()
 
intFixSelfIntersectingEdgeMode ()
 
intFixIntersectingEdgesMode ()
 
intFixNonAdjacentIntersectingEdgesMode ()
 Returns (modifiable) the flag for corresponding Fix..() method which defines whether this method will be called from the corresponding Fix..() method of the public level: -1 default 1 method will be called 0 method will not be called.
 
intFixTailMode ()
 
bool Perform (const Message_ProgressRange &theProgress=Message_ProgressRange())
 This method performs all the available fixes. If some fix is turned on or off explicitly by the Fix..Mode() flag, this fix is either called or not depending on that flag. Else (i.e. if flag is default) fix is called depending on the situation: some fixes are not called or are limited if order of edges in the wire is not OK, or depending on modes.
 
bool FixReorder (bool theModeBoth=false)
 Performs an analysis and reorders edges in the wire using class WireOrder. Flag <theModeBoth> determines the use of miscible mode if necessary.
 
int FixSmall (const bool lockvtx, const double precsmall=0.0)
 Applies FixSmall(num) to all edges in the wire.
 
bool FixConnected (const double prec=-1.0)
 Applies FixConnected(num) to all edges in the wire Connection between first and last edges is treated only if flag ClosedMode is True If <prec> is -1 then MaxTolerance() is taken.
 
bool FixEdgeCurves ()
 Groups the fixes dealing with 3d and pcurves of the edges. The order of the fixes and the default behaviour are: ShapeFix_Edge::FixReversed2d ShapeFix_Edge::FixRemovePCurve (only if forced) ShapeFix_Edge::FixAddPCurve ShapeFix_Edge::FixRemoveCurve3d (only if forced) ShapeFix_Edge::FixAddCurve3d FixSeam, FixShifted, ShapeFix_Edge::FixSameParameter.
 
bool FixDegenerated ()
 Applies FixDegenerated(num) to all edges in the wire Connection between first and last edges is treated only if flag ClosedMode is True.
 
bool FixSelfIntersection ()
 Applies FixSelfIntersectingEdge(num) and FixIntersectingEdges(num) to all edges in the wire and FixIntersectingEdges(num1, num2) for all pairs num1 and num2 such that num2 >= num1 + 2 and removes wrong edges if any.
 
bool FixLacking (const bool force=false)
 Applies FixLacking(num) to all edges in the wire Connection between first and last edges is treated only if flag ClosedMode is True If <force> is False (default), test for connectness is done with precision of vertex between edges, else it is done with minimal value of vertex tolerance and Analyzer.Precision(). Hence, <force> will lead to inserting lacking edges in replacement of vertices which have big tolerances.
 
bool FixClosed (const double prec=-1.0)
 Fixes a wire to be well closed It performs FixConnected, FixDegenerated and FixLacking between last and first edges (independingly on flag ClosedMode and modes for these fixings) If <prec> is -1 then MaxTolerance() is taken.
 
bool FixGaps3d ()
 Fixes gaps between ends of 3d curves on adjacent edges myPrecision is used to detect the gaps.
 
bool FixGaps2d ()
 Fixes gaps between ends of pcurves on adjacent edges myPrecision is used to detect the gaps.
 
bool FixReorder (const ShapeAnalysis_WireOrder &wi)
 Reorder edges in the wire as determined by WireOrder that should be filled and computed before.
 
bool FixSmall (const int num, const bool lockvtx, const double precsmall)
 Fixes Null Length Edge to be removed If an Edge has Null Length (regarding preci, or <precsmall>
 
bool FixConnected (const int num, const double prec, const bool theUpdateWire=true)
 Fixes connected edges (preceding and current) Forces Vertices (end of preceding-begin of current) to be the same one Tests with starting preci or, if given greater, <prec> If <prec> is -1 then MaxTolerance() is taken. If <theUpdateWire> is true, synchronizes wire data with context replacements.
 
bool FixSeam (const int num)
 Fixes a seam edge A Seam edge has two pcurves, one for forward. one for reversed The forward pcurve must be set as first.
 
bool FixShifted ()
 Fixes edges which have pcurves shifted by whole parameter range on the closed surface (the case may occur if pcurve of edge was computed by projecting 3d curve, which goes along the seam). It compares each two consequent edges and tries to connect them if distance between ends is near to range of the surface. It also can detect and fix the case if all pcurves are connected, but lie out of parametric bounds of the surface. In addition to FixShifted from ShapeFix_Wire, more sophisticated check of degenerate points is performed, and special cases like sphere given by two meridians are treated.
 
bool FixDegenerated (const int num)
 Fixes Degenerated Edge Checks an <num-th> edge or a point between <num>th-1 and <num>th edges for a singularity on a supporting surface. If singularity is detected, either adds new degenerated edge (before <num>th), or makes <num>th edge to be degenerated.
 
bool FixLacking (const int num, const bool force=false)
 Fixes Lacking Edge Test if two adjucent edges are disconnected in 2d (while connected in 3d), and in that case either increase tolerance of the vertex or add a new edge (straight in 2d space), in order to close wire in 2d. Returns True if edge was added or tolerance was increased.
 
bool FixNotchedEdges ()
 
bool FixGap3d (const int num, const bool convert=false)
 Fixes gap between ends of 3d curves on num-1 and num-th edges. myPrecision is used to detect the gap. If convert is True, converts curves to bsplines to bend.
 
bool FixGap2d (const int num, const bool convert=false)
 Fixes gap between ends of pcurves on num-1 and num-th edges. myPrecision is used to detect the gap. If convert is True, converts pcurves to bsplines to bend.
 
bool FixTails ()
 
bool StatusReorder (const ShapeExtend_Status status) const
 
bool StatusSmall (const ShapeExtend_Status status) const
 
bool StatusConnected (const ShapeExtend_Status status) const
 
bool StatusEdgeCurves (const ShapeExtend_Status status) const
 
bool StatusDegenerated (const ShapeExtend_Status status) const
 
bool StatusSelfIntersection (const ShapeExtend_Status status) const
 
bool StatusLacking (const ShapeExtend_Status status) const
 
bool StatusClosed (const ShapeExtend_Status status) const
 
bool StatusGaps3d (const ShapeExtend_Status status) const
 
bool StatusGaps2d (const ShapeExtend_Status status) const
 
bool StatusNotches (const ShapeExtend_Status status) const
 
bool StatusRemovedSegment () const
 Querying the status of performed API fixing procedures Each Status..() methods gives information about the last call to the corresponding Fix..() method of API level: OK : no problems detected; nothing done DONE: some problem(s) was(were) detected and successfully fixed FAIL: some problem(s) cannot be fixed.
 
bool StatusFixTails (const ShapeExtend_Status status) const
 
bool LastFixStatus (const ShapeExtend_Status status) const
 Queries the status of last call to methods Fix... of advanced level For details see corresponding methods; universal statuses are: OK : problem not detected; nothing done DONE: problem was detected and successfully fixed FAIL: problem cannot be fixed.
 
occ::handle< ShapeFix_EdgeFixEdgeTool () const
 Returns tool for fixing wires.
 
- Public Member Functions inherited from ShapeFix_Root
 ShapeFix_Root ()
 Empty Constructor (no context is created)
 
virtual void Set (const occ::handle< ShapeFix_Root > &Root)
 Copy all fields from another Root object.
 
virtual void SetContext (const occ::handle< ShapeBuild_ReShape > &context)
 Sets context.
 
occ::handle< ShapeBuild_ReShapeContext () const
 Returns context.
 
virtual void SetMsgRegistrator (const occ::handle< ShapeExtend_BasicMsgRegistrator > &msgreg)
 Sets message registrator.
 
occ::handle< ShapeExtend_BasicMsgRegistratorMsgRegistrator () const
 Returns message registrator.
 
double Precision () const
 Returns basic precision value.
 
virtual void SetMinTolerance (const double mintol)
 Sets minimal allowed tolerance.
 
double MinTolerance () const
 Returns minimal allowed tolerance.
 
virtual void SetMaxTolerance (const double maxtol)
 Sets maximal allowed tolerance.
 
double MaxTolerance () const
 Returns maximal allowed tolerance.
 
double LimitTolerance (const double toler) const
 Returns tolerance limited by [myMinTol,myMaxTol].
 
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.
 
void SendMsg (const Message_Msg &message, const Message_Gravity gravity=Message_Info) const
 Sends a message to be attached to myShape. Calls previous method.
 
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.
 
void SendWarning (const Message_Msg &message) const
 Calls previous method for myShape.
 
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.
 
void SendFail (const Message_Msg &message) const
 Calls previous method for myShape.
 
- Public Member Functions inherited from Standard_Transient
 Standard_Transient ()
 Empty constructor.
 
 Standard_Transient (const Standard_Transient &)
 Copy constructor – does nothing.
 
Standard_Transientoperator= (const Standard_Transient &)
 Assignment operator, needed to avoid copying reference counter.
 
virtual ~Standard_Transient ()=default
 Destructor must be virtual.
 
virtual const opencascade::handle< Standard_Type > & DynamicType () const
 Returns a type descriptor about this object.
 
bool IsInstance (const opencascade::handle< Standard_Type > &theType) const
 Returns a true value if this is an instance of Type.
 
bool IsInstance (const char *const theTypeName) const
 Returns a true value if this is an instance of TypeName.
 
bool IsKind (const opencascade::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.
 
bool IsKind (const char *const 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.
 
Standard_TransientThis () const
 Returns non-const pointer to this object (like const_cast). For protection against creating handle to objects allocated in stack or call from constructor, it will raise exception Standard_ProgramError if reference counter is zero.
 
int GetRefCount () const noexcept
 Get the reference counter of this object.
 
void IncrementRefCounter () noexcept
 Increments the reference counter of this object. Uses relaxed memory ordering since incrementing only requires atomicity, not synchronization with other memory operations.
 
int DecrementRefCounter () noexcept
 Decrements the reference counter of this object; returns the decremented value. Uses release ordering for the decrement to ensure all writes to the object are visible before the count reaches zero. An acquire fence is added only when the count reaches zero, ensuring proper synchronization before deletion. This is more efficient than using acq_rel for every decrement.
 
virtual void Delete () const
 Memory deallocator for transient classes.
 

Protected Member Functions

void UpdateWire ()
 Updates WireData if some replacements are made This is necessary for wires (unlike other shape types) since one edge can present in wire several times.
 

Protected Attributes

occ::handle< ShapeFix_EdgemyFixEdge
 
occ::handle< ShapeAnalysis_WiremyAnalyzer
 
bool myGeomMode
 
bool myTopoMode
 
bool myClosedMode
 
bool myPreference2d
 
bool myFixGapsByRanges
 
int myFixReversed2dMode
 
int myFixRemovePCurveMode
 
int myFixAddPCurveMode
 
int myFixRemoveCurve3dMode
 
int myFixAddCurve3dMode
 
int myFixSeamMode
 
int myFixShiftedMode
 
int myFixSameParameterMode
 
int myFixVertexToleranceMode
 
int myFixNotchedEdgesMode
 
int myFixSelfIntersectingEdgeMode
 
int myFixIntersectingEdgesMode
 
int myFixNonAdjacentIntersectingEdgesMode
 
int myFixTailMode
 
int myRemoveLoopMode
 
int myFixReorderMode
 
int myFixSmallMode
 
int myFixConnectedMode
 
int myFixEdgeCurvesMode
 
int myFixDegeneratedMode
 
int myFixSelfIntersectionMode
 
int myFixLackingMode
 
int myFixGaps3dMode
 
int myFixGaps2dMode
 
int myLastFixStatus
 
int myStatusReorder
 
int myStatusSmall
 
int myStatusConnected
 
int myStatusEdgeCurves
 
int myStatusDegenerated
 
int myStatusClosed
 
int myStatusSelfIntersection
 
int myStatusLacking
 
int myStatusGaps3d
 
int myStatusGaps2d
 
bool myStatusRemovedSegment
 
int myStatusNotches
 
int myStatusFixTails
 
double myMaxTailAngleSine
 
double myMaxTailWidth
 
- Protected Attributes inherited from ShapeFix_Root
TopoDS_Shape myShape
 

Additional Inherited Members

- Public Types inherited from Standard_Transient
typedef void base_type
 Returns a type descriptor about this object.
 
- Static Public Member Functions inherited from Standard_Transient
static constexpr const charget_type_name ()
 Returns a type descriptor about this object.
 
static const opencascade::handle< Standard_Type > & get_type_descriptor ()
 Returns type descriptor of Standard_Transient class.
 
- Static Protected Member Functions inherited from ShapeFix_Root
static bool NeedFix (const int flag, const bool def=true)
 Auxiliary method for work with three-position (on/off/default) flags (modes) in ShapeFix.
 

Detailed Description

This class provides a set of tools for repairing a wire.

These are methods Fix...(), organised in two levels:

Level 1: Advanced - each method in this level fixes one separate problem, usually dealing with either single edge or connection of the two adjacent edges. These methods should be used carefully and called in right sequence, because some of them depend on others.

Level 2: Public (API) - methods which group several methods of level 1 and call them in a proper sequence in order to make some consistent set of fixes for a whole wire. It is possible to control calls to methods of the advanced level from methods of the public level by use of flags Fix..Mode() (see below).

Fixes can be made in three ways:

  1. Increasing tolerance of an edge or a vertex
  2. Changing topology (adding/removing/replacing edge in the wire and/or replacing the vertex in the edge)
  3. Changing geometry (shifting vertex or adjusting ends of edge curve to vertices, or recomputing curves of the edge)

When fix can be made in more than one way (e.g., either by increasing tolerance or shifting a vertex), it is chosen according to the flags: ModifyTopologyMode - allows modification of the topology. This flag can be set when fixing a wire on the separate (free) face, and should be unset for face which is part of shell. ModifyGeometryMode - allows modification of the geometry.

The order of descriptions of Fix() methods in this CDL approximately corresponds to the optimal order of calls.

NOTE: most of fixing methods expect edges in the ShapeExtend_WireData to be ordered, so it is necessary to make call to FixReorder() before any other fixes

ShapeFix_Wire should be initialized prior to any fix by the following data: a) Wire (ether TopoDS_Wire or ShapeExtend_Wire) b) Face or surface c) Precision d) Maximal tail angle and width This can be done either by calling corresponding methods (LoadWire, SetFace or SetSurface, SetPrecision, SetMaxTailAngle and SetMaxTailWidth), or by loading already filled ShapeAnalisis_Wire with method Load

Constructor & Destructor Documentation

◆ ShapeFix_Wire() [1/2]

ShapeFix_Wire::ShapeFix_Wire ( )

Empty Constructor, creates clear object with default flags.

◆ ShapeFix_Wire() [2/2]

ShapeFix_Wire::ShapeFix_Wire ( const TopoDS_Wire & wire,
const TopoDS_Face & face,
const double prec )

Create new object with default flags and prepare it for use (Loads analyzer with all the data for the wire and face)

Member Function Documentation

◆ Analyzer()

occ::handle< ShapeAnalysis_Wire > ShapeFix_Wire::Analyzer ( ) const

returns field Analyzer (working tool)

◆ ClearModes()

void ShapeFix_Wire::ClearModes ( )

Sets all modes to default.

◆ ClearStatuses()

void ShapeFix_Wire::ClearStatuses ( )

Clears all statuses.

◆ ClosedWireMode()

bool & ShapeFix_Wire::ClosedWireMode ( )

Returns (modifiable) the flag which defines whether the wire is to be closed (by calling methods like FixDegenerated() and FixConnected() for last and first edges).

◆ Face()

const TopoDS_Face & ShapeFix_Wire::Face ( ) const

returns working face (Analyzer.Face())

◆ FixAddCurve3dMode()

int & ShapeFix_Wire::FixAddCurve3dMode ( )

◆ FixAddPCurveMode()

int & ShapeFix_Wire::FixAddPCurveMode ( )

◆ FixClosed()

bool ShapeFix_Wire::FixClosed ( const double prec = -1.0)

Fixes a wire to be well closed It performs FixConnected, FixDegenerated and FixLacking between last and first edges (independingly on flag ClosedMode and modes for these fixings) If <prec> is -1 then MaxTolerance() is taken.

◆ FixConnected() [1/2]

bool ShapeFix_Wire::FixConnected ( const double prec = -1.0)

Applies FixConnected(num) to all edges in the wire Connection between first and last edges is treated only if flag ClosedMode is True If <prec> is -1 then MaxTolerance() is taken.

◆ FixConnected() [2/2]

bool ShapeFix_Wire::FixConnected ( const int num,
const double prec,
const bool theUpdateWire = true )

Fixes connected edges (preceding and current) Forces Vertices (end of preceding-begin of current) to be the same one Tests with starting preci or, if given greater, <prec> If <prec> is -1 then MaxTolerance() is taken. If <theUpdateWire> is true, synchronizes wire data with context replacements.

◆ FixConnectedMode()

int & ShapeFix_Wire::FixConnectedMode ( )

◆ FixDegenerated() [1/2]

bool ShapeFix_Wire::FixDegenerated ( )

Applies FixDegenerated(num) to all edges in the wire Connection between first and last edges is treated only if flag ClosedMode is True.

◆ FixDegenerated() [2/2]

bool ShapeFix_Wire::FixDegenerated ( const int num)

Fixes Degenerated Edge Checks an <num-th> edge or a point between <num>th-1 and <num>th edges for a singularity on a supporting surface. If singularity is detected, either adds new degenerated edge (before <num>th), or makes <num>th edge to be degenerated.

◆ FixDegeneratedMode()

int & ShapeFix_Wire::FixDegeneratedMode ( )

◆ FixEdgeCurves()

bool ShapeFix_Wire::FixEdgeCurves ( )

Groups the fixes dealing with 3d and pcurves of the edges. The order of the fixes and the default behaviour are: ShapeFix_Edge::FixReversed2d ShapeFix_Edge::FixRemovePCurve (only if forced) ShapeFix_Edge::FixAddPCurve ShapeFix_Edge::FixRemoveCurve3d (only if forced) ShapeFix_Edge::FixAddCurve3d FixSeam, FixShifted, ShapeFix_Edge::FixSameParameter.

◆ FixEdgeCurvesMode()

int & ShapeFix_Wire::FixEdgeCurvesMode ( )

◆ FixEdgeTool()

occ::handle< ShapeFix_Edge > ShapeFix_Wire::FixEdgeTool ( ) const

Returns tool for fixing wires.

◆ FixGap2d()

bool ShapeFix_Wire::FixGap2d ( const int num,
const bool convert = false )

Fixes gap between ends of pcurves on num-1 and num-th edges. myPrecision is used to detect the gap. If convert is True, converts pcurves to bsplines to bend.

◆ FixGap3d()

bool ShapeFix_Wire::FixGap3d ( const int num,
const bool convert = false )

Fixes gap between ends of 3d curves on num-1 and num-th edges. myPrecision is used to detect the gap. If convert is True, converts curves to bsplines to bend.

◆ FixGaps2d()

bool ShapeFix_Wire::FixGaps2d ( )

Fixes gaps between ends of pcurves on adjacent edges myPrecision is used to detect the gaps.

◆ FixGaps2dMode()

int & ShapeFix_Wire::FixGaps2dMode ( )

Returns (modifiable) the flag for corresponding Fix..() method which defines whether this method will be called from the method APIFix(): -1 default 1 method will be called 0 method will not be called.

◆ FixGaps3d()

bool ShapeFix_Wire::FixGaps3d ( )

Fixes gaps between ends of 3d curves on adjacent edges myPrecision is used to detect the gaps.

◆ FixGaps3dMode()

int & ShapeFix_Wire::FixGaps3dMode ( )

◆ FixGapsByRangesMode()

bool & ShapeFix_Wire::FixGapsByRangesMode ( )

Returns (modifiable) the flag which defines whether tool tries to fix gaps first by changing curves ranges (i.e. using intersection, extrema, projections) or not.

◆ FixIntersectingEdgesMode()

int & ShapeFix_Wire::FixIntersectingEdgesMode ( )

◆ FixLacking() [1/2]

bool ShapeFix_Wire::FixLacking ( const bool force = false)

Applies FixLacking(num) to all edges in the wire Connection between first and last edges is treated only if flag ClosedMode is True If <force> is False (default), test for connectness is done with precision of vertex between edges, else it is done with minimal value of vertex tolerance and Analyzer.Precision(). Hence, <force> will lead to inserting lacking edges in replacement of vertices which have big tolerances.

◆ FixLacking() [2/2]

bool ShapeFix_Wire::FixLacking ( const int num,
const bool force = false )

Fixes Lacking Edge Test if two adjucent edges are disconnected in 2d (while connected in 3d), and in that case either increase tolerance of the vertex or add a new edge (straight in 2d space), in order to close wire in 2d. Returns True if edge was added or tolerance was increased.

◆ FixLackingMode()

int & ShapeFix_Wire::FixLackingMode ( )

◆ FixNonAdjacentIntersectingEdgesMode()

int & ShapeFix_Wire::FixNonAdjacentIntersectingEdgesMode ( )

Returns (modifiable) the flag for corresponding Fix..() method which defines whether this method will be called from the corresponding Fix..() method of the public level: -1 default 1 method will be called 0 method will not be called.

◆ FixNotchedEdges()

bool ShapeFix_Wire::FixNotchedEdges ( )

◆ FixNotchedEdgesMode()

int & ShapeFix_Wire::FixNotchedEdgesMode ( )

◆ FixRemoveCurve3dMode()

int & ShapeFix_Wire::FixRemoveCurve3dMode ( )

◆ FixRemovePCurveMode()

int & ShapeFix_Wire::FixRemovePCurveMode ( )

◆ FixReorder() [1/2]

bool ShapeFix_Wire::FixReorder ( bool theModeBoth = false)

Performs an analysis and reorders edges in the wire using class WireOrder. Flag <theModeBoth> determines the use of miscible mode if necessary.

◆ FixReorder() [2/2]

bool ShapeFix_Wire::FixReorder ( const ShapeAnalysis_WireOrder & wi)

Reorder edges in the wire as determined by WireOrder that should be filled and computed before.

◆ FixReorderMode()

int & ShapeFix_Wire::FixReorderMode ( )

◆ FixReversed2dMode()

int & ShapeFix_Wire::FixReversed2dMode ( )

◆ FixSameParameterMode()

int & ShapeFix_Wire::FixSameParameterMode ( )

◆ FixSeam()

bool ShapeFix_Wire::FixSeam ( const int num)

Fixes a seam edge A Seam edge has two pcurves, one for forward. one for reversed The forward pcurve must be set as first.

NOTE that correct order of pcurves in the seam edge depends on its orientation (i.e., on orientation of the wire, method of exploration of edges etc.). Since wire represented by the ShapeExtend_WireData is always forward (orientation is accounted by edges), it will work correct if:

  1. Wire created from ShapeExtend_WireData with methods ShapeExtend_WireData::Wire..() is added into the FORWARD face (orientation can be applied later)
  2. Wire is extracted from the face with orientation not composed with orientation of the face

◆ FixSeamMode()

int & ShapeFix_Wire::FixSeamMode ( )

◆ FixSelfIntersectingEdgeMode()

int & ShapeFix_Wire::FixSelfIntersectingEdgeMode ( )

◆ FixSelfIntersection()

bool ShapeFix_Wire::FixSelfIntersection ( )

Applies FixSelfIntersectingEdge(num) and FixIntersectingEdges(num) to all edges in the wire and FixIntersectingEdges(num1, num2) for all pairs num1 and num2 such that num2 >= num1 + 2 and removes wrong edges if any.

◆ FixSelfIntersectionMode()

int & ShapeFix_Wire::FixSelfIntersectionMode ( )

◆ FixShifted()

bool ShapeFix_Wire::FixShifted ( )

Fixes edges which have pcurves shifted by whole parameter range on the closed surface (the case may occur if pcurve of edge was computed by projecting 3d curve, which goes along the seam). It compares each two consequent edges and tries to connect them if distance between ends is near to range of the surface. It also can detect and fix the case if all pcurves are connected, but lie out of parametric bounds of the surface. In addition to FixShifted from ShapeFix_Wire, more sophisticated check of degenerate points is performed, and special cases like sphere given by two meridians are treated.

◆ FixShiftedMode()

int & ShapeFix_Wire::FixShiftedMode ( )

◆ FixSmall() [1/2]

int ShapeFix_Wire::FixSmall ( const bool lockvtx,
const double precsmall = 0.0 )

Applies FixSmall(num) to all edges in the wire.

◆ FixSmall() [2/2]

bool ShapeFix_Wire::FixSmall ( const int num,
const bool lockvtx,
const double precsmall )

Fixes Null Length Edge to be removed If an Edge has Null Length (regarding preci, or <precsmall>

  • what is smaller), it should be removed It can be with no problem if its two vertices are the same Else, if lockvtx is False, it is removed and its end vertex is put on the preceding edge But if lockvtx is True, this edge must be kept ...

◆ FixSmallMode()

int & ShapeFix_Wire::FixSmallMode ( )

◆ FixTailMode()

int & ShapeFix_Wire::FixTailMode ( )

◆ FixTails()

bool ShapeFix_Wire::FixTails ( )

◆ FixVertexToleranceMode()

int & ShapeFix_Wire::FixVertexToleranceMode ( )

◆ Init() [1/2]

void ShapeFix_Wire::Init ( const occ::handle< ShapeAnalysis_Wire > & saw)

Load analyzer with all the data already prepared and drops all fixing statuses If analyzer contains face, there is no need to set it by SetFace or SetSurface.

◆ Init() [2/2]

void ShapeFix_Wire::Init ( const TopoDS_Wire & wire,
const TopoDS_Face & face,
const double prec )

Load analyzer with all the data for the wire and face and drops all fixing statuses.

◆ IsLoaded()

bool ShapeFix_Wire::IsLoaded ( ) const

Tells if the wire is loaded.

◆ IsReady()

bool ShapeFix_Wire::IsReady ( ) const

Tells if the wire and face are loaded.

◆ LastFixStatus()

bool ShapeFix_Wire::LastFixStatus ( const ShapeExtend_Status status) const

Queries the status of last call to methods Fix... of advanced level For details see corresponding methods; universal statuses are: OK : problem not detected; nothing done DONE: problem was detected and successfully fixed FAIL: problem cannot be fixed.

◆ Load() [1/2]

void ShapeFix_Wire::Load ( const occ::handle< ShapeExtend_WireData > & sbwd)

Load data for the wire, and drops all fixing statuses.

◆ Load() [2/2]

void ShapeFix_Wire::Load ( const TopoDS_Wire & wire)

Load data for the wire, and drops all fixing statuses.

◆ ModifyGeometryMode()

bool & ShapeFix_Wire::ModifyGeometryMode ( )

Returns (modifiable) the flag which defines whether the Fix..() methods are allowed to modify geometry of the edges and vertices.

◆ ModifyRemoveLoopMode()

int & ShapeFix_Wire::ModifyRemoveLoopMode ( )

Returns (modifiable) the flag which defines whether the Fix..() methods are allowed to modify RemoveLoop of the edges.

◆ ModifyTopologyMode()

bool & ShapeFix_Wire::ModifyTopologyMode ( )

Returns (modifiable) the flag which defines whether it is allowed to modify topology of the wire during fixing (adding/removing edges etc.)

◆ NbEdges()

int ShapeFix_Wire::NbEdges ( ) const

returns number of edges in the working wire

◆ Perform()

bool ShapeFix_Wire::Perform ( const Message_ProgressRange & theProgress = Message_ProgressRange())

This method performs all the available fixes. If some fix is turned on or off explicitly by the Fix..Mode() flag, this fix is either called or not depending on that flag. Else (i.e. if flag is default) fix is called depending on the situation: some fixes are not called or are limited if order of edges in the wire is not OK, or depending on modes.

The order of the fixes and default behaviour of Perform() are: FixReorder FixSmall (with lockvtx true if ! TopoMode or if wire is not ordered) FixConnected (if wire is ordered) FixEdgeCurves (without FixShifted if wire is not ordered) FixDegenerated (if wire is ordered) FixSelfIntersection (if wire is ordered and ClosedMode is True) FixLacking (if wire is ordered)

◆ PreferencePCurveMode()

bool & ShapeFix_Wire::PreferencePCurveMode ( )

Returns (modifiable) the flag which defines whether the 2d (True) representation of the wire is preferable over 3d one (in the case of ambiguity in FixEdgeCurves).

◆ SetFace() [1/2]

void ShapeFix_Wire::SetFace ( const TopoDS_Face & face)

Set working face for the wire.

◆ SetFace() [2/2]

void ShapeFix_Wire::SetFace ( const TopoDS_Face & theFace,
const occ::handle< ShapeAnalysis_Surface > & theSurfaceAnalysis )

Set working face for the wire and surface analysis object.

◆ SetMaxTailAngle()

void ShapeFix_Wire::SetMaxTailAngle ( const double theMaxTailAngle)

Sets the maximal allowed angle of the tails in radians.

◆ SetMaxTailWidth()

void ShapeFix_Wire::SetMaxTailWidth ( const double theMaxTailWidth)

Sets the maximal allowed width of the tails.

◆ SetPrecision()

void ShapeFix_Wire::SetPrecision ( const double prec)
overridevirtual

Set working precision (to root and to analyzer)

Reimplemented from ShapeFix_Root.

◆ SetSurface() [1/3]

void ShapeFix_Wire::SetSurface ( const occ::handle< Geom_Surface > & surf)

Set surface for the wire.

◆ SetSurface() [2/3]

void ShapeFix_Wire::SetSurface ( const occ::handle< Geom_Surface > & surf,
const TopLoc_Location & loc )

Set surface for the wire.

◆ SetSurface() [3/3]

void ShapeFix_Wire::SetSurface ( const occ::handle< ShapeAnalysis_Surface > & theSurfaceAnalysis)

Set surface analysis for the wire.

◆ StatusClosed()

bool ShapeFix_Wire::StatusClosed ( const ShapeExtend_Status status) const

◆ StatusConnected()

bool ShapeFix_Wire::StatusConnected ( const ShapeExtend_Status status) const

◆ StatusDegenerated()

bool ShapeFix_Wire::StatusDegenerated ( const ShapeExtend_Status status) const

◆ StatusEdgeCurves()

bool ShapeFix_Wire::StatusEdgeCurves ( const ShapeExtend_Status status) const

◆ StatusFixTails()

bool ShapeFix_Wire::StatusFixTails ( const ShapeExtend_Status status) const

◆ StatusGaps2d()

bool ShapeFix_Wire::StatusGaps2d ( const ShapeExtend_Status status) const

◆ StatusGaps3d()

bool ShapeFix_Wire::StatusGaps3d ( const ShapeExtend_Status status) const

◆ StatusLacking()

bool ShapeFix_Wire::StatusLacking ( const ShapeExtend_Status status) const

◆ StatusNotches()

bool ShapeFix_Wire::StatusNotches ( const ShapeExtend_Status status) const

◆ StatusRemovedSegment()

bool ShapeFix_Wire::StatusRemovedSegment ( ) const

Querying the status of performed API fixing procedures Each Status..() methods gives information about the last call to the corresponding Fix..() method of API level: OK : no problems detected; nothing done DONE: some problem(s) was(were) detected and successfully fixed FAIL: some problem(s) cannot be fixed.

◆ StatusReorder()

bool ShapeFix_Wire::StatusReorder ( const ShapeExtend_Status status) const

◆ StatusSelfIntersection()

bool ShapeFix_Wire::StatusSelfIntersection ( const ShapeExtend_Status status) const

◆ StatusSmall()

bool ShapeFix_Wire::StatusSmall ( const ShapeExtend_Status status) const

◆ UpdateWire()

void ShapeFix_Wire::UpdateWire ( )
protected

Updates WireData if some replacements are made This is necessary for wires (unlike other shape types) since one edge can present in wire several times.

◆ Wire()

TopoDS_Wire ShapeFix_Wire::Wire ( ) const

Makes the resulting Wire (by basic Brep_Builder)

◆ WireAPIMake()

TopoDS_Wire ShapeFix_Wire::WireAPIMake ( ) const

Makes the resulting Wire (by BRepAPI_MakeWire)

◆ WireData()

const occ::handle< ShapeExtend_WireData > & ShapeFix_Wire::WireData ( ) const

returns working wire

Field Documentation

◆ myAnalyzer

occ::handle<ShapeAnalysis_Wire> ShapeFix_Wire::myAnalyzer
protected

◆ myClosedMode

bool ShapeFix_Wire::myClosedMode
protected

◆ myFixAddCurve3dMode

int ShapeFix_Wire::myFixAddCurve3dMode
protected

◆ myFixAddPCurveMode

int ShapeFix_Wire::myFixAddPCurveMode
protected

◆ myFixConnectedMode

int ShapeFix_Wire::myFixConnectedMode
protected

◆ myFixDegeneratedMode

int ShapeFix_Wire::myFixDegeneratedMode
protected

◆ myFixEdge

occ::handle<ShapeFix_Edge> ShapeFix_Wire::myFixEdge
protected

◆ myFixEdgeCurvesMode

int ShapeFix_Wire::myFixEdgeCurvesMode
protected

◆ myFixGaps2dMode

int ShapeFix_Wire::myFixGaps2dMode
protected

◆ myFixGaps3dMode

int ShapeFix_Wire::myFixGaps3dMode
protected

◆ myFixGapsByRanges

bool ShapeFix_Wire::myFixGapsByRanges
protected

◆ myFixIntersectingEdgesMode

int ShapeFix_Wire::myFixIntersectingEdgesMode
protected

◆ myFixLackingMode

int ShapeFix_Wire::myFixLackingMode
protected

◆ myFixNonAdjacentIntersectingEdgesMode

int ShapeFix_Wire::myFixNonAdjacentIntersectingEdgesMode
protected

◆ myFixNotchedEdgesMode

int ShapeFix_Wire::myFixNotchedEdgesMode
protected

◆ myFixRemoveCurve3dMode

int ShapeFix_Wire::myFixRemoveCurve3dMode
protected

◆ myFixRemovePCurveMode

int ShapeFix_Wire::myFixRemovePCurveMode
protected

◆ myFixReorderMode

int ShapeFix_Wire::myFixReorderMode
protected

◆ myFixReversed2dMode

int ShapeFix_Wire::myFixReversed2dMode
protected

◆ myFixSameParameterMode

int ShapeFix_Wire::myFixSameParameterMode
protected

◆ myFixSeamMode

int ShapeFix_Wire::myFixSeamMode
protected

◆ myFixSelfIntersectingEdgeMode

int ShapeFix_Wire::myFixSelfIntersectingEdgeMode
protected

◆ myFixSelfIntersectionMode

int ShapeFix_Wire::myFixSelfIntersectionMode
protected

◆ myFixShiftedMode

int ShapeFix_Wire::myFixShiftedMode
protected

◆ myFixSmallMode

int ShapeFix_Wire::myFixSmallMode
protected

◆ myFixTailMode

int ShapeFix_Wire::myFixTailMode
protected

◆ myFixVertexToleranceMode

int ShapeFix_Wire::myFixVertexToleranceMode
protected

◆ myGeomMode

bool ShapeFix_Wire::myGeomMode
protected

◆ myLastFixStatus

int ShapeFix_Wire::myLastFixStatus
protected

◆ myMaxTailAngleSine

double ShapeFix_Wire::myMaxTailAngleSine
protected

◆ myMaxTailWidth

double ShapeFix_Wire::myMaxTailWidth
protected

◆ myPreference2d

bool ShapeFix_Wire::myPreference2d
protected

◆ myRemoveLoopMode

int ShapeFix_Wire::myRemoveLoopMode
protected

◆ myStatusClosed

int ShapeFix_Wire::myStatusClosed
protected

◆ myStatusConnected

int ShapeFix_Wire::myStatusConnected
protected

◆ myStatusDegenerated

int ShapeFix_Wire::myStatusDegenerated
protected

◆ myStatusEdgeCurves

int ShapeFix_Wire::myStatusEdgeCurves
protected

◆ myStatusFixTails

int ShapeFix_Wire::myStatusFixTails
protected

◆ myStatusGaps2d

int ShapeFix_Wire::myStatusGaps2d
protected

◆ myStatusGaps3d

int ShapeFix_Wire::myStatusGaps3d
protected

◆ myStatusLacking

int ShapeFix_Wire::myStatusLacking
protected

◆ myStatusNotches

int ShapeFix_Wire::myStatusNotches
protected

◆ myStatusRemovedSegment

bool ShapeFix_Wire::myStatusRemovedSegment
protected

◆ myStatusReorder

int ShapeFix_Wire::myStatusReorder
protected

◆ myStatusSelfIntersection

int ShapeFix_Wire::myStatusSelfIntersection
protected

◆ myStatusSmall

int ShapeFix_Wire::myStatusSmall
protected

◆ myTopoMode

bool ShapeFix_Wire::myTopoMode
protected

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