STLtoMask
Table of Contents
Overview
Create a 3D image based off of an STL file and user defined spacing. Additional, options exist for rotating the mesh, adding a 3MF file to create a "color-intensity" on the surface of the image, and flipping the image and mesh along the vertical axial plane.
The script produces 2 files: 1) Metaimage file for the image, 2) STL file just incase any rotations/flips were added (makes this file even if nothing was changed from the original STL file).
Notes:
- The spacing must be integeres, even if floats are input they will be converted.
- Adding a 3MF file will greatly increase the computation time depending on mesh size ~ 30 minutes for 1 million points.
Features
Converts STL file to a 3D image.
Options:
- Add 3MF file to transfer mesh color to surface insensity on the image.
- Allows mesh rotation before image creation.
- Flip image/mesh before output along the vertical axis in the axial plane.
Installation
Using pip:
pip install STLtoMask
Examples
Basic
from STLtoMask.converter import stl_to_mask
input_path = r'/path/to/STL_file'
output_path = r/path/to/export/data'
spacing = [1, 1, 1]
stl_to_mask(input_path, output_path, spacing)
Advanced
from STLtoMask.converter import stl_to_mask
input_path = r'/path/to/STL_file'
output_path = r/path/to/export/data'
spacing = [1, 1, 1]
threemf_path = r'Z:\Morfeus\Derek\2023-06-21_OCCR.3mf'
rotation = {'zxy': [10, 5, 20]}
stl_to_mask(input_path, output_path, spacing, three_mf_path, rotation, flip=True)
Metadata
Release files for STLtoMask 0.14
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 |
|---|---|---|---|---|
| STLtoMask-0.14.tar.gz | 19.2 kB | Without provenance | Details for STLtoMask-0.14.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| STLtoMask-0.14-py3-none-any.whl | Python 3 | none | any | Details for STLtoMask-0.14-py3-none-any.whl |
Total release size: 39.3 kB
Release files / STLtoMask-0.14.tar.gz
| Download URL | STLtoMask-0.14.tar.gz |
|---|---|
| Size | 19.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
295e49b5e08089c4cc62a1eb5248324c272fdd980fbe065730ad337340c7a0d9
|
|
BLAKE2b-256 checksum How to use checksums |
3c343fdebc2307f6a6098b770185816f0416996692f18acef69be299351824a5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.13
|
Release files / STLtoMask-0.14-py3-none-any.whl
| Download URL | STLtoMask-0.14-py3-none-any.whl |
|---|---|
| Size | 20.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7f130299fc19b22302bcc040e8673f403a300d7646cb98ec8fe2c9b64190624d
|
|
BLAKE2b-256 checksum How to use checksums |
5fd32b0dc7fcd1b46049f3e830923afbd42feec3cd4dcec789ab5c0b8fb1928d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.13
|
Security for STLtoMask 0.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.
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.