Passthrough Fidget Generator
Generate interlocking passthrough fidgets from existing 3D models.
The generator takes an existing STL, OBJ, or PLY model and splits it into two interlocking pieces using a smooth curved interface. The resulting pieces can be printed separately and assembled into a passthrough fidget.
Features
- Generate passthrough fidgets from existing 3D models
- Smooth mathematical curved interfaces
- Configurable clearance
- Configurable waves
- Configurable twists
- Configurable radial resolution
- Configurable height resolution
- STL output
- Command-line interface
- Python API
Installation
Install from PyPI:
pip install passthrough-fidget-generator
Command Line
Basic usage:
passthrough-fidget-generator model.stl
Specify an output directory:
passthrough-fidget-generator model.stl -o output
Parameters
--clearance
Sets the gap between the two pieces.
--clearance 0.3
The value uses the same units as the input model.
--waves
Controls the number of waves along the height of the model.
--waves 1.5
--twists
Controls how many rotations the interface makes around the model.
--twists 2
--radial-samples
Controls the resolution around the curved interface.
--radial-samples 128
Higher values produce smoother surfaces but require more processing.
--height-samples
Controls the resolution along the height of the interface.
--height-samples 64
Higher values produce smoother surfaces but require more processing.
Example
passthrough-fidget-generator model.stl \
--clearance 0.3 \
--waves 1.5 \
--twists 2 \
--radial-samples 128 \
--height-samples 64 \
-o output
Python API
The generator can be used directly from Python:
from passthrough_fidget_generator import generate_from_file
paths = generate_from_file(
"model.stl",
output="output",
clearance=0.3,
waves=1.5,
twists=2,
radial_samples=128,
height_samples=64,
)
You can also work directly with a trimesh.Trimesh object:
from passthrough_fidget_generator import generate
inner, outer = generate(
mesh,
clearance=0.3,
waves=1.5,
twists=2,
radial_samples=128,
height_samples=64,
)
Input Models
The input should be a closed, watertight solid.
Supported formats depend on the underlying trimesh installation, including:
- STL
- OBJ
- PLY
Non-watertight or invalid meshes may fail during the boolean operations used to create the pieces.
How It Works
The generator:
- Loads the input mesh.
- Creates a smooth mathematical interface through the model.
- Uses boolean operations to divide the original model along that interface.
- Applies the requested clearance.
- Extracts the resulting inner and outer pieces.
- Writes the generated meshes as STL files.
The interface is generated mathematically rather than using voxelization, allowing the resulting pieces to have smooth curved surfaces.
Dependencies
The project uses:
- NumPy
- SciPy
- Trimesh
- Manifold3D
- scikit-image
- NetworkX
These dependencies are installed automatically when installing from PyPI.
Development
Clone the repository:
git clone https://github.com/gooficat/passthrough_fidget_generator.git
cd passthrough_fidget_generator
Create a virtual environment:
python -m venv .venv
source .venv/bin/activate
Install the package in editable mode:
pip install -e .
Run the tests:
pytest
Building
Build the package with:
python -m build
The distribution files will be created in:
dist/
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 passthrough_fidget_generator-0.1.3.tar.gz.
File metadata
- Download URL: passthrough_fidget_generator-0.1.3.tar.gz
- Upload date:
- Size: 6.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
14254c460e811ce6b0ff7bb0d781229d69fd23c9a8343e1f246edd03860c1c28
|
|
| MD5 |
17c86578b549fedd790ec2363adf9663
|
|
| BLAKE2b-256 |
970bb24d5a0b31db9d5cc6dca302469c2a7b1ea33f8d5a32ac159a78c1415877
|
Provenance
The following attestation bundles were made for passthrough_fidget_generator-0.1.3.tar.gz:
Publisher:
publish.yml on gooficat/passthrough_fidget_generator
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
passthrough_fidget_generator-0.1.3.tar.gz -
Subject digest:
14254c460e811ce6b0ff7bb0d781229d69fd23c9a8343e1f246edd03860c1c28 - Sigstore transparency entry: 2482120139
- Sigstore integration time:
-
Permalink:
gooficat/passthrough_fidget_generator@273d0323431075b3c62645430fd6c6b38f240e0e -
Branch / Tag:
refs/heads/main - Owner: https://github.com/gooficat
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@273d0323431075b3c62645430fd6c6b38f240e0e -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file passthrough_fidget_generator-0.1.3-py3-none-any.whl.
File metadata
- Download URL: passthrough_fidget_generator-0.1.3-py3-none-any.whl
- Upload date:
- Size: 7.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 |
3fa39c2b2095815fa3172b4656af6e0f6921745936991dc2a226ada2374c8049
|
|
| MD5 |
1f9ed0a6d7009c7367baff175e0dc96f
|
|
| BLAKE2b-256 |
0bcf5cf9436329f637d3538fa05491b8a2c7943e753ce4fdd8b82ed5d0ca498e
|
Provenance
The following attestation bundles were made for passthrough_fidget_generator-0.1.3-py3-none-any.whl:
Publisher:
publish.yml on gooficat/passthrough_fidget_generator
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
passthrough_fidget_generator-0.1.3-py3-none-any.whl -
Subject digest:
3fa39c2b2095815fa3172b4656af6e0f6921745936991dc2a226ada2374c8049 - Sigstore transparency entry: 2482120248
- Sigstore integration time:
-
Permalink:
gooficat/passthrough_fidget_generator@273d0323431075b3c62645430fd6c6b38f240e0e -
Branch / Tag:
refs/heads/main - Owner: https://github.com/gooficat
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@273d0323431075b3c62645430fd6c6b38f240e0e -
Trigger Event:
workflow_dispatch
-
Statement type: