Class vdPolyline
- Namespace
- VectorDraw.Professional.vdFigures
- Assembly
- VectorDraw.Professional.dll
Represents a polyline figure composed of straight segments and arcs (via bulges ),
or a spline-based curve depending on the SPlineFlag setting.
Provides geometry operations such as union, combine, offset, fillet, chamfer, explode and area/length calculations.
public class vdPolyline : vdCurve, IDisposable, IVDSerialise, IvdHatchFigure, IBaseObject
- Inheritance
-
vdPolyline
- Implements
- Inherited Members
Examples
// Create a simple open polyline and add three vertices
var pl = new vdPolyline(doc);
pl.VertexList.Add(new Vertex(0,0,0));
pl.VertexList.Add(new Vertex(10,0,0));
pl.VertexList.Add(new Vertex(10,10,0));
pl.Flag = VdConstPlineFlag.PlFlagOPEN;
doc.Model.Entities.AddItem(pl);
Remarks
A vdPolyline stores its geometry as a collection of Vertex entries in VertexList. — Depending onSPlineFlag, the entity may behave as:
- standard polyline segments (bulges/arcs/lines),
- control-point spline, or
- fitted spline using start/end tangents and optional knots/weights.
Width information can be supplied per segment via Widths; if absent the object's PenWidth
is used. Hatch behavior is controlled through HatchProperties.
Geometry returned by methods such as GetSamplePoints(int, double), getOffsetCurve(double),
and Explode().
Mutating operations raise document events (for example vdDocument.OnBeforeModifyObject / vdDocument.OnAfterModifyObject)
when the object is document-registered.
Constructors
- vdPolyline()
Initializes a new instance of the vdPolyline object.
- vdPolyline(vdDocument)
Initializes a new instance of the vdPolyline object and registers it to the passed Document.
- vdPolyline(vdDocument, Vertexes)
Initializes a new instance of the vdPolyline object and registers it to the passed Document.
- vdPolyline(vdDocument, gPoints)
Initializes a new instance of the vdPolyline object and registers it to the passed Document.
Properties
- BoundingBox
Gets the Bounding Box of the vdPolyline object in WorldCoordinate System.
- ECSMatrix
Gets the transformation Matrix that converts coordinates from the object's local coordinate system (object coordinate system, OCS) to the World Coordinate System (WCS).
- EndTangent
Get/Set the end Tangent in WCS of the vdPolyline object used when SPlineFlag is SFlagFITTING .
- Flag
Get/Set a flag indicating if the polyline is closed or open.
- HatchProperties
Get/Set the hatch properties of the vdPolyline object.
- Knots
Get/Set the Knots of the vdPolyline object used when SPlineFlag is not SFlagSTANDARD.
- PLineDrawFlag
Get/Set a value that represents how Widths are drawn.
- SPlineFlag
Get/Set the Spline flag of the vdPolyline object representing which type of Spline will be used.
- StartTangent
Get/Set the start Tangent in WCS of the vdPolyline object used when SPlineFlag is SFlagFITTING .
- VertexList
Get/Set the vertex list of the vdPolyline object.Bulges are relative to Entity CS.
- Weights
Get/Set the weights of the vdPolyline object used when SPlineFlag is not SFlagSTANDARD.
- Widths
Get/Set the widths of the vdPolyline object used when SPlineFlag is not SFlagSTANDARD.
Methods
- AppendVertex(Vertex)
Adds a Vertex at the VertexList of the vdPolyline object.
- Area()
Calculates the enclosed area of the vdPolyline object in Drawing Units relative to Entity CS.
- Area(bool)
Get the area of the plane that consists from the points of the collection.
- AutoBulge(double)
This method will try to autodetect bulges from points that are close to each other and substitute them wityh a bulged arc.
- Break(gPoint, gPoint, out vdFigure)
Breaks the vdPolyline into two or one subpolylines.Deletes the part that is between p1,p2.
- BulgeAtParam(double, out double, out double)
Calculates the bulges at a given param of the vdPolyline object.
- CalculateControlPoints()
Calculates the control points of the vdPolyline object in WCS.
- CalculateKnots()
Calculates the Knots of the vdPolyline object.
- Chamfer(double, double, ChamferMethodEnum, bool, out vdEntities)
Chamfers all edges of the polyline using the passed parameters. Chamfer in Splines is not supported.
- ChamferAtIndex(int, double, double, ChamferMethodEnum, bool, vdEntities)
Chamferes one edge of the polyline at the given index.Chamfer in Splines is not supported.
- Combine(vdCurve, CombineMode)
Create a combination between this polyline object and a vdCurve object.
- Combine(vdCurve, CombineMode, double)
Create a combination between this polyline object and a vdCurve object.
- CreateBulge(gPoint, gPoint, gPoint)
Creates a bulge from the given points
- DeSerialize(DeSerializer, string, object)
This Function is called foreach field name of the vdPolyline object when opening in vdml format.
- Draw(vdRender)
Called in order to draw the object in a specified vdRender object.
- Explode()
Explodes the vdPolyline object into subentities vdArcs and/or vdLines.If the polyline has HatchProperties then the explode method creates a vdPolyhatch object.
- Fillet(double, ref vdCurve, gPoint, gPoint, out vdArc)
Fillets the edges between this polyline and arcs and lines.
- FilletRadius(double)
Inserts fillet arcs at each vertex of a polyline where two line segments meet if the specified radius is enough small to feet between the lines.
- FilletRadiusAtIndex(double, int)
Inserts fillet arcs at vertex of specified index of a polyline where two line segments meet if the specified radius is enough small to feet between the lines
- GetBoundaryPolyFromPoint(gPoint, double)
Search the ActiveLayout Entities which are visible in ActiveLayout render to find a closed perigram around the selected point and updates this polyline's VertexList.
- GetBoundaryPolyFromPoint(gPoint, double, bool, Keys)
Search the ActiveLayout Entities which are visible in ActiveLayout render to find a closed perigram around the selected point and updates this polyline's VertexList.
- GetBoundaryPolyFromPoint(gPoint, double, Keys)
Search the ActiveLayout Entities which are visible in ActiveLayout render to find a closed perigram around the selected point and updates this polyline's VertexList.
- GetCompareHash()
Returns a unique 32 bit integer value according to the object type and its properties values
- GetFigureAtSegmentIndex(int)
Returns a vdLine or a vdArc object at a specified index of the vdPolyline object.
- GetGripPoints()
A function returning the grip points of the object.
- GetPolygonsAreas(double)
This method is used for area calculation , devides the area of the polyline into small segments that can be used to calculate and demonstrate the area of the polyline.
- GetSamplePoints(int, double)
Returns a list of points on the vdPolyline object from the start to the end point of the curve.
- GetSegmentAtPoint(gPoint)
Get a vdCurve segment(line or arc) that belongs to a polyline at the given closest point.
- GetValidGripPointsItems()
Returns the number of valid grip points of the object. Must return the same number of points as the GetGripPoints() method.
- HasBulges()
Checkes if any of the vertexes of the vdPolyline object has bulge value not equal to 0.0.
- HasWidths()
Returns true if and only if any of the segments in this Polyline entity have start and end widths and the SPlineFlag is SFlagSTANDARD
- InitializeProperties()
Resets the properties of the vdPolyline object to the Default values.
- InsertPointAtParam(double)
Adds a point to the vdPolyline object at the point indicated by the param.
- InsertVertex(int, Vertex)
Inserts a vertex at a specific index of the vdPolyline object.
- InternalSetOwner(vdBaseObject)
Internally used only.
Set the object owner
- IntersectWith(vdFigure, VdConstInters, gPoints)
Finds the intersection points of an object with another object.
- Is2D()
Checks if all points of the vdPolyline object belong to the same plane.
- IsClockwise()
Returns true if the points of the vdPolyline object are clockwise.
- JoinEntities(vdSelection, double)
Joins vdArcs, vdLines and vdPolylines into this object.
- JoinEntities(vdSelection, double, bool)
Joins vdArcs, vdLines and vdPolylines into this object.
- JoinEntity(vdCurve, double)
Joins a vdLine,vdArc,vdPolyline to a vdPolyline object.
- JoinEntity(vdCurve, double, bool)
Joins a vdLine,vdArc,vdPolyline to a vdPolyline object.
- Length()
Calculates the length of the vdPolyline object.
- MatchProperties(vdPrimary, vdDocument)
Matches all the common properties from an object and sets them to this object.
- MoveGripPointsAt(Int32Array, double, double, double)
This function is intended to be called during a grip edit of the object.
- PointOnCurve(gPoint, bool)
Returns if a point belongs to a vdPolyline object.
- Reverse()
Gets the reversed Vertex list of the vdPolyline object.
- SegmentIndexFromParam(double)
Returns the segment of the vdPolyline object that the param belongs.
- SegmentIndexFromPoint(gPoint, double)
Find the segment of a vdPolyline object that a point belongs. If the point passed in this function is not on the polyline, then the closest to this point segment will returned.
- SelfIntersectPoints()
Calculate and return the self intersection points if they exist.
- Serialize(Serializer)
This Function is called when saving the vdPolyline object to vdml format.
- Split(gPoint, vdSelection)
Splits the Polyline into two newlly created Polylines devided by the passed point.
- SplitPolylineWithPoints(gPoints)
Culculate the segments that this polyline object is splitting by passed points
- SubtractSimple(vdCurve, double)
Subtract between this object and an other one of vdPolyline, vdCircle or vdRect type.
- TestOffsetSide(gPoint)
Returns -1.0 if the point is on the left side accordingly to the polyline direction.
- ToMesh(int)
Converts the vdPolyline into a vdPolyface object.
- ToString()
Gets a System.String that represents the type of the vdPolyline Object.
- Transformby(Matrix)
Transforms all geometrical properties of this object by the specified Matrix.
- Union(vdFigure)
Joins the Polyline with an other vdFigure object.
- UnionEx(vdCurves, bool)
Try to Join the vdCurve objects of a collection with this object.
- UnionEx(vdSelection, bool)
Try to Join the vdFigure objects of a selection with this object.
- UnionEx(vdFigure, bool)
Joins the Polyline with an other vdFigure object.
- Update()
Updates the object after change of properties.
- getClosestPointTo(gPoint)
Get The closest point belonging to the curve.
- getDistAtParam(double)
Get the length of the vdPolyline’s segment from the vdPolyline’s beginning to the point specified by param.
- getDistAtPoint(gPoint)
Get the length of the vdPolyline’s segment between the vdPolyline’s start point and point pt.
- getEndParam()
Return the end parameter for the vdPolyline object.
- getEndPoint()
Get the last point of the polyline.
- getFirstOffsetParam()
Get a value representing the start of the vdPolyline object.
- getOffsetCurve(double)
Creates new objects at a specified distance and in the same plane with the existing vdPolyline object.
- getOffsetCurveEx(double, int, double)
Creates new objects at a specified distance from the existing vdPolyline object.
Note this method uses the GetSamplePoints(int, double) of this polyline to offset to passed distance
Call the getOffsetCurve(double) instead in order to use the VertexList of this polyline object
- getOsnapPoints(Matrix, OsnapMode, gPoint, gPoint, int, OsnapPoints)
Overrrides the getOsnapPoints(Matrix, OsnapMode, gPoint, gPoint, int, OsnapPoints).
- getParamAtDist(double)
Gets the parameter of the object at the specific distance.
- getParamAtPoint(gPoint)
Get the parameter of the vdPolyline at a specified point.
- getPointAtDist(double)
Gets a point belonging to the vdPolyline at the specified distance.
- getPointAtParam(double)
Returns a point on the vdPolyline representing a param.
- getSplineData(out int, out gPoints, out DoubleArray, out DoubleArray, out Vector, out Vector, out gPoints)
Returns the data for this Spline entity.
- getSplineData(out gPoints, out DoubleArray, out DoubleArray, out Vector, out Vector)
Returns the data for this Spline entity.
- getSplineData(out gPoints, out DoubleArray, out DoubleArray, out Vector, out Vector, out gPoints)
Returns the data for this Spline entity.
- getStartParam()
Returns the start parameter for the vdPolyline object.
- getStartPoint()
Get the first point of the polyline.
- getSubPoly(double, double)
Returns the sub polyline between two distances from the beginning this object
- setEndWidthAt(int, double)
Sets the end width for the specified segment of this Polyline entity.
- setStartWidthAt(int, double)
Sets the start width for the specified segment of this Polyline entity.
- setWidthsAt(int, double, double)
Sets the start and end widths for the specified segment of this Polyline entity.