Sphere
Description
NURB sphere
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 sphere:
Format 1 Keys
- xOrigin - double value of the X coordinate of the center of the sphere
- yOrigin - double value of the Y coordinate of the center of the sphere
- zOrigin - double value of the Y coordinate of the center of the sphere
Format 2 Keys
- Origin - a table consisting of 3 double positions representing X,Y,Z coordinates of the center of the sphere
Keys in both Format 1 and 2
- Type="SplineCurve" - Defines this table as a spline entity type
- Radius - the radius of the defined sphere
Example
Format 1
--Minimal definition
mySphere = { Type="Sphere", xOrigin=25.0, yOrigin=30.0, zOrigin=20.0, Radius=30.0 }
--Complete definition
mySphere = { CmdName="My Sphere", Type="Cylinder", xOrigin=25.0, yOrigin=30.0, zOrigin=20.0, Radius=30.0, Layer="Layer Name", Color="Blue" }
Format 2
--Minimal definition
mySphere = { Type="Sphere", Origin={0.0,0.0,0.0}, Radius=30.0 }
--Complete definition
mySphere = { CmdName="My Sphere", Type="Cylinder", Origin={0.0,0.0,0.0}, Radius=30.0, Layer="Layer Name", Color="Blue" }