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

ModelingAlgorithms
TKGeomAlgo
GeomFill


GeomFill_Pipe Class Reference

Describes functions to construct pipes. A pipe is built by
sweeping a curve (the section) along another curve (the path).
The Pipe class provides the following types of construction:
- pipes with a circular section of constant radius,
- pipes with a constant section,
- pipes with a section evolving between two given curves.
All standard specific cases are detected in order to build,
where required, a plane, cylinder, cone, sphere, torus,
surface of linear extrusion or surface of revolution.
Generally speaking, the result is a BSpline surface (NURBS).
A Pipe object provides a framework for:
- defining the pipe to be built,
- implementing the construction algorithm, and
- consulting the resulting surface.
There are several methods to instantiate a Pipe:
1) give a path and a radius : the section is
a circle. This location is the first point
of the path, and this direction is the first
derivate (calculate at the first point ) of
the path.

2) give a path and a section.
Differtent options are available
2.a) Use the classical Frenet trihedron
- or the CorrectedFrenet trihedron
(To avoid twisted surface)
- or a constant trihedron to have all the sections
in a same plane
2.b) Define a ConstantBinormal Direction to keep the
same angle beetween the Direction and the sections
along the sweep surface.
2.c) Define the path by a surface and a 2dcurve,
the surface is used to define the trihedron's normal.
It is usefull to keep a constant angle beetween
input surface and the pipe. --
3) give a path and two sections. The section
evoluate from First to Last Section.

3) give a path and N sections. The section
evoluate from First to Last Section.

In general case the result is a NURBS. But we
can generate plane, cylindrical, spherical,
conical, toroidal surface in some particular case.

The natural parametrization of the result is:

U-Direction along the section.
V-Direction along the path.

But, in some particular case, the surface must
be construct otherwise.
The method "EchangeUV" return false in such cases.

.

#include <GeomFill_Pipe.hxx>


Public Member Functions

void * operator new (size_t, void *anAddress)
void * operator new (size_t size)
void operator delete (void *anAddress)
Standard_EXPORT GeomFill_Pipe ()
 Constructs an empty algorithm for building pipes. Use
the function Init to initialize it.
.
Standard_EXPORT GeomFill_Pipe (const Handle(Geom_Curve)&Path, const Standard_Real Radius)
Standard_EXPORT GeomFill_Pipe (const Handle(Geom_Curve)&Path, const Handle(Geom_Curve)&FirstSect, const GeomFill_Trihedron Option=GeomFill_IsCorrectedFrenet)
 Create a pipe with a constant section
(<firstsection>) and a path (<path>)
Option can be - GeomFill_IsCorrectedFrenet
- GeomFill_IsFrenet
- GeomFill_IsConstant
.
Standard_EXPORT GeomFill_Pipe (const Handle(Geom2d_Curve)&Path, const Handle(Geom_Surface)&Support, const Handle(Geom_Curve)&FirstSect)
 Create a pipe with a constant section
(<firstsection>) and a path defined by <path> and <support>
.
Standard_EXPORT GeomFill_Pipe (const Handle(Geom_Curve)&Path, const Handle(Geom_Curve)&FirstSect, const gp_Dir &Dir)
 Create a pipe with a constant section
(<firstsection>) and a path <path> and a fixed
binormal direction <dir>
.
Standard_EXPORT GeomFill_Pipe (const Handle(Geom_Curve)&Path, const Handle(Geom_Curve)&FirstSect, const Handle(Geom_Curve)&LastSect)
 Create a pipe with an evolving section
The section evoluate from First to Last Section
.
Standard_EXPORT GeomFill_Pipe (const Handle(Geom_Curve)&Path, const GeomFill_SequenceOfCurve &NSections)
 Create a pipe with N sections
The section evoluate from First to Last Section
.
Standard_EXPORT GeomFill_Pipe (const Handle(Geom_Curve)&Path, const Handle(Geom_Curve)&Curve1, const Handle(Geom_Curve)&Curve2, const Standard_Real Radius)
 Create a pipe with a constant radius with 2
guide-line.
.
Standard_EXPORT GeomFill_Pipe (const Handle(Adaptor3d_HCurve)&Path, const Handle(Adaptor3d_HCurve)&Curve1, const Handle(Adaptor3d_HCurve)&Curve2, const Standard_Real Radius)
 Create a pipe with a constant radius with 2
guide-line.
.
Standard_EXPORT GeomFill_Pipe (const Handle(Geom_Curve)&Path, const Handle(Adaptor3d_HCurve)&Guide, const Handle(Geom_Curve)&FirstSect, const Standard_Boolean ByACR, const Standard_Boolean rotat)
 Create a pipe with a constant section and with 1
guide-line.
Use the function Perform to build the surface.
All standard specific cases are detected in order to
construct, according to the respective geometric
nature of Path and the sections, a planar, cylindrical,
conical, spherical or toroidal surface, a surface of
linear extrusion or a surface of revolution.
In the general case, the result is a BSpline surface
(NURBS) built by approximation of a series of sections where:
- the number of sections N is chosen automatically
by the algorithm according to the respective
geometries of Path and the sections. N is greater than or equal to 2;
- N points Pi (with i in the range [ 1,N ]) are
defined at regular intervals along the curve Path
from its first point to its end point. At each point Pi,
a coordinate system Ti is computed with Pi as
origin, and with the tangential and normal vectors
to Path defining two of its coordinate axes.
In the case of a pipe with a constant circular section,
the first section is a circle of radius Radius centered
on the origin of Path and whose "Z Axis" is aligned
along the vector tangential to the origin of Path. In the
case of a pipe with a constant section, the first section
is the curve FirstSect. In these two cases, the ith
section (for values of i greater than 1) is obtained by
applying to a copy of this first section the geometric
transformation which transforms coordinate system
T1 into coordinate system Ti.
In the case of an evolving section, N-2 intermediate
curves Si are first computed (if N is greater than 2,
and with i in the range [ 2,N-1 ]) whose geometry
evolves regularly from the curve S1=FirstSect to the
curve SN=LastSect. The first section is FirstSect,
and the ith section (for values of i greater than 1) is
obtained by applying to the curve Si the geometric
transformation which transforms coordinate system
T1 into coordinate system Ti.
.
Standard_EXPORT void Init (const Handle(Geom_Curve)&Path, const Standard_Real Radius)
Standard_EXPORT void Init (const Handle(Geom_Curve)&Path, const Handle(Geom_Curve)&FirstSect, const GeomFill_Trihedron Option=GeomFill_IsCorrectedFrenet)
Standard_EXPORT void Init (const Handle(Geom2d_Curve)&Path, const Handle(Geom_Surface)&Support, const Handle(Geom_Curve)&FirstSect)
Standard_EXPORT void Init (const Handle(Geom_Curve)&Path, const Handle(Geom_Curve)&FirstSect, const gp_Dir &Dir)
Standard_EXPORT void Init (const Handle(Geom_Curve)&Path, const Handle(Geom_Curve)&FirstSect, const Handle(Geom_Curve)&LastSect)
Standard_EXPORT void Init (const Handle(Geom_Curve)&Path, const GeomFill_SequenceOfCurve &NSections)
Standard_EXPORT void Init (const Handle(Adaptor3d_HCurve)&Path, const Handle(Adaptor3d_HCurve)&Curve1, const Handle(Adaptor3d_HCurve)&Curve2, const Standard_Real Radius)
 Create a pipe with a constant radius with 2
guide-line.
.
Standard_EXPORT void Init (const Handle(Geom_Curve)&Path, const Handle(Adaptor3d_HCurve)&Guide, const Handle(Geom_Curve)&FirstSect, const Standard_Boolean ByACR, const Standard_Boolean rotat)
 Initializes this pipe algorithm to build the following surface:
- a pipe with a constant circular section of radius
Radius along the path Path, or
- a pipe with constant section FirstSect along the path Path, or
- a pipe where the section evolves from FirstSect to
LastSect along the path Path.
Use the function Perform to build the surface.
Note: a description of the resulting surface is given under Constructors.
.
Standard_EXPORT void Perform (const Standard_Boolean WithParameters=Standard_False, const Standard_Boolean myPolynomial=Standard_False)
 Builds the pipe defined at the time of initialization of this
algorithm. A description of the resulting surface is given under Constructors.
If WithParameters (defaulted to false) is set to true, the
approximation algorithm (used only in the general case
of construction of a BSpline surface) builds the surface
with a u parameter corresponding to the one of the path.
Exceptions
Standard_ConstructionError if a surface cannot be constructed from the data.
Warning: It is the old Perform method, the next methode is recommended.
.
Standard_EXPORT void Perform (const Standard_Real Tol, const Standard_Boolean Polynomial, const GeomAbs_Shape Conti=GeomAbs_C1, const Standard_Integer MaxDegree=11, const Standard_Integer NbMaxSegment=30)
 detects the particular cases. And compute the surface.
if none particular case is detected we make an approximation
with respect of the Tolerance <tol>, the continuty <conti>, the
maximum degree <maxdegree>, the maximum number of span <nbmaxsegment>
and the spine parametrization.
//! If we can't create a surface with the data

const Handle_Geom_Surface & Surface () const
 Returns the surface built by this algorithm.
Warning
Do not use this function before the surface is built (in this
case the function will return a null handle).
.
Standard_EXPORT Standard_Boolean ExchangeUV () const
 The u parametric direction of the surface constructed by
this algorithm usually corresponds to the evolution
along the path and the v parametric direction
corresponds to the evolution along the section(s).
However, this rule is not respected when constructing
certain specific Geom surfaces (typically cylindrical
surfaces, surfaces of revolution, etc.) for which the
parameterization is inversed.
The ExchangeUV function checks for this, and returns
true in all these specific cases.
Warning
Do not use this function before the surface is built.
.
void GenerateParticularCase (const Standard_Boolean B)
 Sets a flag to try to create as many planes,
cylinder,... as possible. Default value is
<standard_false>.
.
Standard_Boolean GenerateParticularCase () const
 Returns the flag.
.
Standard_Real ErrorOnSurf () const
 Returns the approximation's error. if the Surface
is plane, cylinder ... this error can be 0.
.

Private Member Functions

Standard_EXPORT void Init ()
Standard_EXPORT void ApproxSurf (const Standard_Boolean WithParameters)
 The result (<mysurface>) is an approximation. Using
<sweepsectiongenerator> to do that. If
<withparameters> is set to <standard_true>, the
apprxoximation will be done in respect to the spine
parametrization.
.
Standard_EXPORT Standard_Boolean KPartT4 ()

Private Attributes

Standard_Real myRadius
Standard_Real myError
Handle_Adaptor3d_HCurve myAdpPath
Handle_Adaptor3d_HCurve myAdpFirstSect
Handle_Adaptor3d_HCurve myAdpLastSect
Handle_Geom_Surface mySurface
Handle_GeomFill_LocationLaw myLoc
Handle_GeomFill_SectionLaw mySec
Standard_Integer myType
Standard_Boolean myExchUV
Standard_Boolean myKPart
Standard_Boolean myPolynomial


Constructor & Destructor Documentation

Standard_EXPORT GeomFill_Pipe::GeomFill_Pipe  ) 
 

Standard_EXPORT GeomFill_Pipe::GeomFill_Pipe const Handle(Geom_Curve)&  Path,
const Standard_Real  Radius
 

Standard_EXPORT GeomFill_Pipe::GeomFill_Pipe const Handle(Geom_Curve)&  Path,
const Handle(Geom_Curve)&  FirstSect,
const GeomFill_Trihedron  Option = GeomFill_IsCorrectedFrenet
 

Standard_EXPORT GeomFill_Pipe::GeomFill_Pipe const Handle(Geom2d_Curve)&  Path,
const Handle(Geom_Surface)&  Support,
const Handle(Geom_Curve)&  FirstSect
 

Standard_EXPORT GeomFill_Pipe::GeomFill_Pipe const Handle(Geom_Curve)&  Path,
const Handle(Geom_Curve)&  FirstSect,
const gp_Dir &  Dir
 

Standard_EXPORT GeomFill_Pipe::GeomFill_Pipe const Handle(Geom_Curve)&  Path,
const Handle(Geom_Curve)&  FirstSect,
const Handle(Geom_Curve)&  LastSect
 

Standard_EXPORT GeomFill_Pipe::GeomFill_Pipe const Handle(Geom_Curve)&  Path,
const GeomFill_SequenceOfCurve NSections
 

Standard_EXPORT GeomFill_Pipe::GeomFill_Pipe const Handle(Geom_Curve)&  Path,
const Handle(Geom_Curve)&  Curve1,
const Handle(Geom_Curve)&  Curve2,
const Standard_Real  Radius
 

Standard_EXPORT GeomFill_Pipe::GeomFill_Pipe const Handle(Adaptor3d_HCurve)&  Path,
const Handle(Adaptor3d_HCurve)&  Curve1,
const Handle(Adaptor3d_HCurve)&  Curve2,
const Standard_Real  Radius
 

Standard_EXPORT GeomFill_Pipe::GeomFill_Pipe const Handle(Geom_Curve)&  Path,
const Handle(Adaptor3d_HCurve)&  Guide,
const Handle(Geom_Curve)&  FirstSect,
const Standard_Boolean  ByACR,
const Standard_Boolean  rotat
 


Member Function Documentation

Standard_EXPORT void GeomFill_Pipe::ApproxSurf const Standard_Boolean  WithParameters  )  [private]
 

Standard_Real GeomFill_Pipe::ErrorOnSurf  )  const [inline]
 

Standard_Boolean GeomFill_Pipe::ExchangeUV  )  const [inline]
 

Standard_Boolean GeomFill_Pipe::GenerateParticularCase  )  const [inline]
 

void GeomFill_Pipe::GenerateParticularCase const Standard_Boolean  B  )  [inline]
 

Standard_EXPORT void GeomFill_Pipe::Init  )  [private]
 

Standard_EXPORT void GeomFill_Pipe::Init const Handle(Geom_Curve)&  Path,
const Handle(Adaptor3d_HCurve)&  Guide,
const Handle(Geom_Curve)&  FirstSect,
const Standard_Boolean  ByACR,
const Standard_Boolean  rotat
 

Standard_EXPORT void GeomFill_Pipe::Init const Handle(Adaptor3d_HCurve)&  Path,
const Handle(Adaptor3d_HCurve)&  Curve1,
const Handle(Adaptor3d_HCurve)&  Curve2,
const Standard_Real  Radius
 

Standard_EXPORT void GeomFill_Pipe::Init const Handle(Geom_Curve)&  Path,
const GeomFill_SequenceOfCurve NSections
 

Standard_EXPORT void GeomFill_Pipe::Init const Handle(Geom_Curve)&  Path,
const Handle(Geom_Curve)&  FirstSect,
const Handle(Geom_Curve)&  LastSect
 

Standard_EXPORT void GeomFill_Pipe::Init const Handle(Geom_Curve)&  Path,
const Handle(Geom_Curve)&  FirstSect,
const gp_Dir &  Dir
 

Standard_EXPORT void GeomFill_Pipe::Init const Handle(Geom2d_Curve)&  Path,
const Handle(Geom_Surface)&  Support,
const Handle(Geom_Curve)&  FirstSect
 

Standard_EXPORT void GeomFill_Pipe::Init const Handle(Geom_Curve)&  Path,
const Handle(Geom_Curve)&  FirstSect,
const GeomFill_Trihedron  Option = GeomFill_IsCorrectedFrenet
 

Standard_EXPORT void GeomFill_Pipe::Init const Handle(Geom_Curve)&  Path,
const Standard_Real  Radius
 

Standard_EXPORT Standard_Boolean GeomFill_Pipe::KPartT4  )  [private]
 

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

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

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

Standard_EXPORT void GeomFill_Pipe::Perform const Standard_Real  Tol,
const Standard_Boolean  Polynomial,
const GeomAbs_Shape  Conti = GeomAbs_C1,
const Standard_Integer  MaxDegree = 11,
const Standard_Integer  NbMaxSegment = 30
 

Standard_EXPORT void GeomFill_Pipe::Perform const Standard_Boolean  WithParameters = Standard_False,
const Standard_Boolean  myPolynomial = Standard_False
 

const Handle_Geom_Surface& GeomFill_Pipe::Surface  )  const
 


Field Documentation

Handle_Adaptor3d_HCurve GeomFill_Pipe::myAdpFirstSect [private]
 

Handle_Adaptor3d_HCurve GeomFill_Pipe::myAdpLastSect [private]
 

Handle_Adaptor3d_HCurve GeomFill_Pipe::myAdpPath [private]
 

Standard_Real GeomFill_Pipe::myError [private]
 

Standard_Boolean GeomFill_Pipe::myExchUV [private]
 

Standard_Boolean GeomFill_Pipe::myKPart [private]
 

Handle_GeomFill_LocationLaw GeomFill_Pipe::myLoc [private]
 

Standard_Boolean GeomFill_Pipe::myPolynomial [private]
 

Standard_Real GeomFill_Pipe::myRadius [private]
 

Handle_GeomFill_SectionLaw GeomFill_Pipe::mySec [private]
 

Handle_Geom_Surface GeomFill_Pipe::mySurface [private]
 

Standard_Integer GeomFill_Pipe::myType [private]
 


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