Class vdCurve
- Namespace
- VectorDraw.Professional.vdFigures
- Assembly
- VectorDraw.Professional.dll
Abstract base class for planar curve entities and their common operations.
public abstract class vdCurve : vdFigure, IDisposable, IVDSerialise, IBaseObject
- Inheritance
-
vdCurve
- Implements
- Derived
- Inherited Members
Examples
// Example (using a concrete derived type):
var line = new VectorDraw.Professional.vdFigures.vdLine();
double len = line.Length();
var pts = line.GetSamplePoints(10, 0.0);
Remarks
The vdCurve class provides shared geometry, rendering and editing support for all curve-like entities (for example vdArc, vdCircle, vdEllipse, vdPolyline, vdLine, and vdRect).
Responsibilities include maintaining temporary sample points used for rendering, managing thickness and extrusion via Thickness and ExtrusionVector, handling the smoothing angle used for lighting (SmoothAngle), and exposing a set of virtual methods that derived types override to provide specific geometry behavior (for example Length(), Area(), GetSamplePoints(int, double), ToMesh(int) and parameterization helpers).
The class participates in serialization and deserialization routines and raises document modification events when its properties change. Many editing helpers are provided such as Divide(int), Measure(double), Trim(vdSelection, gPoint, out vdCurve, bool), Extend(vdSelection, gPoint, bool) and Break(gPoint, gPoint, out vdFigure).
Constructors
- vdCurve()
Initializes a new instance of the vdCurve object.
Fields
- mSamplePoints
Internally used to temporary keep an array of points that are used in order to draw the object.
Properties
- ExtrusionVector
Get/Set the 3D vector extrusion direction for the object.
- SmoothAngle
Get/Set the angle in degrees between 0 and 90 used to calculate normals for each vertex in each face when rendering a vdcurve object with thickness. Defines the maximun angle which is compared with the angles between the planes of neighboring vertical thickness faces in order to filter out the normals of the planes that will added in the average calculation.
- Thickness
Get/Set the object's thickness in Drawing Units.
Methods
- Area()
Get the enclosed area of the object in Drawing Units.
- Break(gPoint, gPoint, out vdFigure)
Removes the segment that is between the p1,p2 points.
- DeSerialize(DeSerializer, string, object)
This Function is called foreach field name of the vdCurve object when opening in vdml format.
- Dispose()
Releases all resources used by this object.
- Divide(int)
Divides the curve into NumSegments segments.
- Extend(vdSelection, gPoint)
Extends an object intersecting the closest object of the selection.
- Extend(vdSelection, gPoint, bool)
Extends an object intersecting the closest object of the selection.
- FindSmallestEnclosingCircle(out gPoint, out double)
Calculates and returns the center and the radius of the smallest circle that includes all the points of the curve.
- GetOutLine()
overrides the GetOutLine()
- GetSamplePoints(int, double)
Returns a list of points on the curve from the start to the end point of the curve.
- InitializeProperties()
Resets the properties of the vdCurve object to the Default values.
- IsParamValid(double)
Checks if the param is between the getStartParam and the getEndParam.
- Length()
Get the length of the object in Drawing Units
- MatchProperties(vdPrimary, vdDocument)
Matches all the common properties from an object and sets them to this object.
- Measure(double)
Divides the curve into segments with length equal to the passed parameter.
- PointOnCurve(gPoint, bool)
Checks if a point belongs to the curve.
- Serialize(Serializer)
This Function is called when saving the vdCurve object to vdml format.
- Split(gPoint, vdSelection)
Splits the Curve into two newlly created curves devided by the passed point.
- TestOffsetSide(gPoint)
Returns -1.0 if the point is on the left side accordingly to the polyline direction.
- ToMesh(int)
Converts the curve into a vdPolyface object.
- ToString()
Gets a System.String that represents the type of the vdCurve Object.
- Transformby(Matrix)
Transforms all geometrical properties of this object by the specified Matrix.
- Trim(vdSelection, gPoint, out vdCurve)
Trims an specific segment of the object.
- Trim(vdSelection, gPoint, out vdCurve, bool)
Trims an specific segment of the object.
- Update()
Updates the object after change of properties.
- geomMeasure(double)
Divides the curve into segments with length equal to the passed parameter.
- getClosestPointTo(gPoint)
Get The closest point belonging to the curve.
- getDistAtParam(double)
Get the length of the curve’s segment from the curve’s beginning to the point specified by param.
- getDistAtPoint(gPoint)
Get the length of the curve’s segment between the curve’s start point and point pt.
- getEndParam()
Get the parameter of the end of the curve
- getEndPoint()
Returns the endpoint of the curve in World Coordinate System(WCS)
- getFirstOffsetParam()
Get a value representing the getStartParam().
- getOffsetCurve(double)
Creates new objects at a specified distance and in the same plane with an existing object.
- getParamAtDist(double)
Gets the parameter of the object at the specific distance.
- getParamAtPoint(gPoint)
Get the parameter of the curve at a specified point.
- getPointAtDist(double)
Gets a point belonging to the curve at the specified distance.
- getPointAtParam(double)
Returns a point on the curve representing a param.
- getStartParam()
Get the parameter of the start of the curve.
- getStartPoint()
Returns the startpoint of the curve in World Coordinate System(WCS)
- getTangentAtPoint(gPoint, out gPoint)
Returns the Tangent Vector direction from a point on the curve in World Coordinate System