Class BoundedCurve
A bounded curve.
Inherited Members
Namespace: Elements.Geometry
Assembly: Hypar.Elements.dll
Syntax
public abstract class BoundedCurve : Curve, ICurve, ITransformable<Curve>, IBoundedCurve
Fields
DefaultMinimumChordLength
The minimum chord length allowed for subdivision of the curve. A smaller MinimumChordLength results in smoother curves. For polylines and polygons this parameter will have no effect.
Declaration
public const double DefaultMinimumChordLength = 0.1
Field Value
Type | Description |
---|---|
System.Double |
Properties
Domain
The domain of the curve.
Declaration
[JsonIgnore]
public virtual Domain1d Domain { get; }
Property Value
Type | Description |
---|---|
Domain1d |
End
The end of the curve.
Declaration
public virtual Vector3 End { get; protected set; }
Property Value
Type | Description |
---|---|
Vector3 |
IsClosedForRendering
Should the curve be considered closed for rendering? Curves marked true will use LINE_LOOP mode for rendering. Curves marked false will use LINE_STRIP for rendering.
Declaration
[JsonIgnore]
public virtual bool IsClosedForRendering { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Start
The start of the curve.
Declaration
public virtual Vector3 Start { get; protected set; }
Property Value
Type | Description |
---|---|
Vector3 |
Methods
ArcLength(Double, Double)
Calculate the length of the curve between two parameters.
Declaration
public abstract double ArcLength(double start, double end)
Parameters
Type | Name | Description |
---|---|---|
System.Double | start | |
System.Double | end |
Returns
Type | Description |
---|---|
System.Double |
Bounds()
Get the bounding box for this curve.
Declaration
public abstract BBox3 Bounds()
Returns
Type | Description |
---|---|
BBox3 | A bounding box for this curve. |
Frames(Double, Double, Double)
Get a collection of Transforms which represent frames along this curve.
Declaration
public virtual Transform[] Frames(double startSetbackDistance = 0, double endSetbackDistance = 0, double additionalRotation = 0)
Parameters
Type | Name | Description |
---|---|---|
System.Double | startSetbackDistance | The offset from the start of the ICurve. |
System.Double | endSetbackDistance | The offset from the end of the ICurve. |
System.Double | additionalRotation | An additional rotation of the frame at each point. |
Returns
Type | Description |
---|---|
Transform[] | A collection of Transforms. |
GetSubdivisionParameters(Double, Double)
Get parameters to be used to find points along the curve for visualization.
Declaration
public abstract double[] GetSubdivisionParameters(double startSetbackDistance = 0, double endSetbackDistance = 0)
Parameters
Type | Name | Description |
---|---|---|
System.Double | startSetbackDistance | An optional setback from the start of the curve. |
System.Double | endSetbackDistance | An optional setback from the end of the curve. |
Returns
Type | Description |
---|---|
System.Double[] | A collection of parameter values. |
Length()
Calculate the length of the curve.
Declaration
public abstract double Length()
Returns
Type | Description |
---|---|
System.Double |
Mid()
The point at the middle of the curve's parameter space.
Declaration
public virtual Vector3 Mid()
Returns
Type | Description |
---|---|
Vector3 |
PointAtNormalized(Double)
Get a point along the curve at parameter u.
Declaration
public Vector3 PointAtNormalized(double u)
Parameters
Type | Name | Description |
---|---|---|
System.Double | u | A parameter along the curve between 0.0 and 1.0. |
Returns
Type | Description |
---|---|
Vector3 | A point along the curve at parameter u. |
ToPolyline(Int32)
Create a polyline through a set of points along the curve.
Declaration
public virtual Polyline ToPolyline(int divisions = 10)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | divisions | The number of divisions of the curve. |
Returns
Type | Description |
---|---|
Polyline | A polyline. |
TransformAtNormalized(Double)
Get a transform whose XY plane is perpendicular to the curve, and whose positive Z axis points along the curve.
Declaration
public Transform TransformAtNormalized(double u)
Parameters
Type | Name | Description |
---|---|---|
System.Double | u | The parameter along the curve between 0.0 and 1.0. |
Returns
Type | Description |
---|---|
Transform | A transform. |
Operators
Implicit(BoundedCurve to ModelCurve)
Convert a bounded curve to a model curve.
Declaration
public static implicit operator ModelCurve(BoundedCurve c)
Parameters
Type | Name | Description |
---|---|---|
BoundedCurve | c | The bounded curve to convert. |
Returns
Type | Description |
---|---|
ModelCurve |