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

ModelingAlgorithms
TKGeomAlgo
GeomPlate


GeomPlate_BuildPlateSurface Class Reference

This class provides an algorithm for constructing such a plate surface that
it conforms to given curve and/or point constraints.
The algorithm accepts or constructs an initial surface
and looks for a deformation of it satisfying the
constraints and minimizing energy input.
A BuildPlateSurface object provides a framework for:
- defining or setting constraints
- implementing the construction algorithm
- consulting the result.
.

#include <GeomPlate_BuildPlateSurface.hxx>


Public Member Functions

void * operator new (size_t, void *anAddress)
void * operator new (size_t size)
void operator delete (void *anAddress)
Standard_EXPORT GeomPlate_BuildPlateSurface (const Handle(TColStd_HArray1OfInteger)&NPoints, const Handle(GeomPlate_HArray1OfHCurveOnSurface)&TabCurve, const Handle(TColStd_HArray1OfInteger)&Tang, const Standard_Integer Degree, const Standard_Integer NbIter=3, const Standard_Real Tol2d=0.00001, const Standard_Real Tol3d=0.0001, const Standard_Real TolAng=0.01, const Standard_Real TolCurv=0.1, const Standard_Boolean Anisotropie=Standard_False)
 Constructor compatible with the old version
with this constructor the constraint are given in a Array of Curve on Surface
The array NbPoints contains the number of points for each constraint.
The Array Tang contains the order of constraint for each Constraint: The possible values for this
order has to be -1 , 0 , 1 , 2 . Order i means constraint Gi.
NbIter is the maximum number of iteration to optimise the number of points for resolution
Degree is the degree of resolution for Plate
Tol2d is the tolerance used to test if two points of different constraint are identical in the
parametric space of the initial surface
Tol3d is used to test if two identical points in the 2d space are identical in 3d space
TolAng is used to compare the angle between normal of two identical points in the 2d space
Raises ConstructionError;
.
Standard_EXPORT GeomPlate_BuildPlateSurface (const Handle(Geom_Surface)&Surf, const Standard_Integer Degree=3, const Standard_Integer NbPtsOnCur=10, const Standard_Integer NbIter=3, const Standard_Real Tol2d=0.00001, const Standard_Real Tol3d=0.0001, const Standard_Real TolAng=0.01, const Standard_Real TolCurv=0.1, const Standard_Boolean Anisotropie=Standard_False)
Standard_EXPORT GeomPlate_BuildPlateSurface (const Standard_Integer Degree=3, const Standard_Integer NbPtsOnCur=10, const Standard_Integer NbIter=3, const Standard_Real Tol2d=0.00001, const Standard_Real Tol3d=0.0001, const Standard_Real TolAng=0.01, const Standard_Real TolCurv=0.1, const Standard_Boolean Anisotropie=Standard_False)
 Initializes the BuildPlateSurface framework for
deforming plate surfaces using curve and point
constraints. You use the first constructor if you have
an initial surface to work with at construction time. If
not, you use the second. You can add one later by
using the method LoadInitSurface. If no initial
surface is loaded, one will automatically be computed.
The curve and point constraints will be defined by
using the method Add.
Before the call to the algorithm, the curve constraints
will be transformed into sequences of discrete points.
Each curve defined as a constraint will be given the
value of NbPtsOnCur as the average number of points on it.
Several arguments serve to improve performance of
the algorithm. NbIter, for example, expresses the
number of iterations allowed and is used to control the
duration of computation. To optimize resolution,
Degree will have the default value of 3.
The surface generated must respect several tolerance values:
- 2d tolerance given by Tol2d, with a default value of 0.00001
- 3d tolerance expressed by Tol3d, with a default value of 0.0001
- angular tolerance given by TolAng, with a default
value of 0.01, defining the greatest angle allowed
between the constraint and the target surface.
Exceptions
Standard_ConstructionError if NbIter is less than 1 or Degree is less than 3.
.
Standard_EXPORT void Init ()
 Resets all constraints
.
Standard_EXPORT void LoadInitSurface (const Handle(Geom_Surface)&Surf)
 Loads the initial Surface
.
Standard_EXPORT void Add (const Handle(GeomPlate_CurveConstraint)&Cont)
 Adds the linear constraint cont.
.
Standard_EXPORT void SetNbBounds (const Standard_Integer NbBounds)
Standard_EXPORT void Add (const Handle(GeomPlate_PointConstraint)&Cont)
 Adds the point constraint cont.
.
Standard_EXPORT void Perform ()
 Calls the algorithm and computes the plate surface using
the loaded constraints. If no initial surface is given, the
algorithm automatically computes one.
Exceptions
Standard_RangeError if the value of the constraint is
null or if plate is not done.
.
Standard_EXPORT Handle_GeomPlate_CurveConstraint CurveConstraint (const Standard_Integer order) const
 returns the CurveConstraints of order order


Standard_EXPORT Handle_GeomPlate_PointConstraint PointConstraint (const Standard_Integer order) const
 returns the PointConstraint of order order


Standard_EXPORT void Disc2dContour (const Standard_Integer nbp, TColgp_SequenceOfXY &Seq2d)
Standard_EXPORT void Disc3dContour (const Standard_Integer nbp, const Standard_Integer iordre, TColgp_SequenceOfXYZ &Seq3d)
Standard_EXPORT Standard_Boolean IsDone () const
 Tests whether computation of the plate has been completed.
.
Standard_EXPORT Handle_GeomPlate_Surface Surface () const
 Returns the result of the computation. This surface can
then be used by GeomPlate_MakeApprox for
converting the resulting surface into a BSpline.
.
Standard_EXPORT Handle_Geom_Surface SurfInit () const
 Returns the initial surface
.
Standard_EXPORT Handle_TColStd_HArray1OfInteger Sense () const
 Allows you to ensure that the array of curves returned by
Curves2d has the correct orientation. Returns the
orientation of the curves in the the array returned by
Curves2d. Computation changes the orientation of
these curves. Consequently, this method returns the
orientation prior to computation.
.
Standard_EXPORT Handle_TColGeom2d_HArray1OfCurve Curves2d () const
 Extracts the array of curves on the plate surface which
correspond to the curve constraints set in Add.
.
Standard_EXPORT Handle_TColStd_HArray1OfInteger Order () const
 Returns the order of the curves in the array returned by
Curves2d. Computation changes this order.
Consequently, this method returns the order of the
curves prior to computation.
.
Standard_EXPORT Standard_Real G0Error () const
 Returns the max distance betwen the result and the constraints
.
Standard_EXPORT Standard_Real G1Error () const
 Returns the max angle betwen the result and the constraints
.
Standard_EXPORT Standard_Real G2Error () const
 Returns the max difference of curvature betwen the result and the constraints

.
Standard_EXPORT Standard_Real G0Error (const Standard_Integer Index)
 Returns the max distance between the result and the constraint Index
.
Standard_EXPORT Standard_Real G1Error (const Standard_Integer Index)
 Returns the max angle between the result and the constraint Index
.
Standard_EXPORT Standard_Real G2Error (const Standard_Integer Index)
 Returns the max difference of curvature between the result and the constraint Index
.

Private Member Functions

Standard_EXPORT void EcartContraintesMil (const Standard_Integer c, Handle(TColStd_HArray1OfReal)&d, Handle(TColStd_HArray1OfReal)&an, Handle(TColStd_HArray1OfReal)&courb)
 Evaluates the distance, the angle between normals, and the "courbure"
on middle points of contraints an corresponding points on the GeomPlate_Surface
the results are given for a curve c
.
Standard_EXPORT gp_Pnt2d ProjectPoint (const gp_Pnt &P)
Standard_EXPORT Handle_Geom2d_Curve ProjectCurve (const Handle(Adaptor3d_HCurve)&Curv)
Standard_EXPORT Handle_Adaptor2d_HCurve2d ProjectedCurve (Handle(Adaptor3d_HCurve)&Curv)
Standard_EXPORT void ComputeSurfInit ()
Standard_EXPORT void Intersect (Handle(GeomPlate_HArray1OfSequenceOfReal)&PntInter, Handle(GeomPlate_HArray1OfSequenceOfReal)&PntG1G1)
Standard_EXPORT void Discretise (const Handle(GeomPlate_HArray1OfSequenceOfReal)&PntInter, const Handle(GeomPlate_HArray1OfSequenceOfReal)&PntG1G1)
Standard_EXPORT void LoadCurve (const Standard_Integer NbBoucle, const Standard_Integer OrderMax=2)
Standard_EXPORT void LoadPoint (const Standard_Integer NbBoucle, const Standard_Integer OrderMax=2)
Standard_EXPORT void CalculNbPtsInit ()
Standard_EXPORT Standard_Boolean VerifSurface (const Standard_Integer NbLoop)
Standard_EXPORT void VerifPoints (Standard_Real &dist, Standard_Real &ang, Standard_Real &curv) const
Standard_EXPORT Standard_Boolean CourbeJointive (const Standard_Real tolerance)
Standard_EXPORT Standard_Real ComputeAnisotropie () const
Standard_EXPORT Standard_Boolean IsOrderG1 () const

Private Attributes

Handle_GeomPlate_HSequenceOfCurveConstraint myLinCont
Handle_GeomPlate_HArray1OfSequenceOfReal myParCont
Handle_GeomPlate_HArray1OfSequenceOfReal myPlateCont
Handle_GeomPlate_HSequenceOfPointConstraint myPntCont
Handle_Geom_Surface mySurfInit
Handle_Geom_Surface myPlanarSurfInit
Handle_GeomPlate_Surface myGeomPlateSurface
Plate_Plate myPlate
Plate_Plate myPrevPlate
Standard_Boolean myAnisotropie
Handle_TColStd_HArray1OfInteger mySense
Standard_Integer myDegree
Handle_TColStd_HArray1OfInteger myInitOrder
Standard_Real myG0Error
Standard_Real myG1Error
Standard_Real myG2Error
Standard_Integer myNbPtsOnCur
Standard_Boolean mySurfInitIsPlane
Standard_Boolean mySurfInitIsGive
Standard_Integer myNbIter
Extrema_ExtPS myProj
Standard_Real myTol2d
Standard_Real myTol3d
Standard_Real myTolAng
Standard_Real myTolCurv
Standard_Real myTolU
Standard_Real myTolV
Standard_Integer myNbBounds
Standard_Boolean myIsLinear
Standard_Boolean myFree


Constructor & Destructor Documentation

Standard_EXPORT GeomPlate_BuildPlateSurface::GeomPlate_BuildPlateSurface const Handle(TColStd_HArray1OfInteger)&  NPoints,
const Handle(GeomPlate_HArray1OfHCurveOnSurface)&  TabCurve,
const Handle(TColStd_HArray1OfInteger)&  Tang,
const Standard_Integer  Degree,
const Standard_Integer  NbIter = 3,
const Standard_Real  Tol2d = 0.00001,
const Standard_Real  Tol3d = 0.0001,
const Standard_Real  TolAng = 0.01,
const Standard_Real  TolCurv = 0.1,
const Standard_Boolean  Anisotropie = Standard_False
 

Standard_EXPORT GeomPlate_BuildPlateSurface::GeomPlate_BuildPlateSurface const Handle(Geom_Surface)&  Surf,
const Standard_Integer  Degree = 3,
const Standard_Integer  NbPtsOnCur = 10,
const Standard_Integer  NbIter = 3,
const Standard_Real  Tol2d = 0.00001,
const Standard_Real  Tol3d = 0.0001,
const Standard_Real  TolAng = 0.01,
const Standard_Real  TolCurv = 0.1,
const Standard_Boolean  Anisotropie = Standard_False
 

Standard_EXPORT GeomPlate_BuildPlateSurface::GeomPlate_BuildPlateSurface const Standard_Integer  Degree = 3,
const Standard_Integer  NbPtsOnCur = 10,
const Standard_Integer  NbIter = 3,
const Standard_Real  Tol2d = 0.00001,
const Standard_Real  Tol3d = 0.0001,
const Standard_Real  TolAng = 0.01,
const Standard_Real  TolCurv = 0.1,
const Standard_Boolean  Anisotropie = Standard_False
 


Member Function Documentation

Standard_EXPORT void GeomPlate_BuildPlateSurface::Add const Handle(GeomPlate_PointConstraint)&  Cont  ) 
 

Standard_EXPORT void GeomPlate_BuildPlateSurface::Add const Handle(GeomPlate_CurveConstraint)&  Cont  ) 
 

Standard_EXPORT void GeomPlate_BuildPlateSurface::CalculNbPtsInit  )  [private]
 

Standard_EXPORT Standard_Real GeomPlate_BuildPlateSurface::ComputeAnisotropie  )  const [private]
 

Standard_EXPORT void GeomPlate_BuildPlateSurface::ComputeSurfInit  )  [private]
 

Standard_EXPORT Standard_Boolean GeomPlate_BuildPlateSurface::CourbeJointive const Standard_Real  tolerance  )  [private]
 

Standard_EXPORT Handle_GeomPlate_CurveConstraint GeomPlate_BuildPlateSurface::CurveConstraint const Standard_Integer  order  )  const
 

Standard_EXPORT Handle_TColGeom2d_HArray1OfCurve GeomPlate_BuildPlateSurface::Curves2d  )  const
 

Standard_EXPORT void GeomPlate_BuildPlateSurface::Disc2dContour const Standard_Integer  nbp,
TColgp_SequenceOfXY &  Seq2d
 

Standard_EXPORT void GeomPlate_BuildPlateSurface::Disc3dContour const Standard_Integer  nbp,
const Standard_Integer  iordre,
TColgp_SequenceOfXYZ &  Seq3d
 

Standard_EXPORT void GeomPlate_BuildPlateSurface::Discretise const Handle(GeomPlate_HArray1OfSequenceOfReal)&  PntInter,
const Handle(GeomPlate_HArray1OfSequenceOfReal)&  PntG1G1
[private]
 

Standard_EXPORT void GeomPlate_BuildPlateSurface::EcartContraintesMil const Standard_Integer  c,
Handle(TColStd_HArray1OfReal)&  d,
Handle(TColStd_HArray1OfReal)&  an,
Handle(TColStd_HArray1OfReal)&  courb
[private]
 

Standard_EXPORT Standard_Real GeomPlate_BuildPlateSurface::G0Error const Standard_Integer  Index  ) 
 

Standard_EXPORT Standard_Real GeomPlate_BuildPlateSurface::G0Error  )  const
 

Standard_EXPORT Standard_Real GeomPlate_BuildPlateSurface::G1Error const Standard_Integer  Index  ) 
 

Standard_EXPORT Standard_Real GeomPlate_BuildPlateSurface::G1Error  )  const
 

Standard_EXPORT Standard_Real GeomPlate_BuildPlateSurface::G2Error const Standard_Integer  Index  ) 
 

Standard_EXPORT Standard_Real GeomPlate_BuildPlateSurface::G2Error  )  const
 

Standard_EXPORT void GeomPlate_BuildPlateSurface::Init  ) 
 

Standard_EXPORT void GeomPlate_BuildPlateSurface::Intersect Handle(GeomPlate_HArray1OfSequenceOfReal)&  PntInter,
Handle(GeomPlate_HArray1OfSequenceOfReal)&  PntG1G1
[private]
 

Standard_EXPORT Standard_Boolean GeomPlate_BuildPlateSurface::IsDone  )  const
 

Standard_EXPORT Standard_Boolean GeomPlate_BuildPlateSurface::IsOrderG1  )  const [private]
 

Standard_EXPORT void GeomPlate_BuildPlateSurface::LoadCurve const Standard_Integer  NbBoucle,
const Standard_Integer  OrderMax = 2
[private]
 

Standard_EXPORT void GeomPlate_BuildPlateSurface::LoadInitSurface const Handle(Geom_Surface)&  Surf  ) 
 

Standard_EXPORT void GeomPlate_BuildPlateSurface::LoadPoint const Standard_Integer  NbBoucle,
const Standard_Integer  OrderMax = 2
[private]
 

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

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

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

Standard_EXPORT Handle_TColStd_HArray1OfInteger GeomPlate_BuildPlateSurface::Order  )  const
 

Standard_EXPORT void GeomPlate_BuildPlateSurface::Perform  ) 
 

Standard_EXPORT Handle_GeomPlate_PointConstraint GeomPlate_BuildPlateSurface::PointConstraint const Standard_Integer  order  )  const
 

Standard_EXPORT Handle_Geom2d_Curve GeomPlate_BuildPlateSurface::ProjectCurve const Handle(Adaptor3d_HCurve)&  Curv  )  [private]
 

Standard_EXPORT Handle_Adaptor2d_HCurve2d GeomPlate_BuildPlateSurface::ProjectedCurve Handle(Adaptor3d_HCurve)&  Curv  )  [private]
 

Standard_EXPORT gp_Pnt2d GeomPlate_BuildPlateSurface::ProjectPoint const gp_Pnt &  P  )  [private]
 

Standard_EXPORT Handle_TColStd_HArray1OfInteger GeomPlate_BuildPlateSurface::Sense  )  const
 

Standard_EXPORT void GeomPlate_BuildPlateSurface::SetNbBounds const Standard_Integer  NbBounds  ) 
 

Standard_EXPORT Handle_GeomPlate_Surface GeomPlate_BuildPlateSurface::Surface  )  const
 

Standard_EXPORT Handle_Geom_Surface GeomPlate_BuildPlateSurface::SurfInit  )  const
 

Standard_EXPORT void GeomPlate_BuildPlateSurface::VerifPoints Standard_Real &  dist,
Standard_Real &  ang,
Standard_Real &  curv
const [private]
 

Standard_EXPORT Standard_Boolean GeomPlate_BuildPlateSurface::VerifSurface const Standard_Integer  NbLoop  )  [private]
 


Field Documentation

Standard_Boolean GeomPlate_BuildPlateSurface::myAnisotropie [private]
 

Standard_Integer GeomPlate_BuildPlateSurface::myDegree [private]
 

Standard_Boolean GeomPlate_BuildPlateSurface::myFree [private]
 

Standard_Real GeomPlate_BuildPlateSurface::myG0Error [private]
 

Standard_Real GeomPlate_BuildPlateSurface::myG1Error [private]
 

Standard_Real GeomPlate_BuildPlateSurface::myG2Error [private]
 

Handle_GeomPlate_Surface GeomPlate_BuildPlateSurface::myGeomPlateSurface [private]
 

Handle_TColStd_HArray1OfInteger GeomPlate_BuildPlateSurface::myInitOrder [private]
 

Standard_Boolean GeomPlate_BuildPlateSurface::myIsLinear [private]
 

Handle_GeomPlate_HSequenceOfCurveConstraint GeomPlate_BuildPlateSurface::myLinCont [private]
 

Standard_Integer GeomPlate_BuildPlateSurface::myNbBounds [private]
 

Standard_Integer GeomPlate_BuildPlateSurface::myNbIter [private]
 

Standard_Integer GeomPlate_BuildPlateSurface::myNbPtsOnCur [private]
 

Handle_GeomPlate_HArray1OfSequenceOfReal GeomPlate_BuildPlateSurface::myParCont [private]
 

Handle_Geom_Surface GeomPlate_BuildPlateSurface::myPlanarSurfInit [private]
 

Plate_Plate GeomPlate_BuildPlateSurface::myPlate [private]
 

Handle_GeomPlate_HArray1OfSequenceOfReal GeomPlate_BuildPlateSurface::myPlateCont [private]
 

Handle_GeomPlate_HSequenceOfPointConstraint GeomPlate_BuildPlateSurface::myPntCont [private]
 

Plate_Plate GeomPlate_BuildPlateSurface::myPrevPlate [private]
 

Extrema_ExtPS GeomPlate_BuildPlateSurface::myProj [private]
 

Handle_TColStd_HArray1OfInteger GeomPlate_BuildPlateSurface::mySense [private]
 

Handle_Geom_Surface GeomPlate_BuildPlateSurface::mySurfInit [private]
 

Standard_Boolean GeomPlate_BuildPlateSurface::mySurfInitIsGive [private]
 

Standard_Boolean GeomPlate_BuildPlateSurface::mySurfInitIsPlane [private]
 

Standard_Real GeomPlate_BuildPlateSurface::myTol2d [private]
 

Standard_Real GeomPlate_BuildPlateSurface::myTol3d [private]
 

Standard_Real GeomPlate_BuildPlateSurface::myTolAng [private]
 

Standard_Real GeomPlate_BuildPlateSurface::myTolCurv [private]
 

Standard_Real GeomPlate_BuildPlateSurface::myTolU [private]
 

Standard_Real GeomPlate_BuildPlateSurface::myTolV [private]
 


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