Table of Contents

Method MeasureCurve

Namespace
vdWebLibrary
Assembly
JsPropertiesExtractor.dll

MeasureCurve(object, double)

Calculates an array of points over the entity, where each point has a distance equal to length from the previous point.

public object[] MeasureCurve(object entity, double length)

Parameters

entity object

An entity of the following type : vdLine, vdPolyline, vdRect, vdCircle, vdArc, vdEllipse

length double

The distance lenght used to place each segment

Returns

object[]

Examples

divide an entity to 10 segments

var circle = vdcanvas.AddCircle([0, 0, 0], 2);
 var overalllength = vdcanvas.GetEntityLength(circle);
 var segmentlength = overalllength / 10;
 var pts = vdcanvas.MeasureCurve(circle, segmentlength);
 var pline = vdcanvas.AddPolyline(pts);//add a new polyline with created points
 vdcanvas.redraw();