Hide menu
Loading...
Searching...
No Matches

Defines a B-Spline surface. More...

Inheritance diagram for cadex.Geom.BSplineSurface:
cadex.Geom.Surface cadex.Geom.Geometry cadex.BaseObject

Public Member Functions

 BSplineSurface (global::System.IntPtr cPtr, bool cMemoryOwn)
 
 BSplineSurface (cadex.Collections.PointList thePoles, int theNumberOfUPoles, int theNumberOfVPoles, cadex.Collections.DoubleList theUKnots, cadex.Collections.DoubleList theVKnots, cadex.Collections.IntList theUMults, cadex.Collections.IntList theVMults, int theUDegree, int theVDegree, bool theIsUPeriodic, bool theIsVPeriodic)
 Constructor.
 
 BSplineSurface (cadex.Collections.PointList thePoles, int theNumberOfUPoles, int theNumberOfVPoles, cadex.Collections.DoubleList theUKnots, cadex.Collections.DoubleList theVKnots, cadex.Collections.IntList theUMults, cadex.Collections.IntList theVMults, int theUDegree, int theVDegree, bool theIsUPeriodic)
 
 BSplineSurface (cadex.Collections.PointList thePoles, int theNumberOfUPoles, int theNumberOfVPoles, cadex.Collections.DoubleList theUKnots, cadex.Collections.DoubleList theVKnots, cadex.Collections.IntList theUMults, cadex.Collections.IntList theVMults, int theUDegree, int theVDegree)
 
 BSplineSurface (cadex.Collections.PointList thePoles, cadex.Collections.DoubleList theWeights, int theNumberOfUPoles, int theNumberOfVPoles, cadex.Collections.DoubleList theUKnots, cadex.Collections.DoubleList theVKnots, cadex.Collections.IntList theUMults, cadex.Collections.IntList theVMults, int theUDegree, int theVDegree, bool theIsUPeriodic, bool theIsVPeriodic)
 Constructor.
 
 BSplineSurface (cadex.Collections.PointList thePoles, cadex.Collections.DoubleList theWeights, int theNumberOfUPoles, int theNumberOfVPoles, cadex.Collections.DoubleList theUKnots, cadex.Collections.DoubleList theVKnots, cadex.Collections.IntList theUMults, cadex.Collections.IntList theVMults, int theUDegree, int theVDegree, bool theIsUPeriodic)
 
 BSplineSurface (cadex.Collections.PointList thePoles, cadex.Collections.DoubleList theWeights, int theNumberOfUPoles, int theNumberOfVPoles, cadex.Collections.DoubleList theUKnots, cadex.Collections.DoubleList theVKnots, cadex.Collections.IntList theUMults, cadex.Collections.IntList theVMults, int theUDegree, int theVDegree)
 
int UDegree ()
 Returns U-degree.
 
int VDegree ()
 Returns V-degree.
 
int NumberOfUPoles ()
 Returns number of U-poles.
 
int NumberOfVPoles ()
 Returns number of V-poles.
 
int NumberOfUKnots ()
 Returns number of unique U-knots.
 
int NumberOfVKnots ()
 Returns number of unique V-knots.
 
cadex.Geom.Point Pole (int theUIndex, int theVIndex)
 Returns a pole value.
 
cadex.Collections.PointList Poles ()
 Populates a 2D table of poles.
 
double Weight (int theUIndex, int theVIndex)
 Returns a weight value.
 
cadex.Collections.DoubleList Weights ()
 Populates a 2D table of weights.
 
double UKnot (int theUIndex)
 Returns a U-knot value.
 
double VKnot (int theVIndex)
 Returns a V-knot value.
 
cadex.Collections.DoubleList UKnots ()
 Populates a vector of U-knots.
 
cadex.Collections.DoubleList VKnots ()
 Populates a vector of V-knots.
 
int UMultiplicity (int theUIndex)
 Returns a U knot multiplicity.
 
int VMultiplicity (int theVIndex)
 Returns a V knot multiplicity.
 
cadex.Collections.IntList UMultiplicities ()
 Populates a vector of U knot multiplicities.
 
cadex.Collections.IntList VMultiplicities ()
 Populates a vector of V knot multiplicities.
 
bool IsURational ()
 Returns true if the B-Spline curve is rational in U direction.
 
bool IsVRational ()
 Returns true if the B-Spline curve is rational in V direction.
 
- Public Member Functions inherited from cadex.Geom.Surface
 Surface (global::System.IntPtr cPtr, bool cMemoryOwn)
 
cadex.Geom.SurfaceType Type ()
 Returns a surface type.
 
cadex.Geom.Continuity Continuity ()
 Returns a continuity type of the surface.
 
cadex.Geom.Point Value (double theParameterU, double theParameterV)
 Evaluates a point on the surface.
 
cadex.Geom.Direction Normal (double theParameterU, double theParameterV)
 
bool IsUPeriodic ()
 Returns true if the surface is periodic in U direction.
 
bool IsVPeriodic ()
 Returns true if the surface is periodic in V direction.
 
double UMin ()
 Returns a minimum parameter of a definition domain in U direction.
 
double UMax ()
 Returns a maximum parameter of a definition domain in U direction.
 
double VMin ()
 Returns a minimum parameter of a definition domain in V direction.
 
double VMax ()
 Returns a maximum parameter of a definition domain in V direction.
 
void Domain (out double theUMin, out double theUMax, out double theVMin, out double theVMax)
 Returns a definition domain.
 
bool IsTrimmed ()
 Returns whether surface is trimmed or not.
 
void SetTrim (double theUFirst, double theULast, double theVFirst, double theVLast)
 Trims surface with [theUFirst, theULast] x [theVFirst, theVLast] section.
 
void Transform (cadex.Geom.Transformation theTransformation)
 Applies transformation matrix to this object.
 
cadex.Geom.Surface Transformed (cadex.Geom.Transformation theTransformation)
 Returns a copy this object after applying transformation.
 
void D0 (double theParameterU, double theParameterV, cadex.Geom.Point theValue)
 
void D1 (double theParameterU, double theParameterV, cadex.Geom.Point theValue, cadex.Geom.Vector theD1U, cadex.Geom.Vector theD1V)
 
void D2 (double theParameterU, double theParameterV, cadex.Geom.Point theValue, cadex.Geom.Vector theD1U, cadex.Geom.Vector theD1V, cadex.Geom.Vector theD2U, cadex.Geom.Vector theD2V, cadex.Geom.Vector theD2UV)
 
bool DN (double theParameterU, double theParameterV, uint theDerivativeOrder, cadex.Geom.Point theValue, cadex.Collections.VectorList theD)
 
void Curvature (double theParameterU, double theParameterV, cadex.Geom.Direction thePrincipalMaxDirection, cadex.Geom.Direction thePrincipalMinDirection)
 
void Curvature (double theParameterU, double theParameterV, cadex.Geom.Direction thePrincipalMaxDirection, cadex.Geom.Direction thePrincipalMinDirection, out double theMaxCurvature, out double theMinCurvature)
 
void Mirror (cadex.Geom.Point thePoint)
 
void Mirror (cadex.Geom.Axis1d theAxis)
 
void Mirror (cadex.Geom.Axis3d theAxis)
 
cadex.Geom.Surface Mirrored (cadex.Geom.Point theRef)
 
cadex.Geom.Surface Mirrored (cadex.Geom.Axis1d theAxis)
 
cadex.Geom.Surface Mirrored (cadex.Geom.Axis3d theAxis)
 
void Rotate (cadex.Geom.Axis1d theAxis, double theAngle)
 
cadex.Geom.Surface Rotated (cadex.Geom.Axis1d theAxis, double theAngle)
 
void Translate (cadex.Geom.Vector theVector)
 
cadex.Geom.Surface Translated (cadex.Geom.Vector theVector)
 
void Scale (cadex.Geom.Point thePoint, double theScale)
 
cadex.Geom.Surface Scaled (cadex.Geom.Point thePoint, double theScale)
 
- Public Member Functions inherited from cadex.Geom.Geometry
 Geometry (global::System.IntPtr cPtr, bool cMemoryOwn)
 
- Public Member Functions inherited from cadex.BaseObject
 BaseObject (global::System.IntPtr cPtr, bool cMemoryOwn)
 
void Dispose ()
 
bool IsNull ()
 
ulong Id ()
 Return unique identifier of public object.
 
bool IsEqual (cadex.BaseObject theObj)
 
override int GetHashCode ()
 
override bool Equals (System.Object o)
 

Static Public Member Functions

static new bool CompareType (cadex.BaseObject theObject)
 
static cadex.Geom.BSplineSurface Cast (cadex.Geom.Surface theBase)
 
- Static Public Member Functions inherited from cadex.Geom.Surface
static new bool CompareType (cadex.BaseObject theObject)
 
- Static Public Member Functions inherited from cadex.Geom.Geometry
static bool CompareType (cadex.BaseObject theObject)
 
static cadex.Geom.Geometry Cast (cadex.BaseObject theBase)
 

Protected Member Functions

override void Dispose (bool disposing)
 
- Protected Member Functions inherited from cadex.Geom.Surface
override void Dispose (bool disposing)
 

Detailed Description

Defines a B-Spline surface.

B-Spline surface is defined by degree, control points (poles), their weights, unique knots and their multiplicities. The following image depicts an example of a B-Spline surface:

B-Spline surface

For introduction to and mathematical definition of NURBS please refer to external resources, for instance:

A rational B-Spline contains an explicit vector of weights, whereas polynomial does not.

The number of poles must equal the number of weights. The number of poles in each direction (U or V) is defined via the following formulas:

  • for non-periodic B-Spline: number_of_poles = sum_of_knot_multiplicities - degree - 1;
  • for periodic B-Spline: number_of_poles = sum_of_knot_multiplicities - start_multiplicity.

B-Splines of degree up to 25 are supported.

Examples
exploring/brep_geometry/Program.cs, and exploring/brep_geometry/main.cxx.

Constructor & Destructor Documentation

◆ BSplineSurface() [1/2]

cadex.Geom.BSplineSurface.BSplineSurface ( cadex.Collections.PointList thePoles,
int theNumberOfUPoles,
int theNumberOfVPoles,
cadex.Collections.DoubleList theUKnots,
cadex.Collections.DoubleList theVKnots,
cadex.Collections.IntList theUMults,
cadex.Collections.IntList theVMults,
int theUDegree,
int theVDegree,
bool theIsUPeriodic,
bool theIsVPeriodic )
inline

Constructor.

Creates a polynomial B-Spline surface.

Parameters:

  • thePoles contains a 2D table of poles, with size equal to theNumberOfUPoles * theNumberOfVPoles; theNumberOfUPoles and theNumberOfVPoles must be >=2 each;
  • theNumberOfUKnots defines the length of theUKnots and theUMults and must be >=2;
  • theNumberOfVKnots defines the length of theVKnots and theVMults and must be >=2;
  • theUDegree and theVDegree must belong to range [1, 25];
  • theIsUPeriodic and theIsVPeriodic specify if the B-Spline is periodic in U and/or V direction respectively.

Number of poles in U and V direction must meet the requirements described above.

◆ BSplineSurface() [2/2]

cadex.Geom.BSplineSurface.BSplineSurface ( cadex.Collections.PointList thePoles,
cadex.Collections.DoubleList theWeights,
int theNumberOfUPoles,
int theNumberOfVPoles,
cadex.Collections.DoubleList theUKnots,
cadex.Collections.DoubleList theVKnots,
cadex.Collections.IntList theUMults,
cadex.Collections.IntList theVMults,
int theUDegree,
int theVDegree,
bool theIsUPeriodic,
bool theIsVPeriodic )
inline

Constructor.

Creates a rational B-Spline surface.

Parameters:

  • thePoles contains a 2D table of poles, with size equal to theNumberOfUPoles * theNumberOfVPoles; theNumberOfUPoles and theNumberOfVPoles must be >=2 each;
  • thePoleWeights defines pole weights and must have the same size and layout as thePoles;
  • theNumberOfUKnots defines the length of theUKnots and theUMults and must be >=2;
  • theNumberOfVKnots defines the length of theVKnots and theVMults and must be >=2;
  • theUDegree and theVDegree must belong to range [1, 25];
  • theIsUPeriodic and theIsVPeriodic specify if the B-Spline is periodic in U and/or V direction respectively.

Number of poles in U and V direction must meet the requirements described above.

Poles are to be provided after division by their weights.

Member Function Documentation

◆ Dispose()

override void cadex.Geom.BSplineSurface.Dispose ( bool disposing)
inlineprotectedvirtual

Reimplemented from cadex.BaseObject.

◆ IsURational()

bool cadex.Geom.BSplineSurface.IsURational ( )
inline

Returns true if the B-Spline curve is rational in U direction.

See also
Weights(), IsVRational().

◆ IsVRational()

bool cadex.Geom.BSplineSurface.IsVRational ( )
inline

Returns true if the B-Spline curve is rational in V direction.

See also
Weights(), IsURational().

◆ NumberOfUKnots()

int cadex.Geom.BSplineSurface.NumberOfUKnots ( )
inline

Returns number of unique U-knots.

Returns the value specified in the constructor.

Examples
exploring/brep_geometry/Program.cs, and exploring/brep_geometry/main.cxx.

◆ NumberOfUPoles()

int cadex.Geom.BSplineSurface.NumberOfUPoles ( )
inline

Returns number of U-poles.

Returns the value specified in the constructor.

Examples
exploring/brep_geometry/Program.cs, and exploring/brep_geometry/main.cxx.

◆ NumberOfVKnots()

int cadex.Geom.BSplineSurface.NumberOfVKnots ( )
inline

Returns number of unique V-knots.

Returns the value specified in the constructor.

Examples
exploring/brep_geometry/Program.cs, and exploring/brep_geometry/main.cxx.

◆ NumberOfVPoles()

int cadex.Geom.BSplineSurface.NumberOfVPoles ( )
inline

Returns number of V-poles.

Returns the value specified in the constructor.

Examples
exploring/brep_geometry/Program.cs, and exploring/brep_geometry/main.cxx.

◆ Pole()

cadex.Geom.Point cadex.Geom.BSplineSurface.Pole ( int theUIndex,
int theVIndex )
inline

Returns a pole value.

theUIndex must be in the range [1, NumberOfUPoles()], theVIndex in the range [1, NumberOfVPoles()].

See also
Weight().
Examples
exploring/brep_geometry/Program.cs, and exploring/brep_geometry/main.cxx.

◆ Poles()

cadex.Collections.PointList cadex.Geom.BSplineSurface.Poles ( )
inline

Populates a 2D table of poles.

thePoles must point to a buffer in memory with at least NumberOfUPoles() * NumberOfVPoles() preallocated values.

Returns NumberOfUPoles() * NumberOfVPoles().

See also
Weights().

◆ UDegree()

int cadex.Geom.BSplineSurface.UDegree ( )
inline

Returns U-degree.

Returns the value specified in the constructor.

Examples
exploring/brep_geometry/Program.cs, and exploring/brep_geometry/main.cxx.

◆ UKnot()

double cadex.Geom.BSplineSurface.UKnot ( int theUIndex)
inline

Returns a U-knot value.

theIndex must be in the range [1, NumberOfUKnots()].

See also
UMultiplicity().
Examples
exploring/brep_geometry/Program.cs, and exploring/brep_geometry/main.cxx.

◆ UKnots()

cadex.Collections.DoubleList cadex.Geom.BSplineSurface.UKnots ( )
inline

Populates a vector of U-knots.

theUKnots must point to a buffer in memory with at least NumberOfUKnots() preallocated values.

Returns NumberOfUKnots().

See also
UMultiplicities().

◆ UMultiplicities()

cadex.Collections.IntList cadex.Geom.BSplineSurface.UMultiplicities ( )
inline

Populates a vector of U knot multiplicities.

theUMults must point to a buffer in memory with at least NumberOfUKnots() preallocated values.

Returns NumberOfUKnots().

See also
UKnots().

◆ UMultiplicity()

int cadex.Geom.BSplineSurface.UMultiplicity ( int theUIndex)
inline

Returns a U knot multiplicity.

theIndex must be in the range [1, NumberOfUKnots()].

See also
UKnot().
Examples
exploring/brep_geometry/Program.cs, and exploring/brep_geometry/main.cxx.

◆ VDegree()

int cadex.Geom.BSplineSurface.VDegree ( )
inline

Returns V-degree.

Returns the value specified in the constructor.

Examples
exploring/brep_geometry/Program.cs, and exploring/brep_geometry/main.cxx.

◆ VKnot()

double cadex.Geom.BSplineSurface.VKnot ( int theVIndex)
inline

Returns a V-knot value.

theIndex must be in the range [1, NumberOfVKnots()].

See also
VMultiplicity().
Examples
exploring/brep_geometry/Program.cs, and exploring/brep_geometry/main.cxx.

◆ VKnots()

cadex.Collections.DoubleList cadex.Geom.BSplineSurface.VKnots ( )
inline

Populates a vector of V-knots.

theVKnots must point to a buffer in memory with at least NumberOfVKnots() preallocated values.

Returns NumberOfVKnots().

See also
VMultiplicities().

◆ VMultiplicities()

cadex.Collections.IntList cadex.Geom.BSplineSurface.VMultiplicities ( )
inline

Populates a vector of V knot multiplicities.

theVMults must point to a buffer in memory with at least NumberOfVKnots() preallocated values.

Returns NumberOfVKnots().

See also
VKnots().

◆ VMultiplicity()

int cadex.Geom.BSplineSurface.VMultiplicity ( int theVIndex)
inline

Returns a V knot multiplicity.

theIndex must be in the range [1, NumberOfVKnots()].

See also
VKnot().
Examples
exploring/brep_geometry/Program.cs, and exploring/brep_geometry/main.cxx.

◆ Weight()

double cadex.Geom.BSplineSurface.Weight ( int theUIndex,
int theVIndex )
inline

Returns a weight value.

theUIndex must be in the range [1, NumberOfUPoles()], theVIndex in the range [1, NumberOfVPoles()].

For polynomial B-Spline behavior is undefined.

See also
Pole(), IsURational(), IsVRational().
Examples
exploring/brep_geometry/Program.cs, and exploring/brep_geometry/main.cxx.

◆ Weights()

cadex.Collections.DoubleList cadex.Geom.BSplineSurface.Weights ( )
inline

Populates a 2D table of weights.

theWeights must point to a buffer in memory with at least NumberOfUPoles() * NumberOfVPoles() preallocated values.

Returns NumberOfUPoles() * NumberOfVPoles().

For polynomial B-Spline does nothing and returns 0.

See also
Poles(), IsURational(), IsVRational().