Open CASCADE Technology 7.8.0
Public Member Functions
ShapeFix_WireSegment Class Reference

This class is auxiliary class (data storage) used in ComposeShell. It is intended for representing segment of the wire (or whole wire). The segment itself is represented by ShapeExtend_WireData. In addition, some associated data necessary for computations are stored: More...

#include <ShapeFix_WireSegment.hxx>

Public Member Functions

 ShapeFix_WireSegment ()
 Creates empty segment.
 
 ShapeFix_WireSegment (const Handle< ShapeExtend_WireData > &wire, const TopAbs_Orientation ori=TopAbs_EXTERNAL)
 Creates segment and initializes it with wire and orientation.
 
 ShapeFix_WireSegment (const TopoDS_Wire &wire, const TopAbs_Orientation ori=TopAbs_EXTERNAL)
 Creates segment and initializes it with wire and orientation.
 
void Clear ()
 Clears all fields.
 
void Load (const Handle< ShapeExtend_WireData > &wire)
 Loads wire.
 
const Handle< ShapeExtend_WireData > & WireData () const
 Returns wire.
 
void Orientation (const TopAbs_Orientation ori)
 Sets orientation flag.
 
TopAbs_Orientation Orientation () const
 Returns orientation flag.
 
TopoDS_Vertex FirstVertex () const
 Returns first vertex of the first edge in the wire (no dependance on Orientation()).
 
TopoDS_Vertex LastVertex () const
 Returns last vertex of the last edge in the wire (no dependance on Orientation()).
 
Standard_Boolean IsClosed () const
 Returns True if FirstVertex() == LastVertex()
 
Standard_Integer NbEdges () const
 Returns Number of edges in the wire.
 
TopoDS_Edge Edge (const Standard_Integer i) const
 Returns edge by given index in the wire.
 
void SetEdge (const Standard_Integer i, const TopoDS_Edge &edge)
 Replaces edge at index i by new one.
 
void AddEdge (const Standard_Integer i, const TopoDS_Edge &edge)
 Insert a new edge with index i and implicitly defined patch indices (indefinite patch). If i==0, edge is inserted at end of wire.
 
void AddEdge (const Standard_Integer i, const TopoDS_Edge &edge, const Standard_Integer iumin, const Standard_Integer iumax, const Standard_Integer ivmin, const Standard_Integer ivmax)
 Insert a new edge with index i and explicitly defined patch indices. If i==0, edge is inserted at end of wire.
 
void SetPatchIndex (const Standard_Integer i, const Standard_Integer iumin, const Standard_Integer iumax, const Standard_Integer ivmin, const Standard_Integer ivmax)
 Set patch indices for edge i.
 
void DefineIUMin (const Standard_Integer i, const Standard_Integer iumin)
 
void DefineIUMax (const Standard_Integer i, const Standard_Integer iumax)
 
void DefineIVMin (const Standard_Integer i, const Standard_Integer ivmin)
 
void DefineIVMax (const Standard_Integer i, const Standard_Integer ivmax)
 Modify minimal or maximal patch index for edge i. The corresponding patch index for that edge is modified so as to satisfy eq. iumin <= myIUMin(i) <= myIUMax(i) <= iumax.
 
void GetPatchIndex (const Standard_Integer i, Standard_Integer &iumin, Standard_Integer &iumax, Standard_Integer &ivmin, Standard_Integer &ivmax) const
 Returns patch indices for edge i.
 
Standard_Boolean CheckPatchIndex (const Standard_Integer i) const
 Checks patch indices for edge i to satisfy equations IUMin(i) <= IUMax(i) <= IUMin(i)+1.
 
void SetVertex (const TopoDS_Vertex &theVertex)
 
TopoDS_Vertex GetVertex () const
 
Standard_Boolean IsVertex () const
 

Detailed Description

This class is auxiliary class (data storage) used in ComposeShell. It is intended for representing segment of the wire (or whole wire). The segment itself is represented by ShapeExtend_WireData. In addition, some associated data necessary for computations are stored:

TopAbs_FORWARD and TopAbs_REVERSED - says that segment was traversed once in the corresponding direction, and hence it should be traversed once more in opposite direction;

TopAbs_EXTERNAL - the segment was not yet traversed in any direction (i.e. not yet used as boundary)

TopAbs_INTERNAL - the segment was traversed in both directions and hence is out of further work.

Segments of initial bounding wires are created with orientation REVERSED (for outer wire) or FORWARD (for inner wires), and segments of splitting seams - with orientation EXTERNAL.

Constructor & Destructor Documentation

◆ ShapeFix_WireSegment() [1/3]

ShapeFix_WireSegment::ShapeFix_WireSegment ( )

Creates empty segment.

◆ ShapeFix_WireSegment() [2/3]

ShapeFix_WireSegment::ShapeFix_WireSegment ( const Handle< ShapeExtend_WireData > &  wire,
const TopAbs_Orientation  ori = TopAbs_EXTERNAL 
)

Creates segment and initializes it with wire and orientation.

◆ ShapeFix_WireSegment() [3/3]

ShapeFix_WireSegment::ShapeFix_WireSegment ( const TopoDS_Wire wire,
const TopAbs_Orientation  ori = TopAbs_EXTERNAL 
)

Creates segment and initializes it with wire and orientation.

Member Function Documentation

◆ AddEdge() [1/2]

void ShapeFix_WireSegment::AddEdge ( const Standard_Integer  i,
const TopoDS_Edge edge 
)

Insert a new edge with index i and implicitly defined patch indices (indefinite patch). If i==0, edge is inserted at end of wire.

◆ AddEdge() [2/2]

void ShapeFix_WireSegment::AddEdge ( const Standard_Integer  i,
const TopoDS_Edge edge,
const Standard_Integer  iumin,
const Standard_Integer  iumax,
const Standard_Integer  ivmin,
const Standard_Integer  ivmax 
)

Insert a new edge with index i and explicitly defined patch indices. If i==0, edge is inserted at end of wire.

◆ CheckPatchIndex()

Standard_Boolean ShapeFix_WireSegment::CheckPatchIndex ( const Standard_Integer  i) const

Checks patch indices for edge i to satisfy equations IUMin(i) <= IUMax(i) <= IUMin(i)+1.

◆ Clear()

void ShapeFix_WireSegment::Clear ( )

Clears all fields.

◆ DefineIUMax()

void ShapeFix_WireSegment::DefineIUMax ( const Standard_Integer  i,
const Standard_Integer  iumax 
)

◆ DefineIUMin()

void ShapeFix_WireSegment::DefineIUMin ( const Standard_Integer  i,
const Standard_Integer  iumin 
)

◆ DefineIVMax()

void ShapeFix_WireSegment::DefineIVMax ( const Standard_Integer  i,
const Standard_Integer  ivmax 
)

Modify minimal or maximal patch index for edge i. The corresponding patch index for that edge is modified so as to satisfy eq. iumin <= myIUMin(i) <= myIUMax(i) <= iumax.

◆ DefineIVMin()

void ShapeFix_WireSegment::DefineIVMin ( const Standard_Integer  i,
const Standard_Integer  ivmin 
)

◆ Edge()

TopoDS_Edge ShapeFix_WireSegment::Edge ( const Standard_Integer  i) const

Returns edge by given index in the wire.

◆ FirstVertex()

TopoDS_Vertex ShapeFix_WireSegment::FirstVertex ( ) const

Returns first vertex of the first edge in the wire (no dependance on Orientation()).

◆ GetPatchIndex()

void ShapeFix_WireSegment::GetPatchIndex ( const Standard_Integer  i,
Standard_Integer iumin,
Standard_Integer iumax,
Standard_Integer ivmin,
Standard_Integer ivmax 
) const

Returns patch indices for edge i.

◆ GetVertex()

TopoDS_Vertex ShapeFix_WireSegment::GetVertex ( ) const

◆ IsClosed()

Standard_Boolean ShapeFix_WireSegment::IsClosed ( ) const

Returns True if FirstVertex() == LastVertex()

◆ IsVertex()

Standard_Boolean ShapeFix_WireSegment::IsVertex ( ) const

◆ LastVertex()

TopoDS_Vertex ShapeFix_WireSegment::LastVertex ( ) const

Returns last vertex of the last edge in the wire (no dependance on Orientation()).

◆ Load()

void ShapeFix_WireSegment::Load ( const Handle< ShapeExtend_WireData > &  wire)

Loads wire.

◆ NbEdges()

Standard_Integer ShapeFix_WireSegment::NbEdges ( ) const

Returns Number of edges in the wire.

◆ Orientation() [1/2]

TopAbs_Orientation ShapeFix_WireSegment::Orientation ( ) const

Returns orientation flag.

◆ Orientation() [2/2]

void ShapeFix_WireSegment::Orientation ( const TopAbs_Orientation  ori)

Sets orientation flag.

◆ SetEdge()

void ShapeFix_WireSegment::SetEdge ( const Standard_Integer  i,
const TopoDS_Edge edge 
)

Replaces edge at index i by new one.

◆ SetPatchIndex()

void ShapeFix_WireSegment::SetPatchIndex ( const Standard_Integer  i,
const Standard_Integer  iumin,
const Standard_Integer  iumax,
const Standard_Integer  ivmin,
const Standard_Integer  ivmax 
)

Set patch indices for edge i.

◆ SetVertex()

void ShapeFix_WireSegment::SetVertex ( const TopoDS_Vertex theVertex)

◆ WireData()

const Handle< ShapeExtend_WireData > & ShapeFix_WireSegment::WireData ( ) const

Returns wire.


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