Skip to main content

Introduction to Scripting

LuminiCAD’s scripting interface lets you create precise models using text commands. It’s especially useful for:
  • Creating patterns and arrays
  • Building complex shapes from simple ones
  • Making parametric designs
  • Automating repetitive tasks

Using Variables

Commands can be assigned to variables for later use:
Use the $ prefix when referencing variables in subsequent commands

Basic Commands

Creating Simple Shapes

Advanced Operations

Extrusion and Sweeping

Boolean Operations

Creating Complex Shapes

Wire Creation

Organization with Folders

Practical Examples

Creating a Patterned Cylinder

Building a Flanged Connection

When creating complex models, break down your design into simple shapes first, then combine them using boolean operations.

Best Practices

  1. Organization
    • Use folders to group related components
    • Follow a consistent naming convention
    • Break complex shapes into manageable parts
  2. Efficiency
    • Create patterns using REVOLVE or SWEEP when possible
    • Use boolean operations to combine shapes
    • Reuse common components through folders
  3. Troubleshooting
    • Check your coordinates and measurements
    • Verify normal directions for circles and profiles
    • Ensure boolean operations have valid shapes
Remember that all measurements are in millimeters (mm) and angles in degrees.