# Model Library
Source: https://docs.luminicad.com/features/model-library
Access and manage pre-built components and templates
🚧 **Coming Soon**
The Model Library feature is currently in development and will be available in an upcoming release.
##
# Scripting Guide
Source: https://docs.luminicad.com/features/scripting
Create complex models using LuminiCAD scripting commands
## 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:
```text Variables theme={null}
base = CREATE RECTANGLE ORIGIN 0 0 0 SIZE 100 50
CREATE PRISM SECTION $base LENGTH 200
edge1 = CREATE LINE FROM 0 0 0 TO 100 0 0
arc1 = CREATE ARC CENTER 100 0 0 START 100 10 0 NORMAL 0 0 1 ANGLE 90
```
```text Using Variables theme={null}
// Create and store a base circle
circle1 = CREATE CIRCLE CENTER 0 0 0 RADIUS 25 NORMAL 0 0 1
// Use the stored circle to create a prism
CREATE PRISM SECTION $circle1 LENGTH 100
// Create a cutting tool
cutter = CREATE CIRCLE CENTER 20 0 0 RADIUS 5 NORMAL 1 0 0
CREATE PRISM SECTION $cutter LENGTH 60
```
Use the \$ prefix when referencing variables in subsequent commands
## Basic Commands
### Creating Simple Shapes
```text Box theme={null}
CREATE BOX ORIGIN x y z SIZE dx dy HEIGHT dz
# Example
CREATE BOX ORIGIN 0 0 0 SIZE 100 50 HEIGHT 75
```
```text Circle theme={null}
CREATE CIRCLE CENTER x y z RADIUS r NORMAL nx ny nz
# Example
CREATE CIRCLE CENTER 0 0 0 RADIUS 50 NORMAL 0 0 1
```
```text Arc theme={null}
CREATE ARC CENTER x y z START x y z NORMAL x y z ANGLE a
# Example
CREATE ARC CENTER 0 0 0 START 100 0 0 NORMAL 0 0 1 ANGLE 90
```
```text Line theme={null}
CREATE LINE FROM x1 y1 z1 TO x2 y2 z2
# Example
CREATE LINE FROM 0 0 0 TO 100 0 0
```
```text Rectangle theme={null}
CREATE RECTANGLE ORIGIN x y z SIZE dx dy
# Example
CREATE RECTANGLE ORIGIN 0 0 0 SIZE 100 50
```
```text Polygon theme={null}
CREATE POLYGON POINTS x1 y1 z1 x2 y2 z2 ... xn yn zn
# Example
CREATE POLYGON POINTS 0 0 0 100 0 0 100 100 0 0 100 0
```
## Advanced Operations
### Extrusion and Sweeping
```text Prism theme={null}
CREATE PRISM SECTION [section-command] LENGTH length
# Example
CREATE PRISM SECTION [CREATE CIRCLE CENTER 0 0 0 RADIUS 25 NORMAL 0 0 1] LENGTH 100
```
```text Revolve theme={null}
CREATE REVOLVE PROFILE [profile-command]
AXIS ORIGIN x y z DIRECTION dx dy dz ANGLE angle
# Example
CREATE REVOLVE PROFILE [CREATE LINE FROM 10 0 0 TO 20 20 0]
AXIS ORIGIN 0 0 0 DIRECTION 0 0 1 ANGLE 360
```
```text Sweep theme={null}
CREATE SWEEP PROFILE [profile-command] PATH [path-command]
# Example
CREATE SWEEP PROFILE [CREATE CIRCLE CENTER 0 0 0 RADIUS 10 NORMAL 1 0 0]
PATH [CREATE LINE FROM 0 0 0 TO 100 0 0]
```
### Boolean Operations
```text Fuse theme={null}
CREATE FUSE BOTTOM [bottom-command] TOP [top-command]
# Example
CREATE FUSE BOTTOM [CREATE BOX ORIGIN 0 0 0 SIZE 50 50 HEIGHT 20]
TOP [CREATE CYLINDER CENTER 25 25 20 RADIUS 15 HEIGHT 30]
```
```text Boolean theme={null}
CREATE BOOLEAN [COMMON|CUT|FUSE]
FIRST [first-shape]
SECOND [second-shape]
# Example
CREATE BOOLEAN CUT
FIRST [CREATE BOX ORIGIN 0 0 0 SIZE 50 50 HEIGHT 20]
SECOND [CREATE CYLINDER CENTER 25 25 0 RADIUS 10 HEIGHT 30]
```
## Creating Complex Shapes
### Wire Creation
```text theme={null}
CREATE WIRE EDGES [edge-command] AND [edge-command]
# Example - Creating a rectangular wire
CREATE WIRE EDGES
[CREATE LINE FROM 0 0 0 TO 100 0 0] AND
[CREATE LINE FROM 100 0 0 TO 100 100 0] AND
[CREATE LINE FROM 100 100 0 TO 0 100 0] AND
[CREATE LINE FROM 0 100 0 TO 0 0 0]
```
### Organization with Folders
```text theme={null}
CREATE FOLDER NAME "My Components"
```
## Practical Examples
### Creating a Patterned Cylinder
```text theme={null}
// Create base cylinder
CREATE CIRCLE CENTER 0 0 0 RADIUS 25 NORMAL 0 0 1
CREATE PRISM SECTION [previous-circle] LENGTH 100
// Create a single hole
CREATE CIRCLE CENTER 20 0 0 RADIUS 5 NORMAL 1 0 0
CREATE PRISM SECTION [previous-circle] LENGTH 60
// Pattern the hole around the cylinder
CREATE REVOLVE PROFILE [previous-hole]
AXIS ORIGIN 0 0 0 DIRECTION 0 0 1 ANGLE 360
```
### Building a Flanged Connection
```text theme={null}
// Create the base flange
CREATE CIRCLE CENTER 0 0 0 RADIUS 50 NORMAL 0 0 1
CREATE PRISM SECTION [previous-circle] LENGTH 10
// Add the pipe
CREATE CIRCLE CENTER 0 0 10 RADIUS 25 NORMAL 0 0 1
CREATE PRISM SECTION [previous-circle] LENGTH 100
// Add bolt holes
CREATE CIRCLE CENTER 40 0 0 RADIUS 6 NORMAL 0 0 1
CREATE PRISM SECTION [previous-circle] LENGTH 10
CREATE REVOLVE PROFILE [previous-hole]
AXIS ORIGIN 0 0 0 DIRECTION 0 0 1 ANGLE 360
```
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.
# Text to CAD
Source: https://docs.luminicad.com/features/text-to-cad
Create CAD models using natural language descriptions
## How It Works
LuminiCAD converts your text descriptions into precise CAD models. Simply describe what you want to create, and we'll help you build it.
Start with basic shapes and add details gradually. This helps ensure your description is interpreted accurately.
## Basic Descriptions
Here are some examples of how to describe common shapes:
```text Simple Shapes theme={null}
"Create a cylinder 50mm in diameter and 100mm tall"
"Make a rectangular box 100mm wide, 50mm deep, and 75mm high"
"Draw a sphere with 30mm radius"
```
```text With Details theme={null}
"Create a hollow cylinder with 5mm thick walls"
"Make a box with rounded corners using 2mm fillets"
"Create a cone that tapers from 50mm to 20mm diameter"
```
## Adding Features
You can modify shapes by describing additional features:
```text Holes theme={null}
"Add a 10mm diameter hole through the center"
"Create 4 equally spaced holes of 6mm diameter"
"Make a rectangular cutout 20mm by 30mm"
```
```text Patterns theme={null}
"Pattern this hole every 45 degrees around the cylinder"
"Create a 3 by 4 array of 5mm holes"
"Mirror this feature across the center"
```
## Practical Examples
### Example 1: A Simple Bracket
```text theme={null}
"Create an L-shaped bracket 100mm tall and 75mm wide,
with a thickness of 8mm. Add 10mm mounting holes
in each end, positioned 15mm from the edges"
```
### Example 2: A Custom Container
```text theme={null}
"Make a cylindrical container 80mm in diameter and 120mm tall.
Add a screw-top lid with 2mm thread pitch. Include 4 reinforcement
ribs equally spaced around the outside"
```
## Tips for Better Results
1. **Be Specific**
* Include measurements when possible
* Specify orientations (vertical, horizontal)
* Mention important relationships ("centered", "aligned with")
2. **Build Gradually**
* Start with the main shape
* Add features one at a time
* Review and adjust as needed
3. **Common Terms**
* "Centered" or "in the middle"
* "Equally spaced" or "evenly distributed"
* "Through all" for holes
* "Symmetric" or "mirrored"
## Advanced Features
### Combining Shapes
```text theme={null}
"Combine a cylinder and a box, with the box centered
on top of the cylinder. The cylinder should be 50mm
diameter and 30mm tall, and the box should be
40mm square and 20mm tall"
```
### Complex Patterns
```text theme={null}
"Create a hexagonal pattern of 5mm holes, with
15mm spacing between centers, covering an area
of 100mm by 100mm"
```
If the result isn't exactly what you wanted, try describing it in a different way or break it down into simpler steps.
## Common Challenges
### Ambiguous Descriptions
```text Unclear ❌ theme={null}
"Make it bigger"
"Add some holes"
"Put it on top"
```
```text Clear ✅ theme={null}
"Increase the diameter to 75mm"
"Add three 8mm holes spaced 30mm apart"
"Position it 50mm above the base surface"
```
### Complex Geometry
For complex models, consider:
1. Breaking down into simpler components
2. Using the scripting interface for precise control
3. Combining text commands with manual adjustments
Remember that you can always switch to the scripting interface for more precise control over your design.
Like any AI tool, LuminiCAD may sometimes misinterpret complex descriptions. For best results:
* Break down complex shapes into smaller, simpler parts
* Build your model step by step
* Be specific with measurements and relationships
* Review each step before moving to the next
The key to success is in how you describe your model. Think of it as a conversation: the clearer and more structured your description, the better the outcome.
# Examples
Source: https://docs.luminicad.com/guides/examples
Real-world examples using LuminiCAD
## Scripting Examples
### Mounting Plate with Holes
```text theme={null}
// Create base plate
base = CREATE RECTANGLE ORIGIN 0 0 0 SIZE 200 150
CREATE PRISM SECTION $base LENGTH 5
// Create a corner hole
hole = CREATE CIRCLE CENTER 15 15 0 RADIUS 3 NORMAL 0 0 1
CREATE PRISM SECTION $hole LENGTH 5
// Create opposite corner hole
hole2 = CREATE CIRCLE CENTER 185 15 0 RADIUS 3 NORMAL 0 0 1
CREATE PRISM SECTION $hole2 LENGTH 5
// Create remaining corner holes
hole3 = CREATE CIRCLE CENTER 185 135 0 RADIUS 3 NORMAL 0 0 1
CREATE PRISM SECTION $hole3 LENGTH 5
hole4 = CREATE CIRCLE CENTER 15 135 0 RADIUS 3 NORMAL 0 0 1
CREATE PRISM SECTION $hole4 LENGTH 5
```
### Patterned Cylinder
```
// Create main cylinder
base = CREATE CIRCLE CENTER 0 0 0 RADIUS 30 NORMAL 0 0 1
CREATE PRISM SECTION $base LENGTH 60
// Create feature hole
hole = CREATE CIRCLE CENTER 25 0 0 RADIUS 5 NORMAL 1 0 0
CREATE PRISM SECTION $hole LENGTH 60
// Create additional holes at different angles
hole2 = CREATE CIRCLE CENTER -25 0 0 RADIUS 5 NORMAL -1 0 0
CREATE PRISM SECTION $hole2 LENGTH 60
hole3 = CREATE CIRCLE CENTER 0 25 0 RADIUS 5 NORMAL 0 1 0
CREATE PRISM SECTION $hole3 LENGTH 60
hole4 = CREATE CIRCLE CENTER 0 -25 0 RADIUS 5 NORMAL 0 -1 0
CREATE PRISM SECTION $hole4 LENGTH 60
```
### Wire Frame Structure
```text theme={null}
// Create vertical lines
line1 = CREATE LINE FROM 0 0 0 TO 0 0 100
line2 = CREATE LINE FROM 100 0 0 TO 100 0 100
line3 = CREATE LINE FROM 100 100 0 TO 100 100 100
line4 = CREATE LINE FROM 0 100 0 TO 0 100 100
// Create base rectangle
base1 = CREATE LINE FROM 0 0 0 TO 100 0 0
base2 = CREATE LINE FROM 100 0 0 TO 100 100 0
base3 = CREATE LINE FROM 100 100 0 TO 0 100 0
base4 = CREATE LINE FROM 0 100 0 TO 0 0 0
// Create top rectangle
top1 = CREATE LINE FROM 0 0 100 TO 100 0 100
top2 = CREATE LINE FROM 100 0 100 TO 100 100 100
top3 = CREATE LINE FROM 100 100 100 TO 0 100 100
top4 = CREATE LINE FROM 0 100 100 TO 0 0 100
```
## Text-to-CAD Examples
### Simple Bracket
```text theme={null}
"Create an L-shaped bracket that is 100mm tall and 75mm wide,
with a thickness of 8mm. Add four 6mm mounting holes,
positioned 10mm from each edge."
```
### Electronics Housing
```text theme={null}
"Create a rectangular box 200mm long, 150mm wide, and 50mm tall.
Add ventilation holes 5mm in diameter arranged in a grid pattern
on the top surface. Space the holes 15mm apart."
```
### Machine Part
```text theme={null}
"Create a cylindrical shaft 100mm long and 30mm in diameter.
Add a 5mm deep groove around the middle, 3mm wide.
At each end, create a 10mm long section reduced to 25mm diameter."
```
### Mounting System
```text theme={null}
"Design a wall mount consisting of a 150mm by 150mm square plate,
8mm thick. Create four countersunk holes for M6 screws in the corners,
20mm from the edges. In the center, add a cylindrical boss 40mm in
diameter and 25mm tall."
```
When using the scripting interface, break down complex shapes into simple commands
and use variables to store intermediate results for reuse.
## Combining Approaches
### Text-First, Script-Refined
1. Start with text description:
```text theme={null}
"Create a cylindrical container 100mm tall and 80mm in diameter
with regularly spaced vertical reinforcement ribs"
```
2. Refine with scripting:
```text theme={null}
// Create main cylinder
base = CREATE CIRCLE CENTER 0 0 0 RADIUS 40 NORMAL 0 0 1
CREATE PRISM SECTION $base LENGTH 100
// Add reinforcement rib
rib = CREATE RECTANGLE ORIGIN 40 -2.5 0 SIZE 5 5
CREATE PRISM SECTION $rib LENGTH 100
// Create additional ribs at different angles
rib2 = CREATE RECTANGLE ORIGIN -45 -2.5 0 SIZE 5 5
CREATE PRISM SECTION $rib2 LENGTH 100
rib3 = CREATE RECTANGLE ORIGIN -2.5 40 0 SIZE 5 5
CREATE PRISM SECTION $rib3 LENGTH 100
rib4 = CREATE RECTANGLE ORIGIN -2.5 -45 0 SIZE 5 5
CREATE PRISM SECTION $rib4 LENGTH 100
```
More examples will be added regularly based on user feedback and common use cases.
# Model Organization
Source: https://docs.luminicad.com/guides/model-organization
Best practices for organizing your CAD models and projects
## Project Structure
### Folder Hierarchy
```text theme={null}
Project Name/
├── Base Components/
├── Features/
├── Assemblies/
└── Manufacturing/
```
Create a consistent folder structure at the start of each project. This makes it easier to find and manage components as your project grows.
## Naming Conventions
### Components
Follow a clear naming pattern:
```text theme={null}
[Type]_[Function]_[Version]
```
Examples:
* `BASE_Platform_v1`
* `FEATURE_MountingHole_M6`
* `ASSY_TopModule_Final`
### Features
Use descriptive, consistent names:
```text theme={null}
- Hole_M6_Through
- Fillet_R5_External
- Pattern_Circular_6x
```
## Version Control
### Component Versions
Track changes systematically:
1. Use version numbers (v1, v2, v3)
2. Add date stamps when needed
3. Keep notes on major changes
```text Version Example theme={null}
BASE_Platform_v1 // Initial design
BASE_Platform_v2 // Added mounting points
BASE_Platform_v2.1 // Modified hole pattern
```
```text Change Notes theme={null}
v1 - Basic structure
v2 - Added mounting features
v2.1 - Updated hole spacing
```
## Model Tree Organization
### Structure
```text theme={null}
Assembly/
├── 01_Base
│ ├── Base_Plate
│ └── Support_Structures
├── 02_Features
│ ├── Mounting_Holes
│ └── Alignment_Pins
└── 03_References
├── Center_Planes
└── Construction_Geometry
```
### Reference Geometry
Keep construction elements organized:
* Named reference planes
* Center axes
* Construction sketches
## Best Practices
### 1. Component Management
* Group related components
* Use subfolders for complex assemblies
* Keep reference geometry separate
### 2. Feature Organization
* Order features logically
* Group related operations
* Name patterns clearly
### 3. Assembly Structure
```text Main Assembly theme={null}
ASSY_Main/
├── SUB_Base
├── SUB_Mechanism
└── SUB_Housing
```
```text Sub-Assembly theme={null}
SUB_Mechanism/
├── COMP_Shaft
├── COMP_Bearings
└── COMP_Gears
```
## Working with Teams
### Shared Components
* Use clear component names
* Document dependencies
* Note any constraints
### Collaboration Tips
1. **Standard Naming**
* Follow team conventions
* Use clear descriptions
* Include version numbers
2. **Documentation**
* Add comments to complex features
* Note design intentions
* Document dependencies
Consistent organization is key for team projects. Establish standards early and document any deviations.
## Project Management
### File Organization
```text theme={null}
Project_Name/
├── CAD/
│ ├── Components/
│ ├── Assemblies/
│ └── Manufacturing/
├── Documentation/
└── References/
```
### Design States
Track model status:
* `WIP` (Work in Progress)
* `REVIEW` (Under Review)
* `APPROVED` (Final Version)
* `DEPRECATED` (Obsolete)
## Tips for Success
Remove unused features and organize regularly
Maintain logical structure from start
Track changes and maintain history
Keep notes on important decisions
## Common Mistakes to Avoid
1. **Inconsistent Naming**
* Mixed conventions
* Unclear descriptions
* Missing versions
2. **Poor Structure**
* Deep nested folders
* Unclear hierarchies
* Mixed component types
3. **Lack of Documentation**
* Missing change notes
* Undefined references
* Unclear dependencies
Take time to organize at the start of each project. Good organization saves time and reduces errors in the long run.
Remember that organization is an ongoing process. Regular maintenance keeps your projects manageable as they grow in complexity.
# Scripting Patterns
Source: https://docs.luminicad.com/guides/scripting-patterns
Common patterns and best practices for LuminiCAD scripting
## Basic Patterns
### Building Blocks
```text Basic Shapes theme={null}
CREATE BOX ORIGIN 0 0 0 SIZE 100 50 HEIGHT 75
CREATE CIRCLE CENTER 0 0 0 RADIUS 50 NORMAL 0 0 1
CREATE LINE FROM 0 0 0 TO 100 0 0
```
```text Combinations theme={null}
CREATE FUSE
BOTTOM [first-shape-command]
TOP [second-shape-command]
CREATE BOOLEAN CUT
FIRST [base-shape]
SECOND [cutting-shape]
```
## Common Patterns
### Circular Patterns
```text theme={null}
// Create base hole
CREATE CIRCLE CENTER 40 0 0 RADIUS 5 NORMAL 0 0 1
CREATE PRISM SECTION [previous-circle] LENGTH 10
// Pattern around center
CREATE REVOLVE PROFILE [previous-hole]
AXIS ORIGIN 0 0 0 DIRECTION 0 0 1 ANGLE 360
```
### Linear Arrays
```text theme={null}
// Create base feature
CREATE RECTANGLE ORIGIN 0 0 0 SIZE 20 20
CREATE PRISM SECTION [previous-rectangle] LENGTH 10
// Create linear pattern
CREATE SWEEP PROFILE [previous-prism]
PATH [CREATE LINE FROM 0 0 0 TO 200 0 0]
```
## Organization Patterns
### Folder Structure
```text theme={null}
// Create main assembly folder
CREATE FOLDER NAME "Main Assembly"
// Create component folders
CREATE FOLDER NAME "Base Components"
CREATE FOLDER NAME "Features"
CREATE FOLDER NAME "Patterns"
```
### Component Building
```text theme={null}
// Base structure
CREATE BOX ORIGIN 0 0 0 SIZE 100 100 HEIGHT 50
// Features
CREATE CIRCLE CENTER 50 50 0 RADIUS 20 NORMAL 0 0 1
CREATE PRISM SECTION [previous-circle] LENGTH 50
// Combine
CREATE BOOLEAN CUT
FIRST [base-box]
SECOND [hole-prism]
```
## Best Practices
### 1. Structure Your Code
* Group related operations
* Use clear naming
### 2. Build Parametrically
```text theme={null}
// Define key dimensions
CREATE BOX ORIGIN 0 0 0
SIZE [width] [length]
HEIGHT [height]
// Reference existing geometry
CREATE CIRCLE CENTER [width/2] [length/2] 0
RADIUS [hole_diameter/2]
NORMAL 0 0 1
```
### 3. Error Prevention
```text Check Parameters theme={null}
// Validate dimensions
if width < minimum_width:
show error "Width too small"
// Check relationships
if hole_diameter > width:
show error "Hole larger than part"
```
```text Safe Operations theme={null}
// Create base first
CREATE base_shape
// Verify before boolean
if base_shape exists:
CREATE BOOLEAN CUT
```
## Advanced Patterns
### Complex Geometry
```text theme={null}
// Create profile
CREATE WIRE EDGES
[CREATE LINE FROM 0 0 0 TO 100 0 0] AND
[CREATE ARC CENTER 100 50 0 START 100 0 0 NORMAL 0 0 1 ANGLE 180] AND
[CREATE LINE FROM 100 100 0 TO 0 100 0] AND
[CREATE LINE FROM 0 100 0 TO 0 0 0]
// Create solid
CREATE PRISM SECTION [previous-wire] LENGTH 50
```
### Reusable Components
```text theme={null}
// Define component
CREATE FOLDER NAME "Standard Holes"
// Create template
CREATE CIRCLE CENTER x y z RADIUS r NORMAL nx ny nz
CREATE PRISM SECTION [previous-circle] LENGTH l
// Save for reuse
SAVE AS "Through Hole Template"
```
## Performance Tips
### 1. Optimize Operations
* Combine similar operations
* Reduce boolean operations
* Use patterns instead of individual features
### 2. Memory Management
* Clean up temporary geometry
* Use folders for organization
* Reference existing features when possible
When creating complex patterns, test with a small number of iterations first before scaling up.
## Debugging Strategies
### Common Issues
1. **Geometry Fails**
* Check input parameters
* Verify relationships
* Ensure valid operations
2. **Performance Problems**
* Reduce operation complexity
* Use efficient patterns
* Clean up unused features
Keep your scripts modular. This makes debugging and modifications much easier later.
## Examples
### Parametric Flange
```text theme={null}
// Base parameters
SET flange_diameter = 100
SET hole_count = 6
SET hole_diameter = 8
// Create base
CREATE CIRCLE CENTER 0 0 0
RADIUS [flange_diameter/2]
NORMAL 0 0 1
CREATE PRISM SECTION [previous-circle] LENGTH 10
// Create hole pattern
CREATE CIRCLE CENTER [flange_diameter*0.4] 0 0
RADIUS [hole_diameter/2]
NORMAL 0 0 1
CREATE PRISM SECTION [previous-circle] LENGTH 10
CREATE REVOLVE PROFILE [previous-hole]
AXIS ORIGIN 0 0 0 DIRECTION 0 0 1 ANGLE 360
```
Test your scripts with different parameters to ensure they work across a range of values.
# Templates
Source: https://docs.luminicad.com/guides/templates
Ready-to-use templates for common CAD designs
🚧 **Coming Soon**
Our template library is currently in development. These templates will provide quick starting points for common CAD designs.
## Basic Templates
### Simple Enclosure
```text theme={null}
// Create outer shell
outer = CREATE BOX ORIGIN 0 0 0 SIZE 100 150 HEIGHT 50
// Create inner void
inner = CREATE BOX ORIGIN 3 3 3 SIZE 94 144 HEIGHT 47
// Create mounting holes
hole1 = CREATE CIRCLE CENTER 10 10 0 RADIUS 3 NORMAL 0 0 1
CREATE PRISM SECTION $hole1 LENGTH 50
hole2 = CREATE CIRCLE CENTER 90 10 0 RADIUS 3 NORMAL 0 0 1
CREATE PRISM SECTION $hole2 LENGTH 50
hole3 = CREATE CIRCLE CENTER 90 140 0 RADIUS 3 NORMAL 0 0 1
CREATE PRISM SECTION $hole3 LENGTH 50
hole4 = CREATE CIRCLE CENTER 10 140 0 RADIUS 3 NORMAL 0 0 1
CREATE PRISM SECTION $hole4 LENGTH 50
```
### Mounting Plate
```text theme={null}
// Base plate
base = CREATE RECTANGLE ORIGIN 0 0 0 SIZE 200 150
CREATE PRISM SECTION $base LENGTH 5
// Corner holes
hole1 = CREATE CIRCLE CENTER 15 15 0 RADIUS 3 NORMAL 0 0 1
CREATE PRISM SECTION $hole1 LENGTH 5
hole2 = CREATE CIRCLE CENTER 185 15 0 RADIUS 3 NORMAL 0 0 1
CREATE PRISM SECTION $hole2 LENGTH 5
hole3 = CREATE CIRCLE CENTER 185 135 0 RADIUS 3 NORMAL 0 0 1
CREATE PRISM SECTION $hole3 LENGTH 5
hole4 = CREATE CIRCLE CENTER 15 135 0 RADIUS 3 NORMAL 0 0 1
CREATE PRISM SECTION $hole4 LENGTH 5
```
These templates will be customizable through parameters and can be used as starting points for your designs.
# Text Command
Source: https://docs.luminicad.com/guides/text-commands
Learn how to write effective text commands for better CAD modeling results
## Basic Principles
### Be Specific and Clear
```text Not Effective ❌ theme={null}
"Make a big hole"
"Add some rounded corners"
"Put it somewhere in the middle"
```
```text Effective ✅ theme={null}
"Create a 20mm diameter hole"
"Add 5mm fillets to all edges"
"Center the hole on the top face"
```
## Structure Your Commands
### 1. Start with the Main Shape
```text Step 1 theme={null}
"Create a rectangular block 100mm long, 50mm wide, and 30mm tall"
```
```text Step 2 theme={null}
"Add a 15mm diameter hole through the center"
```
```text Step 3 theme={null}
"Add 3mm fillets to all vertical edges"
```
### 2. Use Clear Measurements
* Always specify units (mm, cm, degrees)
* Use decimal points for precision
* Include all necessary dimensions
## Common Patterns
### Location References
```text theme={null}
"from the center"
"from the edge"
"relative to the base"
"aligned with the front face"
```
### Geometric Relations
```text theme={null}
"perpendicular to"
"parallel with"
"tangent to"
"concentric with"
```
### Pattern Commands
```text theme={null}
"evenly spaced"
"distributed around"
"mirrored across"
"repeated every X mm"
```
## Tips for Complex Models
### Break Down into Steps
```text Complex ❌ theme={null}
"Create a flanged cylinder with 6 bolt holes and internal threads"
```
```text Step-by-Step ✅ theme={null}
"1. Create a cylinder 50mm diameter and 100mm tall
2. Add a flange 80mm diameter and 10mm thick at the base
3. Create a 6mm hole 60mm from center
4. Pattern this hole 6 times around the flange
5. Add M6 internal threads to all holes"
```
### Use Reference Points
* Start with clear origin points
* Reference existing features
* Use standard planes (front, top, right)
## Troubleshooting
### When Results Aren't Perfect
1. **Review Your Description**
* Check measurements
* Verify relationships
* Look for ambiguous terms
2. **Common Fixes**
* Add missing dimensions
* Clarify relationships
* Break into smaller steps
Keep a note of commands that work well. You can reuse these patterns in future models.
## Examples by Complexity
### Simple Components
```text theme={null}
"Create a cylinder 30mm diameter and 50mm tall"
"Add a 2mm fillet to the top edge"
```
### Medium Complexity
```text theme={null}
"Create a rectangular plate 100x150mm and 5mm thick
Add 8mm holes in each corner, 10mm from the edges
Add a 50mm diameter center hole"
```
### Complex Assemblies
```text theme={null}
"1. Create base plate 200x200x10mm
2. Add 4 mounting holes 8mm diameter, 20mm from corners
3. Center a cylinder 80mm diameter, 100mm tall
4. Add support ribs 5mm thick every 90 degrees
5. Create a top flange 100mm diameter, 10mm thick"
```
## Best Practices Checklist
✅ Include all dimensions\
✅ Specify units\
✅ Use clear reference points\
✅ Break down complex shapes\
✅ Review before executing\
✅ Build step by step
Remember: The quality of your model depends on the clarity of your description. Take time to plan and structure your commands.
Start simple and add complexity gradually. It's easier to add features than to fix mistakes in complex models.
# Welcome to LuminiCAD
Source: https://docs.luminicad.com/introduction
Design CAD models through natural language
## Design Through Text
LuminiCAD helps engineers and designers create 3D models in a more natural way. Simply describe what you want to build, and we'll help you turn those ideas into precise CAD models.
Create your first model in minutes
Learn the basics of text-based modeling
Write simple scripts for complex shapes
Browse ready-to-use components
## Why Use LuminiCAD?
* **Natural Input**: Describe your models in everyday language
* **Simple Scripting**: Use basic commands to create detailed designs
We're currently in early beta. Join us to try LuminiCAD early and help us make it better.
# Quick Start
Source: https://docs.luminicad.com/quickstart
Create your first CAD model with LuminiCAD
## Your First Model
Let's create a simple model to help you understand how LuminiCAD works. We'll make a basic cylinder that could be used as a container or component.
### 1. Describe Your Model
Start by typing a description in the command box:
```text theme={null}
Create a cylinder with 50mm diameter and 100mm height
```
Keep your descriptions clear and include measurements when possible. This helps create exactly what you need.
### 2. Adjust Your Design
After the initial model appears, you can:
* Click and drag to rotate the view
* Use the scroll wheel to zoom
* Hold shift and drag to pan
### 3. Fine-Tune Details
Need to make changes? You can:
* Edit measurements directly by clicking on them
* Add features like holes or fillets through the side panel
* Use the history panel to undo or modify previous steps
## Basic Commands
Here are some simple commands to get you started:
```text Basic Shapes theme={null}
Create a cube 50mm on each side
Make a sphere with 30mm radius
Draw a cylinder 40mm wide and 80mm tall
```
```text Modifications theme={null}
Add a 5mm fillet to all edges
Create a 10mm hole through the center
Round the top corners with 2mm radius
```
## Using the Scripting Interface
For more precise control, you can use our scripting interface. Toggle between text and script mode using the button in the top right corner.
Here are some basic commands you can use:
```text Basic Shapes theme={null}
CREATE BOX ORIGIN 0 0 0 SIZE 100 50 HEIGHT 75
CREATE CIRCLE CENTER 0 0 0 RADIUS 50 NORMAL 0 0 1
CREATE LINE FROM 0 0 0 TO 100 0 0
```
```text Advanced Operations theme={null}
CREATE PRISM SECTION [section-command] LENGTH 100
CREATE REVOLVE PROFILE [profile-command] AXIS ORIGIN 0 0 0 DIRECTION 0 0 1 ANGLE 360
CREATE SWEEP PROFILE [profile-command] PATH [path-command]
```
```text Combining Shapes theme={null}
CREATE FUSE BOTTOM [bottom-shape] TOP [top-shape]
CREATE WIRE EDGES [edge-command] AND [edge-command]
```
Here's a complete example that creates a cylinder with patterned holes:
```javascript theme={null}
// Create the main cylinder
CREATE CIRCLE CENTER 0 0 0 RADIUS 25 NORMAL 0 0 1
CREATE PRISM SECTION [previous-circle] LENGTH 100
// Create holes around the cylinder
CREATE CIRCLE CENTER 20 0 0 RADIUS 5 NORMAL 1 0 0
CREATE PRISM SECTION [previous-circle] LENGTH 60
// Pattern the holes
CREATE REVOLVE PROFILE [previous-hole] AXIS ORIGIN 0 0 0 DIRECTION 0 0 1 ANGLE 360
```
The scripting interface is perfect for creating patterns, precise measurements, and complex combinations of shapes.
## Next Steps
Learn more ways to describe your models
Try simple scripts for more control
Need help? Click the chat button in the bottom right corner of the app, and we'll help you get unstuck.