PythonSCAD Pin Cutout
Reusable, parametric recesses for hot-gluing metal brooch pins into PythonSCAD models.
The generated cutter is a rectangular pocket with two circular recesses. The recesses leave matching knobs in the printed part, which locate the pin and give the hot glue more surface area.
Installation
PythonSCAD Pin Cutout requires PythonSCAD 1.1.0 or newer:
pip install pythonscad-pincutout
Usage
Import the package, render a cutter, position it for your design, and subtract it from the solid:
import pincutout
from pythonscad import cube
base = cube([40, 40, 2])
pin_cutter = pincutout.PinCutout.generic_25mm().render().translate([7.25, 17.45, 0])
show(base - pin_cutter)
render() deliberately applies no X/Y positioning or model-specific
centering. The pocket begins at PythonSCAD's default origin and is shifted
downward only by epsilon to make the boolean operation robust.
Custom dimensions
All dimensions are in millimetres:
cutout = pincutout.PinCutout(
length=30.0,
width=6.0,
depth=0.6,
knob_diameter=2.4,
knob_gap=8.0,
epsilon=0.001,
fn=128,
).render()
length,width, anddepthdescribe the rectangular pocket.knob_diameteris the diameter of each circular recess.knob_gapis the edge-to-edge space between the recesses. Their centre-to-centre distance isknob_gap + knob_diameter.epsilonextends overlapping geometry to avoid coincident boolean faces.fncontrols the circular tessellation.
Invalid or non-finite dimensions are rejected before rendering. The knobs must fit completely within the pocket.
Presets
PinCutout.generic_25mm() reproduces the measured geometry this project was
extracted from: a 25.5 × 5.1 × 0.4 mm pocket with 2 mm knobs separated by
a 6 mm edge-to-edge gap. It is intentionally generic and does not claim
compatibility with a particular vendor.
Preset values can be overridden:
cutout = pincutout.PinCutout.generic_25mm(depth=0.6, fn=64)
Future presets should be based on measured hardware and identify their source.
Development
Clone the repository and install the project and development tools:
git clone https://github.com/nomike/pythonscad-pincutout.git
cd pythonscad-pincutout
uv sync --all-groups
pre-commit install --hook-type pre-commit --hook-type commit-msg
uv run pre-commit run --all-files
See CONTRIBUTING.md for commits and pull requests, VERSIONING.md for automated releases, and PUBLISHING.md for the one-time GitHub and package-index setup.
License
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 pythonscad_pincutout-0.1.0.tar.gz.
File metadata
- Download URL: pythonscad_pincutout-0.1.0.tar.gz
- Upload date:
- Size: 8.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5a28aa95d4d60fc601e57659e651516e67149c7bab2b9f26af1530967d419277
|
|
| MD5 |
1e0c084b0ebe9055843068f8d3f3d56f
|
|
| BLAKE2b-256 |
4a57d10d7ba0ffad7841844d297e2e36566ec2e4d434afb2995bb7e3800f9ead
|
Provenance
The following attestation bundles were made for pythonscad_pincutout-0.1.0.tar.gz:
Publisher:
publish.yml on nomike/pythonscad-pincutout
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pythonscad_pincutout-0.1.0.tar.gz -
Subject digest:
5a28aa95d4d60fc601e57659e651516e67149c7bab2b9f26af1530967d419277 - Sigstore transparency entry: 2387416255
- Sigstore integration time:
-
Permalink:
nomike/pythonscad-pincutout@40ffdfe16f01b8808944c4ae9c4f59d93cb4624b -
Branch / Tag:
refs/heads/main - Owner: https://github.com/nomike
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@40ffdfe16f01b8808944c4ae9c4f59d93cb4624b -
Trigger Event:
push
-
Statement type:
File details
Details for the file pythonscad_pincutout-0.1.0-py3-none-any.whl.
File metadata
- Download URL: pythonscad_pincutout-0.1.0-py3-none-any.whl
- Upload date:
- Size: 5.5 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 |
64d6877b241d32e8149be85fc42a30b0aec6378e0b0efb4348d55851e68cfd6a
|
|
| MD5 |
cfe460708f9d8f776d61274f83799e3e
|
|
| BLAKE2b-256 |
6cb842f82042d6525d582a98f8e5239137dc4208e37f5e553499e62844297865
|
Provenance
The following attestation bundles were made for pythonscad_pincutout-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on nomike/pythonscad-pincutout
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pythonscad_pincutout-0.1.0-py3-none-any.whl -
Subject digest:
64d6877b241d32e8149be85fc42a30b0aec6378e0b0efb4348d55851e68cfd6a - Sigstore transparency entry: 2387416318
- Sigstore integration time:
-
Permalink:
nomike/pythonscad-pincutout@40ffdfe16f01b8808944c4ae9c4f59d93cb4624b -
Branch / Tag:
refs/heads/main - Owner: https://github.com/nomike
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@40ffdfe16f01b8808944c4ae9c4f59d93cb4624b -
Trigger Event:
push
-
Statement type: