Open CASCADE Technology Reference Manual 8.0.0
Loading...
Searching...
No Matches
Public Member Functions
GeomAPI_PointsToBSplineSurface Class Reference

This class is used to approximate or interpolate a BSplineSurface passing through an Array2 of points, with a given continuity. Describes functions for building a BSpline surface which approximates or interpolates a set of points. A PointsToBSplineSurface object provides a framework for: More...

#include <GeomAPI_PointsToBSplineSurface.hxx>

Public Member Functions

 GeomAPI_PointsToBSplineSurface ()
 Constructs an empty algorithm for approximation or interpolation of a surface. Use:
 
 GeomAPI_PointsToBSplineSurface (const NCollection_Array2< gp_Pnt > &Points, const int DegMin=3, const int DegMax=8, const GeomAbs_Shape Continuity=GeomAbs_C2, const double Tol3D=1.0e-3)
 Approximates a BSpline Surface passing through an array of Points. The resulting BSpline will have the following properties: 1- his degree will be in the range [Degmin,Degmax] 2- his continuity will be at least <Continuity> 3- the distance from the point <Points> to the BSpline will be lower to Tol3D.
 
 GeomAPI_PointsToBSplineSurface (const NCollection_Array2< gp_Pnt > &Points, const Approx_ParametrizationType ParType, const int DegMin=3, const int DegMax=8, const GeomAbs_Shape Continuity=GeomAbs_C2, const double Tol3D=1.0e-3)
 Approximates a BSpline Surface passing through an array of Points. The resulting BSpline will have the following properties: 1- his degree will be in the range [Degmin,Degmax] 2- his continuity will be at least <Continuity> 3- the distance from the point <Points> to the BSpline will be lower to Tol3D.
 
 GeomAPI_PointsToBSplineSurface (const NCollection_Array2< gp_Pnt > &Points, const double Weight1, const double Weight2, const double Weight3, const int DegMax=8, const GeomAbs_Shape Continuity=GeomAbs_C2, const double Tol3D=1.0e-3)
 Approximates a BSpline Surface passing through an array of points using variational smoothing algorithm, which tries to minimize additional criterium: Weight1*CurveLength + Weight2*Curvature + Weight3*Torsion.
 
 GeomAPI_PointsToBSplineSurface (const NCollection_Array2< double > &ZPoints, const double X0, const double dX, const double Y0, const double dY, const int DegMin=3, const int DegMax=8, const GeomAbs_Shape Continuity=GeomAbs_C2, const double Tol3D=1.0e-3)
 Approximates a BSpline Surface passing through an array of Points.
 
void Init (const NCollection_Array2< gp_Pnt > &Points, const int DegMin=3, const int DegMax=8, const GeomAbs_Shape Continuity=GeomAbs_C2, const double Tol3D=1.0e-3)
 Approximates a BSpline Surface passing through an array of Point. The resulting BSpline will have the following properties: 1- his degree will be in the range [Degmin,Degmax] 2- his continuity will be at least <Continuity> 3- the distance from the point <Points> to the BSpline will be lower to Tol3D.
 
void Interpolate (const NCollection_Array2< gp_Pnt > &Points, const bool thePeriodic=false)
 Interpolates a BSpline Surface passing through an array of Point. The resulting BSpline will have the following properties: 1- his degree will be 3. 2- his continuity will be C2.
 
void Interpolate (const NCollection_Array2< gp_Pnt > &Points, const Approx_ParametrizationType ParType, const bool thePeriodic=false)
 Interpolates a BSpline Surface passing through an array of Point. The resulting BSpline will have the following properties: 1- his degree will be 3. 2- his continuity will be C2.
 
void Init (const NCollection_Array2< double > &ZPoints, const double X0, const double dX, const double Y0, const double dY, const int DegMin=3, const int DegMax=8, const GeomAbs_Shape Continuity=GeomAbs_C2, const double Tol3D=1.0e-3)
 Approximates a BSpline Surface passing through an array of Points.
 
void Interpolate (const NCollection_Array2< double > &ZPoints, const double X0, const double dX, const double Y0, const double dY)
 Interpolates a BSpline Surface passing through an array of Points.
 
void Init (const NCollection_Array2< gp_Pnt > &Points, const Approx_ParametrizationType ParType, const int DegMin=3, const int DegMax=8, const GeomAbs_Shape Continuity=GeomAbs_C2, const double Tol3D=1.0e-3, const bool thePeriodic=false)
 Approximates a BSpline Surface passing through an array of Point. The resulting BSpline will have the following properties: 1- his degree will be in the range [Degmin,Degmax] 2- his continuity will be at least <Continuity> 3- the distance from the point <Points> to the BSpline will be lower to Tol3D.
 
void Init (const NCollection_Array2< gp_Pnt > &Points, const double Weight1, const double Weight2, const double Weight3, const int DegMax=8, const GeomAbs_Shape Continuity=GeomAbs_C2, const double Tol3D=1.0e-3)
 Approximates a BSpline Surface passing through an array of point using variational smoothing algorithm, which tries to minimize additional criterium: Weight1*CurveLength + Weight2*Curvature + Weight3*Torsion.
 
const occ::handle< Geom_BSplineSurface > & Surface () const
 Returns the approximate BSpline Surface.
 
 operator occ::handle< Geom_BSplineSurface > () const
 
bool IsDone () const
 

Detailed Description

This class is used to approximate or interpolate a BSplineSurface passing through an Array2 of points, with a given continuity. Describes functions for building a BSpline surface which approximates or interpolates a set of points. A PointsToBSplineSurface object provides a framework for:

There is accordance between parametrization of result surface S(U, V) and indexes of array Points(i, j): first index corresponds U parameter of surface, second - V parameter of surface. So, points of any j-th column Points(*, j) represent any V isoline of surface, points of any i-th row Point(i, *) represent any U isoline of surface.

For each sampling point parameters U, V are calculated according to type of parametrization, which can be Approx_ChordLength, Approx_Centripetal or Approx_IsoParametric. Default value is Approx_ChordLength. For ChordLength parametrisation U(i) = U(i-1) + P(i).Distance(P(i-1)), For Centripetal type U(i) = U(i-1) + std::sqrt(P(i).Distance(P(i-1))). Centripetal type can get better result for irregular distances between points.

Approximation and interpolation algorithms can build periodical surface along U direction, which corresponds columns of array Points(i, j), if corresponding parameter (thePeriodic, see comments below) of called methods is set to True. Algorithm uses first row Points(1, *) as periodic boundary, so to avoid getting wrong surface it is necessary to keep distance between corresponding points of first and last rows of Points: Points(1, *) != Points(Upper, *).

Constructor & Destructor Documentation

◆ GeomAPI_PointsToBSplineSurface() [1/5]

GeomAPI_PointsToBSplineSurface::GeomAPI_PointsToBSplineSurface ( )

Constructs an empty algorithm for approximation or interpolation of a surface. Use:

  • an Init function to define and build the BSpline surface by approximation, or
  • an Interpolate function to define and build the BSpline surface by interpolation.

◆ GeomAPI_PointsToBSplineSurface() [2/5]

GeomAPI_PointsToBSplineSurface::GeomAPI_PointsToBSplineSurface ( const NCollection_Array2< gp_Pnt > & Points,
const int DegMin = 3,
const int DegMax = 8,
const GeomAbs_Shape Continuity = GeomAbs_C2,
const double Tol3D = 1.0e-3 )

Approximates a BSpline Surface passing through an array of Points. The resulting BSpline will have the following properties: 1- his degree will be in the range [Degmin,Degmax] 2- his continuity will be at least <Continuity> 3- the distance from the point <Points> to the BSpline will be lower to Tol3D.

◆ GeomAPI_PointsToBSplineSurface() [3/5]

GeomAPI_PointsToBSplineSurface::GeomAPI_PointsToBSplineSurface ( const NCollection_Array2< gp_Pnt > & Points,
const Approx_ParametrizationType ParType,
const int DegMin = 3,
const int DegMax = 8,
const GeomAbs_Shape Continuity = GeomAbs_C2,
const double Tol3D = 1.0e-3 )

Approximates a BSpline Surface passing through an array of Points. The resulting BSpline will have the following properties: 1- his degree will be in the range [Degmin,Degmax] 2- his continuity will be at least <Continuity> 3- the distance from the point <Points> to the BSpline will be lower to Tol3D.

◆ GeomAPI_PointsToBSplineSurface() [4/5]

GeomAPI_PointsToBSplineSurface::GeomAPI_PointsToBSplineSurface ( const NCollection_Array2< gp_Pnt > & Points,
const double Weight1,
const double Weight2,
const double Weight3,
const int DegMax = 8,
const GeomAbs_Shape Continuity = GeomAbs_C2,
const double Tol3D = 1.0e-3 )

Approximates a BSpline Surface passing through an array of points using variational smoothing algorithm, which tries to minimize additional criterium: Weight1*CurveLength + Weight2*Curvature + Weight3*Torsion.

◆ GeomAPI_PointsToBSplineSurface() [5/5]

GeomAPI_PointsToBSplineSurface::GeomAPI_PointsToBSplineSurface ( const NCollection_Array2< double > & ZPoints,
const double X0,
const double dX,
const double Y0,
const double dY,
const int DegMin = 3,
const int DegMax = 8,
const GeomAbs_Shape Continuity = GeomAbs_C2,
const double Tol3D = 1.0e-3 )

Approximates a BSpline Surface passing through an array of Points.

The points will be constructed as follow: P(i,j) = gp_Pnt( X0 + (i-1)*dX, Y0 + (j-1)*dY, ZPoints(i,j) )

The resulting BSpline will have the following properties: 1- his degree will be in the range [Degmin,Degmax] 2- his continuity will be at least <Continuity> 3- the distance from the point <Points> to the BSpline will be lower to Tol3D 4- the parametrization of the surface will verify: S->Value( U, V) = gp_Pnt( U, V, Z(U,V) );

Member Function Documentation

◆ Init() [1/4]

void GeomAPI_PointsToBSplineSurface::Init ( const NCollection_Array2< double > & ZPoints,
const double X0,
const double dX,
const double Y0,
const double dY,
const int DegMin = 3,
const int DegMax = 8,
const GeomAbs_Shape Continuity = GeomAbs_C2,
const double Tol3D = 1.0e-3 )

Approximates a BSpline Surface passing through an array of Points.

The points will be constructed as follow: P(i,j) = gp_Pnt( X0 + (i-1)*dX, Y0 + (j-1)*dY, ZPoints(i,j) )

The resulting BSpline will have the following properties: 1- his degree will be in the range [Degmin,Degmax] 2- his continuity will be at least <Continuity> 3- the distance from the point <Points> to the BSpline will be lower to Tol3D 4- the parametrization of the surface will verify: S->Value( U, V) = gp_Pnt( U, V, Z(U,V) );

◆ Init() [2/4]

void GeomAPI_PointsToBSplineSurface::Init ( const NCollection_Array2< gp_Pnt > & Points,
const Approx_ParametrizationType ParType,
const int DegMin = 3,
const int DegMax = 8,
const GeomAbs_Shape Continuity = GeomAbs_C2,
const double Tol3D = 1.0e-3,
const bool thePeriodic = false )

Approximates a BSpline Surface passing through an array of Point. The resulting BSpline will have the following properties: 1- his degree will be in the range [Degmin,Degmax] 2- his continuity will be at least <Continuity> 3- the distance from the point <Points> to the BSpline will be lower to Tol3D.

◆ Init() [3/4]

void GeomAPI_PointsToBSplineSurface::Init ( const NCollection_Array2< gp_Pnt > & Points,
const double Weight1,
const double Weight2,
const double Weight3,
const int DegMax = 8,
const GeomAbs_Shape Continuity = GeomAbs_C2,
const double Tol3D = 1.0e-3 )

Approximates a BSpline Surface passing through an array of point using variational smoothing algorithm, which tries to minimize additional criterium: Weight1*CurveLength + Weight2*Curvature + Weight3*Torsion.

◆ Init() [4/4]

void GeomAPI_PointsToBSplineSurface::Init ( const NCollection_Array2< gp_Pnt > & Points,
const int DegMin = 3,
const int DegMax = 8,
const GeomAbs_Shape Continuity = GeomAbs_C2,
const double Tol3D = 1.0e-3 )

Approximates a BSpline Surface passing through an array of Point. The resulting BSpline will have the following properties: 1- his degree will be in the range [Degmin,Degmax] 2- his continuity will be at least <Continuity> 3- the distance from the point <Points> to the BSpline will be lower to Tol3D.

◆ Interpolate() [1/3]

void GeomAPI_PointsToBSplineSurface::Interpolate ( const NCollection_Array2< double > & ZPoints,
const double X0,
const double dX,
const double Y0,
const double dY )

Interpolates a BSpline Surface passing through an array of Points.

The points will be constructed as follow: P(i,j) = gp_Pnt( X0 + (i-1)*dX, Y0 + (j-1)*dY, ZPoints(i,j) )

The resulting BSpline will have the following properties: 1- his degree will be 3 2- his continuity will be C2. 4- the parametrization of the surface will verify: S->Value( U, V) = gp_Pnt( U, V, Z(U,V) );

◆ Interpolate() [2/3]

void GeomAPI_PointsToBSplineSurface::Interpolate ( const NCollection_Array2< gp_Pnt > & Points,
const Approx_ParametrizationType ParType,
const bool thePeriodic = false )

Interpolates a BSpline Surface passing through an array of Point. The resulting BSpline will have the following properties: 1- his degree will be 3. 2- his continuity will be C2.

◆ Interpolate() [3/3]

void GeomAPI_PointsToBSplineSurface::Interpolate ( const NCollection_Array2< gp_Pnt > & Points,
const bool thePeriodic = false )

Interpolates a BSpline Surface passing through an array of Point. The resulting BSpline will have the following properties: 1- his degree will be 3. 2- his continuity will be C2.

◆ IsDone()

bool GeomAPI_PointsToBSplineSurface::IsDone ( ) const

◆ operator occ::handle< Geom_BSplineSurface >()

GeomAPI_PointsToBSplineSurface::operator occ::handle< Geom_BSplineSurface > ( ) const

◆ Surface()

const occ::handle< Geom_BSplineSurface > & GeomAPI_PointsToBSplineSurface::Surface ( ) const

Returns the approximate BSpline Surface.


The documentation for this class was generated from the following file: