cd procedural-design
pip install -r requirements.txtfrom pipelines.vase import VasePipeline, VaseConfig
# Create configuration
config = VaseConfig(
height=150.0,
pattern_type='spots',
random_seed=42
)
# Generate
pipeline = VasePipeline(config)
mesh = pipeline.generate()
# Export
pipeline.export('my_first_vase.stl')python src/cli/generate_vase.py \
--height 150 \
--pattern spots \
--output my_first_vase.stl \
--stats \
--validatestreamlit run src/app/streamlit_app.pyThen:
- Adjust parameters in sidebar
- Click "Generate Vase"
- Download STL file
from pipelines.moss_pole import MossPolePipeline, MossPoleConfig
config = MossPoleConfig(
height=200.0,
attractor_count=2000
)
pipeline = MossPolePipeline(config)
mesh = pipeline.generate()
pipeline.export('my_first_pole.stl')python src/cli/generate_moss_pole.py \
--height 200 \
--attractors 2000 \
--output my_first_pole.stl \
--stats- Start Jupyter Lab:
jupyter lab-
Open
notebooks/01_refactored_example.ipynb -
Run all cells to see both vase and moss pole generation
-
Experiment with parameters!
pytest tests/ -v- Read REFACTORING_GUIDE.md for detailed architecture
- Explore
notebooks/experiments/for more examples - Check
.cursor/rules/for coding guidelines - Try different pattern presets: 'spots', 'stripes', 'waves', 'holes'
| Parameter | Type | Default | Description |
|---|---|---|---|
| height | float | 150.0 | Vase height in mm |
| base_size | float | 80.0 | Base dimension in mm |
| profile_type | str | 'square' | 'circle', 'square', 'hexagon' |
| pattern_type | str | 'spots' | 'spots', 'stripes', 'waves', 'holes' |
| displacement_amplitude | float | 6.0 | Displacement in mm |
| simulation_steps | int | 10000 | More = finer patterns |
| Parameter | Type | Default | Description |
|---|---|---|---|
| outer_diameter | float | 50.0 | Diameter in mm |
| height | float | 200.0 | Height in mm |
| tunnel_radius | float | 1.5 | Perforation size in mm |
| attractor_count | int | 2000 | Branch density |
| n_ribs | int | 4 | Structural ribs |
- Start small: Use low resolution (64-128) and fewer steps (1000-5000) for testing
- GPU acceleration: Set
use_gpu=Trueif you have Taichi GPU support - Reproducibility: Set
random_seedfor consistent results - Validation: Always run
pipeline.validate()before 3D printing - Batch processing: Use CLI tools for generating multiple variants
Q: Generation is slow
- Lower
field_resolutionandsimulation_steps - Enable GPU with
use_gpu=True
Q: Mesh has holes
- Increase
simulation_stepsfor better patterns - Check
mesh.is_watertightproperty - Run with
--validateflag in CLI
Q: Pattern looks wrong
- Try different
pattern_typepresets - Adjust
feed_rateandkill_ratemanually - Increase
simulation_steps
Q: Import errors
- Make sure you're in the
procedural-design/directory - Check Python path includes
src/
- Check REFACTORING_GUIDE.md
- Look at test files in
tests/for examples - Read docstrings in source code
- Check
.cursor/rules/for coding standards