Table of Contents

Class vdLine

Namespace
VectorDraw.Professional.vdFigures
Assembly
VectorDraw.Professional.dll

Represents a straight line curve within the VectorDraw document model. The vdLine class models a 3D line segment defined by a start and an end point and provides geometry, editing and rendering operations such as length calculation, intersection tests, splitting, fillet/chamfer operations and conversion to polyline or mesh representations.

public class vdLine : vdCurve, IDisposable, IVDSerialise, IBaseObject
Inheritance
vdLine
Implements
Inherited Members

Examples

// create and add a line to a document
var line = new vdLine(doc, new gPoint(0.0, 0.0, 0.0), new gPoint(10.0, 0.0, 0.0));
doc.Model.Entities.AddItem(line);

Remarks

vdLine inherits from vdCurve. Coordinates are expressed in the World Coordinate System (WCS).

Use constructors that accept a vdDocument to register new instances with a document; otherwise create standalone instances and register them later using document APIs.

Constructors

vdLine()

Initializes a new instance of the vdLine object.

vdLine(gPoint, gPoint)

Initializes a new instance of the vdLine object.

vdLine(vdDocument)

Initializes a new instance of the vdLine object and registers it to the passed Document.

vdLine(vdDocument, gPoint, gPoint)

Initializes a new instance of the vdLine object and registers it to the passed Document.

Properties

BoundingBox

Gets the Bounding Box of the vdLine 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).

EndPoint

Get/Set the end point of the vdLine object.

StartPoint

Get/Set the start point of the vdLine object.

Methods

AreSegmentEqual(object)

Returns True if StartPoint , EndPoint are equal using Globals default equalities.

Area()

Returns 0.0.

AsPolyline()

Create a vdPolyline object with the same properties as the this object.

Break(gPoint, gPoint, out vdFigure)

Breaks the vdLine into two or one sublines.Deletes the part that is between p1,p2.

ChamferLines(vdLine, vdLine, out vdLine, ChamferMethodEnum, bool, double, double)

Chamfers the two passed lines using the passed parameters.

DeSerialize(DeSerializer, string, object)

This Function is called foreach field name of the vdLine object when opening in vdml format.

Draw(vdRender)

Called in order to draw the object in a specified vdRender object.

Fillet(double, ref vdCurve, gPoint, gPoint, out vdArc)

Fillets the edges between arcs and lines.

GetCompareHash()

Returns a unique 32 bit integer value according to the object type and its properties values

GetGripPoints()

A function returning the grip points of the object.

GetSamplePoints(int, double)

Returns a list of points on the vdLine object from the start to the end point of the line.

GetValidGripPointsItems()

Returns the number of valid grip points of the object. Must return the same number of points as the GetGripPoints() method.

InitializeProperties()

Resets the properties of the vdLine object to the Default values.

IntersectWith(vdFigure, VdConstInters, gPoints)

Finds the intersection points of an object with another object.

Length()

Calculates the length of the vdLine 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 vdLine object.

PointOnCurve(gPoint, bool)

Checks if a point belongs to the line.

Serialize(Serializer)

This Function is called when saving the vdLine object to vdml format.

Split(gPoint, vdSelection)

Splits the Line into two newlly created lines devided by the passed point.

TestOffsetSide(gPoint)

Tests if a point is left or right a vdLine object.

ToMesh(int)

Converts the vdLine into a vdPolyface object.

ToString()

Gets a System.String that represents the type of the vdLine Object.

Transformby(Matrix)

Transforms all geometrical properties of this object by the specified Matrix.

getDistAtParam(double)

Get the length of the line’s segment from the line’s beginning to the point specified by param.

getDistAtPoint(gPoint)

Get the length of the line’s segment between the line’s start point and point pt.

getEndParam()

Return the end parameter for the vdLine object.

getEndPoint()

Gets the end point of the Line.

getOffsetCurve(double)

Creates a new vdLine object at a specified distance and in the same plane with the existing 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)

Returns the parameter of the vdLine object at the specified point.

getPointAtDist(double)

Gets a point belonging to the line at the specified distance.

getPointAtParam(double)

Get a point of the vdLine object at a given param distance.

getStartParam()

Returns the start parameter for the vdLine object.

getStartPoint()

Gets the start point of the Line.

See Also