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
Metadata
Release files for pythonscad-pincutout 0.1.0
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 | |
|---|---|---|---|---|
| pythonscad_pincutout-0.1.0.tar.gz | 8.3 kB | With provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pythonscad_pincutout-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 13.9 kB
Release files / pythonscad_pincutout-0.1.0.tar.gz
| Download URL | pythonscad_pincutout-0.1.0.tar.gz |
|---|---|
| Size | 8.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5a28aa95d4d60fc601e57659e651516e67149c7bab2b9f26af1530967d419277
|
|
BLAKE2b-256 checksum How to use checksums |
4a57d10d7ba0ffad7841844d297e2e36566ec2e4d434afb2995bb7e3800f9ead
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.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 Aug 8, 2026.
Transparency logRelease files / pythonscad_pincutout-0.1.0-py3-none-any.whl
| Download URL | pythonscad_pincutout-0.1.0-py3-none-any.whl |
|---|---|
| Size | 5.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
64d6877b241d32e8149be85fc42a30b0aec6378e0b0efb4348d55851e68cfd6a
|
|
BLAKE2b-256 checksum How to use checksums |
6cb842f82042d6525d582a98f8e5239137dc4208e37f5e553499e62844297865
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.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 Aug 8, 2026.
Transparency logSecurity for pythonscad-pincutout 0.1.0
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
All 2 files in this release have been uploaded with provenance metadata.
Attestation for pythonscad_pincutout-0.1.0.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 Aug 8, 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.