build123d-utils-jas
Personal build123d utilities, extracted from a pile of CAD projects that each carried their own diverging copy.
uv add build123d-utils-jas # core
uv add 'build123d-utils-jas[fasteners,preview]' # + FastHeatSetNut, + ocp_vscode viewer
Supports build123d >=0.11. Developed and tested against both the latest
release and a pinned build123d dev revision (see [tool.uv.sources]).
Modules
fast_patch — faster Shape operations
Monkey-patches Shape.__copy__/moved/located/_apply_transform/fix/
bounding_box to skip revalidation and share the underlying TopoDS_Shape.
bounding_box also defaults to the fast non-optimal OCC box with a coarse
tolerance. Nothing happens at import time — opt in explicitly:
from build123d_utils_jas import apply_fast_patch, no_fast_patch
if __name__ == "__main__":
apply_fast_patch()
with no_fast_patch():
... # stock build123d behavior restored for this block
helpers — geometry helpers
from build123d_utils_jas import align, lift, raise_to, offset_to, extrude_to, CENTER, MIN, MAX
part = align(part, (CENTER, CENTER, MIN)) # bounding-box alignment to origin
plane = offset_to(Plane.XY.offset(3), bb.max.Z) # offset a plane to an absolute coordinate
extrude_to(heatsink_bb.min.X) # extrude pending sketches to an absolute coordinate
Also flip, shell_loft, make_solid (solid from shells, holes supported),
and convex_face_from_points (planar face from a point cloud's hull).
assembly — labeled compounds
from build123d_utils_jas import make_compound, find_part
a = make_compound(label="lamp", base=base, wago=[w1, w2])
find_part(a, "wago") # -> [wago_0, wago_1]
find_part(a, "cap.can") # dotted paths descend into nested compounds
vendor — cached STEP imports
from build123d_utils_jas import import_vendor, set_vendor_dir
set_vendor_dir("vendor") # the default; resolved against the cwd
cob = import_vendor("XLamp CMA1303.STEP", rot=(90, 0, 0))
STEP files are cached on disk as BREP keyed by content hash
(vendor/cache/<file>/<sha256>.brep) and memoized in-memory per process, so
re-running a script re-imports nothing that didn't change.
viewer — ocp_vscode wrappers (opt-in)
show_object, push_object, show_objects, reset_show are no-ops until
init_viewer() is called, so batch runs and imports never need a viewer.
Requires the preview extra when actually used.
printing — FDM printability
fix_horizontal_holes(shape) finds horizontal-ish cylindrical/conical bores
and cuts their tops into self-supporting flat-roof teardrops, leaving the
load-bearing part of the bore round.
fasteners — FastHeatSetNut
A bd_warehouse Nut for heat-set inserts with knurling removed for fast
generation, plus a fill_factor property (insert volume vs. hole volume).
Requires the fasteners extra.
AI use
AI (Claude) was used to manage the extraction of these utilities from their original per-project copies, and assisted in writing parts of the code. Design decisions and the original implementations are my own.
License
MIT
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file build123d_utils_jas-0.1.0.tar.gz.
File metadata
- Download URL: build123d_utils_jas-0.1.0.tar.gz
- Upload date:
- Size: 13.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
548c387af4bd58836883b61bd05913f0ee78650496bacc928e575b37318d1a0a
|
|
| MD5 |
7da5d96d6a737cc86480fd39b81ef6b4
|
|
| BLAKE2b-256 |
8e7e77e93dbe00f6dc76a4a12de5cb814f33df5eff2dedd13d44ddd7d784c100
|
Provenance
The following attestation bundles were made for build123d_utils_jas-0.1.0.tar.gz:
Publisher:
publish.yml on jsmnbom/build123d-utils-jas
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
build123d_utils_jas-0.1.0.tar.gz -
Subject digest:
548c387af4bd58836883b61bd05913f0ee78650496bacc928e575b37318d1a0a - Sigstore transparency entry: 2676809741
- Sigstore integration time:
-
Permalink:
jsmnbom/build123d-utils-jas@5ab6161c2cac01ee27ad538cf03eaa49d5b3f7a0 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/jsmnbom
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@5ab6161c2cac01ee27ad538cf03eaa49d5b3f7a0 -
Trigger Event:
release
-
Statement type:
File details
Details for the file build123d_utils_jas-0.1.0-py3-none-any.whl.
File metadata
- Download URL: build123d_utils_jas-0.1.0-py3-none-any.whl
- Upload date:
- Size: 17.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c7690b0d9c535849568897159c676cc4bd1326804e18dc376ae8803a22728788
|
|
| MD5 |
03c08bdcadde02c18fa18bf586e426d5
|
|
| BLAKE2b-256 |
1b7c5f79c38cceda70bbb3e0db102639c23a9ea1993615a539bb685a43efebce
|
Provenance
The following attestation bundles were made for build123d_utils_jas-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on jsmnbom/build123d-utils-jas
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
build123d_utils_jas-0.1.0-py3-none-any.whl -
Subject digest:
c7690b0d9c535849568897159c676cc4bd1326804e18dc376ae8803a22728788 - Sigstore transparency entry: 2676809865
- Sigstore integration time:
-
Permalink:
jsmnbom/build123d-utils-jas@5ab6161c2cac01ee27ad538cf03eaa49d5b3f7a0 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/jsmnbom
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@5ab6161c2cac01ee27ad538cf03eaa49d5b3f7a0 -
Trigger Event:
release
-
Statement type: