Skip to main content

hra_glb_mesh_collisions

PyPI - Version PyPI - Python Version


Table of Contents

Installation

pip install hra-glb-mesh-collisions

License

hra-glb-mesh-collisions is distributed under the terms of the MIT license.

Dependencies

System packages:

You may need to install libfcl liboctomap if the program does not work right away using this command (on Ubuntu):

$ sudo apt install liboctomap-dev libfcl-dev

For Python library:

  1. pygltflib
  2. trimesh

Install python dependencies with:

pip install -r requirements.txt

Usage

Example usage:

python3 mesh-mesh-collisions.py ./examples/VH_F_Kidney_Left.glb collision_result.csv

For help documentation:

$ python3 mesh-mesh-collisions.py --help

usage: mesh-mesh-collisions.py [-h] [--include-distances] [-v] input_glb output_csv

positional arguments:
  input_glb            path to input glb file
  output_csv           path to output collisions csv file

options:
  -h, --help           show this help message and exit
  --include-distances  include distances even if they dont' colide
  -v, --verbose

Sample result ouptut csv:

Notes about the distance colum:

  • distance is in meters
  • -1 = intersection
  • distance measured between two closest points
source,target,distance
VHF_hilum_of_kidney_L,VHF_kidney_capsule_L,-1
VHF_hilum_of_kidney_L,VHF_major_calyx_L_a,-1
VHF_hilum_of_kidney_L,VHF_major_calyx_L_b,0.0014157565638410548
VHF_hilum_of_kidney_L,VHF_major_calyx_L_c,-1
VHF_hilum_of_kidney_L,VHF_major_calyx_L_d,-1
VHF_hilum_of_kidney_L,VHF_minor_calyx_L_a,0.011878771067593177
VHF_hilum_of_kidney_L,VHF_minor_calyx_L_b,0.014892350577084101
VHF_hilum_of_kidney_L,VHF_minor_calyx_L_c,0.01049842653752553
VHF_hilum_of_kidney_L,VHF_minor_calyx_L_d,0.013852964218697942
VHF_hilum_of_kidney_L,VHF_minor_calyx_L_e,-1
VHF_hilum_of_kidney_L,VHF_minor_calyx_L_f,0.0003293750826728972
VHF_hilum_of_kidney_L,VHF_minor_calyx_L_g,0.0013917394770369632
VHF_hilum_of_kidney_L,VHF_minor_calyx_L_h,0.002076302121193277
VHF_hilum_of_kidney_L,VHF_minor_calyx_L_i,0.0001650410537290576
VHF_hilum_of_kidney_L,VHF_minor_calyx_L_j,0.0026597163618629024

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

hra_glb_mesh_collisions-0.1.1.tar.gz (1.4 MB view details)

Uploaded Source

Built Distribution

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

hra_glb_mesh_collisions-0.1.1-py3-none-any.whl (5.9 kB view details)

Uploaded Python 3

File details

Details for the file hra_glb_mesh_collisions-0.1.1.tar.gz.

File metadata

File hashes

Hashes for hra_glb_mesh_collisions-0.1.1.tar.gz
Algorithm Hash digest
SHA256 68f59e9a9377318121d37458998af6a53fbe7bcaab9ee2ecd2ca3e99e892561a
MD5 b116f3f4cdafdd39ccfab57f2caddf1e
BLAKE2b-256 0dc893ea3a4cb34a931b3489205a8c0eee1faddee3f1c76f66a3503f2b2f23fb

See more details on using hashes here.

File details

Details for the file hra_glb_mesh_collisions-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for hra_glb_mesh_collisions-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 4cf8f47de2b8a0de35a7293ce705b82dde7304bcda8e4705728442bb9746c046
MD5 8afb7b33e9f9d0e989ea0b3d1cf0862d
BLAKE2b-256 65c0eeb64c760bf08576bcd59cdf01b23205640fc22d8314d6845c6a5c6ecbe0

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 files

0.1.0

2 files

Supported by

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