Description

NURB Cylinder


BobCAD API supports 2 different table key definition formats for flexibility in coding.

Keys

The following Keys can be created inside a table to form a cylinder:

Format 1 Keys

  • xOrigin - double value of the X coordinate of the bottom center of the cylinder
  • yOrigin - double value of the Y coordinate of the bottom center of the cylinder
  • zOrigin - double value of the Y coordinate of the bottom center of the cylinder

Format 2 Keys

  • Origin - a table consisting of 3 double positions representing X,Y,Z coordinates of the bottom center of the cylinder

Keys in both Format 1 and 2

  • Type="Cylinder" - Defines this table as a cylinder entity type
  • Height - the height of the cylinder
  • Radius - the radius of the cylinder

Example

Format 1


--Minimal definition

myCylinder = { Type="Cylinder", xOrigin=25.0, yOrigin=30.0, zOrigin=20.0, Height=50.0, Radius=30.0 }


--Complete definition

myCylinder = { CmdName="My Cylinder", Type="Cylinder", xOrigin=25.0, yOrigin=30.0, zOrigin=20.0, Height=50.0, Radius=30.0, Layer="Layer Name", Color="Blue" }


Format 2


--Minimal definition

myCylinder = { Type="Cylinder", Origin={0.0,0.0,0.0}, Height=50.0, Radius=30.0 }


--Complete definition

myCylinder = { CmdName="My Cylinder", Type="Cylinder", Origin={0.0,0.0,0.0}, Height=50.0, Radius=30.0, Layer="Layer Name", Color="Blue" }