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

ModelingData
TKGeomBase
Approx


Approx_SweepApproximation Class Reference

Approximation of an Surface S(u,v)
(and eventually associate 2d Curves) defined
by section's law.

This surface is defined by a function F(u, v)
where Ft(u) = F(u, t) is a bspline curve.
To use this algorithme, you have to implement Ft(u)
as a derivative class of Approx_SweepFunction.
This algorithm can be used by blending, sweeping...
.

#include <Approx_SweepApproximation.hxx>


Public Member Functions

void * operator new (size_t, void *anAddress)
void * operator new (size_t size)
void operator delete (void *anAddress)
Standard_EXPORT Approx_SweepApproximation (const Handle(Approx_SweepFunction)&Func)
Standard_EXPORT void Perform (const Standard_Real First, const Standard_Real Last, const Standard_Real Tol3d, const Standard_Real BoundTol, const Standard_Real Tol2d, const Standard_Real TolAngular, const GeomAbs_Shape Continuity=GeomAbs_C0, const Standard_Integer Degmax=11, const Standard_Integer Segmax=50)
 Perform the Approximation
[First, Last] : Approx_SweepApproximation.cdl
Tol3d : Tolerance to surface approximation
Tol2d : Tolerance used to perform curve approximation
Normaly the 2d curve are approximated with a
tolerance given by the resolution on support surfaces,
but if this tolerance is too large Tol2d is used.
TolAngular : Tolerance (in radian) to control the angle
beetween tangents on the section law and
tangent of iso-v on approximed surface
Continuity : The continuity in v waiting on the surface
Degmax : The maximum degree in v requiered on the surface
Segmax : The maximum number of span in v requiered on
the surface
Warning : The continuity ci can be obtained only if Ft is Ci
.
Standard_EXPORT Standard_Integer Eval (const Standard_Real Parameter, const Standard_Integer DerivativeRequest, const Standard_Real First, const Standard_Real Last, Standard_Real &Result)
 The EvaluatorFunction from AdvApprox;
.
Standard_Boolean IsDone () const
 returns if we have an result

Standard_EXPORT void SurfShape (Standard_Integer &UDegree, Standard_Integer &VDegree, Standard_Integer &NbUPoles, Standard_Integer &NbVPoles, Standard_Integer &NbUKnots, Standard_Integer &NbVKnots) const
Standard_EXPORT void Surface (TColgp_Array2OfPnt &TPoles, TColStd_Array2OfReal &TWeights, TColStd_Array1OfReal &TUKnots, TColStd_Array1OfReal &TVKnots, TColStd_Array1OfInteger &TUMults, TColStd_Array1OfInteger &TVMults) const
Standard_Integer UDegree () const
Standard_Integer VDegree () const
const TColgp_Array2OfPnt & SurfPoles () const
const TColStd_Array2OfReal & SurfWeights () const
const TColStd_Array1OfReal & SurfUKnots () const
const TColStd_Array1OfReal & SurfVKnots () const
const TColStd_Array1OfInteger & SurfUMults () const
const TColStd_Array1OfInteger & SurfVMults () const
Standard_EXPORT Standard_Real MaxErrorOnSurf () const
 returns the maximum error in the suface approximation.

Standard_EXPORT Standard_Real AverageErrorOnSurf () const
 returns the average error in the suface approximation.

Standard_Integer NbCurves2d () const
Standard_EXPORT void Curves2dShape (Standard_Integer &Degree, Standard_Integer &NbPoles, Standard_Integer &NbKnots) const
Standard_EXPORT void Curve2d (const Standard_Integer Index, TColgp_Array1OfPnt2d &TPoles, TColStd_Array1OfReal &TKnots, TColStd_Array1OfInteger &TMults) const
Standard_Integer Curves2dDegree () const
const TColgp_Array1OfPnt2d & Curve2dPoles (const Standard_Integer Index) const
const TColStd_Array1OfReal & Curves2dKnots () const
const TColStd_Array1OfInteger & Curves2dMults () const
Standard_EXPORT Standard_Real Max2dError (const Standard_Integer Index) const
 returns the maximum error of the <index>
2d curve approximation.

Standard_EXPORT Standard_Real Average2dError (const Standard_Integer Index) const
 returns the average error of the <index>
2d curve approximation.

Standard_EXPORT Standard_Real TolCurveOnSurf (const Standard_Integer Index) const
 returns the maximum 3d error of the <index>
2d curve approximation on the Surface.

Standard_EXPORT void Dump (Standard_OStream &o) const
 display information on approximation.


Private Member Functions

Standard_EXPORT void Approximation (const Handle(TColStd_HArray1OfReal)&OneDTol, const Handle(TColStd_HArray1OfReal)&TwoDTol, const Handle(TColStd_HArray1OfReal)&ThreeDTol, const Standard_Real BounTol, const Standard_Real First, const Standard_Real Last, const GeomAbs_Shape Continuity, const Standard_Integer Degmax, const Standard_Integer Segmax, const AdvApprox_EvaluatorFunction &TheApproxFunction, const AdvApprox_Cutting &TheCuttingTool)
Standard_EXPORT Standard_Boolean D0 (const Standard_Real Param, const Standard_Real First, const Standard_Real Last, Standard_Real &Result)
Standard_EXPORT Standard_Boolean D1 (const Standard_Real Param, const Standard_Real First, const Standard_Real Last, Standard_Real &Result)
Standard_EXPORT Standard_Boolean D2 (const Standard_Real Param, const Standard_Real First, const Standard_Real Last, Standard_Real &Result)

Private Attributes

Handle_Approx_SweepFunction myFunc
Standard_Boolean done
Standard_Integer Num1DSS
Standard_Integer Num2DSS
Standard_Integer Num3DSS
Standard_Integer udeg
Standard_Integer vdeg
Standard_Integer deg2d
Handle_TColgp_HArray2OfPnt tabPoles
Handle_TColStd_HArray2OfReal tabWeights
Handle_TColStd_HArray1OfReal tabUKnots
Handle_TColStd_HArray1OfReal tabVKnots
Handle_TColStd_HArray1OfReal tab2dKnots
Handle_TColStd_HArray1OfInteger tabUMults
Handle_TColStd_HArray1OfInteger tabVMults
Handle_TColStd_HArray1OfInteger tab2dMults
Approx_SequenceOfArray1OfPnt2d seqPoles2d
Handle_TColStd_HArray1OfReal MError1d
Handle_TColStd_HArray1OfReal tab2dError
Handle_TColStd_HArray1OfReal MError3d
Handle_TColStd_HArray1OfReal AError1d
Handle_TColStd_HArray1OfReal Ave2dError
Handle_TColStd_HArray1OfReal AError3d
Handle_Approx_HArray1OfGTrsf2d AAffin
Handle_TColStd_HArray1OfReal COnSurfErr
gp_Vec Translation
Handle_TColgp_HArray1OfPnt myPoles
Handle_TColgp_HArray1OfPnt2d myPoles2d
Handle_TColStd_HArray1OfReal myWeigths
Handle_TColgp_HArray1OfVec myDPoles
Handle_TColgp_HArray1OfVec myD2Poles
Handle_TColgp_HArray1OfVec2d myDPoles2d
Handle_TColgp_HArray1OfVec2d myD2Poles2d
Handle_TColStd_HArray1OfReal myDWeigths
Handle_TColStd_HArray1OfReal myD2Weigths
Standard_Integer myOrder
Standard_Real myParam
Standard_Real first
Standard_Real last


Constructor & Destructor Documentation

Standard_EXPORT Approx_SweepApproximation::Approx_SweepApproximation const Handle(Approx_SweepFunction)&  Func  ) 
 


Member Function Documentation

Standard_EXPORT void Approx_SweepApproximation::Approximation const Handle(TColStd_HArray1OfReal)&  OneDTol,
const Handle(TColStd_HArray1OfReal)&  TwoDTol,
const Handle(TColStd_HArray1OfReal)&  ThreeDTol,
const Standard_Real  BounTol,
const Standard_Real  First,
const Standard_Real  Last,
const GeomAbs_Shape  Continuity,
const Standard_Integer  Degmax,
const Standard_Integer  Segmax,
const AdvApprox_EvaluatorFunction TheApproxFunction,
const AdvApprox_Cutting TheCuttingTool
[private]
 

Standard_EXPORT Standard_Real Approx_SweepApproximation::Average2dError const Standard_Integer  Index  )  const
 

Standard_EXPORT Standard_Real Approx_SweepApproximation::AverageErrorOnSurf  )  const
 

Standard_EXPORT void Approx_SweepApproximation::Curve2d const Standard_Integer  Index,
TColgp_Array1OfPnt2d &  TPoles,
TColStd_Array1OfReal &  TKnots,
TColStd_Array1OfInteger &  TMults
const
 

const TColgp_Array1OfPnt2d & Approx_SweepApproximation::Curve2dPoles const Standard_Integer  Index  )  const [inline]
 

Standard_Integer Approx_SweepApproximation::Curves2dDegree  )  const [inline]
 

const TColStd_Array1OfReal & Approx_SweepApproximation::Curves2dKnots  )  const [inline]
 

const TColStd_Array1OfInteger & Approx_SweepApproximation::Curves2dMults  )  const [inline]
 

Standard_EXPORT void Approx_SweepApproximation::Curves2dShape Standard_Integer &  Degree,
Standard_Integer &  NbPoles,
Standard_Integer &  NbKnots
const
 

Standard_EXPORT Standard_Boolean Approx_SweepApproximation::D0 const Standard_Real  Param,
const Standard_Real  First,
const Standard_Real  Last,
Standard_Real &  Result
[private]
 

Standard_EXPORT Standard_Boolean Approx_SweepApproximation::D1 const Standard_Real  Param,
const Standard_Real  First,
const Standard_Real  Last,
Standard_Real &  Result
[private]
 

Standard_EXPORT Standard_Boolean Approx_SweepApproximation::D2 const Standard_Real  Param,
const Standard_Real  First,
const Standard_Real  Last,
Standard_Real &  Result
[private]
 

Standard_EXPORT void Approx_SweepApproximation::Dump Standard_OStream &  o  )  const
 

Standard_EXPORT Standard_Integer Approx_SweepApproximation::Eval const Standard_Real  Parameter,
const Standard_Integer  DerivativeRequest,
const Standard_Real  First,
const Standard_Real  Last,
Standard_Real &  Result
 

Standard_Boolean Approx_SweepApproximation::IsDone  )  const [inline]
 

Standard_EXPORT Standard_Real Approx_SweepApproximation::Max2dError const Standard_Integer  Index  )  const
 

Standard_EXPORT Standard_Real Approx_SweepApproximation::MaxErrorOnSurf  )  const
 

Standard_Integer Approx_SweepApproximation::NbCurves2d  )  const [inline]
 

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

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

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

Standard_EXPORT void Approx_SweepApproximation::Perform const Standard_Real  First,
const Standard_Real  Last,
const Standard_Real  Tol3d,
const Standard_Real  BoundTol,
const Standard_Real  Tol2d,
const Standard_Real  TolAngular,
const GeomAbs_Shape  Continuity = GeomAbs_C0,
const Standard_Integer  Degmax = 11,
const Standard_Integer  Segmax = 50
 

Standard_EXPORT void Approx_SweepApproximation::Surface TColgp_Array2OfPnt &  TPoles,
TColStd_Array2OfReal &  TWeights,
TColStd_Array1OfReal &  TUKnots,
TColStd_Array1OfReal &  TVKnots,
TColStd_Array1OfInteger &  TUMults,
TColStd_Array1OfInteger &  TVMults
const
 

const TColgp_Array2OfPnt & Approx_SweepApproximation::SurfPoles  )  const [inline]
 

Standard_EXPORT void Approx_SweepApproximation::SurfShape Standard_Integer &  UDegree,
Standard_Integer &  VDegree,
Standard_Integer &  NbUPoles,
Standard_Integer &  NbVPoles,
Standard_Integer &  NbUKnots,
Standard_Integer &  NbVKnots
const
 

const TColStd_Array1OfReal & Approx_SweepApproximation::SurfUKnots  )  const [inline]
 

const TColStd_Array1OfInteger & Approx_SweepApproximation::SurfUMults  )  const [inline]
 

const TColStd_Array1OfReal & Approx_SweepApproximation::SurfVKnots  )  const [inline]
 

const TColStd_Array1OfInteger & Approx_SweepApproximation::SurfVMults  )  const [inline]
 

const TColStd_Array2OfReal & Approx_SweepApproximation::SurfWeights  )  const [inline]
 

Standard_EXPORT Standard_Real Approx_SweepApproximation::TolCurveOnSurf const Standard_Integer  Index  )  const
 

Standard_Integer Approx_SweepApproximation::UDegree  )  const [inline]
 

Standard_Integer Approx_SweepApproximation::VDegree  )  const [inline]
 


Field Documentation

Handle_Approx_HArray1OfGTrsf2d Approx_SweepApproximation::AAffin [private]
 

Handle_TColStd_HArray1OfReal Approx_SweepApproximation::AError1d [private]
 

Handle_TColStd_HArray1OfReal Approx_SweepApproximation::AError3d [private]
 

Handle_TColStd_HArray1OfReal Approx_SweepApproximation::Ave2dError [private]
 

Handle_TColStd_HArray1OfReal Approx_SweepApproximation::COnSurfErr [private]
 

Standard_Integer Approx_SweepApproximation::deg2d [private]
 

Standard_Boolean Approx_SweepApproximation::done [private]
 

Standard_Real Approx_SweepApproximation::first [private]
 

Standard_Real Approx_SweepApproximation::last [private]
 

Handle_TColStd_HArray1OfReal Approx_SweepApproximation::MError1d [private]
 

Handle_TColStd_HArray1OfReal Approx_SweepApproximation::MError3d [private]
 

Handle_TColgp_HArray1OfVec Approx_SweepApproximation::myD2Poles [private]
 

Handle_TColgp_HArray1OfVec2d Approx_SweepApproximation::myD2Poles2d [private]
 

Handle_TColStd_HArray1OfReal Approx_SweepApproximation::myD2Weigths [private]
 

Handle_TColgp_HArray1OfVec Approx_SweepApproximation::myDPoles [private]
 

Handle_TColgp_HArray1OfVec2d Approx_SweepApproximation::myDPoles2d [private]
 

Handle_TColStd_HArray1OfReal Approx_SweepApproximation::myDWeigths [private]
 

Handle_Approx_SweepFunction Approx_SweepApproximation::myFunc [private]
 

Standard_Integer Approx_SweepApproximation::myOrder [private]
 

Standard_Real Approx_SweepApproximation::myParam [private]
 

Handle_TColgp_HArray1OfPnt Approx_SweepApproximation::myPoles [private]
 

Handle_TColgp_HArray1OfPnt2d Approx_SweepApproximation::myPoles2d [private]
 

Handle_TColStd_HArray1OfReal Approx_SweepApproximation::myWeigths [private]
 

Standard_Integer Approx_SweepApproximation::Num1DSS [private]
 

Standard_Integer Approx_SweepApproximation::Num2DSS [private]
 

Standard_Integer Approx_SweepApproximation::Num3DSS [private]
 

Approx_SequenceOfArray1OfPnt2d Approx_SweepApproximation::seqPoles2d [private]
 

Handle_TColStd_HArray1OfReal Approx_SweepApproximation::tab2dError [private]
 

Handle_TColStd_HArray1OfReal Approx_SweepApproximation::tab2dKnots [private]
 

Handle_TColStd_HArray1OfInteger Approx_SweepApproximation::tab2dMults [private]
 

Handle_TColgp_HArray2OfPnt Approx_SweepApproximation::tabPoles [private]
 

Handle_TColStd_HArray1OfReal Approx_SweepApproximation::tabUKnots [private]
 

Handle_TColStd_HArray1OfInteger Approx_SweepApproximation::tabUMults [private]
 

Handle_TColStd_HArray1OfReal Approx_SweepApproximation::tabVKnots [private]
 

Handle_TColStd_HArray1OfInteger Approx_SweepApproximation::tabVMults [private]
 

Handle_TColStd_HArray2OfReal Approx_SweepApproximation::tabWeights [private]
 

gp_Vec Approx_SweepApproximation::Translation [private]
 

Standard_Integer Approx_SweepApproximation::udeg [private]
 

Standard_Integer Approx_SweepApproximation::vdeg [private]
 


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