User Tools

Site Tools


custom

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
custom [2015/01/04 21:37]
jr
custom [2018/04/01 14:41] (current)
Line 29: Line 29:
 //void ComputeCenter()//​ - Add code to compute the center of rotation. ​ If this function does not exist, a default function will attempt to computer the center based on cross-sections and the Origin parameter. //void ComputeCenter()//​ - Add code to compute the center of rotation. ​ If this function does not exist, a default function will attempt to computer the center based on cross-sections and the Origin parameter.
  
- ​Simple Example+__Simple Example__
  
 Lets say you need a cone shape with two parameters, height and diameter, controlling the shape. ​ First create a file called “Cone.vsppart” in the CustomScript directory. ​ To create the parameters, add the following code to Init(): Lets say you need a cone shape with two parameters, height and diameter, controlling the shape. ​ First create a file called “Cone.vsppart” in the CustomScript directory. ​ To create the parameters, add the following code to Init():
Line 36: Line 36:
  string height ​  = AddParm( PARM_DOUBLE_TYPE,​ "​Height",​ "​Design"​ );  string height ​  = AddParm( PARM_DOUBLE_TYPE,​ "​Height",​ "​Design"​ );
  SetParmValLimits( height, 4.0, 0.001, 1.0e12 );  SetParmValLimits( height, 4.0, 0.001, 1.0e12 );
-    SetParmDescript( height, "​Height of Cone" );+  ​SetParmDescript( height, "​Height of Cone" );
  
  string diameter = AddParm( PARM_DOUBLE_TYPE,​ "​Diameter",​ "​Design"​ );  string diameter = AddParm( PARM_DOUBLE_TYPE,​ "​Diameter",​ "​Design"​ );
  SetParmValLimits( diameter, 8.0, 0.001, 1.0e12 );  SetParmValLimits( diameter, 8.0, 0.001, 1.0e12 );
-    SetParmDescript( diameter, "​Diameter of Cone" );+  ​SetParmDescript( diameter, "​Diameter of Cone" );
  
  
custom.1420436254.txt.gz · Last modified: 2018/04/01 14:40 (external edit)