Description

NURB cube 


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 cube:

Format 1 Keys

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

Format 2 Keys

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

Keys in both Format 1 and 2

  • Type="Cube" - Defines this table as a cube entity type
  • Length - double value of the length of the cube in the X direction
  • Width - double value of the width of the cube in the Y direction
  • Height - double value of the height of the cube in the Z direction

Example

Format 1


--Minimal definition

myCube = { Type="Cube", xOrigin=25, yOrigin=30, zOrigin=20, Length=50, Width=30, Height=60 }


--Complete definition

myCube = { CmdName="My Cube", Type="Cube", xOrigin=25, yOrigin=30, zOrigin=20, Length=50, Width=30, Height=60, Layer="Layer Name", Color="Blue" }


Format 2


--Minimal definition

myCube = { Type="Cube", Origin={0.0,0.0,0.0}, Length=50, Width=30, Height=60 }


--Complete definition

myCube = { CmdName="My Cube", Type="Cube", Origin={0.0,0.0,0.0}, Length=50, Width=30, Height=60, Layer="Layer Name", Color="Blue" }