70001493 I would like to have a vdFigure for a large amount of points

Article 70001493
Type Wish
Product Engine
Version 8001
Date Added 2/6/2019
Fixed 8.8002.0.1 (2/21/2019)
Submitted by Andrea Faoro


I would like to have a vdFigure for a large amount of points (point cloud)


In version 8001 we added a new vdFigure in our VectorDraw Developers Framework named vdPointCloud.
This object can be used by the developer to load a large amount of points.
Note that all points have the same color so if you have multiple color points these point clouds have to be separated into different vdPointCloud objects.
The points do not follow the PointStyle of the Document for rendering speed reasons.
Explode method will return a collection of vdPoint objects that will follow the PointStyle of the Document.
Exporting the object to any format other than vdml/vdcl will be exploded.
The vdPointCloud has the following properties

int digitQuality : Pixels around the center to ignore points.
int PointSize : The size of draw cross in pixels.
Matrix ECSMatrix : ECSMatrix of the points used for transformations like move,scale , rotate.
gPoints points : Get/Set the points collection of the points.

Sample code to create a vdPointCloud in c#

int size = 1000000; //prompts to set the number of points.Enter for default 1000000 points doc.Prompt("Number of points <" + size.ToString() + ">:"); doc.ActionUtility.SetAcceptedStringValues(null, size); StatusCode scode = doc.ActionUtility.getUserInt(out size); doc.Prompt(null); if (scode != StatusCode.Success) return; size = Math.Abs(size); if (size == 0) size = 1000000; gPoints pts = new gPoints(size); int OneSize = (int)Math.Sqrt(size); for (int i = 0; i < OneSize; i++) { for (int j = 0; j < OneSize; j++) { pts.Add(new gPoint(i, j, 0)); } } //Create a new pointCloud with calculated points vdPointCloud mpts = new vdPointCloud(doc, pts); //add the pointCloud to the model entities collection doc.Model.Entities.AddItem(mpts); //send a redraw doc.Redraw(true);

Send comments on this topic.