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

ModelingAlgorithms
TKOffset
BRepOffsetAPI


BRepOffsetAPI_MakePipeShell Class Reference

This class provides for a framework to construct a shell
or a solid along a spine consisting in a wire.
To produce a solid, the initial wire must be closed.
Two approaches are used:
- definition by section
- by a section and a scaling law
- by addition of successive intermediary sections
- definition by sweep mode.
- pseudo-Frenet
- constant
- binormal constant
- normal defined by a surface support
- normal defined by a guiding contour.
The two global approaches can also be combined.
You can also close the surface later in order to form a solid.
Warning: In this version some limitation exist
-- We can add only 1 Section (else Standard_NotImplemented is raised
-- Mode with auxilary spine is incompatible with hometetic laws
-- Mode with auxilary spine and keep contact produce only CO surface.
-- Transition treatement is implemented only with the option <brepbuilderapi_transformed>
Normaly all these limitations have to be deleted in mext version.
.

#include <BRepOffsetAPI_MakePipeShell.hxx>

Inheritance diagram for BRepOffsetAPI_MakePipeShell:

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 BRepOffsetAPI_MakePipeShell (const TopoDS_Wire &Spine)
 Constructs the shell-generating framework defined by the wire Spine.
//! Sets an sweep's mode
If no mode are setted, the mode use in MakePipe is used
.
Standard_EXPORT void SetMode (const Standard_Boolean IsFrenet=Standard_False)
 Sets a Frenet or a CorrectedFrenet trihedron
to perform the sweeping
If IsFrenet is false, a corrected Frenet trihedron is used.
.
Standard_EXPORT void SetMode (const gp_Ax2 &Axe)
 Sets a fixed trihedron to perform the sweeping
all sections will be parallel.
.
Standard_EXPORT void SetMode (const gp_Dir &BiNormal)
 Sets a fixed BiNormal direction to perform the --
sweeping. Angular relations beetween the
section(s) and <binormal> will be constant
.
Standard_EXPORT Standard_Boolean SetMode (const TopoDS_Shape &SpineSupport)
 Sets support to the spine to define the BiNormal of
the trihedron, like the normal to the surfaces.
Warning: To be effective, Each edge of the <spine> must
have an representaion on one face of<SpineSupport>
.
Standard_EXPORT void SetMode (const TopoDS_Wire &AuxiliarySpine, const Standard_Boolean CurvilinearEquivalence, const Standard_Boolean KeepContact=Standard_False)
 Sets an auxiliary spine to define the Normal
For each Point of the Spine P, an Point Q is evalued
on <auxiliaryspine>
If <curvilinearequivalence>
Q split <auxiliaryspine> with the same length ratio
than P split <spline>.
Else the plan define by P and the tangent to the <spine>
intersect <auxiliaryspine> in Q.
If <keepcontact> the Normal is defined to assume like the sweeped
section is in contact to the <auxiliaryspine>
Else the Normal is defined by the vector PQ.
//! Give section to sweep.
Possibilities are :
- Give one or sevral section
- Give one profile and an homotetic law.
- Automatic compute of correspondance beetween spine, and section
on the sweeped shape
- correspondance beetween spine, and section on the sweeped shape
defined by a vertex of the spine
.
Standard_EXPORT void Add (const TopoDS_Shape &Profile, const Standard_Boolean WithContact=Standard_False, const Standard_Boolean WithCorrection=Standard_False)
 Adds the section Profile to this framework. First and last
sections may be punctual, so the shape Profile may be
both wire and vertex. Correspondent point on spine is
computed automatically.
If WithContact is true, the section is translated to be in
contact with the spine.
If WithCorrection is true, the section is rotated to be
orthogonal to the spine?s tangent in the correspondent
point. This option has no sense if the section is punctual
(Profile is of type TopoDS_Vertex).
.
Standard_EXPORT void Add (const TopoDS_Shape &Profile, const TopoDS_Vertex &Location, const Standard_Boolean WithContact=Standard_False, const Standard_Boolean WithCorrection=Standard_False)
 Adds the section Profile to this framework.
Correspondent point on the spine is given by Location.
Warning:
To be effective, it is not recommended to combine methods Add and SetLaw.
.
Standard_EXPORT void SetLaw (const TopoDS_Shape &Profile, const Handle(Law_Function)&L, const Standard_Boolean WithContact=Standard_False, const Standard_Boolean WithCorrection=Standard_False)
 Sets the evolution law defined by the wire Profile with
its position (Location, WithContact, WithCorrection
are the same options as in methods Add) and a
homotetic law defined by the function L.
Warning:
To be effective, it is not recommended to combine methods Add and SetLaw.
.
Standard_EXPORT void SetLaw (const TopoDS_Shape &Profile, const Handle(Law_Function)&L, const TopoDS_Vertex &Location, const Standard_Boolean WithContact=Standard_False, const Standard_Boolean WithCorrection=Standard_False)
 Sets the evolution law defined by the wire Profile with
its position (Location, WithContact, WithCorrection
are the same options as in methods Add) and a
homotetic law defined by the function L.
Warning:
To be effective, it is not recommended to combine methods Add and SetLaw.
.
Standard_EXPORT void Delete (const TopoDS_Shape &Profile)
 Removes the section Profile from this framework.
.
Standard_EXPORT Standard_Boolean IsReady () const
 Returns true if this tool object is ready to build the
shape, i.e. has a definition for the wire section Profile.
.
Standard_EXPORT BRepBuilderAPI_PipeError GetStatus () const
 Get a status, when Simulate or Build failed. It can be
BRepBuilderAPI_PipeDone,
BRepBuilderAPI_PipeNotDone,
BRepBuilderAPI_PlaneNotIntersectGuide,
BRepBuilderAPI_ImpossibleContact.
.
Standard_EXPORT void SetTolerance (const Standard_Real Tol3d=1.0e-4, const Standard_Real BoundTol=1.0e-4, const Standard_Real TolAngular=1.0e-2)
 Sets the following tolerance values
- 3D tolerance Tol3d
- boundary tolerance BoundTol
- angular tolerance TolAngular.
.
Standard_EXPORT void SetTransitionMode (const BRepBuilderAPI_TransitionMode Mode=BRepBuilderAPI_Transformed)
 Sets the transition mode to manage discontinuities on
the swept shape caused by fractures on the spine. The
transition mode can be BRepBuilderAPI_Transformed
(default value), BRepBuilderAPI_RightCorner,
BRepBuilderAPI_RoundCorner:
- RepBuilderAPI_Transformed:
discontinuities are treated by
modification of the sweeping mode. The
pipe is "transformed" at the fractures of
the spine. This mode assumes building a
self-intersected shell.
- BRepBuilderAPI_RightCorner:
discontinuities are treated like right
corner. Two pieces of the pipe
corresponding to two adjacent
segments of the spine are extended
and intersected at a fracture of the spine.
- BRepBuilderAPI_RoundCorner:
discontinuities are treated like round
corner. The corner is treated as rotation
of the profile around an axis which
passes through the point of the spine?s
fracture. This axis is based on cross
product of directions tangent to the
adjacent segments of the spine at their common point.
Warnings
The mode BRepBuilderAPI_RightCorner provides a
valid result if intersection of two pieces of the pipe
(corresponding to two adjacent segments of the spine)
in the neighborhood of the spine?s fracture is
connected and planar. This condition can be violated if
the spine is non-linear in some neighborhood of the
fracture or if the profile was set with a scaling law.
The last mode, BRepBuilderAPI_RoundCorner, will
assuredly provide a good result only if a profile was set
with option WithCorrection = True, i.e. it is strictly
orthogonal to the spine.
.
Standard_EXPORT void Simulate (const Standard_Integer NumberOfSection, TopTools_ListOfShape &Result)
 Simulates the resulting shape by calculating its
cross-sections. The spine is devided by this
cross-sections into (NumberOfSection - 1) equal
parts, the number of cross-sections is
NumberOfSection. The cross-sections are wires and
they are returned in the list Result.
This gives a rapid preview of the resulting shape,
which will be obtained using the settings you have provided.
Raises NotDone if <me> it is not Ready
.
virtual Standard_EXPORT void Build ()
 Builds the resulting shape (redefined from MakeShape).
.
Standard_EXPORT Standard_Boolean MakeSolid ()
 Transforms the sweeping Shell in Solid.
If a propfile is not closed returns False
.
virtual Standard_EXPORT TopoDS_Shape FirstShape ()
 Returns the TopoDS Shape of the bottom of the sweep.
.
virtual Standard_EXPORT TopoDS_Shape LastShape ()
 Returns the TopoDS Shape of the top of the sweep.
.
virtual Standard_EXPORT const
TopTools_ListOfShape & 
Generated (const TopoDS_Shape &S)
 Returns a list of new shapes generated from the shape
S by the shell-generating algorithm.
This function is redefined from BRepOffsetAPI_MakeShape::Generated.
S can be an edge of the given Spine (see Constructor),
it can be an edge or a boundary vertex of a shape
returned by the method FirstShape(), it can also be a
Profile (see method Add()) closest to the beginning or
the end of the Spine.
If S is an edge of the given Spine, then method
Generated() returns a list of generated faces and a list
of edges from a free boundary (if it exists) of the
resulting shell.
If S is an edge of the start shape (see FirstShape()),
method Generated() returns a list of faces generated
along the whole spine from the given edge.
If S is a boundary vertex of the start shape (see
FirstShape()), method Generated() returns a list of
edges from the free boundary of the resulting shell,
generated along the whole spine.
If S is a Profile closest to the beginning of the Spine,
method Generated() returns the start shape, that can
also be obtained by method FirstShape().
If S is a Profile closest to the end of the Spine, method
Generated() returns the end shape, that can also be
obtained by method LastShape().
.

Private Attributes

Handle_BRepFill_PipeShell myPipe

Constructor & Destructor Documentation

Standard_EXPORT BRepOffsetAPI_MakePipeShell::BRepOffsetAPI_MakePipeShell const TopoDS_Wire &  Spine  ) 
 


Member Function Documentation

Standard_EXPORT void BRepOffsetAPI_MakePipeShell::Add const TopoDS_Shape &  Profile,
const TopoDS_Vertex &  Location,
const Standard_Boolean  WithContact = Standard_False,
const Standard_Boolean  WithCorrection = Standard_False
 

Standard_EXPORT void BRepOffsetAPI_MakePipeShell::Add const TopoDS_Shape &  Profile,
const Standard_Boolean  WithContact = Standard_False,
const Standard_Boolean  WithCorrection = Standard_False
 

virtual Standard_EXPORT void BRepOffsetAPI_MakePipeShell::Build  )  [virtual]
 

Reimplemented from BRepBuilderAPI_MakeShape.

Standard_EXPORT void BRepOffsetAPI_MakePipeShell::Delete const TopoDS_Shape &  Profile  ) 
 

virtual Standard_EXPORT TopoDS_Shape BRepOffsetAPI_MakePipeShell::FirstShape  )  [virtual]
 

Implements BRepPrimAPI_MakeSweep.

virtual Standard_EXPORT const TopTools_ListOfShape& BRepOffsetAPI_MakePipeShell::Generated const TopoDS_Shape &  S  )  [virtual]
 

Reimplemented from BRepBuilderAPI_MakeShape.

Standard_EXPORT BRepBuilderAPI_PipeError BRepOffsetAPI_MakePipeShell::GetStatus  )  const
 

Standard_EXPORT Standard_Boolean BRepOffsetAPI_MakePipeShell::IsReady  )  const
 

virtual Standard_EXPORT TopoDS_Shape BRepOffsetAPI_MakePipeShell::LastShape  )  [virtual]
 

Implements BRepPrimAPI_MakeSweep.

Standard_EXPORT Standard_Boolean BRepOffsetAPI_MakePipeShell::MakeSolid  ) 
 

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

Reimplemented from BRepPrimAPI_MakeSweep.

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

Reimplemented from BRepPrimAPI_MakeSweep.

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

Reimplemented from BRepPrimAPI_MakeSweep.

Standard_EXPORT void BRepOffsetAPI_MakePipeShell::SetLaw const TopoDS_Shape &  Profile,
const Handle(Law_Function)&  L,
const TopoDS_Vertex &  Location,
const Standard_Boolean  WithContact = Standard_False,
const Standard_Boolean  WithCorrection = Standard_False
 

Standard_EXPORT void BRepOffsetAPI_MakePipeShell::SetLaw const TopoDS_Shape &  Profile,
const Handle(Law_Function)&  L,
const Standard_Boolean  WithContact = Standard_False,
const Standard_Boolean  WithCorrection = Standard_False
 

Standard_EXPORT void BRepOffsetAPI_MakePipeShell::SetMode const TopoDS_Wire &  AuxiliarySpine,
const Standard_Boolean  CurvilinearEquivalence,
const Standard_Boolean  KeepContact = Standard_False
 

Standard_EXPORT Standard_Boolean BRepOffsetAPI_MakePipeShell::SetMode const TopoDS_Shape &  SpineSupport  ) 
 

Standard_EXPORT void BRepOffsetAPI_MakePipeShell::SetMode const gp_Dir &  BiNormal  ) 
 

Standard_EXPORT void BRepOffsetAPI_MakePipeShell::SetMode const gp_Ax2 &  Axe  ) 
 

Standard_EXPORT void BRepOffsetAPI_MakePipeShell::SetMode const Standard_Boolean  IsFrenet = Standard_False  ) 
 

Standard_EXPORT void BRepOffsetAPI_MakePipeShell::SetTolerance const Standard_Real  Tol3d = 1.0e-4,
const Standard_Real  BoundTol = 1.0e-4,
const Standard_Real  TolAngular = 1.0e-2
 

Standard_EXPORT void BRepOffsetAPI_MakePipeShell::SetTransitionMode const BRepBuilderAPI_TransitionMode  Mode = BRepBuilderAPI_Transformed  ) 
 

Standard_EXPORT void BRepOffsetAPI_MakePipeShell::Simulate const Standard_Integer  NumberOfSection,
TopTools_ListOfShape &  Result
 


Field Documentation

Handle_BRepFill_PipeShell BRepOffsetAPI_MakePipeShell::myPipe [private]
 


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