Skip to main content

Add a short description here!

Project description

shellforgepy

Python tooling for the ShellForge workflow: model geometry in pure Python, pick a CAD backend at runtime, and export parts ready for fabrication. The package provides a layered architecture — from NumPy-based geometry utilities through alignment-centric construction helpers and production-focused exporters — with optional adapters for CadQuery and FreeCAD.

🚀 Try the Examples!

Get started in 30 seconds:

# Beginner-friendly parametric CAD
python examples/filleted_boxes_example.py

# Amazing mathematical surfaces
python examples/mobius_strip.py

# All 8 examples ready to run!

👉 See All Examples → | 🎯 Quick Examples Guide →


Why ShellForgePy?

  • Backend‑agnostic modeling – Keep your design logic independent of any CAD kernel. Only when you need to materialise a shape do you pick an adapter (CadQuery, FreeCAD, …).
  • Alignment‑first construction – Use the construct helpers to position and combine parts predictably. Translating ShellForge design ideas into code stays tidy and explicit.
  • Production utilitiesproduce offers layout helpers, STL export, and other fabrication conveniences targeted at 3D printing and similar workflows.
  • Composable adapters – Import shellforgepy.simple to auto-select an available CAD backend at import time, while still giving you informative error messages if nothing is installed.

Installation

Base package (geometry + construct + arrange/produce layers):

pip install shellforgepy

Optional extras:

# CadQuery adapter
pip install shellforgepy[cadquery]

# FreeCAD adapter (requires a system FreeCAD installation)
pip install shellforgepy[freecad]

# Everything
pip install shellforgepy[all]

Development install

git clone git@github.com:m-emm/shellforgepy.git
cd shellforgepy
python -m venv .venv
source .venv/bin/activate
pip install -e ".[testing]"

Quick start

from shellforgepy.simple import (
    Alignment,
    align,
    arrange_and_export_parts,
    create_basic_box,
    create_basic_cylinder,
)

# Model a simple assembly (pure Python)
base = create_basic_box(80, 60, 5)
post = create_basic_cylinder(radius=5, height=40)
post = align(post, base, Alignment.CENTER)
assembly = [
    {"name": "base", "part": base},
    {"name": "post", "part": post},
]

# Lay out parts for printing and export to STL
arrange_and_export_parts(
    parts=assembly,
    prod_gap=5.0,
    bed_with=200.0,
    script_file="examples/pedestal.py",
    export_directory="output",
)

If a CadQuery or FreeCAD adapter is available, the exporter will use it transparently. Otherwise you get a helpful error telling you which dependency is missing.


Project layout

src/shellforgepy/
├── geometry/        # Pure NumPy/ SciPy helpers
├── construct/       # Alignment and composition primitives
├── produce/         # Arrangement + export helpers
├── adapters/        # Optional cadquery/ and freecad/ backends
└── simple.py        # Convenience facade with auto-selected adapter

🎯 Examples

8 working examples that demonstrate shellforgepy's full capabilities - from beginner CAD to advanced mathematical surfaces!

🔰 Beginner Examples

python examples/filleted_boxes_example.py    # Parametric CAD with fillets
python examples/create_cylinder_stl.py       # Basic mesh generation
python examples/straight_snake.py            # Simple path following

🔥 Advanced Path-Following

python examples/curved_snake.py              # Sine wave channels
python examples/cylindrical_coil.py          # Helical coils
python examples/conical_coil.py              # Tapering coils
python examples/mobius_strip.py              # One-sided surfaces! 🤯

🧠 Complex Meshes

python examples/create_face_stl.py           # Organic shapes + partitioning

📁 Output: All examples generate STL files ready for 3D printing!

📖 Complete Examples Guide → - Detailed descriptions, features, and outputs for all examples.


Contributing & Development

Run linters/tests before pushing:

pytest
black src/ tests/
isort src/ tests/

Bug reports and pull requests are welcome! Please document new APIs in docstrings and keep adapter-specific code isolated so ShellForgePy stays backend-agnostic by default.


License

MIT — see LICENSE.txt.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

shellforgepy-0.1.0.tar.gz (604.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

shellforgepy-0.1.0-py3-none-any.whl (96.7 kB view details)

Uploaded Python 3

File details

Details for the file shellforgepy-0.1.0.tar.gz.

File metadata

  • Download URL: shellforgepy-0.1.0.tar.gz
  • Upload date:
  • Size: 604.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for shellforgepy-0.1.0.tar.gz
Algorithm Hash digest
SHA256 45ac446aa0fbc792a1b48bdd35c0f830bea3bd4b0d211205aad6f42d612f70d4
MD5 2f1743f995ebacec1c2e8e08096432d1
BLAKE2b-256 2ee8309707e4c787363f4071ad223255209186656db8064ce19b77bbb5c326cc

See more details on using hashes here.

File details

Details for the file shellforgepy-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: shellforgepy-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 96.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for shellforgepy-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 05d0e5e7d825e457299b8082fb6b174920763e7bc876b312f7af28fbf2238f36
MD5 96a1bcc0c4f1126544158340d76724f6
BLAKE2b-256 8d21e3b02807b00650a930159bc7c585b8b5b74a222f682f89d68016016cf127

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page