Class BSpline2D
Inheritance
System.Object
BSpline2D
Implements
System.Runtime.Serialization.ISerializable
System.Runtime.Serialization.IDeserializationCallback
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)
Assembly: CADability.dll
Syntax
[Serializable]
public class BSpline2D : GeneralCurve2D, ICurve2D, IQuadTreeInsertable, I2DIntersectable, ISerializable, IDeserializationCallback, IDebuggerVisualizer, IExplicitPCurve2D
Constructors
|
Improve this Doc
View Source
BSpline2D(GeoPoint2D[], GeoVector2D[], Int32, Boolean)
Declaration
public BSpline2D(GeoPoint2D[] throughpoints, GeoVector2D[] throughdirections, int degree, bool periodic)
Parameters
| Type |
Name |
Description |
| GeoPoint2D[] |
throughpoints |
|
| GeoVector2D[] |
throughdirections |
|
| System.Int32 |
degree |
|
| System.Boolean |
periodic |
|
|
Improve this Doc
View Source
BSpline2D(GeoPoint2D[], Double[], Double[], Int32[], Int32, Boolean, Double, Double)
Constructs a BSpline2D (NURBS) from its main data
Declaration
public BSpline2D(GeoPoint2D[] poles, double[] weights, double[] knots, int[] multiplicities, int degree, bool periodic, double startParam, double endParam)
Parameters
| Type |
Name |
Description |
| GeoPoint2D[] |
poles |
the poles
|
| System.Double[] |
weights |
the weigts or null if not rational
|
| System.Double[] |
knots |
the knot vector
|
| System.Int32[] |
multiplicities |
the multiplicities vector for the knot vector (same size)
|
| System.Int32 |
degree |
the degree
|
| System.Boolean |
periodic |
true for periodic (closed) false otherwise
|
| System.Double |
startParam |
startparameter
|
| System.Double |
endParam |
endparameter
|
|
Improve this Doc
View Source
BSpline2D(GeoPoint2D[], Int32, Boolean)
Constructs a BSpline2D (NURBS) by a set of points, that will be interpolated.
Declaration
public BSpline2D(GeoPoint2D[] throughpoints, int degree, bool periodic)
Parameters
| Type |
Name |
Description |
| GeoPoint2D[] |
throughpoints |
the points to be interpolated
|
| System.Int32 |
degree |
the degree of the BSpline2D
|
| System.Boolean |
periodic |
true for periodic (closed) false otherwise
|
|
Improve this Doc
View Source
BSpline2D(SerializationInfo, StreamingContext)
Constructor required by deserialization
Declaration
protected BSpline2D(SerializationInfo info, StreamingContext context)
Parameters
| Type |
Name |
Description |
| System.Runtime.Serialization.SerializationInfo |
info |
SerializationInfo
|
| System.Runtime.Serialization.StreamingContext |
context |
StreamingContext
|
Properties
|
Improve this Doc
View Source
Degree
Gets the degree of the BSpline (NURBS)
Declaration
public int Degree { get; }
Property Value
| Type |
Description |
| System.Int32 |
|
|
Improve this Doc
View Source
EndDirection
Declaration
public override GeoVector2D EndDirection { get; }
Property Value
Overrides
|
Improve this Doc
View Source
EndParam
Declaration
public double EndParam { get; }
Property Value
| Type |
Description |
| System.Double |
|
|
Improve this Doc
View Source
EndPoint
Declaration
public override GeoPoint2D EndPoint { get; set; }
Property Value
Overrides
|
Improve this Doc
View Source
Knots
Gets a copy of the knots defining the BSpline (NURBS)
Declaration
public double[] Knots { get; }
Property Value
| Type |
Description |
| System.Double[] |
|
|
Improve this Doc
View Source
Length
Declaration
public override double Length { get; }
Property Value
| Type |
Description |
| System.Double |
|
Overrides
|
Improve this Doc
View Source
MiddleDirection
Declaration
public override GeoVector2D MiddleDirection { get; }
Property Value
Overrides
|
Improve this Doc
View Source
Multiplicities
Gets a copy of the multiplicities defining the BSpline (NURBS)
Declaration
public int[] Multiplicities { get; }
Property Value
| Type |
Description |
| System.Int32[] |
|
|
Improve this Doc
View Source
Poles
Gets a copy of the poles defining the BSpline (NURBS)
Declaration
public GeoPoint2D[] Poles { get; }
Property Value
|
Improve this Doc
View Source
StartDirection
Declaration
public override GeoVector2D StartDirection { get; }
Property Value
Overrides
|
Improve this Doc
View Source
StartParam
Declaration
public double StartParam { get; }
Property Value
| Type |
Description |
| System.Double |
|
|
Improve this Doc
View Source
StartPoint
Declaration
public override GeoPoint2D StartPoint { get; set; }
Property Value
Overrides
|
Improve this Doc
View Source
Sweep
Declaration
public override double Sweep { get; }
Property Value
| Type |
Description |
| System.Double |
|
Overrides
|
Improve this Doc
View Source
Weights
Gets a copy of the weights defining the BSpline (NURBS)
Declaration
public double[] Weights { get; }
Property Value
| Type |
Description |
| System.Double[] |
|
Methods
|
Improve this Doc
View Source
AddToGraphicsPath(GraphicsPath, Boolean)
Declaration
public override void AddToGraphicsPath(GraphicsPath path, bool forward)
Parameters
| Type |
Name |
Description |
| System.Drawing.Drawing2D.GraphicsPath |
path |
|
| System.Boolean |
forward |
|
Overrides
|
Improve this Doc
View Source
AdjustPeriodic(GeoPoint2D[], Double, Double)
Declaration
public static void AdjustPeriodic(GeoPoint2D[] points, double xPeriod, double yPeriod)
Parameters
| Type |
Name |
Description |
| GeoPoint2D[] |
points |
|
| System.Double |
xPeriod |
|
| System.Double |
yPeriod |
|
|
Improve this Doc
View Source
ApproximateWithArcs(Double)
Declaration
public Path2D ApproximateWithArcs(double maxError)
Parameters
| Type |
Name |
Description |
| System.Double |
maxError |
|
Returns
|
Improve this Doc
View Source
Clone()
Declaration
public override ICurve2D Clone()
Returns
Overrides
|
Improve this Doc
View Source
CloneReverse(Boolean)
Declaration
public override ICurve2D CloneReverse(bool reverse)
Parameters
| Type |
Name |
Description |
| System.Boolean |
reverse |
|
Returns
Overrides
|
Improve this Doc
View Source
Copy(ICurve2D)
Declaration
public override void Copy(ICurve2D toCopyFrom)
Parameters
| Type |
Name |
Description |
| ICurve2D |
toCopyFrom |
|
Overrides
|
Improve this Doc
View Source
DirectionAt(Double)
Declaration
public override GeoVector2D DirectionAt(double Position)
Parameters
| Type |
Name |
Description |
| System.Double |
Position |
|
Returns
Overrides
|
Improve this Doc
View Source
GetArea()
Declaration
public override double GetArea()
Returns
| Type |
Description |
| System.Double |
|
Overrides
|
Improve this Doc
View Source
GetExtent()
Declaration
public override BoundingRect GetExtent()
Returns
Overrides
|
Improve this Doc
View Source
GetFused(ICurve2D, Double)
Declaration
public override ICurve2D GetFused(ICurve2D toFuseWith, double precision)
Parameters
| Type |
Name |
Description |
| ICurve2D |
toFuseWith |
|
| System.Double |
precision |
|
Returns
Overrides
|
Improve this Doc
View Source
GetModified(ModOp2D)
Declaration
public override ICurve2D GetModified(ModOp2D m)
Parameters
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 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.
|
|
Improve this Doc
View Source
GetSelfIntersections()
Declaration
public override double[] GetSelfIntersections()
Returns
| Type |
Description |
| System.Double[] |
|
Overrides
|
Improve this Doc
View Source
GetSimpleCurve(Double, out ICurve2D)
Declaration
public bool GetSimpleCurve(double precison, out ICurve2D simpleCurve)
Parameters
| Type |
Name |
Description |
| System.Double |
precison |
|
| ICurve2D |
simpleCurve |
|
Returns
| Type |
Description |
| System.Boolean |
|
|
Improve this Doc
View Source
HitTest(ref BoundingRect, Boolean)
Declaration
public override bool HitTest(ref BoundingRect Rect, bool IncludeControlPoints)
Parameters
| Type |
Name |
Description |
| BoundingRect |
Rect |
|
| System.Boolean |
IncludeControlPoints |
|
Returns
| Type |
Description |
| System.Boolean |
|
Overrides
|
Improve this Doc
View Source
Intersect(ICurve2D)
Declaration
public override GeoPoint2DWithParameter[] Intersect(ICurve2D IntersectWith)
Parameters
| Type |
Name |
Description |
| ICurve2D |
IntersectWith |
|
Returns
Overrides
|
Improve this Doc
View Source
Intersect(GeoPoint2D, GeoPoint2D)
Declaration
public override GeoPoint2DWithParameter[] Intersect(GeoPoint2D StartPoint, GeoPoint2D EndPoint)
Parameters
Returns
Overrides
|
Improve this Doc
View Source
IsPartOf(Double, ICurve2D)
Declaration
public ICurve2D IsPartOf(double precision, ICurve2D simpleCurve)
Parameters
| Type |
Name |
Description |
| System.Double |
precision |
|
| ICurve2D |
simpleCurve |
|
Returns
|
Improve this Doc
View Source
IsValidParameter(Double)
Declaration
public override bool IsValidParameter(double par)
Parameters
| Type |
Name |
Description |
| System.Double |
par |
|
Returns
| Type |
Description |
| System.Boolean |
|
Overrides
|
Improve this Doc
View Source
MakeCircle(GeoPoint2D, Double)
Declaration
public static BSpline2D MakeCircle(GeoPoint2D center, double radius)
Parameters
| Type |
Name |
Description |
| GeoPoint2D |
center |
|
| System.Double |
radius |
|
Returns
|
Improve this Doc
View Source
MakeGeoObject(Plane)
Declaration
public override IGeoObject MakeGeoObject(Plane p)
Parameters
| Type |
Name |
Description |
| Plane |
p |
|
Returns
Overrides
|
Improve this Doc
View Source
MakeHyperbola(GeoPoint2D, GeoPoint2D, GeoPoint2D, GeoPoint2D)
Creates a (segment of a) hyperbola defined by its endpoints (startPoint, endPoint), the intersectionpoint of the tangents at the endpoints and a point
located on the hyperbola where the hyperbola intersects with the line [midpoint(startPoint, endPoint), tangentIntersectionPoint]
Declaration
public static BSpline2D MakeHyperbola(GeoPoint2D startPoint, GeoPoint2D endPoint, GeoPoint2D midPoint, GeoPoint2D tangentIntersectionPoint)
Parameters
Returns
|
Improve this Doc
View Source
MakeSpiral(GeoPoint2D, Double, Int32)
Declaration
public static BSpline2D MakeSpiral(GeoPoint2D center, double offset, int turns)
Parameters
| Type |
Name |
Description |
| GeoPoint2D |
center |
|
| System.Double |
offset |
|
| System.Int32 |
turns |
|
Returns
|
Improve this Doc
View Source
Move(Double, Double)
Declaration
public override void Move(double dx, double dy)
Parameters
| Type |
Name |
Description |
| System.Double |
dx |
|
| System.Double |
dy |
|
Overrides
|
Improve this Doc
View Source
Parallel(Double, Boolean, Double, Double)
Declaration
public override ICurve2D Parallel(double Dist, bool approxSpline, double precision, double roundAngle)
Parameters
| Type |
Name |
Description |
| System.Double |
Dist |
|
| System.Boolean |
approxSpline |
|
| System.Double |
precision |
|
| System.Double |
roundAngle |
|
Returns
Overrides
|
Improve this Doc
View Source
Declaration
public override GeoPoint2D[] PerpendicularFoot(GeoPoint2D FromHere)
Parameters
Returns
Overrides
|
Improve this Doc
View Source
PointAt(Double)
Declaration
public override GeoPoint2D PointAt(double Position)
Parameters
| Type |
Name |
Description |
| System.Double |
Position |
|
Returns
Overrides
|
Improve this Doc
View Source
PositionOf(GeoPoint2D)
Declaration
public override double PositionOf(GeoPoint2D p)
Parameters
Returns
| Type |
Description |
| System.Double |
|
Overrides
|
Improve this Doc
View Source
Project(Plane, Plane)
Declaration
public override ICurve2D Project(Plane fromPlane, Plane toPlane)
Parameters
| Type |
Name |
Description |
| Plane |
fromPlane |
|
| Plane |
toPlane |
|
Returns
Overrides
|
Improve this Doc
View Source
Reverse()
Declaration
public override void Reverse()
Overrides
|
Improve this Doc
View Source
Split(Double)
Declaration
public override ICurve2D[] Split(double Position)
Parameters
| Type |
Name |
Description |
| System.Double |
Position |
|
Returns
Overrides
|
Improve this Doc
View Source
TangentPoints(GeoPoint2D, GeoPoint2D)
Declaration
public override GeoPoint2D[] TangentPoints(GeoPoint2D FromHere, GeoPoint2D CloseTo)
Parameters
Returns
Overrides
|
Improve this Doc
View Source
TangentPointsToAngle(Angle, GeoPoint2D)
Declaration
public override GeoPoint2D[] TangentPointsToAngle(Angle ang, GeoPoint2D CloseTo)
Parameters
Returns
Overrides
|
Improve this Doc
View Source
TangentPointsToAngle(GeoVector2D)
Declaration
public override double[] TangentPointsToAngle(GeoVector2D direction)
Parameters
Returns
| Type |
Description |
| System.Double[] |
|
Overrides
|
Improve this Doc
View Source
ToString()
Declaration
public override string ToString()
Returns
| Type |
Description |
| System.String |
|
Overrides
System.Object.ToString()
|
Improve this Doc
View Source
Trim(Double, Double)
Declaration
public override ICurve2D Trim(double StartPos, double EndPos)
Parameters
| Type |
Name |
Description |
| System.Double |
StartPos |
|
| System.Double |
EndPos |
|
Returns
Overrides
|
Improve this Doc
View Source
TrimParam(Double, Double)
Declaration
public bool TrimParam(double startPar, double endPar)
Parameters
| Type |
Name |
Description |
| System.Double |
startPar |
|
| System.Double |
endPar |
|
Returns
| Type |
Description |
| System.Boolean |
|
|
Improve this Doc
View Source
TryPointDeriv2At(Double, out GeoPoint2D, out GeoVector2D, out GeoVector2D)
Declaration
public override bool TryPointDeriv2At(double position, out GeoPoint2D point, out GeoVector2D deriv1, out GeoVector2D deriv2)
Parameters
Returns
| Type |
Description |
| System.Boolean |
|
Overrides
Explicit Interface Implementations
|
Improve this Doc
View Source
IExplicitPCurve2D.GetExplicitPCurve2D()
Declaration
ExplicitPCurve2D IExplicitPCurve2D.GetExplicitPCurve2D()
Returns
|
Improve this Doc
View Source
IDeserializationCallback.OnDeserialization(Object)
Declaration
void IDeserializationCallback.OnDeserialization(object sender)
Parameters
| Type |
Name |
Description |
| System.Object |
sender |
|
Implements
System.Runtime.Serialization.ISerializable
System.Runtime.Serialization.IDeserializationCallback