Prod.: Engine, ver.: 6021, ID: 60001583, Wish : Spline Command

Wish : Spline Command

Article60001583
TypeWish
ProductEngine
Version6021
Date Added12/23/2011
FixedYes [1/5/2012]
Submitted bysudipta.datta
Keywords

Subject

Spline Command

Summary

Spline Command

Solution


Added in 6022

We added two Spline commands as following.

summary Creates an SPline polyline.
param name="ParamList" A collection of Vertexes object in User Coordinate System (UCS) or "USER"/null so the user picks the points to the screen.
param name="flag" The type of the spline polyline.
returns True if the command was succesfull.
remarks If the flag parameter is STANDARD then the command is called.
                If the type is Fitting then after the selection of the points the user is asked for the Start and end Tangent. If the polyline is closed fitting then only one Tangent is required.
public bool CmdSpline(object ParamList, VectorDraw.Professional.Constants.VdConstSplineFlag flag)

summary Creates an Spline polyline. The user is prompted to select the type of the spline first (fitting , quadratic or controlpoints).
param name="ParamList"A collection of Vertexes object in User Coordinate System (UCS) or "USER"/null so the user picks the points to the screen.
returns True if the command was succesfull.
public bool CmdSpline(object ParamList)

The second CmdSpline(object) is basically the command that we use in our applications SimpleCad and vdfCAD. When the command starts the user is prompted to select the type of the spline (fitting , quadratic or controlpoints having fitting the default selection.
The default selection means that if the user simply presses enter the fitting will be his selection.
Also while VectorDraw is waiting for the string selection the user can also pick a point. If this occurs then fitting will be his selection and the point that he clicked will be the first point of the fitting spline that is going to be drawn.


Code Example:
Vertexes verts = new Vertexes();
verts.Add(new Vertex(0.0, 0.0, 0.0));
verts.Add(new Vertex(10.0, 10.0, 0.0));
verts.Add(new Vertex(20.0, 10.0, 0.0));
verts.Add(new Vertex(30.0, 15.0, 0.0));
verts.Add(new Vertex(30.0, 0.0, 0.0));
verts.Add(new Vertex(20.0, -15.0, 0.0));
vdFramedControl.BaseControl.ActiveDocument.CommandAction.CmdSpline(verts, VectorDraw.Professional.Constants.VdConstSplineFlag.SFlagFITTING);

OR

vdFramedControl.BaseControl.ActiveDocument.CommandAction.CmdSpline(null);