Open CASCADE Technology Reference Manual 8.0.0
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Protected Member Functions
Geom_BezierSurface Class Reference

Describes a rational or non-rational Bezier surface. More...

#include <Geom_BezierSurface.hxx>

Inheritance diagram for Geom_BezierSurface:
Inheritance graph
[legend]

Public Member Functions

 Geom_BezierSurface (const NCollection_Array2< gp_Pnt > &SurfacePoles)
 Creates a non-rational Bezier surface with a set of poles. Control points representation : SPoles(Uorigin,Vorigin) ...................SPoles(Uorigin,Vend) . . . . SPoles(Uend, Vorigin) .....................SPoles(Uend, Vend) For the double array the row indice corresponds to the parametric U direction and the columns indice corresponds to the parametric V direction. The weights are defaulted to all being 1.
 
 Geom_BezierSurface (const Geom_BezierSurface &theOther)
 Copy constructor for optimized copying without validation.
 
bool HasEvalRepresentation () const
 Returns true if an evaluation representation is attached.
 
const occ::handle< GeomEval_RepSurfaceDesc::Base > & EvalRepresentation () const
 Returns the current evaluation representation descriptor (may be null).
 
void SetEvalRepresentation (const occ::handle< GeomEval_RepSurfaceDesc::Base > &theDesc)
 Sets a new evaluation representation. Validates descriptor data and ensures no circular references.
 
void ClearEvalRepresentation ()
 Removes the evaluation representation.
 
 Geom_BezierSurface (const NCollection_Array2< gp_Pnt > &SurfacePoles, const NCollection_Array2< double > &PoleWeights)
 —Purpose Creates a rational Bezier surface with a set of poles and a set of weights. For the double array the row indice corresponds to the parametric U direction and the columns indice corresponds to the parametric V direction. If all the weights are identical the surface is considered as non-rational (the tolerance criterion is Resolution from package gp).
 
void ExchangeUV ()
 Exchanges the direction U and V on a Bezier surface As a consequence:
 
void Increase (const int UDeg, const int VDeg)
 Increases the degree of this Bezier surface in the two parametric directions.
 
void InsertPoleColAfter (const int VIndex, const NCollection_Array1< gp_Pnt > &CPoles)
 Inserts a column of poles. If the surface is rational the weights values associated with CPoles are equal defaulted to 1.
 
void InsertPoleColAfter (const int VIndex, const NCollection_Array1< gp_Pnt > &CPoles, const NCollection_Array1< double > &CPoleWeights)
 Inserts a column of poles and weights. If the surface was non-rational it can become rational.
 
void InsertPoleColBefore (const int VIndex, const NCollection_Array1< gp_Pnt > &CPoles)
 Inserts a column of poles. If the surface is rational the weights values associated with CPoles are equal defaulted to 1.
 
void InsertPoleColBefore (const int VIndex, const NCollection_Array1< gp_Pnt > &CPoles, const NCollection_Array1< double > &CPoleWeights)
 Inserts a column of poles and weights. If the surface was non-rational it can become rational.
 
void InsertPoleRowAfter (const int UIndex, const NCollection_Array1< gp_Pnt > &CPoles)
 Inserts a row of poles. If the surface is rational the weights values associated with CPoles are equal defaulted to 1.
 
void InsertPoleRowAfter (const int UIndex, const NCollection_Array1< gp_Pnt > &CPoles, const NCollection_Array1< double > &CPoleWeights)
 Inserts a row of poles and weights. If the surface was non-rational it can become rational.
 
void InsertPoleRowBefore (const int UIndex, const NCollection_Array1< gp_Pnt > &CPoles)
 Inserts a row of poles. If the surface is rational the weights values associated with CPoles are equal defaulted to 1.
 
void InsertPoleRowBefore (const int UIndex, const NCollection_Array1< gp_Pnt > &CPoles, const NCollection_Array1< double > &CPoleWeights)
 Inserts a row of poles and weights. If the surface was non-rational it can become rational.
 
void RemovePoleCol (const int VIndex)
 Removes a column of poles. If the surface was rational it can become non-rational.
 
void RemovePoleRow (const int UIndex)
 Removes a row of poles. If the surface was rational it can become non-rational.
 
void Segment (const double U1, const double U2, const double V1, const double V2)
 Modifies this Bezier surface by segmenting it between U1 and U2 in the u parametric direction, and between V1 and V2 in the v parametric direction. U1, U2, V1, and V2 can be outside the bounds of this surface.
 
void SetPole (const int UIndex, const int VIndex, const gp_Pnt &P)
 Modifies a pole value. If the surface is rational the weight of range (UIndex, VIndex) is not modified.
 
void SetPole (const int UIndex, const int VIndex, const gp_Pnt &P, const double Weight)
 Substitutes the pole and the weight of range UIndex, VIndex. If the surface <me> is not rational it can become rational. if the surface was rational it can become non-rational.
 
void SetPoleCol (const int VIndex, const NCollection_Array1< gp_Pnt > &CPoles)
 Modifies a column of poles. The length of CPoles can be lower but not greater than NbUPoles so you can modify just a part of the column. Raised if VIndex < 1 or VIndex > NbVPoles.
 
void SetPoleCol (const int VIndex, const NCollection_Array1< gp_Pnt > &CPoles, const NCollection_Array1< double > &CPoleWeights)
 Modifies a column of poles. If the surface was rational it can become non-rational If the surface was non-rational it can become rational. The length of CPoles can be lower but not greater than NbUPoles so you can modify just a part of the column. Raised if VIndex < 1 or VIndex > NbVPoles.
 
void SetPoleRow (const int UIndex, const NCollection_Array1< gp_Pnt > &CPoles)
 Modifies a row of poles. The length of CPoles can be lower but not greater than NbVPoles so you can modify just a part of the row. Raised if UIndex < 1 or UIndex > NbUPoles.
 
void SetPoleRow (const int UIndex, const NCollection_Array1< gp_Pnt > &CPoles, const NCollection_Array1< double > &CPoleWeights)
 Modifies a row of poles and weights. If the surface was rational it can become non-rational. If the surface was non-rational it can become rational. The length of CPoles can be lower but not greater than NbVPoles so you can modify just a part of the row. Raised if UIndex < 1 or UIndex > NbUPoles.
 
void SetWeight (const int UIndex, const int VIndex, const double Weight)
 Modifies the weight of the pole of range UIndex, VIndex. If the surface was non-rational it can become rational. If the surface was rational it can become non-rational.
 
void SetWeightCol (const int VIndex, const NCollection_Array1< double > &CPoleWeights)
 Modifies a column of weights. If the surface was rational it can become non-rational. If the surface was non-rational it can become rational. The length of CPoleWeights can be lower but not greater than NbUPoles. Raised if VIndex < 1 or VIndex > NbVPoles.
 
void SetWeightRow (const int UIndex, const NCollection_Array1< double > &CPoleWeights)
 Modifies a row of weights. If the surface was rational it can become non-rational. If the surface was non-rational it can become rational. The length of CPoleWeights can be lower but not greater than NbVPoles. Raised if UIndex < 1 or UIndex > NbUPoles.
 
void UReverse () final
 Changes the orientation of this Bezier surface in the u parametric direction. The bounds of the surface are not changed, but the given parametric direction is reversed. Hence, the orientation of the surface is reversed.
 
double UReversedParameter (const double U) const final
 Computes the u (or v) parameter on the modified surface, produced by reversing its u (or v) parametric direction, for any point of u parameter U (or of v parameter V) on this Bezier surface. In the case of a Bezier surface, these functions return respectively:
 
void VReverse () final
 Changes the orientation of this Bezier surface in the v parametric direction. The bounds of the surface are not changed, but the given parametric direction is reversed. Hence, the orientation of the surface is reversed.
 
double VReversedParameter (const double V) const final
 Computes the u (or v) parameter on the modified surface, produced by reversing its u (or v) parametric direction, for any point of u parameter U (or of v parameter V) on this Bezier surface. In the case of a Bezier surface, these functions return respectively:
 
void Bounds (double &U1, double &U2, double &V1, double &V2) const final
 Returns the parametric bounds U1, U2, V1 and V2 of this Bezier surface. In the case of a Bezier surface, this function returns U1 = 0, V1 = 0, U2 = 1, V2 = 1.
 
GeomAbs_Shape Continuity () const final
 Returns the continuity of the surface CN : the order of continuity is infinite.
 
gp_Pnt EvalD0 (const double U, const double V) const final
 Computes the point of parameter (U, V) on the surface. Raises an exception on failure.
 
Geom_Surface::ResD1 EvalD1 (const double U, const double V) const final
 Computes the point and first partial derivatives at (U, V). Raises an exception if the surface continuity is not C1.
 
Geom_Surface::ResD2 EvalD2 (const double U, const double V) const final
 Computes the point and partial derivatives up to 2nd order at (U, V). Raises an exception if the surface continuity is not C2.
 
Geom_Surface::ResD3 EvalD3 (const double U, const double V) const final
 Computes the point and partial derivatives up to 3rd order at (U, V). Note: The parameters U and V can be outside the bounds of the surface. Raises an exception if the surface continuity is not C3.
 
gp_Vec EvalDN (const double U, const double V, const int Nu, const int Nv) const final
 Computes the derivative of order Nu in the u parametric direction, and Nv in the v parametric direction, at the point of parameters (U, V) of this Bezier surface. Note: The parameters U and V can be outside the bounds of the surface. Raises an exception on failure. Exceptions Standard_RangeError if:
 
int NbUPoles () const
 Returns the number of poles in the U direction.
 
int NbVPoles () const
 Returns the number of poles in the V direction.
 
const gp_PntPole (const int UIndex, const int VIndex) const
 Returns the pole of range UIndex, VIndex Raised if UIndex < 1 or UIndex > NbUPoles, or VIndex < 1 or VIndex > NbVPoles.
 
void Poles (NCollection_Array2< gp_Pnt > &P) const
 Returns the poles of the Bezier surface.
 
const NCollection_Array2< gp_Pnt > & Poles () const
 Returns the poles of the Bezier surface.
 
int UDegree () const
 Returns the degree of the surface in the U direction it is NbUPoles - 1.
 
occ::handle< Geom_CurveUIso (const double U) const final
 Computes the U isoparametric curve. For a Bezier surface the UIso curve is a Bezier curve.
 
int VDegree () const
 Returns the degree of the surface in the V direction it is NbVPoles - 1.
 
occ::handle< Geom_CurveVIso (const double V) const final
 Computes the V isoparametric curve. For a Bezier surface the VIso curve is a Bezier curve.
 
double Weight (const int UIndex, const int VIndex) const
 Returns the weight of range UIndex, VIndex.
 
void Weights (NCollection_Array2< double > &W) const
 Returns the weights of the Bezier surface.
 
const NCollection_Array2< double > * Weights () const
 Returns the weights of the Bezier surface.
 
const NCollection_Array2< double > & WeightsArray () const
 Returns a const reference to the weights array. For rational surfaces: the internal owning weights array. For non-rational surfaces: a non-owning view of unit weights from BSplSLib. The array is always sized to match NbUPoles() x NbVPoles().
 
bool IsUClosed () const final
 Returns True if the first control points row and the last control points row are identical. The tolerance criterion is Resolution from package gp.
 
bool IsVClosed () const final
 Returns True if the first control points column and the last control points column are identical. The tolerance criterion is Resolution from package gp.
 
bool IsCNu (const int N) const final
 Returns True, a Bezier surface is always CN.
 
bool IsCNv (const int N) const final
 Returns True, a BezierSurface is always CN.
 
bool IsUPeriodic () const final
 Returns False.
 
bool IsVPeriodic () const final
 Returns False.
 
bool IsURational () const
 Returns False if the weights are identical in the U direction, The tolerance criterion is Resolution from package gp. Example : |1.0, 1.0, 1.0| if Weights = |0.5, 0.5, 0.5| returns False |2.0, 2.0, 2.0|.
 
bool IsVRational () const
 Returns False if the weights are identical in the V direction, The tolerance criterion is Resolution from package gp. Example : |1.0, 2.0, 0.5| if Weights = |1.0, 2.0, 0.5| returns False |1.0, 2.0, 0.5|.
 
void Transform (const gp_Trsf &T) final
 Applies the transformation T to this Bezier surface.
 
void Resolution (const double Tolerance3D, double &UTolerance, double &VTolerance)
 Computes two tolerance values for this Bezier surface, based on the given tolerance in 3D space Tolerance3D. The tolerances computed are:
 
occ::handle< Geom_GeometryCopy () const final
 Creates a new object which is a copy of this Bezier surface.
 
void DumpJson (Standard_OStream &theOStream, int theDepth=-1) const final
 Dumps the content of me into the stream.
 
const NCollection_Array1< double > & UKnots () const
 Returns Bezier knots {0.0, 1.0} as a static array.
 
const NCollection_Array1< double > & VKnots () const
 Returns Bezier knots {0.0, 1.0} as a static array.
 
const NCollection_Array1< int > & UMultiplicities () const
 Returns Bezier multiplicities for the U degree.
 
const NCollection_Array1< int > & VMultiplicities () const
 Returns Bezier multiplicities for the V degree.
 
const NCollection_Array1< double > & UKnotSequence () const
 Returns Bezier flat knots for the U degree.
 
const NCollection_Array1< double > & VKnotSequence () const
 Returns Bezier flat knots for the V degree.
 
- Public Member Functions inherited from Geom_Surface
occ::handle< Geom_SurfaceUReversed () const
 Reverses the U direction of parametrization of <me>. The bounds of the surface are not modified. A copy of <me> is returned.
 
occ::handle< Geom_SurfaceVReversed () const
 Reverses the V direction of parametrization of <me>. The bounds of the surface are not modified. A copy of <me> is returned.
 
virtual void TransformParameters (double &U, double &V, const gp_Trsf &T) const
 Computes the parameters on the transformed surface for the transform of the point of parameters U,V on <me>.
 
virtual gp_GTrsf2d ParametricTransformation (const gp_Trsf &T) const
 Returns a 2d transformation used to find the new parameters of a point on the transformed surface.
 
virtual double UPeriod () const
 Returns the period of this surface in the u parametric direction. Raises if the surface is not uperiodic.
 
virtual double VPeriod () const
 Returns the period of this surface in the v parametric direction. raises if the surface is not vperiodic.
 
void D0 (const double U, const double V, gp_Pnt &P) const
 Computes the point of parameter (U, V).
 
void D1 (const double U, const double V, gp_Pnt &P, gp_Vec &D1U, gp_Vec &D1V) const
 Computes the point and first partial derivatives.
 
void D2 (const double U, const double V, gp_Pnt &P, gp_Vec &D1U, gp_Vec &D1V, gp_Vec &D2U, gp_Vec &D2V, gp_Vec &D2UV) const
 Computes the point and partial derivatives up to 2nd order.
 
void D3 (const double U, const double V, gp_Pnt &P, gp_Vec &D1U, gp_Vec &D1V, gp_Vec &D2U, gp_Vec &D2V, gp_Vec &D2UV, gp_Vec &D3U, gp_Vec &D3V, gp_Vec &D3UUV, gp_Vec &D3UVV) const
 Computes the point and partial derivatives up to 3rd order.
 
gp_Vec DN (const double U, const double V, const int Nu, const int Nv) const
 Computes the derivative of order Nu in U and Nv in V.
 
gp_Pnt Value (const double U, const double V) const
 Computes the point of parameter (U, V) on the surface.
 
void DumpJson (Standard_OStream &theOStream, int theDepth=-1) const override
 Dumps the content of me into the stream.
 
- Public Member Functions inherited from Geom_Geometry
void Mirror (const gp_Pnt &P)
 Performs the symmetrical transformation of a Geometry with respect to the point P which is the center of the symmetry.
 
void Mirror (const gp_Ax1 &A1)
 Performs the symmetrical transformation of a Geometry with respect to an axis placement which is the axis of the symmetry.
 
void Mirror (const gp_Ax2 &A2)
 Performs the symmetrical transformation of a Geometry with respect to a plane. The axis placement A2 locates the plane of the symmetry : (Location, XDirection, YDirection).
 
void Rotate (const gp_Ax1 &A1, const double Ang)
 Rotates a Geometry. A1 is the axis of the rotation. Ang is the angular value of the rotation in radians.
 
void Scale (const gp_Pnt &P, const double S)
 Scales a Geometry. S is the scaling value.
 
void Translate (const gp_Vec &V)
 Translates a Geometry. V is the vector of the translation.
 
void Translate (const gp_Pnt &P1, const gp_Pnt &P2)
 Translates a Geometry from the point P1 to the point P2.
 
occ::handle< Geom_GeometryMirrored (const gp_Pnt &P) const
 
occ::handle< Geom_GeometryMirrored (const gp_Ax1 &A1) const
 
occ::handle< Geom_GeometryMirrored (const gp_Ax2 &A2) const
 
occ::handle< Geom_GeometryRotated (const gp_Ax1 &A1, const double Ang) const
 
occ::handle< Geom_GeometryScaled (const gp_Pnt &P, const double S) const
 
occ::handle< Geom_GeometryTransformed (const gp_Trsf &T) const
 
occ::handle< Geom_GeometryTranslated (const gp_Vec &V) const
 
occ::handle< Geom_GeometryTranslated (const gp_Pnt &P1, const gp_Pnt &P2) const
 
- Public Member Functions inherited from Standard_Transient
 Standard_Transient ()
 Empty constructor.
 
 Standard_Transient (const Standard_Transient &)
 Copy constructor – does nothing.
 
Standard_Transientoperator= (const Standard_Transient &)
 Assignment operator, needed to avoid copying reference counter.
 
virtual ~Standard_Transient ()=default
 Destructor must be virtual.
 
virtual const opencascade::handle< Standard_Type > & DynamicType () const
 Returns a type descriptor about this object.
 
bool IsInstance (const opencascade::handle< Standard_Type > &theType) const
 Returns a true value if this is an instance of Type.
 
bool IsInstance (const char *const theTypeName) const
 Returns a true value if this is an instance of TypeName.
 
bool IsKind (const opencascade::handle< Standard_Type > &theType) const
 Returns true if this is an instance of Type or an instance of any class that inherits from Type. Note that multiple inheritance is not supported by OCCT RTTI mechanism.
 
bool IsKind (const char *const theTypeName) const
 Returns true if this is an instance of TypeName or an instance of any class that inherits from TypeName. Note that multiple inheritance is not supported by OCCT RTTI mechanism.
 
Standard_TransientThis () const
 Returns non-const pointer to this object (like const_cast). For protection against creating handle to objects allocated in stack or call from constructor, it will raise exception Standard_ProgramError if reference counter is zero.
 
int GetRefCount () const noexcept
 Get the reference counter of this object.
 
void IncrementRefCounter () noexcept
 Increments the reference counter of this object. Uses relaxed memory ordering since incrementing only requires atomicity, not synchronization with other memory operations.
 
int DecrementRefCounter () noexcept
 Decrements the reference counter of this object; returns the decremented value. Uses release ordering for the decrement to ensure all writes to the object are visible before the count reaches zero. An acquire fence is added only when the count reaches zero, ensuring proper synchronization before deletion. This is more efficient than using acq_rel for every decrement.
 
virtual void Delete () const
 Memory deallocator for transient classes.
 

Static Public Member Functions

static int MaxDegree ()
 Returns the value of the maximum polynomial degree of a Bezier surface. This value is 25.
 
- Static Public Member Functions inherited from Standard_Transient
static constexpr const charget_type_name ()
 Returns a type descriptor about this object.
 
static const opencascade::handle< Standard_Type > & get_type_descriptor ()
 Returns type descriptor of Standard_Transient class.
 

Protected Member Functions

void init (const NCollection_Array2< gp_Pnt > &thePoles, const NCollection_Array2< double > *theWeights)
 Set poles to thePoles, weights to theWeights. If theWeights is null the surface is non rational. Update rational flags.
 

Additional Inherited Members

- Public Types inherited from Standard_Transient
typedef void base_type
 Returns a type descriptor about this object.
 

Detailed Description

Describes a rational or non-rational Bezier surface.

Constructor & Destructor Documentation

◆ Geom_BezierSurface() [1/3]

Geom_BezierSurface::Geom_BezierSurface ( const NCollection_Array2< gp_Pnt > & SurfacePoles)

Creates a non-rational Bezier surface with a set of poles. Control points representation : SPoles(Uorigin,Vorigin) ...................SPoles(Uorigin,Vend) . . . . SPoles(Uend, Vorigin) .....................SPoles(Uend, Vend) For the double array the row indice corresponds to the parametric U direction and the columns indice corresponds to the parametric V direction. The weights are defaulted to all being 1.

Raised if the number of poles of the surface is lower than 2 or greater than MaxDegree + 1 in one of the two directions U or V.

◆ Geom_BezierSurface() [2/3]

Geom_BezierSurface::Geom_BezierSurface ( const Geom_BezierSurface & theOther)

Copy constructor for optimized copying without validation.

Parameters
[in]theOtherthe Bezier surface to copy from

◆ Geom_BezierSurface() [3/3]

Geom_BezierSurface::Geom_BezierSurface ( const NCollection_Array2< gp_Pnt > & SurfacePoles,
const NCollection_Array2< double > & PoleWeights )

—Purpose Creates a rational Bezier surface with a set of poles and a set of weights. For the double array the row indice corresponds to the parametric U direction and the columns indice corresponds to the parametric V direction. If all the weights are identical the surface is considered as non-rational (the tolerance criterion is Resolution from package gp).

Raised if SurfacePoles and PoleWeights have not the same Rowlength or have not the same ColLength. Raised if PoleWeights (i, j) <= Resolution from gp; Raised if the number of poles of the surface is lower than 2 or greater than MaxDegree + 1 in one of the two directions U or V.

Member Function Documentation

◆ Bounds()

void Geom_BezierSurface::Bounds ( double & U1,
double & U2,
double & V1,
double & V2 ) const
finalvirtual

Returns the parametric bounds U1, U2, V1 and V2 of this Bezier surface. In the case of a Bezier surface, this function returns U1 = 0, V1 = 0, U2 = 1, V2 = 1.

Implements Geom_Surface.

◆ ClearEvalRepresentation()

void Geom_BezierSurface::ClearEvalRepresentation ( )
inline

Removes the evaluation representation.

◆ Continuity()

GeomAbs_Shape Geom_BezierSurface::Continuity ( ) const
finalvirtual

Returns the continuity of the surface CN : the order of continuity is infinite.

Implements Geom_Surface.

◆ Copy()

occ::handle< Geom_Geometry > Geom_BezierSurface::Copy ( ) const
finalvirtual

Creates a new object which is a copy of this Bezier surface.

Implements Geom_Geometry.

◆ DumpJson()

void Geom_BezierSurface::DumpJson ( Standard_OStream & theOStream,
int theDepth = -1 ) const
finalvirtual

Dumps the content of me into the stream.

Reimplemented from Geom_Geometry.

◆ EvalD0()

gp_Pnt Geom_BezierSurface::EvalD0 ( const double U,
const double V ) const
finalvirtual

Computes the point of parameter (U, V) on the surface. Raises an exception on failure.

Implements Geom_Surface.

◆ EvalD1()

Geom_Surface::ResD1 Geom_BezierSurface::EvalD1 ( const double U,
const double V ) const
finalvirtual

Computes the point and first partial derivatives at (U, V). Raises an exception if the surface continuity is not C1.

Implements Geom_Surface.

◆ EvalD2()

Geom_Surface::ResD2 Geom_BezierSurface::EvalD2 ( const double U,
const double V ) const
finalvirtual

Computes the point and partial derivatives up to 2nd order at (U, V). Raises an exception if the surface continuity is not C2.

Implements Geom_Surface.

◆ EvalD3()

Geom_Surface::ResD3 Geom_BezierSurface::EvalD3 ( const double U,
const double V ) const
finalvirtual

Computes the point and partial derivatives up to 3rd order at (U, V). Note: The parameters U and V can be outside the bounds of the surface. Raises an exception if the surface continuity is not C3.

Implements Geom_Surface.

◆ EvalDN()

gp_Vec Geom_BezierSurface::EvalDN ( const double U,
const double V,
const int Nu,
const int Nv ) const
finalvirtual

Computes the derivative of order Nu in the u parametric direction, and Nv in the v parametric direction, at the point of parameters (U, V) of this Bezier surface. Note: The parameters U and V can be outside the bounds of the surface. Raises an exception on failure. Exceptions Standard_RangeError if:

  • Nu + Nv is less than 1, or Nu or Nv is negative.

Implements Geom_Surface.

◆ EvalRepresentation()

const occ::handle< GeomEval_RepSurfaceDesc::Base > & Geom_BezierSurface::EvalRepresentation ( ) const
inline

Returns the current evaluation representation descriptor (may be null).

◆ ExchangeUV()

void Geom_BezierSurface::ExchangeUV ( )

Exchanges the direction U and V on a Bezier surface As a consequence:

  • the poles and weights tables are transposed,
  • degrees, rational characteristics and so on are exchanged between the two parametric directions, and
  • the orientation of the surface is reversed.

◆ HasEvalRepresentation()

bool Geom_BezierSurface::HasEvalRepresentation ( ) const
inline

Returns true if an evaluation representation is attached.

◆ Increase()

void Geom_BezierSurface::Increase ( const int UDeg,
const int VDeg )

Increases the degree of this Bezier surface in the two parametric directions.

Raised if UDegree < UDegree <me> or VDegree < VDegree <me> Raised if the degree of the surface is greater than MaxDegree in one of the two directions U or V.

◆ init()

void Geom_BezierSurface::init ( const NCollection_Array2< gp_Pnt > & thePoles,
const NCollection_Array2< double > * theWeights )
protected

Set poles to thePoles, weights to theWeights. If theWeights is null the surface is non rational. Update rational flags.

◆ InsertPoleColAfter() [1/2]

void Geom_BezierSurface::InsertPoleColAfter ( const int VIndex,
const NCollection_Array1< gp_Pnt > & CPoles )

Inserts a column of poles. If the surface is rational the weights values associated with CPoles are equal defaulted to 1.

Raised if Vindex < 1 or VIndex > NbVPoles.

raises if VDegree is greater than MaxDegree. raises if the Length of CPoles is not equal to NbUPoles

◆ InsertPoleColAfter() [2/2]

void Geom_BezierSurface::InsertPoleColAfter ( const int VIndex,
const NCollection_Array1< gp_Pnt > & CPoles,
const NCollection_Array1< double > & CPoleWeights )

Inserts a column of poles and weights. If the surface was non-rational it can become rational.

Raised if Vindex < 1 or VIndex > NbVPoles. Raised if . VDegree is greater than MaxDegree. . the Length of CPoles is not equal to NbUPoles . a weight value is lower or equal to Resolution from package gp

◆ InsertPoleColBefore() [1/2]

void Geom_BezierSurface::InsertPoleColBefore ( const int VIndex,
const NCollection_Array1< gp_Pnt > & CPoles )

Inserts a column of poles. If the surface is rational the weights values associated with CPoles are equal defaulted to 1.

Raised if Vindex < 1 or VIndex > NbVPoles.

Raised if VDegree is greater than MaxDegree. Raised if the Length of CPoles is not equal to NbUPoles

◆ InsertPoleColBefore() [2/2]

void Geom_BezierSurface::InsertPoleColBefore ( const int VIndex,
const NCollection_Array1< gp_Pnt > & CPoles,
const NCollection_Array1< double > & CPoleWeights )

Inserts a column of poles and weights. If the surface was non-rational it can become rational.

Raised if Vindex < 1 or VIndex > NbVPoles. Raised if : . VDegree is greater than MaxDegree. . the Length of CPoles is not equal to NbUPoles . a weight value is lower or equal to Resolution from package gp

◆ InsertPoleRowAfter() [1/2]

void Geom_BezierSurface::InsertPoleRowAfter ( const int UIndex,
const NCollection_Array1< gp_Pnt > & CPoles )

Inserts a row of poles. If the surface is rational the weights values associated with CPoles are equal defaulted to 1.

Raised if Uindex < 1 or UIndex > NbUPoles.

Raised if UDegree is greater than MaxDegree. Raised if the Length of CPoles is not equal to NbVPoles

◆ InsertPoleRowAfter() [2/2]

void Geom_BezierSurface::InsertPoleRowAfter ( const int UIndex,
const NCollection_Array1< gp_Pnt > & CPoles,
const NCollection_Array1< double > & CPoleWeights )

Inserts a row of poles and weights. If the surface was non-rational it can become rational.

Raised if Uindex < 1 or UIndex > NbUPoles. Raised if : . UDegree is greater than MaxDegree. . the Length of CPoles is not equal to NbVPoles . a weight value is lower or equal to Resolution from package gp

◆ InsertPoleRowBefore() [1/2]

void Geom_BezierSurface::InsertPoleRowBefore ( const int UIndex,
const NCollection_Array1< gp_Pnt > & CPoles )

Inserts a row of poles. If the surface is rational the weights values associated with CPoles are equal defaulted to 1.

Raised if Uindex < 1 or UIndex > NbUPoles.

Raised if UDegree is greater than MaxDegree. Raised if the Length of CPoles is not equal to NbVPoles

◆ InsertPoleRowBefore() [2/2]

void Geom_BezierSurface::InsertPoleRowBefore ( const int UIndex,
const NCollection_Array1< gp_Pnt > & CPoles,
const NCollection_Array1< double > & CPoleWeights )

Inserts a row of poles and weights. If the surface was non-rational it can become rational.

Raised if Uindex < 1 or UIndex > NbUPoles. Raised if : . UDegree is greater than MaxDegree. . the Length of CPoles is not equal to NbVPoles . a weight value is lower or equal to Resolution from package gp

◆ IsCNu()

bool Geom_BezierSurface::IsCNu ( const int N) const
finalvirtual

Returns True, a Bezier surface is always CN.

Implements Geom_Surface.

◆ IsCNv()

bool Geom_BezierSurface::IsCNv ( const int N) const
finalvirtual

Returns True, a BezierSurface is always CN.

Implements Geom_Surface.

◆ IsUClosed()

bool Geom_BezierSurface::IsUClosed ( ) const
finalvirtual

Returns True if the first control points row and the last control points row are identical. The tolerance criterion is Resolution from package gp.

Implements Geom_Surface.

◆ IsUPeriodic()

bool Geom_BezierSurface::IsUPeriodic ( ) const
finalvirtual

Returns False.

Implements Geom_Surface.

◆ IsURational()

bool Geom_BezierSurface::IsURational ( ) const

Returns False if the weights are identical in the U direction, The tolerance criterion is Resolution from package gp. Example : |1.0, 1.0, 1.0| if Weights = |0.5, 0.5, 0.5| returns False |2.0, 2.0, 2.0|.

◆ IsVClosed()

bool Geom_BezierSurface::IsVClosed ( ) const
finalvirtual

Returns True if the first control points column and the last control points column are identical. The tolerance criterion is Resolution from package gp.

Implements Geom_Surface.

◆ IsVPeriodic()

bool Geom_BezierSurface::IsVPeriodic ( ) const
finalvirtual

Returns False.

Implements Geom_Surface.

◆ IsVRational()

bool Geom_BezierSurface::IsVRational ( ) const

Returns False if the weights are identical in the V direction, The tolerance criterion is Resolution from package gp. Example : |1.0, 2.0, 0.5| if Weights = |1.0, 2.0, 0.5| returns False |1.0, 2.0, 0.5|.

◆ MaxDegree()

static int Geom_BezierSurface::MaxDegree ( )
static

Returns the value of the maximum polynomial degree of a Bezier surface. This value is 25.

◆ NbUPoles()

int Geom_BezierSurface::NbUPoles ( ) const

Returns the number of poles in the U direction.

◆ NbVPoles()

int Geom_BezierSurface::NbVPoles ( ) const

Returns the number of poles in the V direction.

◆ Pole()

const gp_Pnt & Geom_BezierSurface::Pole ( const int UIndex,
const int VIndex ) const

Returns the pole of range UIndex, VIndex Raised if UIndex < 1 or UIndex > NbUPoles, or VIndex < 1 or VIndex > NbVPoles.

◆ Poles() [1/2]

const NCollection_Array2< gp_Pnt > & Geom_BezierSurface::Poles ( ) const
inline

Returns the poles of the Bezier surface.

◆ Poles() [2/2]

void Geom_BezierSurface::Poles ( NCollection_Array2< gp_Pnt > & P) const

Returns the poles of the Bezier surface.

Raised if the length of P in the U an V direction is not equal to NbUPoles and NbVPoles.

Deprecated
("use Poles() returning const reference instead")

◆ RemovePoleCol()

void Geom_BezierSurface::RemovePoleCol ( const int VIndex)

Removes a column of poles. If the surface was rational it can become non-rational.

Raised if NbVPoles <= 2 after removing, a Bezier surface must have at least two columns of poles. Raised if Vindex < 1 or VIndex > NbVPoles

◆ RemovePoleRow()

void Geom_BezierSurface::RemovePoleRow ( const int UIndex)

Removes a row of poles. If the surface was rational it can become non-rational.

Raised if NbUPoles <= 2 after removing, a Bezier surface must have at least two rows of poles. Raised if Uindex < 1 or UIndex > NbUPoles

◆ Resolution()

void Geom_BezierSurface::Resolution ( const double Tolerance3D,
double & UTolerance,
double & VTolerance )

Computes two tolerance values for this Bezier surface, based on the given tolerance in 3D space Tolerance3D. The tolerances computed are:

  • UTolerance in the u parametric direction, and
  • VTolerance in the v parametric direction. If f(u,v) is the equation of this Bezier surface, UTolerance and VTolerance guarantee that: | u1 - u0 | < UTolerance and | v1 - v0 | < VTolerance ====> |f (u1,v1) - f (u0,v0)| < Tolerance3D

◆ Segment()

void Geom_BezierSurface::Segment ( const double U1,
const double U2,
const double V1,
const double V2 )

Modifies this Bezier surface by segmenting it between U1 and U2 in the u parametric direction, and between V1 and V2 in the v parametric direction. U1, U2, V1, and V2 can be outside the bounds of this surface.

  • U1 and U2 isoparametric Bezier curves, segmented between V1 and V2, become the two bounds of the surface in the v parametric direction (0. and 1. u isoparametric curves).
  • V1 and V2 isoparametric Bezier curves, segmented between U1 and U2, become the two bounds of the surface in the u parametric direction (0. and 1. v isoparametric curves). The poles and weights tables are modified, but the degree of this surface in the u and v parametric directions does not change. U1 can be greater than U2, and V1 can be greater than V2. In these cases, the corresponding parametric direction is inverted. The orientation of the surface is inverted if one (and only one) parametric direction is inverted.

◆ SetEvalRepresentation()

void Geom_BezierSurface::SetEvalRepresentation ( const occ::handle< GeomEval_RepSurfaceDesc::Base > & theDesc)

Sets a new evaluation representation. Validates descriptor data and ensures no circular references.

◆ SetPole() [1/2]

void Geom_BezierSurface::SetPole ( const int UIndex,
const int VIndex,
const gp_Pnt & P )

Modifies a pole value. If the surface is rational the weight of range (UIndex, VIndex) is not modified.

Raised if UIndex < 1 or UIndex > NbUPoles or VIndex < 1 or VIndex > NbVPoles.

◆ SetPole() [2/2]

void Geom_BezierSurface::SetPole ( const int UIndex,
const int VIndex,
const gp_Pnt & P,
const double Weight )

Substitutes the pole and the weight of range UIndex, VIndex. If the surface <me> is not rational it can become rational. if the surface was rational it can become non-rational.

raises if UIndex < 1 or UIndex > NbUPoles or VIndex < 1 or VIndex > NbVPoles. Raised if Weight <= Resolution from package gp.

◆ SetPoleCol() [1/2]

void Geom_BezierSurface::SetPoleCol ( const int VIndex,
const NCollection_Array1< gp_Pnt > & CPoles )

Modifies a column of poles. The length of CPoles can be lower but not greater than NbUPoles so you can modify just a part of the column. Raised if VIndex < 1 or VIndex > NbVPoles.

Raised if CPoles.Lower() < 1 or CPoles.Upper() > NbUPoles

◆ SetPoleCol() [2/2]

void Geom_BezierSurface::SetPoleCol ( const int VIndex,
const NCollection_Array1< gp_Pnt > & CPoles,
const NCollection_Array1< double > & CPoleWeights )

Modifies a column of poles. If the surface was rational it can become non-rational If the surface was non-rational it can become rational. The length of CPoles can be lower but not greater than NbUPoles so you can modify just a part of the column. Raised if VIndex < 1 or VIndex > NbVPoles.

Raised if CPoles.Lower() < 1 or CPoles.Upper() > NbUPoles Raised if CPoleWeights and CPoles have not the same bounds. Raised if one of the weight value CPoleWeights (i) is lower or equal to Resolution from package gp.

◆ SetPoleRow() [1/2]

void Geom_BezierSurface::SetPoleRow ( const int UIndex,
const NCollection_Array1< gp_Pnt > & CPoles )

Modifies a row of poles. The length of CPoles can be lower but not greater than NbVPoles so you can modify just a part of the row. Raised if UIndex < 1 or UIndex > NbUPoles.

Raised if CPoles.Lower() < 1 or CPoles.Upper() > NbVPoles

◆ SetPoleRow() [2/2]

void Geom_BezierSurface::SetPoleRow ( const int UIndex,
const NCollection_Array1< gp_Pnt > & CPoles,
const NCollection_Array1< double > & CPoleWeights )

Modifies a row of poles and weights. If the surface was rational it can become non-rational. If the surface was non-rational it can become rational. The length of CPoles can be lower but not greater than NbVPoles so you can modify just a part of the row. Raised if UIndex < 1 or UIndex > NbUPoles.

Raised if CPoles.Lower() < 1 or CPoles.Upper() > NbVPoles Raised if CPoleWeights and CPoles have not the same bounds. Raised if one of the weight value CPoleWeights (i) is lower or equal to Resolution from gp.

◆ SetWeight()

void Geom_BezierSurface::SetWeight ( const int UIndex,
const int VIndex,
const double Weight )

Modifies the weight of the pole of range UIndex, VIndex. If the surface was non-rational it can become rational. If the surface was rational it can become non-rational.

Raised if UIndex < 1 or UIndex > NbUPoles or VIndex < 1 or VIndex > NbVPoles. Raised if Weight <= Resolution from package gp.

◆ SetWeightCol()

void Geom_BezierSurface::SetWeightCol ( const int VIndex,
const NCollection_Array1< double > & CPoleWeights )

Modifies a column of weights. If the surface was rational it can become non-rational. If the surface was non-rational it can become rational. The length of CPoleWeights can be lower but not greater than NbUPoles. Raised if VIndex < 1 or VIndex > NbVPoles.

Raised if CPoleWeights.Lower() < 1 or CPoleWeights.Upper() > NbUPoles Raised if one of the weight value CPoleWeights (i) is lower or equal to Resolution from package gp.

◆ SetWeightRow()

void Geom_BezierSurface::SetWeightRow ( const int UIndex,
const NCollection_Array1< double > & CPoleWeights )

Modifies a row of weights. If the surface was rational it can become non-rational. If the surface was non-rational it can become rational. The length of CPoleWeights can be lower but not greater than NbVPoles. Raised if UIndex < 1 or UIndex > NbUPoles.

Raised if CPoleWeights.Lower() < 1 or CPoleWeights.Upper() > NbVPoles Raised if one of the weight value CPoleWeights (i) is lower or equal to Resolution from package gp.

◆ Transform()

void Geom_BezierSurface::Transform ( const gp_Trsf & T)
finalvirtual

Applies the transformation T to this Bezier surface.

Implements Geom_Geometry.

◆ UDegree()

int Geom_BezierSurface::UDegree ( ) const

Returns the degree of the surface in the U direction it is NbUPoles - 1.

◆ UIso()

occ::handle< Geom_Curve > Geom_BezierSurface::UIso ( const double U) const
finalvirtual

Computes the U isoparametric curve. For a Bezier surface the UIso curve is a Bezier curve.

Implements Geom_Surface.

◆ UKnots()

const NCollection_Array1< double > & Geom_BezierSurface::UKnots ( ) const

Returns Bezier knots {0.0, 1.0} as a static array.

◆ UKnotSequence()

const NCollection_Array1< double > & Geom_BezierSurface::UKnotSequence ( ) const

Returns Bezier flat knots for the U degree.

◆ UMultiplicities()

const NCollection_Array1< int > & Geom_BezierSurface::UMultiplicities ( ) const

Returns Bezier multiplicities for the U degree.

◆ UReverse()

void Geom_BezierSurface::UReverse ( )
finalvirtual

Changes the orientation of this Bezier surface in the u parametric direction. The bounds of the surface are not changed, but the given parametric direction is reversed. Hence, the orientation of the surface is reversed.

Implements Geom_Surface.

◆ UReversedParameter()

double Geom_BezierSurface::UReversedParameter ( const double U) const
finalvirtual

Computes the u (or v) parameter on the modified surface, produced by reversing its u (or v) parametric direction, for any point of u parameter U (or of v parameter V) on this Bezier surface. In the case of a Bezier surface, these functions return respectively:

  • 1.-U, or 1.-V.

Implements Geom_Surface.

◆ VDegree()

int Geom_BezierSurface::VDegree ( ) const

Returns the degree of the surface in the V direction it is NbVPoles - 1.

◆ VIso()

occ::handle< Geom_Curve > Geom_BezierSurface::VIso ( const double V) const
finalvirtual

Computes the V isoparametric curve. For a Bezier surface the VIso curve is a Bezier curve.

Implements Geom_Surface.

◆ VKnots()

const NCollection_Array1< double > & Geom_BezierSurface::VKnots ( ) const

Returns Bezier knots {0.0, 1.0} as a static array.

◆ VKnotSequence()

const NCollection_Array1< double > & Geom_BezierSurface::VKnotSequence ( ) const

Returns Bezier flat knots for the V degree.

◆ VMultiplicities()

const NCollection_Array1< int > & Geom_BezierSurface::VMultiplicities ( ) const

Returns Bezier multiplicities for the V degree.

◆ VReverse()

void Geom_BezierSurface::VReverse ( )
finalvirtual

Changes the orientation of this Bezier surface in the v parametric direction. The bounds of the surface are not changed, but the given parametric direction is reversed. Hence, the orientation of the surface is reversed.

Implements Geom_Surface.

◆ VReversedParameter()

double Geom_BezierSurface::VReversedParameter ( const double V) const
finalvirtual

Computes the u (or v) parameter on the modified surface, produced by reversing its u (or v) parametric direction, for any point of u parameter U (or of v parameter V) on this Bezier surface. In the case of a Bezier surface, these functions return respectively:

  • 1.-U, or 1.-V.

Implements Geom_Surface.

◆ Weight()

double Geom_BezierSurface::Weight ( const int UIndex,
const int VIndex ) const

Returns the weight of range UIndex, VIndex.

Raised if UIndex < 1 or UIndex > NbUPoles, or VIndex < 1 or VIndex > NbVPoles.

◆ Weights() [1/2]

const NCollection_Array2< double > * Geom_BezierSurface::Weights ( ) const
inline

Returns the weights of the Bezier surface.

◆ Weights() [2/2]

void Geom_BezierSurface::Weights ( NCollection_Array2< double > & W) const

Returns the weights of the Bezier surface.

Raised if the length of W in the U an V direction is not equal to NbUPoles and NbVPoles.

Deprecated
("use Weights() returning const pointer instead")

◆ WeightsArray()

const NCollection_Array2< double > & Geom_BezierSurface::WeightsArray ( ) const
inline

Returns a const reference to the weights array. For rational surfaces: the internal owning weights array. For non-rational surfaces: a non-owning view of unit weights from BSplSLib. The array is always sized to match NbUPoles() x NbVPoles().

Warning
Do NOT modify elements through the returned reference.

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