A house design project that materializes a simple living lifestyle through programmatic 3D modeling and CAD design.
- Project Overview
- Quick Start
- Development Setup
- 3D Model Features
- Output Files
- Troubleshooting
- Architecture
- Customization
- Contributing
This project creates a 3D model of a minimalist house using Python and the build123d library. The house features:
- Dimensions: 10m × 8m × 3m (width × depth × height)
- Wall thickness: 0.3m
- Roof height: 2m with overhang
- Features: Front door, multiple windows, gabled roof
- Python 3.13+
- uv package manager
# Clone the repository
git clone https://github.com/marcelovicentegc/simple-living
cd simple-living
# Install dependencies
uv sync
# Install development dependencies (for linting)
uv sync --extra dev# Run the main application
make dev
# Run with multiple viewer options
make view
# See all available commands
make helpThis project includes a comprehensive linting and formatting setup:
- Ruff: Fast Python linter and formatter
- MyPy: Static type checker
- Black: Code formatter
- Pre-commit hooks: Automatic linting on commits
# Development
make dev # Run the main project (with fallback)
make view # Run with multiple viewer options
make install-dev # Install development dependencies
# Code Quality
make lint # Run all linting checks
make format # Format code with ruff and black
make check # Check formatting without fixing
make fix # Fix auto-fixable linting issues
make clean # Clean up cache files
# Help
make help # Show all available commands# Run individual tools
uv run ruff check . # Lint code
uv run ruff format . # Format code
uv run mypy . # Type checking
uv run black . # Format with black
# Run custom lint script
uv run python lint.py- Main building: Rectangular base with hollow interior
- Walls: 0.3m thick with proper insulation space
- Floor: Solid base with 0.2m thickness
- Roof: Gabled design with 0.5m overhang
- Front door: 1.2m × 2.2m entrance
- Windows: Multiple windows on front and side walls
- Front facade: 2 windows (1.5m × 1.2m each)
- Side walls: 4 windows (1.2m × 1.0m each)
The project supports multiple viewing options:
- VS Code Extension: Real-time 3D viewing (requires OCP CAD Viewer extension)
- File Export: Automatic fallback to CAD files
.stepformat: For CAD software (FreeCAD, Fusion 360, etc.).stlformat: For 3D printing (Cura, PrusaSlicer, etc.)
When you run the project, it generates:
minimalist_house.step- CAD format for professional softwareminimalist_house.stl- 3D printing format for manufacturing
If you see "Cannot access viewer status" errors:
- Install the OCP CAD Viewer extension in VS Code
- Start the viewer from the extension panel
- Run the project - it should display in VS Code
The project automatically handles viewer issues by:
- Detecting when the VS Code viewer isn't available
- Automatically exporting the model to files
- Providing helpful error messages and guidance
simple-living/
├── app.py # Main application with fallback
├── app_with_viewer.py # Alternative with multiple viewers
├── lint.py # Custom linting script
├── Makefile # Build commands
├── pyproject.toml # Project configuration
├── .pre-commit-config.yaml # Pre-commit hooks
└── README.md # This file
- build123d: 3D modeling and CAD operations
- ocp-vscode: VS Code integration for 3D viewing
- Development tools: ruff, mypy, black for code quality
You can easily modify the house design by changing these variables in app.py:
house_width = 10 # meters
house_depth = 8 # meters
house_height = 3 # meters
wall_thickness = 0.3 # meters
roof_overhang = 0.5 # meters
roof_height = 2 # metersThe modular design makes it easy to add:
- Additional rooms
- Different window styles
- Roof variations
- Interior elements
- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature - Make your changes and ensure they pass linting:
make check - Commit your changes:
git commit -m 'Add amazing feature' - Push to the branch:
git push origin feature/amazing-feature - Open a Pull Request
- All code must pass
make check(linting, formatting, type checking) - Use
make fixto automatically fix formatting issues - Follow the existing code style and patterns