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

Defines 3D B-Spline curve. More...

Inheritance diagram for cadex.Geom.BSplineCurve:
cadex.Geom.Curve cadex.Geom.Geometry cadex.BaseObject

Public Member Functions

 BSplineCurve (global::System.IntPtr cPtr, bool cMemoryOwn)
 
 BSplineCurve (cadex.Collections.PointList thePoles, cadex.Collections.DoubleList theKnots, cadex.Collections.IntList theMultiplicities, int theDegree, bool theIsPeriodic)
 
 BSplineCurve (cadex.Collections.PointList thePoles, cadex.Collections.DoubleList theKnots, cadex.Collections.IntList theMultiplicities, int theDegree)
 
 BSplineCurve (cadex.Collections.PointList thePoles, cadex.Collections.DoubleList thePoleWeights, cadex.Collections.DoubleList theKnots, cadex.Collections.IntList theMultiplicities, int theDegree, bool theIsPeriodic)
 
 BSplineCurve (cadex.Collections.PointList thePoles, cadex.Collections.DoubleList thePoleWeights, cadex.Collections.DoubleList theKnots, cadex.Collections.IntList theMultiplicities, int theDegree)
 
int Degree ()
 Returns degree.
 
int NumberOfKnots ()
 Returns number of unique knots.
 
int NumberOfPoles ()
 Returns number of poles.
 
double Knot (int theIndex)
 theIndex must be in the range [1, NumberOfKnots()].
 
cadex.Collections.DoubleList Knots ()
 theKnots must point to a buffer in memory with at least NumberOfKnots() preallocated values.
 
int Multiplicity (int theIndex)
 theIndex must be in the range [1, NumberOfKnots()].
 
cadex.Collections.IntList Multiplicities ()
 theMultiplicities must point to a buffer in memory with at least NumberOfKnots() preallocated values.
 
cadex.Geom.Point Pole (int theIndex)
 theIndex must be in the range [1, NumberOfPoles()].
 
cadex.Collections.PointList Poles ()
 thePoles must point to a buffer in memory with at least NumberOfPoles() preallocated values.
 
double Weight (int theIndex)
 theIndex must be in the range [1, NumberOfPoles()].
 
cadex.Collections.DoubleList Weights ()
 theWeights must point to a buffer in memory with at least NumberOfPoles() preallocated values.
 
bool IsRational ()
 Returns true if the B-Spline curve is rational (i.e. has weights).
 
- Public Member Functions inherited from cadex.Geom.Curve
 Curve (global::System.IntPtr cPtr, bool cMemoryOwn)
 
cadex.Geom.CurveType Type ()
 
cadex.Geom.Continuity Continuity ()
 Returns a continuity type of the curve.
 
cadex.Geom.Point Value (double theParameter)
 Evaluates a point on the curve.
 
cadex.Geom.Direction Normal (double theParameter)
 Returns the normal direction theNormal of parameter theParam.
 
double Curvature (double theParameter)
 Returns the curvature value of parameter theParam.
 
bool IsPeriodic ()
 Returns true if the curve is periodic.
 
double UMin ()
 Returns a minimum parameter of a definition domain.
 
double UMax ()
 Returns a maximum parameter of a definition domain.
 
void Domain (out double theUMin, out double theUMax)
 Returns a definition domain.
 
bool IsTrimmed ()
 Returns whether curve is trimmed or not.
 
void SetTrim (double theFirst, double theLast)
 Trims curve with [theFirst, theLast] section.
 
void Transform (cadex.Geom.Transformation theTransformation)
 Results depends on the actual curve type.
 
cadex.Geom.Curve Transformed (cadex.Geom.Transformation theTransformation)
 The contents of this object is not modified.
 
void D0 (double theParameter, cadex.Geom.Point theValue)
 Throws exception only for the OffsetCurve if it is not possible to compute the current point.
 
void D1 (double theParameter, cadex.Geom.Point theValue, cadex.Geom.Vector theD1)
 Returns the point theValue of parameter theParam and the first derivative theD1.
 
void D2 (double theParameter, cadex.Geom.Point theValue, cadex.Geom.Vector theD1, cadex.Geom.Vector theD2)
 Returns the point theValue of parameter theParam, the first theD1 and second theD2 derivatives.
 
bool DN (double theParameter, uint theDerivativeOrder, cadex.Geom.Point theValue, cadex.Collections.VectorList theD)
 Returns true if calculation completed successfully.
 
void Mirror (cadex.Geom.Point thePoint)
 
void Mirror (cadex.Geom.Axis1d theAxis)
 
void Mirror (cadex.Geom.Axis3d theAxis)
 
cadex.Geom.Curve Mirrored (cadex.Geom.Point theRef)
 
cadex.Geom.Curve Mirrored (cadex.Geom.Axis1d theAxis)
 
cadex.Geom.Curve Mirrored (cadex.Geom.Axis3d theAxis)
 
void Rotate (cadex.Geom.Axis1d theAxis, double theAngle)
 
cadex.Geom.Curve Rotated (cadex.Geom.Axis1d theAxis, double theAngle)
 
void Translate (cadex.Geom.Vector theVector)
 
cadex.Geom.Curve Translated (cadex.Geom.Vector theVector)
 
void Scale (cadex.Geom.Point thePoint, double theScale)
 
cadex.Geom.Curve 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.BSplineCurve Cast (cadex.Geom.Curve theBase)
 
- Static Public Member Functions inherited from cadex.Geom.Curve
static new bool CompareType (cadex.BaseObject theObject)
 
static cadex.Geom.Curve Cast (cadex.Geom.Geometry theBase)
 
- 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.Curve
override void Dispose (bool disposing)
 
- Protected Member Functions inherited from cadex.Geom.Geometry
override void Dispose (bool disposing)
 

Detailed Description

Defines 3D B-Spline curve.

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

B-Spline curve

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 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.

Member Function Documentation

◆ Degree()

int cadex.Geom.BSplineCurve.Degree ( )
inline

◆ Dispose()

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

Reimplemented from cadex.BaseObject.

◆ IsRational()

bool cadex.Geom.BSplineCurve.IsRational ( )
inline

Returns true if the B-Spline curve is rational (i.e. has weights).

◆ Knot()

double cadex.Geom.BSplineCurve.Knot ( int theIndex)
inline

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

See also
Multiplicity(). Returns a knot value.
Examples
exploring/brep_geometry/Program.cs, and exploring/brep_geometry/main.cxx.

◆ Knots()

cadex.Collections.DoubleList cadex.Geom.BSplineCurve.Knots ( )
inline

theKnots must point to a buffer in memory with at least NumberOfKnots() preallocated values.

Returns NumberOfKnots().

See also
Multiplicities(). Populates a vector of knots.

◆ Multiplicities()

cadex.Collections.IntList cadex.Geom.BSplineCurve.Multiplicities ( )
inline

theMultiplicities must point to a buffer in memory with at least NumberOfKnots() preallocated values.

Returns NumberOfKnots().

See also
Knots(). Populates a vector of knot multiplicities.

◆ Multiplicity()

int cadex.Geom.BSplineCurve.Multiplicity ( int theIndex)
inline

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

See also
Knot(). Returns a knot multiplicity.
Examples
exploring/brep_geometry/Program.cs, and exploring/brep_geometry/main.cxx.

◆ NumberOfKnots()

int cadex.Geom.BSplineCurve.NumberOfKnots ( )
inline

Returns number of unique knots.

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

◆ NumberOfPoles()

int cadex.Geom.BSplineCurve.NumberOfPoles ( )
inline

◆ Pole()

cadex.Geom.Point cadex.Geom.BSplineCurve.Pole ( int theIndex)
inline

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

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

◆ Poles()

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

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

Returns NumberOfPoles().

See also
Weights(). Populates a vector of poles.

◆ Weight()

double cadex.Geom.BSplineCurve.Weight ( int theIndex)
inline

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

For polynomial B-Spline behavior is undefined.

See also
Pole(), IsRational(). Returns a weight value.
Examples
exploring/brep_geometry/Program.cs, and exploring/brep_geometry/main.cxx.

◆ Weights()

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

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

Returns NumberOfPoles().

For polynomial B-Spline does nothing and returns 0.

See also
Poles(), IsRational(). Populates a vector of weights.