Class Contour
A continguous set of curves.
Examples
var r = 1.0;
// The reflection plane.
var t = new Transform();
t.Reflect(Vector3.YAxis);
var ctrlPoints = new List<Vector3>{
new Vector3(0, -r),
new Vector3(1.25, 1),
new Vector3(3.75, -1),
new Vector3(5, -r)
};
var l1 = new Bezier(ctrlPoints);
var a1 = new Arc(new Vector3(5, 0), r, -90.0, 90.0);
var l2 = (Bezier)l1.Transformed(t);
l2.ControlPoints.Reverse();
var a2 = new Arc(new Vector3(0, 0), r, 90.0, 270.0);
var contour = new Contour(new List<BoundedCurve> { l1, a1, l2, a2 });
Inheritance
System.Object
Contour
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()
Namespace: Elements.Geometry
Assembly: Hypar.Elements.dll
Syntax
[Obsolete("Please use IndexedPolycurve instead.")]
public class Contour : IEnumerable<Curve>, IEnumerable
Constructors
Contour(List<BoundedCurve>)
Construct a contour.
Declaration
public Contour(List<BoundedCurve> curves)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.List<BoundedCurve> | curves | A list of curves to create the contour. |
Methods
GetEnumerator()
Get the enumerator for the collection of curves.
Declaration
public IEnumerator<Curve> GetEnumerator()
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerator<Curve> |
ToPolygon()
Convert the contour to a polygon.
Declaration
public Polygon ToPolygon()
Returns
Type | Description |
---|---|
Polygon |
Explicit Interface Implementations
IEnumerable.GetEnumerator()
Declaration
IEnumerator IEnumerable.GetEnumerator()
Returns
Type | Description |
---|---|
System.Collections.IEnumerator |
Implements
System.Collections.Generic.IEnumerable<T>
System.Collections.IEnumerable