Skip to main content

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)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

stl_find_ball-0.1.3-py3-none-any.whl (4.8 kB view details)

Uploaded Python 3

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

Hashes for stl_find_ball-0.1.3.tar.gz
Algorithm Hash digest
SHA256 d3b3d4a390c53761f080e65dce97df01d7b3b956c7ce85a739ff6ac5f93953a9
MD5 459e92edb2be7a64937c22578e6bdf57
BLAKE2b-256 c23c52afac8a44ceee7ac76f013a86fd50391a76a509ae26f179a11e3ccdb5fe

See more details on using hashes here.

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

Hashes for stl_find_ball-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 13d54955689a81ae13b79153aba2a7e8769739f2197a65d05c1749ae277d8ef6
MD5 43591a5934942440bc37d7e84d1edf73
BLAKE2b-256 aad25a15998ace1c2fd940d6067b8909fa8fbf69d10efa3157a1a8d524ab2be1

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page