Skip to main content

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 = "./test_data/Bone-1.new.stl"

# detected_spheres is a list of tuple
# tuple: ((center_x, center_y, center_z), radius, point_per_area)
detected_spheres = locate_sphere_in_stl(stl_path=STL_FILE, max_ball_cnt=4)

# visualize the balls with stl model with VTK
vtk_visualization(
    stl_path=STL_FILE, 
    spheres=detected_spheres
)

# Output json form data
detected_spheres = [item[:2] for item in detected_spheres]
with open(STL_FILE[:-4] + ".json", "w") as fp:
    fp.write(json.dumps(detected_spheres, indent=4))

Metadata

Release files for stl-find-ball 0.1.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for stl-find-ball 0.1.4
File Size Uploaded Provenance Actions
stl_find_ball-0.1.4.tar.gz 6.3 kB Without provenance Details for stl_find_ball-0.1.4.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for stl-find-ball 0.1.4
File Interpreter ABI Platform Actions
stl_find_ball-0.1.4-py3-none-any.whl Python 3 none any Details for stl_find_ball-0.1.4-py3-none-any.whl

Total release size: 13.5 kB

Release files / stl_find_ball-0.1.4.tar.gz

Download URL stl_find_ball-0.1.4.tar.gz
Size 6.3 kB
Tags Source
SHA-256 checksum
How to use checksums
2150e06a2b56957652e2fedda3fa769e4d372e9a7f675e583ddf307fdd2d1d54
BLAKE2b-256 checksum
How to use checksums
106e08dd173ee2fe46d7641d0c0a6065b0313ffcc48cee7d94bacfb9fcea0382
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.4.1 CPython/3.10.20 Windows/10

Release files / stl_find_ball-0.1.4-py3-none-any.whl

Download URL stl_find_ball-0.1.4-py3-none-any.whl
Size 7.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c983a027d0de7c4519cf4ba9dd9c7bfb554b2ce0aea4db2477175329fdbeaf09
BLAKE2b-256 checksum
How to use checksums
f98b136f2222d0ca515099c5acea8a4cf17b381edc1c9d3f60c368939d973329
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.4.1 CPython/3.10.20 Windows/10

Security for stl-find-ball 0.1.4

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page