orca123d
Project to help when working with build123d models in OrcaSlicer. Generate .3mf files with geometry plus per-object and per-part slicer settings and painted regions — directly from Python.
from build123d import Box, Cylinder, Pos
from orca123d import Project, PrintSettings
# Project is just a convenient wrapper around the 3MF structure: objects, parts, settings, and painted regions.
proj = Project()
# A single-solid object with a per-object override.
proj.add_object(Box(20, 20, 10), name="Base",
settings=PrintSettings(wall_loops=4, sparse_infill_density="20%"))
# A two-part object: body + pin, each on its own extruder. Relative layout in
# build123d coords is preserved on save.
tag = proj.add_object(name="Two Color Tag")
tag.add_part(Pos(0, 30, 0) * Box(30, 12, 3), name="Body", extruder=1)
tag.add_part(Pos(10, 30, 1.5) * Cylinder(3, 4), name="Pin", extruder=2,
settings=PrintSettings(sparse_infill_density="100%"))
proj.save("basic.3mf") # open in OrcaSlicer
What it does
orca123d writes model-only projects: geometry and per-object/per-part settings in Metadata/model_settings.config, with no project_settings.config. OrcaSlicer opens these using whatever printer / filament / print presets you currently have active, and overlays the settings shipped in the file. So you keep choosing the machine and filament in OrcaSlicer, while the model brings its own structure and overrides.
Features
- Objects and parts — a
Projectholds objects; each object is one or more parts ("volumes" in OrcaSlicer). Parts carry an extruder assignment and asubtype(NORMAL,NEGATIVEto carve material away,MODIFIERto apply settings to an overlapping region,SUPPORT_ENFORCER,SUPPORT_BLOCKER).add_object(shape, subtype=…)sets it for a single-part object;add_part(shape, subtype=…)for each volume. - Typed print settings —
PrintSettingsis a pydantic model generated from OrcaSlicer's own definitions, covering the slicer's Print tab. Every field is optional, so an instance is a sparse set of overrides; values are validated/coerced to OrcaSlicer's string form, and unknown keys pass through. Attach settings per object or per part. - Print layout vs. assembly view — objects keep their build123d coordinates as the assembled arrangement (OrcaSlicer's Assembly View); an optional per-object
print_locationlays them out differently for printing. OrcaSlicer auto-centers the whole group on a single plate, so this sets the relative print layout, not absolute bed coordinates (model-only files import onto one plate — they can't split objects across plates). - Seam painting —
part.paint_seam(region, ...)biases (or blocks) the seam using build123d geometry as the selector: a whole face, a 2D sketch on a face, an edge/wire (paint within N mm), or a solid (paint where the surface lies inside it). - Fuzzy-skin painting —
part.paint_fuzzy_skin(region, ...)enables/disables fuzzy skin over the same kinds of regions. - Project info —
Project(info=ProjectInfo(...))attaches design metadata (title,designer,description,copyright,license) written as<model>metadata, which OrcaSlicer surfaces in its Project / Auxiliaries panels.licensetakes aLicensemember (the CC options) or a raw string; any other 3MF metadata key can be passed as an extra keyword and is written verbatim. - Preview —
project.to_compound()builds a build123dCompoundmirroring the project tree (objects → parts). Passlayout="print"to preview the bed layout (print locations applied, group bed-centered) instead of the default"assembly"view. Hand it toocp_vscode.show()to preview in the OCP CAD Viewer VS Code extension, or to build123d's exporters.
Install
Requires Python ≥ 3.13. Using uv:
uv sync # core
uv sync --extra dev # + pytest and type stubs
uv sync --extra preview # + ocp_vscode for previewing Project.to_compound()
Usage by feature
Multi-part objects and per-part settings
from orca123d import PartSubtype, PrintSettings
obj = proj.add_object(name="Bracket")
obj.add_part(body, name="Body")
obj.add_part(rib, name="Rib")
obj.add_part(core, name="Dense core", subtype=PartSubtype.MODIFIER,
settings=PrintSettings(sparse_infill_density="100%")) # 100% infill where it overlaps
obj.add_part(cut, name="Pocket", subtype=PartSubtype.NEGATIVE) # carves material away
Project info
from orca123d import License, Project, ProjectInfo
proj = Project(info=ProjectInfo(
title="Two Color Tag",
designer="Jas",
description="A two-part name tag.",
license=License.CC_BY_SA, # or a raw string
Origin="MakerWorld", # any other 3MF metadata key, written verbatim
))
Print layout vs. assembly view
from build123d import Box, Pos
# Base prints where it's designed; the lid is moved aside for printing, but the
# Assembly View still shows it seated on the base.
proj.add_object(Box(40, 40, 10), name="Base")
proj.add_object(Pos(0, 0, 6.5) * Box(40, 40, 3), name="Lid",
print_location=Pos(50, 0, 0))
proj.to_compound(layout="assembly") # preview the assembled product
proj.to_compound(layout="print") # preview the print bed (spread, centered)
Model-only files always import onto a single, auto-centered plate, so
print_locationcontrols the relative bed layout (not absolute coordinates), and objects can't be split across multiple plates from a model-only file.
Seam / fuzzy-skin painting
from build123d import Axis, Box
from orca123d import EnforcerBlockerType
box = Box(20, 20, 10)
part = proj.add_object(box, name="Box").parts[0]
# Pin the seam to a vertical corner edge (paint within 1.5 mm of it).
corner = box.edges().filter_by(Axis.Z).sort_by(Axis.X)[-1]
part.paint_seam(corner, mode=EnforcerBlockerType.ENFORCER, within=1.5)
Examples
Runnable scripts live in examples/; each writes a .3mf to open in OrcaSlicer:
| Example | Shows |
|---|---|
examples/basic.py |
objects, multi-part volumes, per-object/part settings |
examples/print_layout.py |
assembled layout vs. print-bed layout (print_location) |
examples/seam_paint.py |
every seam-paint region type (face / sketch / edge / solid) |
examples/fuzzy_skin_paint.py |
fuzzy-skin painting region types |
uv run python examples/basic.py
Development
uv run pytest # tests live in tests/
uv run ruff check # lint (2-space indent)
PrintSettings and its enums are generated from src/orca123d/_proto/print.proto. Regenerate with:
uv run python -m orca123d._proto.codegen
Metadata
Release files for orca123d 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| orca123d-0.1.2.tar.gz | 93.0 kB | With provenance | Details for orca123d-0.1.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| orca123d-0.1.2-py3-none-any.whl | Python 3 | none | any | Details for orca123d-0.1.2-py3-none-any.whl |
Total release size: 192.5 kB
Release files / orca123d-0.1.2.tar.gz
| Download URL | orca123d-0.1.2.tar.gz |
|---|---|
| Size | 93.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
28a0c4d742cefe8ba9254b55e5791ceb30b7680740d9179571502b36416ec919
|
|
BLAKE2b-256 checksum How to use checksums |
4ace564eb54c48ad5ccf1b36d5d46e27b505bcbef8276502f2405ae5fa44ffa3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 27, 2026.
Transparency logRelease files / orca123d-0.1.2-py3-none-any.whl
| Download URL | orca123d-0.1.2-py3-none-any.whl |
|---|---|
| Size | 99.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c7b681c6721e2f5a3ebc6c23de49fc5ebfefb27702a561a389758d51a6534a3d
|
|
BLAKE2b-256 checksum How to use checksums |
d18a6bc5abdae29b244ef55d7629c61105a4d30cc180216f1a00b08692c48796
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 27, 2026.
Transparency logSecurity for orca123d 0.1.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for orca123d-0.1.2.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 27, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.