OCC Main Page | ModelingAlgorithms | Toolkits | Packages | Class Hierarchy | Data Structures | File List | Data Fields | Globals

ModelingAlgorithms
TKTopAlgo
BRepBuilderAPI


BRepBuilderAPI_MakeWire Class Reference

Describes functions to build wires from edges. A wire can
be built from any number of edges.
To build a wire you first initialize the construction, then
add edges in sequence. An unlimited number of edges
can be added. The initialization of construction is done with:
- no edge (an empty wire), or
- edges of an existing wire, or
- up to four connectable edges.
In order to be added to a wire under construction, an
edge (unless it is the first one) must satisfy the following
condition: one of its vertices must be geometrically
coincident with one of the vertices of the wire (provided
that the highest tolerance factor is assigned to the two
vertices). It could also be the same vertex.
- The given edge is shared by the wire if it contains:
- two vertices, identical to two vertices of the wire
under construction (a general case of the wire closure), or
- one vertex, identical to a vertex of the wire under
construction; the other vertex not being
geometrically coincident with another vertex of the wire.
- In other cases, when one of the vertices of the edge
is simply geometrically coincident with a vertex of the
wire under construction (provided that the highest
tolerance factor is assigned to the two vertices), the
given edge is first copied and the coincident vertex is
replaced in this new edge, by the coincident vertex of the wire.
Note: it is possible to build non manifold wires using this construction tool.
A MakeWire object provides a framework for:
- initializing the construction of a wire,
- adding edges to the wire under construction, and
- consulting the result.
.

#include <BRepBuilderAPI_MakeWire.hxx>

Inheritance diagram for BRepBuilderAPI_MakeWire:

Inheritance graph
[legend]

Public Member Functions

void * operator new (size_t, void *anAddress)
void * operator new (size_t size)
void operator delete (void *anAddress)
Standard_EXPORT BRepBuilderAPI_MakeWire ()
 Constructs an empty wire framework, to which edges
are added using the Add function.
As soon as the wire contains one edge, it can return
with the use of the function Wire.
Warning
The function Error will return
BRepBuilderAPI_EmptyWire if it is called before at
least one edge is added to the wire under construction.
.
Standard_EXPORT BRepBuilderAPI_MakeWire (const TopoDS_Edge &E)
 Make a Wire from an edge.
.
Standard_EXPORT BRepBuilderAPI_MakeWire (const TopoDS_Edge &E1, const TopoDS_Edge &E2)
 Make a Wire from two edges.
.
Standard_EXPORT BRepBuilderAPI_MakeWire (const TopoDS_Edge &E1, const TopoDS_Edge &E2, const TopoDS_Edge &E3)
 Make a Wire from three edges.
.
Standard_EXPORT BRepBuilderAPI_MakeWire (const TopoDS_Edge &E1, const TopoDS_Edge &E2, const TopoDS_Edge &E3, const TopoDS_Edge &E4)
 Make a Wire from four edges.
//! Constructs a wire
- from the TopoDS_Wire W composed of the edge E, or
- from edge E, or
- from two edges E1 and E2, or
- from three edges E1, E2 and E3, or
- from four edges E1, E2, E3 and E4.
Further edges can be added using the function Add.
Given edges are added in a sequence. Each of them
must be connectable to the wire under construction,
and so must satisfy the following condition (unless it is
the first edge of the wire): one of its vertices must be
geometrically coincident with one of the vertices of the
wire (provided that the highest tolerance factor is
assigned to the two vertices). It could also be the same vertex.
Warning
If an edge is not connectable to the wire under
construction it is not added. The function Error will
return BRepBuilderAPI_DisconnectedWire, the
function IsDone will return false and the function Wire
will raise an error, until a new connectable edge is added.
.
Standard_EXPORT BRepBuilderAPI_MakeWire (const TopoDS_Wire &W)
 Make a Wire from a Wire. Usefull for adding later.
.
Standard_EXPORT BRepBuilderAPI_MakeWire (const TopoDS_Wire &W, const TopoDS_Edge &E)
 Add an edge to a wire.
.
Standard_EXPORT void Add (const TopoDS_Edge &E)
 Adds the edge E to the wire under construction.
E must be connectable to the wire under construction, and, unless it
is the first edge of the wire, must satisfy the following
condition: one of its vertices must be geometrically coincident
with one of the vertices of the wire (provided that the highest
tolerance factor is assigned to the two vertices). It could also
be the same vertex.
Warning
If E is not connectable to the wire under construction it is not
added. The function Error will return
BRepBuilderAPI_DisconnectedWire, the function IsDone will return
false and the function Wire will raise an error, until a new
connectable edge is added.
.
Standard_EXPORT void Add (const TopoDS_Wire &W)
 Add the edges of <w> to the current wire.
.
Standard_EXPORT void Add (const TopTools_ListOfShape &L)
 Adds the edges of <l> to the current wire. The
edges are not to be consecutive. But they are to
be all connected geometrically or topologically.
If some of them are not connected the Status give
DisconnectedWire but the "Maker" is Done() and you
can get the partial result. (ie connected to the
first edgeof the list <l>)
.
virtual Standard_EXPORT Standard_Boolean IsDone () const
 Returns true if this algorithm contains a valid wire.
IsDone returns false if:
- there are no edges in the wire, or
- the last edge which you tried to add was not connectable.
.
Standard_EXPORT BRepBuilderAPI_WireError Error () const
 Returns the construction status
- BRepBuilderAPI_WireDone if the wire is built, or
- another value of the BRepBuilderAPI_WireError
enumeration indicating why the construction failed.
.
Standard_EXPORT const TopoDS_Wire & Wire () const
 Returns the constructed wire; or the part of the wire
under construction already built.
Exceptions StdFail_NotDone if a wire is not built.
.
Standard_EXPORT operator TopoDS_Wire () const
Standard_EXPORT const TopoDS_Edge & Edge () const
 Returns the last edge added to the wire under construction.
Warning
- This edge can be different from the original one (the
argument of the function Add, for instance,)
- A null edge is returned if there are no edges in the
wire under construction, or if the last edge which you
tried to add was not connectable..
.
Standard_EXPORT const TopoDS_Vertex & Vertex () const
 Returns the last vertex of the last edge added to the
wire under construction.
Warning
A null vertex is returned if there are no edges in the wire
under construction, or if the last edge which you tried to
add was not connectableR
.

Private Attributes

BRepLib_MakeWire myMakeWire

Constructor & Destructor Documentation

Standard_EXPORT BRepBuilderAPI_MakeWire::BRepBuilderAPI_MakeWire  ) 
 

Standard_EXPORT BRepBuilderAPI_MakeWire::BRepBuilderAPI_MakeWire const TopoDS_Edge &  E  ) 
 

Standard_EXPORT BRepBuilderAPI_MakeWire::BRepBuilderAPI_MakeWire const TopoDS_Edge &  E1,
const TopoDS_Edge &  E2
 

Standard_EXPORT BRepBuilderAPI_MakeWire::BRepBuilderAPI_MakeWire const TopoDS_Edge &  E1,
const TopoDS_Edge &  E2,
const TopoDS_Edge &  E3
 

Standard_EXPORT BRepBuilderAPI_MakeWire::BRepBuilderAPI_MakeWire const TopoDS_Edge &  E1,
const TopoDS_Edge &  E2,
const TopoDS_Edge &  E3,
const TopoDS_Edge &  E4
 

Standard_EXPORT BRepBuilderAPI_MakeWire::BRepBuilderAPI_MakeWire const TopoDS_Wire &  W  ) 
 

Standard_EXPORT BRepBuilderAPI_MakeWire::BRepBuilderAPI_MakeWire const TopoDS_Wire &  W,
const TopoDS_Edge &  E
 


Member Function Documentation

Standard_EXPORT void BRepBuilderAPI_MakeWire::Add const TopTools_ListOfShape &  L  ) 
 

Standard_EXPORT void BRepBuilderAPI_MakeWire::Add const TopoDS_Wire &  W  ) 
 

Standard_EXPORT void BRepBuilderAPI_MakeWire::Add const TopoDS_Edge &  E  ) 
 

Standard_EXPORT const TopoDS_Edge& BRepBuilderAPI_MakeWire::Edge  )  const
 

Standard_EXPORT BRepBuilderAPI_WireError BRepBuilderAPI_MakeWire::Error  )  const
 

virtual Standard_EXPORT Standard_Boolean BRepBuilderAPI_MakeWire::IsDone  )  const [virtual]
 

Reimplemented from BRepBuilderAPI_Command.

void BRepBuilderAPI_MakeWire::operator delete void *  anAddress  )  [inline]
 

Reimplemented from BRepBuilderAPI_MakeShape.

void* BRepBuilderAPI_MakeWire::operator new size_t  size  )  [inline]
 

Reimplemented from BRepBuilderAPI_MakeShape.

void* BRepBuilderAPI_MakeWire::operator new size_t  ,
void *  anAddress
[inline]
 

Reimplemented from BRepBuilderAPI_MakeShape.

Standard_EXPORT BRepBuilderAPI_MakeWire::operator TopoDS_Wire  )  const
 

Standard_EXPORT const TopoDS_Vertex& BRepBuilderAPI_MakeWire::Vertex  )  const
 

Standard_EXPORT const TopoDS_Wire& BRepBuilderAPI_MakeWire::Wire  )  const
 


Field Documentation

BRepLib_MakeWire BRepBuilderAPI_MakeWire::myMakeWire [private]
 


The documentation for this class was generated from the following file:
Generated on Mon Aug 25 13:41:07 2008 for OpenCASCADE by  doxygen 1.4.1