A package for RSA
Project description
autoRSA
autoRSA是一个半自动预测RSA术式中入钉角度,导板形状的Python库。
依赖库一览
autoRSA依赖于以下Python库:
open3D,通过以下代码安装:
pip install open3d
numpy,通过以下代码安装:
pip install numpy
tqdm,通过以下代码安装:
pip install tqdm
pyvista,通过以下代码安装:
pip install pyvista
torch和sko,可选(find_nail2()函数所需)。
借助
pip install autoRSA
可以自动安装依赖库。
计算流程一览
- 函数初始化。
filename是肩胛骨模型文件的位置,建议使用已计算法向量和三角面片的.stl格式文件。
s = scapula(filename)
- 函数选点。选点采用的是最佳拟合圆的方式,用户选点应先选取关节盂下缘的点,再选取关节盂前后缘的点。
select_points1()函数提供了一个基于点云选取所需点的窗口。select_points2()函数需要用户或其他程序自己输入选取的点在文件中的索引。picked_id_pcd应是一个列表,其中储存了选择点的索引。
s.select_points1()
s.select_points2(picked_id_pcd)
- 计算最佳拟合圆圆心。
s.computer_circle()
- 移动模型以便于计算。
s.move_center_to_O()
s.find_vector()
- 钉长计算。其中
theta1,theta2,num_point这三个参数是可选的,默认为5/8度,360/40度,400点。
s.find_nail(theta1=..., theta2=..., num_point=...)
print (s.location)
# 输出举例:[array([38.44197149]), [], array([ 13.74876639, 205.71172213])]
# 输出解释:第一个数字代表求的钉长,第二个参数目前无用,第三个参数的两个值代表钉和法向量夹角以及沿着法向量旋转的角度。
- 计算把手位置。
filename代表把手文件的位置,建议使用.stl格式。我们提供了一个把手文件。用户也可以自己绘制。
s.find_handle(filename)
- 计算导板形状。
s.find_guide()
- 放置基座。
filename代表基座文件的位置,建议使用.stl格式。我们提供了一个基座文件。用户也可以自己绘制。
s.find_jizuo(filename)
- 将步骤4中移动所带来的变化复原。
s.go_back()
- 保存文件。输出包括肩胛骨模型文件
mesh.stl,把手文件handle.stl,导板文件guide.stl,钉子文件nail.stl,基座文件jizuo.stl。其他程序可以读入这些文件进行后续操作,用户也可以借助Mimics或其他软件进行后续处理。
s.save()
效果参考
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
autoRSA-0.0.6.tar.gz
(10.1 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 autoRSA-0.0.6.tar.gz.
File metadata
- Download URL: autoRSA-0.0.6.tar.gz
- Upload date:
- Size: 10.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
19ddfb627ee9c89bc351219ccb609d8d61f56d4e8e0455920defe8908e794ebe
|
|
| MD5 |
42a0a1038139f304a1da2f18c59c7e47
|
|
| BLAKE2b-256 |
870c31d664db3ba8b2058f966fa5eddfcf6c2fbf3d62eeec159dad8d18e21f39
|
File details
Details for the file autoRSA-0.0.6-py3-none-any.whl.
File metadata
- Download URL: autoRSA-0.0.6-py3-none-any.whl
- Upload date:
- Size: 8.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ca9e11fcf60aa612d97cf1bfb285b30e710a284049f6aa46fda96a2e7ee57c85
|
|
| MD5 |
3fe3c43cac8ba2fb19f1f7cb0cf338bc
|
|
| BLAKE2b-256 |
111f12bbb3ac9dd0188cb8a076defcb44bd9609239535165f52dbfb85606d870
|