Class PolyCurve
Represents a curve that is the result of joining several (possibly different) types of curves.
public class PolyCurve : NurbsBase, IGeometry<NurbsBase>, IEquatable<NurbsBase>, ITransformable<NurbsBase>
// Initializes a polycurve from a curve a line and an arc.
NurbsCurve curve = new NurbsCurve(pts, degree);
Line line = new Line(new Point3(5, 5, 0), new Point3(5, 5, -2.5));
Arc arc = Arc.ByStartEndDirection(new Point3(5, 5, -2.5), new Point3(10, 5, -5), new Vector3(0, 0, -1));
List<NurbsBase> curves = new List<NurbsBase>{ curve, line, arc};
_polycurve = new PolyCurve(curves);
Initializes a new polyCurve with a list of curves
public PolyCurve(IList<NurbsBase> curves)
Type | Name | Description |
---|---|---|
System.Collections.Generic.IList<NurbsBase> | curves | a list of curves |
The segments of the polyCurve.
public List<NurbsBase> Segments { get; }
Type | Description |
---|---|
System.Collections.Generic.List<NurbsBase> |
Appends and matches the start of the arc to the end of polycurve. This function will fail if the polycurve is closed.
public void Append(Arc arc)
Type | Name | Description |
---|---|---|
Arc | arc | The arc to append. |
Appends and matches the start of the arc to the end of polycurve. This function will fail if the polycurve is closed.
public void Append(Line line)
Type | Name | Description |
---|---|---|
Line | line | The line to append. |
Appends and matches the start of the curve to the end of polycurve. This function will fail if the polycurve is closed or if SegmentCount > 0 and the segment curve is closed.
public void Append(NurbsCurve curve)
Type | Name | Description |
---|---|---|
NurbsCurve | curve |
Appends and matches the start of the curve to the end of polycurve. This function will fail if the polycurve is closed or if SegmentCount > 0 and the segment polycurve is closed.
public void Append(PolyCurve polyCurve)
Type | Name | Description |
---|---|---|
PolyCurve | polyCurve |
Find Curve Segment At a given Length. When there is no curve segments in the PolyCurve, return null; If the provided length is greater than the PolyCurve Length, then it return the last segment in PolyCurve;
public NurbsBase SegmentAtLength(double length)
Type | Name | Description |
---|---|---|
System.Double | length | Segment Length |
Type | Description |
---|---|
NurbsBase |