- Introduction
- Prerequisites
- Installation
- Using Modelita
- Command Reference
- Symbols
- Blender Integration
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:
- Blender: Latest version from the official Blender website.
- Download and extract the package: modelita.tgz
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:
- Your OBJ files are in the
models/
directory - Open Blender
- Load the Python script:
- Open the Scripting tab
- Click Text > Open and select
objimporter.py
- Change the path
- Press Run Script
- Access the importer:
- In the 3D View, press N to open the side panel
- Go to the My Tools tab
- Click Reload OBJ to import all files
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.