Prod.: Engine, ver.: 6012, ID: 60000436, Wish : A new command to create Torus

Wish : A new command to create Torus

Article60000436
TypeWish
ProductEngine
Version6012
Date Added3/4/2008
FixedYes [5/26/2008]
Submitted byRak, Roman
Keywords

Subject

A new command to create Torus

Summary

A new command to create Torus

Solution


Added in 6013.

vdCommandAction internal bool CmdTorus(object center, object MainRad, object TorusRad)
vdPolyface internal bool CreateTorus(gPoint center, double MainRad, double TorusRad,int CurveResolution)

A command to create a Torus.
center:A gPoint object that represents the center of the Torus or "USER",null so the user picks this point to the screen.
MainRad:A double value representing the Main radius of the Torus or "USER",null so the user picks the radius to the screen.
TorusRad:A double value representing the secondary radius of the torus or "USER",null so the user picks this distance to the screen.
returns:True if the operation was succesfull.
public bool CmdTorus(object center, object MainRad, object TorusRad)

e.g.: vdFramedControl.BaseControl.ActiveDocument.CommandAction.CmdTorus(null, null, null);

Creates s Torus using the passed parameters to this polyface.
center:The Center of the Torus in World Coordinate System.
MainRad:The Main Radius of the torus.
TorusRad:The Secondary Radius of the torus.
CurveResolution:If equals to 0 the default Curveresolution is used else you can specify a curve resolution.
returns:True if the operation was succesfull.
remarks:If the Secondary Radius is bigger than the Main radius then a sphere is created using the secondary radius.
Public bool CreateTorus(gPoint center, double MainRad, double TorusRad,int CurveResolution)

e.g.
vdPolyface face = new vdPolyface();
face.SetUnRegisterDocument(Document);
face.setDocumentDefaults();
face.CreateTorus(cen, MainRadius, SecRadius, 0);
face.ClearVerticies();