find ball structure in a certain .stl model.
Project description
stl_find_ball
find ball structure in a certain .stl model.
Installation
pip install stl_find_ball
Usage
from stl_find_ball import locate_sphere_in_stl, vtk_visualization
import json
# input your stl filepath
STL_FILE = "BONE-1.stl"
# detected_spheres is a list of tuple
# tuple: ((center_x, center_y, center_z), radius)
detected_spheres = locate_sphere_in_stl(stl_path=STL_FILE)
# visualize the balls with stl model with VTK
vtk_visualization(
stl_path=STL_FILE,
spheres=detected_spheres
)
# Output json form data
with open(STL_FILE[:-4] + ".json", "w") as fp:
fp.write(json.dumps(detected_spheres, indent=4))
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
stl_find_ball-0.1.3.tar.gz
(4.0 kB
view details)
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 stl_find_ball-0.1.3.tar.gz.
File metadata
- Download URL: stl_find_ball-0.1.3.tar.gz
- Upload date:
- Size: 4.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.3.3 CPython/3.11.15 Windows/10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d3b3d4a390c53761f080e65dce97df01d7b3b956c7ce85a739ff6ac5f93953a9
|
|
| MD5 |
459e92edb2be7a64937c22578e6bdf57
|
|
| BLAKE2b-256 |
c23c52afac8a44ceee7ac76f013a86fd50391a76a509ae26f179a11e3ccdb5fe
|
File details
Details for the file stl_find_ball-0.1.3-py3-none-any.whl.
File metadata
- Download URL: stl_find_ball-0.1.3-py3-none-any.whl
- Upload date:
- Size: 4.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.3.3 CPython/3.11.15 Windows/10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
13d54955689a81ae13b79153aba2a7e8769739f2197a65d05c1749ae277d8ef6
|
|
| MD5 |
43591a5934942440bc37d7e84d1edf73
|
|
| BLAKE2b-256 |
aad25a15998ace1c2fd940d6067b8909fa8fbf69d10efa3157a1a8d524ab2be1
|