MODELITA is a Domain-Specific Language (DSL) for 3D modeling, integrating Racket, PostGIS, and Blender. This documentation covers version 0.2.
Before setting up MODELITA, ensure you have the following installed:
Once you have downloaded MODELITA, you can run the program from the terminal
using ./modelita . When it starts , you will enter an interactive mode where you can input commands to create 3D shapes.
| Command | Description |
|---|---|
| up | Move cursor upward |
| down | Move cursor downward |
| left | Move cursor left |
| right | Move cursor right |
| forward | Move cursor forward |
| backward | Move cursor backward |
| Command | Description |
|---|---|
| rotate-x+ | Rotate 90 degrees around X-axis (+) |
| rotate-x- | Rotate 90 degrees around X-axis (-) |
| rotate-y+ | Rotate 90 degrees around Y-axis (+) |
| rotate-y- | Rotate 90 degrees around Y-axis (-) |
| rotate-z+ | Rotate 90 degrees around Z-axis (+) |
| rotate-z- | Rotate 90 degrees around Z-axis (-) |
| Command | Description |
|---|---|
| a | Add the current position as a vertex |
| b | Clear the current shape |
| select | Print the current cursor position |
| start | Save the shape to an OBJ file |
| Command | Description |
|---|---|
| push | Save current position and rotation |
| pop | Restore last saved position/rotation |
Modelita allows you to define and save custom symbols (commands) to automate actions.
To define a new symbol:
define Enter new symbol name: my-symbol Enter commands (as list): (up right forward)
| Command | Description |
|---|---|
| save | Save a symbol for later use |
| load | Load a previously saved symbol |
Example Usage:
; Save a symbol save Enter symbol name to save: my-symbol ; Load a saved symbol load Enter symbol filename to load: my-symbol ; Use a defined symbol my-symbol
The objimporter.py script automates importing OBJ files generated by Modelita into Blender.
Setup Steps:
models/ directoryobjimporter.py| Feature | Description |
|---|---|
| Auto Cleanup | Removes previous objects before import |
| Directory Scan | Automatically finds OBJ files |
| Debug Info | Shows import process details/errors |
Note
The start command saves your shape design to an OBJ file, while the save command stores defined symbols. Keep this distinction in mind for effective use of Modelita.