Class BSpline
A BSpline is a smooth curve defined by a set of control points. It is implemented as a NURBS - non uniform rational b-spline.
Inheritance
System.Object
BSpline
Implements
System.IComparable
System.ICloneable
System.Runtime.Serialization.ISerializable
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Assembly: CADability.dll
Syntax
[Serializable]
public class BSpline : IGeoObjectImpl, IGeoObject, ILayer, IStyle, IOctTreeInsertable, IComparable, IFeedBack, ICloneable, IColorDef, ILineWidth, ILinePattern, ISerializable, ICurve, IExplicitPCurve3D, IExportStep
Constructors
|
Improve this Doc
View Source
BSpline()
Declaration
|
Improve this Doc
View Source
BSpline(SerializationInfo, StreamingContext)
Constructor required by deserialization
Declaration
protected BSpline(SerializationInfo info, StreamingContext context)
Parameters
| Type |
Name |
Description |
| System.Runtime.Serialization.SerializationInfo |
info |
SerializationInfo
|
| System.Runtime.Serialization.StreamingContext |
context |
StreamingContext
|
Fields
|
Improve this Doc
View Source
Constructor
Declaration
public static BSpline.ConstructionDelegate Constructor
Field Value
|
Improve this Doc
View Source
OnPaintTo3D
Declaration
public static BSpline.PaintTo3DDelegate OnPaintTo3D
Field Value
Properties
|
Improve this Doc
View Source
ColorDef
Declaration
public ColorDef ColorDef { get; set; }
Property Value
|
Improve this Doc
View Source
Degree
Declaration
public int Degree { get; }
Property Value
| Type |
Description |
| System.Int32 |
|
|
Improve this Doc
View Source
HasWeights
Declaration
public bool HasWeights { get; }
Property Value
| Type |
Description |
| System.Boolean |
|
|
Improve this Doc
View Source
IsClosed
Declaration
public bool IsClosed { get; set; }
Property Value
| Type |
Description |
| System.Boolean |
|
|
Improve this Doc
View Source
IsSingular
Declaration
public bool IsSingular { get; }
Property Value
| Type |
Description |
| System.Boolean |
|
|
Improve this Doc
View Source
KnotPoints
Declaration
public GeoPoint[] KnotPoints { get; }
Property Value
|
Improve this Doc
View Source
Knots
Declaration
public double[] Knots { get; }
Property Value
| Type |
Description |
| System.Double[] |
|
|
Improve this Doc
View Source
LinePattern
Declaration
public LinePattern LinePattern { get; set; }
Property Value
|
Improve this Doc
View Source
LineWidth
Declaration
public LineWidth LineWidth { get; set; }
Property Value
|
Improve this Doc
View Source
Multiplicities
Declaration
public int[] Multiplicities { get; }
Property Value
| Type |
Description |
| System.Int32[] |
|
|
Improve this Doc
View Source
PoleCount
Declaration
public int PoleCount { get; }
Property Value
| Type |
Description |
| System.Int32 |
|
|
Improve this Doc
View Source
Poles
Declaration
public GeoPoint[] Poles { get; }
Property Value
|
Improve this Doc
View Source
PreferredStyle
Declaration
public override Style.EDefaultFor PreferredStyle { get; }
Property Value
Overrides
|
Improve this Doc
View Source
ThroughPoint
Declaration
public GeoPoint[] ThroughPoint { get; }
Property Value
|
Improve this Doc
View Source
ThroughPointCount
Declaration
public int ThroughPointCount { get; }
Property Value
| Type |
Description |
| System.Int32 |
|
|
Improve this Doc
View Source
ThroughPoints3dExist
Declaration
public bool ThroughPoints3dExist { get; }
Property Value
| Type |
Description |
| System.Boolean |
|
|
Improve this Doc
View Source
Weights
Declaration
public double[] Weights { get; }
Property Value
| Type |
Description |
| System.Double[] |
|
Methods
|
Improve this Doc
View Source
Approximate(GeoPoint[], Double)
Declaration
public bool Approximate(GeoPoint[] vertex, double precision)
Parameters
| Type |
Name |
Description |
| GeoPoint[] |
vertex |
|
| System.Double |
precision |
|
Returns
| Type |
Description |
| System.Boolean |
|
|
Improve this Doc
View Source
Clone()
Declaration
public override IGeoObject Clone()
Returns
Overrides
|
Improve this Doc
View Source
Construct()
Declaration
public static BSpline Construct()
Returns
|
Improve this Doc
View Source
CopyAttributes(IGeoObject)
Declaration
public override void CopyAttributes(IGeoObject ToCopyFrom)
Parameters
Overrides
|
Improve this Doc
View Source
CopyGeometry(IGeoObject)
Declaration
public override void CopyGeometry(IGeoObject ToCopyFrom)
Parameters
Overrides
|
Improve this Doc
View Source
FindSnapPoint(SnapPointFinder)
Declaration
public override void FindSnapPoint(SnapPointFinder spf)
Parameters
Overrides
|
Improve this Doc
View Source
GetBoundingCube()
Declaration
public override BoundingCube GetBoundingCube()
Returns
Overrides
|
Improve this Doc
View Source
GetData(out GeoPoint[], out Double[], out Double[], out Int32)
Declaration
public void GetData(out GeoPoint[] poles, out double[] weights, out double[] knots, out int degree)
Parameters
| Type |
Name |
Description |
| GeoPoint[] |
poles |
|
| System.Double[] |
weights |
|
| System.Double[] |
knots |
|
| System.Int32 |
degree |
|
|
Improve this Doc
View Source
GetData(out Int32, out GeoPoint[], out Double[], out Double[], out Int32[])
Declaration
public void GetData(out int degree, out GeoPoint[] poles, out double[] weights, out double[] knots, out int[] multiplicities)
Parameters
| Type |
Name |
Description |
| System.Int32 |
degree |
|
| GeoPoint[] |
poles |
|
| System.Double[] |
weights |
|
| System.Double[] |
knots |
|
| System.Int32[] |
multiplicities |
|
|
Improve this Doc
View Source
GetExtent(Projection, ExtentPrecision)
Declaration
public override BoundingRect GetExtent(Projection projection, ExtentPrecision extentPrecision)
Parameters
Returns
Overrides
|
Improve this Doc
View Source
GetExtent(Double)
Declaration
public override BoundingCube GetExtent(double precision)
Parameters
| Type |
Name |
Description |
| System.Double |
precision |
|
Returns
Overrides
|
Improve this Doc
View Source
GetObjectData(SerializationInfo, StreamingContext)
Implements System.Runtime.Serialization.ISerializable.GetObjectData(System.Runtime.Serialization.SerializationInfo, System.Runtime.Serialization.StreamingContext)
Declaration
public override void GetObjectData(SerializationInfo info, StreamingContext context)
Parameters
| Type |
Name |
Description |
| System.Runtime.Serialization.SerializationInfo |
info |
The System.Runtime.Serialization.SerializationInfo to populate with data.
|
| System.Runtime.Serialization.StreamingContext |
context |
The destination (System.Runtime.Serialization.StreamingContext) for this serialization.
|
Overrides
|
Improve this Doc
View Source
GetPole(Int32)
Declaration
public GeoPoint GetPole(int Index)
Parameters
| Type |
Name |
Description |
| System.Int32 |
Index |
|
Returns
|
Improve this Doc
View Source
GetQuadTreeItem(Projection, ExtentPrecision)
Declaration
public override IQuadTreeInsertableZ GetQuadTreeItem(Projection projection, ExtentPrecision extentPrecision)
Parameters
Returns
Overrides
|
Improve this Doc
View Source
GetShowProperties(IFrame)
Declaration
public override IShowProperty GetShowProperties(IFrame Frame)
Parameters
| Type |
Name |
Description |
| IFrame |
Frame |
|
Returns
Overrides
|
Improve this Doc
View Source
GetThroughPoint(Int32)
Declaration
public GeoPoint GetThroughPoint(int Index)
Parameters
| Type |
Name |
Description |
| System.Int32 |
Index |
|
Returns
|
Improve this Doc
View Source
HitTest(ref BoundingCube, Double)
Declaration
public override bool HitTest(ref BoundingCube cube, double precision)
Parameters
| Type |
Name |
Description |
| BoundingCube |
cube |
|
| System.Double |
precision |
|
Returns
| Type |
Description |
| System.Boolean |
|
Overrides
|
Improve this Doc
View Source
HitTest(Projection, BoundingRect, Boolean)
Declaration
public override bool HitTest(Projection projection, BoundingRect rect, bool onlyInside)
Parameters
Returns
| Type |
Description |
| System.Boolean |
|
Overrides
|
Improve this Doc
View Source
HitTest(Projection.PickArea, Boolean)
Declaration
public override bool HitTest(Projection.PickArea area, bool onlyInside)
Parameters
Returns
| Type |
Description |
| System.Boolean |
|
Overrides
|
Improve this Doc
View Source
Modify(ModOp)
Declaration
public override void Modify(ModOp m)
Parameters
| Type |
Name |
Description |
| ModOp |
m |
|
Overrides
|
Improve this Doc
View Source
PaintTo3D(IPaintTo3D)
Declaration
public override void PaintTo3D(IPaintTo3D paintTo3D)
Parameters
Overrides
|
Improve this Doc
View Source
PointAtParam(Double)
Returns the point at the provided parameter. Unlike the ICurve method PointAt(Double)
this Method takes a parameter in the natural space of the BSpline.
Declaration
public GeoPoint PointAtParam(double param)
Parameters
| Type |
Name |
Description |
| System.Double |
param |
Parameter to get the point for
|
Returns
| Type |
Description |
| GeoPoint |
The resulting point
|
|
Improve this Doc
View Source
Position(GeoPoint, GeoVector, Double)
Declaration
public override double Position(GeoPoint fromHere, GeoVector direction, double precision)
Parameters
Returns
| Type |
Description |
| System.Double |
|
Overrides
|
Improve this Doc
View Source
PositionOfThroughPoint(Int32)
Declaration
public double PositionOfThroughPoint(int ind)
Parameters
| Type |
Name |
Description |
| System.Int32 |
ind |
|
Returns
| Type |
Description |
| System.Double |
|
|
Improve this Doc
View Source
PrepareDisplayList(Double)
Declaration
public override void PrepareDisplayList(double precision)
Parameters
| Type |
Name |
Description |
| System.Double |
precision |
|
Overrides
|
Improve this Doc
View Source
ReducePoles(Double)
Declaration
public void ReducePoles(double precision)
Parameters
| Type |
Name |
Description |
| System.Double |
precision |
|
|
Improve this Doc
View Source
SetData(Int32, GeoPoint[], Double[], Double[], Int32[], Boolean)
Declaration
public bool SetData(int degree, GeoPoint[] poles, double[] weights, double[] knots, int[] multiplicities, bool periodic)
Parameters
| Type |
Name |
Description |
| System.Int32 |
degree |
|
| GeoPoint[] |
poles |
|
| System.Double[] |
weights |
|
| System.Double[] |
knots |
|
| System.Int32[] |
multiplicities |
|
| System.Boolean |
periodic |
|
Returns
| Type |
Description |
| System.Boolean |
|
|
Improve this Doc
View Source
SetData(Int32, GeoPoint[], Double[], Double[], Int32[], Boolean, Double, Double)
Declaration
public bool SetData(int degree, GeoPoint[] poles, double[] weights, double[] knots, int[] multiplicities, bool periodic, double startParam, double endParam)
Parameters
| Type |
Name |
Description |
| System.Int32 |
degree |
|
| GeoPoint[] |
poles |
|
| System.Double[] |
weights |
|
| System.Double[] |
knots |
|
| System.Int32[] |
multiplicities |
|
| System.Boolean |
periodic |
|
| System.Double |
startParam |
|
| System.Double |
endParam |
|
Returns
| Type |
Description |
| System.Boolean |
|
|
Improve this Doc
View Source
SetPole(Int32, GeoPoint)
Modifies the value of a pole. The Index must be between 0 and PoleCount.
Declaration
public void SetPole(int Index, GeoPoint ThePoint)
Parameters
| Type |
Name |
Description |
| System.Int32 |
Index |
Index of the pole
|
| GeoPoint |
ThePoint |
The new value
|
|
Improve this Doc
View Source
SetThroughPoint(Int32, GeoPoint)
Declaration
public void SetThroughPoint(int Index, GeoPoint NewValue)
Parameters
| Type |
Name |
Description |
| System.Int32 |
Index |
|
| GeoPoint |
NewValue |
|
|
Improve this Doc
View Source
ShowPoints(Boolean, Boolean)
Declaration
public void ShowPoints(bool showThroughPoints, bool showPoles)
Parameters
| Type |
Name |
Description |
| System.Boolean |
showThroughPoints |
|
| System.Boolean |
showPoles |
|
|
Improve this Doc
View Source
ThroughPoints(GeoPoint[], GeoVector[], Int32, Boolean)
Declaration
public bool ThroughPoints(GeoPoint[] points, GeoVector[] directions, int maxDegree, bool closed)
Parameters
| Type |
Name |
Description |
| GeoPoint[] |
points |
|
| GeoVector[] |
directions |
|
| System.Int32 |
maxDegree |
|
| System.Boolean |
closed |
|
Returns
| Type |
Description |
| System.Boolean |
|
|
Improve this Doc
View Source
ThroughPoints(GeoPoint[], Int32, Boolean)
Makes this BSpline go through the given points. Previous data of this BSpline
(if any) is discarded. The BSpline remembers both this points and the calculated
poles, multiplicities, knots and weights values. If all points lie in a single plane
it is better to use the appropriate ThroughPoints method.
Declaration
public bool ThroughPoints(GeoPoint[] points, int maxDegree, bool closed)
Parameters
| Type |
Name |
Description |
| GeoPoint[] |
points |
List of points to pass through
|
| System.Int32 |
maxDegree |
maximum degree for the BSpline. Must be between 3 an 25
|
| System.Boolean |
closed |
true if the resulting BSpline should be closed
|
Returns
| Type |
Description |
| System.Boolean |
success
|
|
Improve this Doc
View Source
ThroughPoints(Plane, GeoPoint2D[], GeoVector2D[], Int32, Boolean)
Declaration
public bool ThroughPoints(Plane p, GeoPoint2D[] points, GeoVector2D[] directions, int maxDegree, bool closed)
Parameters
Returns
| Type |
Description |
| System.Boolean |
|
Events
|
Improve this Doc
View Source
Constructed
Declaration
public static event BSpline.ConstructedDelegate Constructed
Event Type
Explicit Interface Implementations
|
Improve this Doc
View Source
IColorDef.SetTopLevel(ColorDef)
Declaration
void IColorDef.SetTopLevel(ColorDef newValue)
Parameters
|
Improve this Doc
View Source
IColorDef.SetTopLevel(ColorDef, Boolean)
Declaration
void IColorDef.SetTopLevel(ColorDef newValue, bool overwriteChildNullColor)
Parameters
| Type |
Name |
Description |
| ColorDef |
newValue |
|
| System.Boolean |
overwriteChildNullColor |
|
|
Improve this Doc
View Source
ICurve.Approximate(Boolean, Double)
Declaration
ICurve ICurve.Approximate(bool linesOnly, double maxError)
Parameters
| Type |
Name |
Description |
| System.Boolean |
linesOnly |
|
| System.Double |
maxError |
|
Returns
|
Improve this Doc
View Source
ICurve.Clone()
Declaration
Returns
|
Improve this Doc
View Source
ICurve.CloneModified(ModOp)
Declaration
ICurve ICurve.CloneModified(ModOp m)
Parameters
| Type |
Name |
Description |
| ModOp |
m |
|
Returns
|
Improve this Doc
View Source
ICurve.Description
Declaration
string ICurve.Description { get; }
Returns
| Type |
Description |
| System.String |
|
|
Improve this Doc
View Source
ICurve.DirectionAt(Double)
Declaration
GeoVector ICurve.DirectionAt(double Position)
Parameters
| Type |
Name |
Description |
| System.Double |
Position |
|
Returns
|
Improve this Doc
View Source
ICurve.DistanceTo(GeoPoint)
Declaration
double ICurve.DistanceTo(GeoPoint p)
Parameters
Returns
| Type |
Description |
| System.Double |
|
|
Improve this Doc
View Source
ICurve.EndDirection
Declaration
GeoVector ICurve.EndDirection { get; }
Returns
|
Improve this Doc
View Source
ICurve.EndPoint
Declaration
GeoPoint ICurve.EndPoint { get; set; }
Returns
|
Improve this Doc
View Source
ICurve.GetExtent()
Declaration
BoundingCube ICurve.GetExtent()
Returns
|
Improve this Doc
View Source
ICurve.GetExtrema(GeoVector)
Declaration
double[] ICurve.GetExtrema(GeoVector direction)
Parameters
Returns
| Type |
Description |
| System.Double[] |
|
|
Improve this Doc
View Source
ICurve.GetPlanarState()
Declaration
PlanarState ICurve.GetPlanarState()
Returns
|
Improve this Doc
View Source
ICurve.GetPlane()
Declaration
Returns
|
Improve this Doc
View Source
ICurve.GetPlaneIntersection(Plane)
Declaration
double[] ICurve.GetPlaneIntersection(Plane plane)
Parameters
| Type |
Name |
Description |
| Plane |
plane |
|
Returns
| Type |
Description |
| System.Double[] |
|
|
Improve this Doc
View Source
ICurve.GetProjectedCurve(Plane)
Declaration
ICurve2D ICurve.GetProjectedCurve(Plane p)
Parameters
| Type |
Name |
Description |
| Plane |
p |
|
Returns
|
Improve this Doc
View Source
ICurve.GetSavePositions()
Declaration
double[] ICurve.GetSavePositions()
Returns
| Type |
Description |
| System.Double[] |
|
|
Improve this Doc
View Source
ICurve.GetSelfIntersections()
Declaration
double[] ICurve.GetSelfIntersections()
Returns
| Type |
Description |
| System.Double[] |
|
|
Improve this Doc
View Source
ICurve.HitTest(BoundingCube)
Declaration
bool ICurve.HitTest(BoundingCube cube)
Parameters
Returns
| Type |
Description |
| System.Boolean |
|
|
Improve this Doc
View Source
ICurve.IsClosed
Declaration
bool ICurve.IsClosed { get; }
Returns
| Type |
Description |
| System.Boolean |
|
|
Improve this Doc
View Source
ICurve.IsComposed
Declaration
bool ICurve.IsComposed { get; }
Returns
| Type |
Description |
| System.Boolean |
|
|
Improve this Doc
View Source
ICurve.IsInPlane(Plane)
Declaration
bool ICurve.IsInPlane(Plane p)
Parameters
| Type |
Name |
Description |
| Plane |
p |
|
Returns
| Type |
Description |
| System.Boolean |
|
|
Improve this Doc
View Source
ICurve.IsSingular
Declaration
bool ICurve.IsSingular { get; }
Returns
| Type |
Description |
| System.Boolean |
|
|
Improve this Doc
View Source
ICurve.Length
Declaration
double ICurve.Length { get; }
Returns
| Type |
Description |
| System.Double |
|
|
Improve this Doc
View Source
ICurve.ParameterToPosition(Double)
Declaration
double ICurve.ParameterToPosition(double parameter)
Parameters
| Type |
Name |
Description |
| System.Double |
parameter |
|
Returns
| Type |
Description |
| System.Double |
|
|
Improve this Doc
View Source
ICurve.PointAt(Double)
Declaration
GeoPoint ICurve.PointAt(double Position)
Parameters
| Type |
Name |
Description |
| System.Double |
Position |
|
Returns
|
Improve this Doc
View Source
ICurve.PositionAtLength(Double)
Declaration
double ICurve.PositionAtLength(double position)
Parameters
| Type |
Name |
Description |
| System.Double |
position |
|
Returns
| Type |
Description |
| System.Double |
|
|
Improve this Doc
View Source
ICurve.PositionOf(GeoPoint)
Declaration
double ICurve.PositionOf(GeoPoint p)
Parameters
Returns
| Type |
Description |
| System.Double |
|
|
Improve this Doc
View Source
ICurve.PositionOf(GeoPoint, Plane)
Declaration
double ICurve.PositionOf(GeoPoint p, Plane pl)
Parameters
Returns
| Type |
Description |
| System.Double |
|
|
Improve this Doc
View Source
ICurve.PositionOf(GeoPoint, Double)
Declaration
double ICurve.PositionOf(GeoPoint p, double prefer)
Parameters
| Type |
Name |
Description |
| GeoPoint |
p |
|
| System.Double |
prefer |
|
Returns
| Type |
Description |
| System.Double |
|
|
Improve this Doc
View Source
ICurve.PositionToParameter(Double)
Declaration
double ICurve.PositionToParameter(double position)
Parameters
| Type |
Name |
Description |
| System.Double |
position |
|
Returns
| Type |
Description |
| System.Double |
|
|
Improve this Doc
View Source
ICurve.Reverse()
Declaration
|
Improve this Doc
View Source
ICurve.SameGeometry(ICurve, Double)
Declaration
bool ICurve.SameGeometry(ICurve other, double precision)
Parameters
| Type |
Name |
Description |
| ICurve |
other |
|
| System.Double |
precision |
|
Returns
| Type |
Description |
| System.Boolean |
|
|
Improve this Doc
View Source
ICurve.Split(Double)
Declaration
ICurve[] ICurve.Split(double Position)
Parameters
| Type |
Name |
Description |
| System.Double |
Position |
|
Returns
|
Improve this Doc
View Source
ICurve.Split(Double, Double)
Declaration
ICurve[] ICurve.Split(double Position1, double Position2)
Parameters
| Type |
Name |
Description |
| System.Double |
Position1 |
|
| System.Double |
Position2 |
|
Returns
|
Improve this Doc
View Source
ICurve.StartDirection
Declaration
GeoVector ICurve.StartDirection { get; }
Returns
|
Improve this Doc
View Source
ICurve.StartPoint
Declaration
GeoPoint ICurve.StartPoint { get; set; }
Returns
|
Improve this Doc
View Source
ICurve.SubCurves
Declaration
ICurve[] ICurve.SubCurves { get; }
Returns
|
Improve this Doc
View Source
ICurve.TangentPosition(GeoVector)
Declaration
double[] ICurve.TangentPosition(GeoVector direction)
Parameters
Returns
| Type |
Description |
| System.Double[] |
|
|
Improve this Doc
View Source
ICurve.Trim(Double, Double)
Declaration
void ICurve.Trim(double StartPos, double EndPos)
Parameters
| Type |
Name |
Description |
| System.Double |
StartPos |
|
| System.Double |
EndPos |
|
|
Improve this Doc
View Source
ICurve.TryPointDeriv2At(Double, out GeoPoint, out GeoVector, out GeoVector)
Declaration
bool ICurve.TryPointDeriv2At(double position, out GeoPoint point, out GeoVector deriv1, out GeoVector deriv2)
Parameters
Returns
| Type |
Description |
| System.Boolean |
|
|
Improve this Doc
View Source
IExplicitPCurve3D.GetExplicitPCurve3D()
Declaration
ExplicitPCurve3D IExplicitPCurve3D.GetExplicitPCurve3D()
Returns
|
Improve this Doc
View Source
IExportStep.Export(ExportStep, Boolean)
Declaration
int IExportStep.Export(ExportStep export, bool topLevel)
Parameters
| Type |
Name |
Description |
| ExportStep |
export |
|
| System.Boolean |
topLevel |
|
Returns
| Type |
Description |
| System.Int32 |
|
Implements
System.IComparable
System.ICloneable
System.Runtime.Serialization.ISerializable