Entity Types
There are a variety of entity types supported by the BobCAD-CAM CAD system that can be created via the Lua scripting API.
Each entity definition can be though of containing 3 different sets of information; the entity definition, the entity attributes, and a transform matrix.
Every BobCAD entity type supports the same entity attributes and transform matrix keys that are described in this topic unless otherwise noted.
1. Entity Definition - Each specific entity has it's own type and parameters which can be found by clicking the links below for the specific entity type:
IMPORTANT: All coordinate values via the Lua API are considered to be in millimeters. The scaling will happen automatically to the document unit.
2. Entity Attributes - every entity has attribute definitions using the following key names in the table:
- CmdName – The name that will be displayed in the Undo/Redo list – This can be excluded if using the Bcc.StartUndo() and Bcc.EndUndo()
- Color – the entity color can be specified using either the color name or the hexadecimal color value - If this parameter is excluded, the entity will be created in the systems entity color for that type.
- Color = “Red”
- Color = “#E400FFFF”
For more information on defining colors, please see the Microsoft Colors Class documentation on available colors. - Layer – The name of the layer to create the entity on
- Can be an existing layer or if the layer does not exist it will be created
- if this is omitted the entity is created on the currently active layer in BobCAD
- LineStyle (or PointStyle) - the attribute of the entity to be solid, dashed, etc (or various point styles for the point entity). Please see the specific entity type for further information.
3. Transformation Matrix - The matrix that will be multiplied by the entity parameters to transform the entity
- TransformMatrix - A 4x4 matrix can be specified to transform the given entities coordinates
- TransformMatrix = {{1,0,0,0},{0,1,0,0},{0,0,1,0},{0,0,0,1}}