Class PolyLine2d
Namespace: g3
Assembly: cs.temp.dll.dll
Syntax
public class PolyLine2d : IEnumerable<Vector2d>, IEnumerable
Constructors
PolyLine2d()
Declaration
PolyLine2d(Polygon2d, Boolean)
Declaration
public PolyLine2d(Polygon2d copy, bool bDuplicateFirstLast)
Parameters
PolyLine2d(PolyLine2d)
Declaration
public PolyLine2d(PolyLine2d copy)
Parameters
PolyLine2d(Vector2d[])
Declaration
public PolyLine2d(Vector2d[] v)
Parameters
PolyLine2d(VectorArray2d)
Declaration
public PolyLine2d(VectorArray2d v)
Parameters
PolyLine2d(IEnumerable<Vector2d>)
Declaration
public PolyLine2d(IEnumerable<Vector2d> copy)
Parameters
PolyLine2d(IList<Vector2d>)
Declaration
public PolyLine2d(IList<Vector2d> copy)
Parameters
Fields
Timestamp
Declaration
Field Value
vertices
Declaration
protected List<Vector2d> vertices
Field Value
Properties
ArcLength
Declaration
public double ArcLength { get; }
Property Value
Bounds
Declaration
public AxisAlignedBox2d Bounds { get; }
Property Value
End
Declaration
public Vector2d End { get; }
Property Value
Item[Int32]
Declaration
public Vector2d this[int key] { get; set; }
Parameters
Type |
Name |
Description |
Int32 |
key |
|
Property Value
Length
Declaration
[Obsolete("This method name is confusing. Will remove in future. Use ArcLength instead")]
public double Length { get; }
Property Value
Start
Declaration
public Vector2d Start { get; }
Property Value
VertexCount
Declaration
public int VertexCount { get; }
Property Value
Vertices
Declaration
public ReadOnlyCollection<Vector2d> Vertices { get; }
Property Value
Type |
Description |
ReadOnlyCollection<Vector2d> |
|
Methods
AppendVertex(Vector2d)
Declaration
public virtual void AppendVertex(Vector2d v)
Parameters
AppendVertices(IEnumerable<Vector2d>)
Declaration
public virtual void AppendVertices(IEnumerable<Vector2d> v)
Parameters
DistanceSquared(Vector2d)
Declaration
public double DistanceSquared(Vector2d point)
Parameters
Returns
GetBounds()
Declaration
public AxisAlignedBox2d GetBounds()
Returns
GetEnumerator()
Declaration
public IEnumerator<Vector2d> GetEnumerator()
Returns
GetNormal(Int32)
Declaration
public Vector2d GetNormal(int i)
Parameters
Type |
Name |
Description |
Int32 |
i |
|
Returns
GetTangent(Int32)
Declaration
public Vector2d GetTangent(int i)
Parameters
Type |
Name |
Description |
Int32 |
i |
|
Returns
MakeBoxSpiral(Vector2d, Double, Double)
Declaration
public static PolyLine2d MakeBoxSpiral(Vector2d center, double len, double spacing)
Parameters
Returns
Reverse()
Declaration
public virtual void Reverse()
Segment(Int32)
Declaration
public Segment2d Segment(int iSegment)
Parameters
Type |
Name |
Description |
Int32 |
iSegment |
|
Returns
SegmentItr()
Declaration
public IEnumerable<Segment2d> SegmentItr()
Returns
Simplify(Double, Double, Boolean)
Declaration
public virtual void Simplify(double clusterTol = 0.0001, double lineDeviationTol = 0.01, bool bSimplifyStraightLines = true)
Parameters
simplifyDP(Double, Vector2d[], Int32, Int32, Boolean[])
Declaration
protected static void simplifyDP(double tol, Vector2d[] v, int j, int k, bool[] mk)
Parameters
Declaration
public PolyLine2d Transform(ITransform2 xform)
Parameters
Returns
Trim(Double)
make polyline shorter by removing each_end_dist from start and end
Declaration
public bool Trim(double each_end_dist)
Parameters
Type |
Name |
Description |
Double |
each_end_dist |
|
Returns
TrimEnd(Double)
make polyline shorter by dist length, by removing from end
Declaration
public bool TrimEnd(double dist)
Parameters
Type |
Name |
Description |
Double |
dist |
|
Returns
TrimStart(Double)
make polyline shorter by dist length, by removing from front
Declaration
public bool TrimStart(double dist)
Parameters
Type |
Name |
Description |
Double |
dist |
|
Returns
VertexOffset(Double)
Offset each point by dist along vertex normal direction (ie tangent-perp)
Declaration
public void VertexOffset(double dist)
Parameters
Type |
Name |
Description |
Double |
dist |
|
Implements