Open CASCADE Technology  7.5.0
Public Member Functions
GeomConvert_CompBezierSurfacesToBSplineSurface Class Reference

An algorithm to convert a grid of adjacent non-rational Bezier surfaces (with continuity CM) into a BSpline surface (with continuity CM). A CompBezierSurfacesToBSplineSurface object provides a framework for: More...

#include <GeomConvert_CompBezierSurfacesToBSplineSurface.hxx>

Public Member Functions

 GeomConvert_CompBezierSurfacesToBSplineSurface (const TColGeom_Array2OfBezierSurface &Beziers)
 Computes all the data needed to build a "C0" continuous BSpline surface equivalent to the grid of adjacent non-rational Bezier surfaces Beziers. Each surface in the Beziers grid becomes a natural patch, limited by knots values, on the BSpline surface whose data is computed. Surfaces in the grid must satisfy the following conditions: More...
 
 GeomConvert_CompBezierSurfacesToBSplineSurface (const TColGeom_Array2OfBezierSurface &Beziers, const Standard_Real Tolerance, const Standard_Boolean RemoveKnots=Standard_True)
 Build an Ci uniform (Rational) BSpline surface The higest Continuity Ci is imposed, like the maximal deformation is lower than <Tolerance>. Warning: The Continuity C0 is imposed without any check. More...
 
 GeomConvert_CompBezierSurfacesToBSplineSurface (const TColGeom_Array2OfBezierSurface &Beziers, const TColStd_Array1OfReal &UKnots, const TColStd_Array1OfReal &VKnots, const GeomAbs_Shape UContinuity=GeomAbs_C0, const GeomAbs_Shape VContinuity=GeomAbs_C0, const Standard_Real Tolerance=1.0e-4)
 Computes all the data needed to construct a BSpline surface equivalent to the adjacent non-rational Bezier surfaces Beziers grid. Each surface in the Beziers grid becomes a natural patch, limited by knots values, on the BSpline surface whose data is computed. Surfaces in the grid must satisfy the following conditions: More...
 
Standard_Integer NbUKnots () const
 Returns the number of knots in the U direction of the BSpline surface whose data is computed in this framework. More...
 
Standard_Integer NbUPoles () const
 Returns number of poles in the U direction of the BSpline surface whose data is computed in this framework. More...
 
Standard_Integer NbVKnots () const
 Returns the number of knots in the V direction of the BSpline surface whose data is computed in this framework. More...
 
Standard_Integer NbVPoles () const
 Returns the number of poles in the V direction of the BSpline surface whose data is computed in this framework. More...
 
const Handle< TColgp_HArray2OfPnt > & Poles () const
 Returns the table of poles of the BSpline surface whose data is computed in this framework. More...
 
const Handle< TColStd_HArray1OfReal > & UKnots () const
 Returns the knots table for the u parametric direction of the BSpline surface whose data is computed in this framework. More...
 
Standard_Integer UDegree () const
 Returns the degree for the u parametric direction of the BSpline surface whose data is computed in this framework. More...
 
const Handle< TColStd_HArray1OfReal > & VKnots () const
 Returns the knots table for the v parametric direction of the BSpline surface whose data is computed in this framework. More...
 
Standard_Integer VDegree () const
 Returns the degree for the v parametric direction of the BSpline surface whose data is computed in this framework. More...
 
const Handle< TColStd_HArray1OfInteger > & UMultiplicities () const
 Returns the multiplicities table for the u parametric direction of the knots of the BSpline surface whose data is computed in this framework. More...
 
const Handle< TColStd_HArray1OfInteger > & VMultiplicities () const
 – Returns the multiplicities table for the v parametric direction of the knots of the BSpline surface whose data is computed in this framework. More...
 
Standard_Boolean IsDone () const
 Returns true if the conversion was successful. Unless an exception was raised at the time of construction, the conversion of the Bezier surface grid assigned to this algorithm is always carried out. IsDone returns false if the constraints defined at the time of construction cannot be respected. This occurs when there is an incompatibility between a required degree of continuity on the BSpline surface, and the maximum tolerance accepted for local deformations of the surface. In such a case the computed data does not satisfy all the initial constraints. More...
 

Detailed Description

An algorithm to convert a grid of adjacent non-rational Bezier surfaces (with continuity CM) into a BSpline surface (with continuity CM). A CompBezierSurfacesToBSplineSurface object provides a framework for:

1 | | | | |

2 | | | | |

3 | | | | |

UIndex [1, NbUPatches] Udirection

Warning! Patches must have compatible parametrization

Constructor & Destructor Documentation

◆ GeomConvert_CompBezierSurfacesToBSplineSurface() [1/3]

GeomConvert_CompBezierSurfacesToBSplineSurface::GeomConvert_CompBezierSurfacesToBSplineSurface ( const TColGeom_Array2OfBezierSurface Beziers)

Computes all the data needed to build a "C0" continuous BSpline surface equivalent to the grid of adjacent non-rational Bezier surfaces Beziers. Each surface in the Beziers grid becomes a natural patch, limited by knots values, on the BSpline surface whose data is computed. Surfaces in the grid must satisfy the following conditions:

  • Coincident bounding curves between two consecutive surfaces in a row of the Beziers grid must be u-isoparametric bounding curves of these two surfaces.
  • Coincident bounding curves between two consecutive surfaces in a column of the Beziers grid must be v-isoparametric bounding curves of these two surfaces. The BSpline surface whose data is computed has the following characteristics:
  • Its degree in the u (respectively v) parametric direction is equal to that of the Bezier surface which has the highest degree in the u (respectively v) parametric direction in the Beziers grid.
  • It is a "Piecewise Bezier" in both u and v parametric directions, i.e.:
  • the knots are regularly spaced in each parametric direction (i.e. the difference between two consecutive knots is a constant), and
  • all the multiplicities of the surface knots in a given parametric direction are equal to Degree, which is the degree of the BSpline surface in this parametric direction, except for the first and last knots for which the multiplicity is equal to Degree + 1.
  • Coincident bounding curves between two consecutive columns of Bezier surfaces in the Beziers grid become u-isoparametric curves, corresponding to knots values of the BSpline surface.
  • Coincident bounding curves between two consecutive rows of Bezier surfaces in the Beziers grid become v-isoparametric curves corresponding to knots values of the BSpline surface. Use the available consultation functions to access the computed data. This data may be used to construct the BSpline surface. Warning The surfaces in the Beziers grid must be adjacent, i.e. two consecutive Bezier surfaces in the grid (in a row or column) must have a coincident bounding curve. In addition, the location of the parameterization on each of these surfaces (i.e. the relative location of u and v isoparametric curves on the surface) is of importance with regard to the positioning of the surfaces in the Beziers grid. Care must be taken with respect to the above, as these properties are not checked and an error may occur if they are not satisfied. Exceptions Standard_NotImplemented if one of the Bezier surfaces of the Beziers grid is rational.

◆ GeomConvert_CompBezierSurfacesToBSplineSurface() [2/3]

GeomConvert_CompBezierSurfacesToBSplineSurface::GeomConvert_CompBezierSurfacesToBSplineSurface ( const TColGeom_Array2OfBezierSurface Beziers,
const Standard_Real  Tolerance,
const Standard_Boolean  RemoveKnots = Standard_True 
)

Build an Ci uniform (Rational) BSpline surface The higest Continuity Ci is imposed, like the maximal deformation is lower than <Tolerance>. Warning: The Continuity C0 is imposed without any check.

◆ GeomConvert_CompBezierSurfacesToBSplineSurface() [3/3]

GeomConvert_CompBezierSurfacesToBSplineSurface::GeomConvert_CompBezierSurfacesToBSplineSurface ( const TColGeom_Array2OfBezierSurface Beziers,
const TColStd_Array1OfReal UKnots,
const TColStd_Array1OfReal VKnots,
const GeomAbs_Shape  UContinuity = GeomAbs_C0,
const GeomAbs_Shape  VContinuity = GeomAbs_C0,
const Standard_Real  Tolerance = 1.0e-4 
)

Computes all the data needed to construct a BSpline surface equivalent to the adjacent non-rational Bezier surfaces Beziers grid. Each surface in the Beziers grid becomes a natural patch, limited by knots values, on the BSpline surface whose data is computed. Surfaces in the grid must satisfy the following conditions:

  • Coincident bounding curves between two consecutive surfaces in a row of the Beziers grid must be u-isoparametric bounding curves of these two surfaces.
  • Coincident bounding curves between two consecutive surfaces in a column of the Beziers grid must be v-isoparametric bounding curves of these two surfaces. The BSpline surface whose data is computed has the following characteristics:
  • Its degree in the u (respectively v) parametric direction is equal to that of the Bezier surface which has the highest degree in the u (respectively v) parametric direction in the Beziers grid.
  • Coincident bounding curves between two consecutive columns of Bezier surfaces in the Beziers grid become u-isoparametric curves corresponding to knots values of the BSpline surface.
  • Coincident bounding curves between two consecutive rows of Bezier surfaces in the Beziers grid become v-isoparametric curves corresponding to knots values of the BSpline surface. Knots values of the BSpline surface are given in the two tables:
  • UKnots for the u parametric direction (which corresponds to the order of Bezier surface columns in the Beziers grid), and
  • VKnots for the v parametric direction (which corresponds to the order of Bezier surface rows in the Beziers grid). The dimensions of UKnots (respectively VKnots) must be equal to the number of columns (respectively, rows) of the Beziers grid, plus 1 . UContinuity and VContinuity, which are both defaulted to GeomAbs_C0, specify the required continuity on the BSpline surface. If the required degree of continuity is greater than 0 in a given parametric direction, a deformation is applied locally on the initial surface (as defined by the Beziers grid) to satisfy this condition. This local deformation is not applied however, if it is greater than Tolerance (defaulted to 1.0 e-7). In such cases, the continuity condition is not satisfied, and the function IsDone will return false. A small tolerance value prevents any modification of the surface and a large tolerance value "smoothes" the surface. Use the available consultation functions to access the computed data. This data may be used to construct the BSpline surface. Warning The surfaces in the Beziers grid must be adjacent, i.e. two consecutive Bezier surfaces in the grid (in a row or column) must have a coincident bounding curve. In addition, the location of the parameterization on each of these surfaces (i.e. the relative location of u and v isoparametric curves on the surface) is of importance with regard to the positioning of the surfaces in the Beziers grid. Care must be taken with respect to the above, as these properties are not checked and an error may occur if they are not satisfied. Exceptions Standard_DimensionMismatch:
  • if the number of knots in the UKnots table (i.e. the length of the UKnots array) is not equal to the number of columns of Bezier surfaces in the Beziers grid plus 1, or
  • if the number of knots in the VKnots table (i.e. the length of the VKnots array) is not equal to the number of rows of Bezier surfaces in the Beziers grid, plus 1. Standard_ConstructionError:
  • if UContinuity and VContinuity are not equal to one of the following values: GeomAbs_C0, GeomAbs_C1, GeomAbs_C2 and GeomAbs_C3; or
  • if the number of columns in the Beziers grid is greater than 1, and the required degree of continuity in the u parametric direction is greater than that of the Bezier surface with the highest degree in the u parametric direction (in the Beziers grid), minus 1; or
  • if the number of rows in the Beziers grid is greater than 1, and the required degree of continuity in the v parametric direction is greater than that of the Bezier surface with the highest degree in the v parametric direction (in the Beziers grid), minus 1 . Standard_NotImplemented if one of the Bezier surfaces in the Beziers grid is rational.

Member Function Documentation

◆ IsDone()

Standard_Boolean GeomConvert_CompBezierSurfacesToBSplineSurface::IsDone ( ) const

Returns true if the conversion was successful. Unless an exception was raised at the time of construction, the conversion of the Bezier surface grid assigned to this algorithm is always carried out. IsDone returns false if the constraints defined at the time of construction cannot be respected. This occurs when there is an incompatibility between a required degree of continuity on the BSpline surface, and the maximum tolerance accepted for local deformations of the surface. In such a case the computed data does not satisfy all the initial constraints.

◆ NbUKnots()

Standard_Integer GeomConvert_CompBezierSurfacesToBSplineSurface::NbUKnots ( ) const

Returns the number of knots in the U direction of the BSpline surface whose data is computed in this framework.

◆ NbUPoles()

Standard_Integer GeomConvert_CompBezierSurfacesToBSplineSurface::NbUPoles ( ) const

Returns number of poles in the U direction of the BSpline surface whose data is computed in this framework.

◆ NbVKnots()

Standard_Integer GeomConvert_CompBezierSurfacesToBSplineSurface::NbVKnots ( ) const

Returns the number of knots in the V direction of the BSpline surface whose data is computed in this framework.

◆ NbVPoles()

Standard_Integer GeomConvert_CompBezierSurfacesToBSplineSurface::NbVPoles ( ) const

Returns the number of poles in the V direction of the BSpline surface whose data is computed in this framework.

◆ Poles()

const Handle< TColgp_HArray2OfPnt >& GeomConvert_CompBezierSurfacesToBSplineSurface::Poles ( ) const

Returns the table of poles of the BSpline surface whose data is computed in this framework.

◆ UDegree()

Standard_Integer GeomConvert_CompBezierSurfacesToBSplineSurface::UDegree ( ) const

Returns the degree for the u parametric direction of the BSpline surface whose data is computed in this framework.

◆ UKnots()

const Handle< TColStd_HArray1OfReal >& GeomConvert_CompBezierSurfacesToBSplineSurface::UKnots ( ) const

Returns the knots table for the u parametric direction of the BSpline surface whose data is computed in this framework.

◆ UMultiplicities()

const Handle< TColStd_HArray1OfInteger >& GeomConvert_CompBezierSurfacesToBSplineSurface::UMultiplicities ( ) const

Returns the multiplicities table for the u parametric direction of the knots of the BSpline surface whose data is computed in this framework.

◆ VDegree()

Standard_Integer GeomConvert_CompBezierSurfacesToBSplineSurface::VDegree ( ) const

Returns the degree for the v parametric direction of the BSpline surface whose data is computed in this framework.

◆ VKnots()

const Handle< TColStd_HArray1OfReal >& GeomConvert_CompBezierSurfacesToBSplineSurface::VKnots ( ) const

Returns the knots table for the v parametric direction of the BSpline surface whose data is computed in this framework.

◆ VMultiplicities()

const Handle< TColStd_HArray1OfInteger >& GeomConvert_CompBezierSurfacesToBSplineSurface::VMultiplicities ( ) const

– Returns the multiplicities table for the v parametric direction of the knots of the BSpline surface whose data is computed in this framework.


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