solid123d
This package has moved into scad123d
solid123d is now the geometry engine inside scad123d rather than a separate distribution. 0.9.1 was its last release with code in it; this one only carries this notice. It is not going anywhere — it stays installable, and anything pinned to it keeps working — but new work happens in the merged package.
pip install scad123dgives you both
import scad123dandimport solid123d, with the same API this package had. scad123d converts OpenSCAD models to STEP; solid123d is the geometry engine underneath it — OpenSCAD's semantics on build123d — usable on its own if you're writing SolidPython rather than converting.scadfiles.They were split because solid123d has no OpenSCAD dependency and that boundary is worth keeping. It still is, and it still holds — it is enforced by imports now rather than by two repositories, which stopped being worth the release-ordering cost of changing both at once.
A bridge that runs SolidPython (OpenSCAD-style) code on the build123d BRep kernel. Change one import and existing code produces native build123d shapes instead of OpenSCAD source.
# before
from solid import translate, cube, scad_render_to_file
# after
from solid123d import translate, cube, scad_render_to_file
c = translate([10, 0, 0])(cube(10, center=True))
scad_render_to_file(c, filename="c.scad") # writes c.step (real BRep geometry)
Every object returned is a plain build123d Shape, so bridged code mixes
freely with native build123d — the intended migration path:
from build123d import fillet
from solid123d import cube
part = cube(20, center=True)
part = fillet(part.edges(), radius=2) # native build123d from here on
Supported
-
Primitives:
cube,sphere,cylinder(incl.r1/r2cones,d/d1/d2),square,circle,polygon(incl.pathsholes),text -
Font resolution:
text(font=...)matches fonts by family name the way fontconfig/OpenSCAD does (incl."Family:style=Style"syntax), by scanning system font directories with fontTools and handing build123d the resolved file path. This fixes fonts with nonstandard subfamilies (e.g."Academy Engraved LET", whose subfamily "Plain" makes OCCT's own lookup fall back to Arial). -
Transforms (callable style,
translate(v)(obj, ...)):translate,rotate(vector, scalar, and axis-angle forms with OpenSCAD ordering),scale,mirror,resize,color,offset -
Booleans:
union(),difference(),intersection()— plus native operatorsa + b,a - b,a & b -
minkowski()with a ball —minkowski()(A, sphere(r))/minkowski()(A, circle(r)), by far the most common use ofminkowski()(rounding a shape), is computed exactly asoffset(A, r)— including a ball tessellated as an explicitpolyhedron(), the way BOSL2 builds its rounding kernels. Exact BRep geometry, not an approximation. -
hull(), for every case with a closed-form answer — all computed as exact BRep geometry: equal-radius spheres in any arrangement (including the collinear capsule/slot idiom), equal-radius parallel cylinders sharing a span (the "rounded box from corner posts" idiom), exactly two spheres of any radii (two spherical caps sewn to their external tangent cone; overlap and containment handled), exactly two 2D circles (the keyhole/slot idiom), and any collection of purely flat-faced children (cubes,polyhedron()s, extruded polygons — the hull is exactly the convex hull of their vertices). See Known differences for what still raises. -
polyhedron(points, faces)— explicit point/face solids, with OpenSCAD's tolerance for either winding direction. -
color()that survives into STEP export — colors live on bodies, never on groups. Every operation keeps one invariant: the result is a set of non-overlapping bodies, each with at most one resolved color. Precedence for contested material: an assigned color beats uncolored material, and between two assigned colors the later operand wins — so a red sphere stays whole under a later uncolored cube, while a later blue cube would take the shared material.union()partitions overlapping colored children accordingly,difference()cuts each colored body on its own and keeps its color (cutter colors are ignored),intersection()gives shared material the later operand's color when it has one, andcolor()fills whatever is still uncolored without repainting explicit inner colors.scale()/mirror()carry colors and structure through.hull()andminkowski()create new material, so they warn and drop the children's colors; an enclosingcolor()still applies. Every part is labeled with the color name you wrote (color("SteelBlue")→steelblue, numeric colors get the CSS name or hex).export_step(shape, path)writes one colored STEP product per body under your own grouping;export_step(..., group_by_color=True)buckets the bodies under one group per color instead (plusuncolored), which is what slicers read. Uncolored models are entirely unaffected. -
a * bintersection is not overloaded; usea & borintersection()(a, b). -
hull()raisesNotImplementedErroroutside the closed-form cases above — notably three or more spheres of unequal radii (their hull needs planes tangent to three spheres at once, a genuinely harder object) and mixtures of curved children. Model those explicitly (loft/sweep), or import through scad123d, which renders unsupported hulls as meshes via OpenSCAD. -
minkowski()raisesNotImplementedErrorexcept for the ball cases above; general Minkowski sums have no BRep equivalent. Useoffset()or fillet/chamfer on the build123d object instead. -
linear_extrude(twist=...)raisesNotImplementedError. -
$fn/segmentsarguments are accepted and ignored — BRep curves are exact. -
scad_render()(source string) raisesNotImplementedError. -
OpenSCAD modifiers (
#,%,!) andimport()/surface()/projection()are not implemented.
Development
just test # or: uv run pytest
Metadata
Release files for solid123d 0.9.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 |
|---|---|---|---|---|
| solid123d-0.9.2.tar.gz | 392.3 kB | Without provenance | Details for solid123d-0.9.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| solid123d-0.9.2-py3-none-any.whl | Python 3 | none | any | Details for solid123d-0.9.2-py3-none-any.whl |
Total release size: 651.0 kB
Release files / solid123d-0.9.2.tar.gz
| Download URL | solid123d-0.9.2.tar.gz |
|---|---|
| Size | 392.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
597c04b9825aeae938e597045a76c60516d6006f42175950ecb16f2129f3f3ee
|
|
BLAKE2b-256 checksum How to use checksums |
b9131a3df6a6a30d932ad553f2ac689d6c525042eced0b2325e35d2585a6c7ae
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.7.19
|
Release files / solid123d-0.9.2-py3-none-any.whl
| Download URL | solid123d-0.9.2-py3-none-any.whl |
|---|---|
| Size | 258.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8c5216b0ca57c24232e1598a06a388b4663c6eed9dc2f635793fe4d51eedf5de
|
|
BLAKE2b-256 checksum How to use checksums |
131bb8417f8691626a31d67c39656cd333edb81d06ca25dad93c9e281be245c6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.7.19
|
Security for solid123d 0.9.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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A 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.