Skip to main content

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
  • torchsko,可选(find_nail2()函数所需)。

借助

pip install autoRSA

可以自动安装依赖库。

计算流程一览

  1. 函数初始化。filename是肩胛骨模型文件的位置,建议使用已计算法向量和三角面片的.stl格式文件。
s = scapula(filename)
  1. 函数选点。选点采用的是最佳拟合圆的方式,用户选点应先选取关节盂下缘的点,再选取关节盂前后缘的点。select_points1()函数提供了一个基于点云选取所需点的窗口。select_points2()函数需要用户或其他程序自己输入选取的点在文件中的索引。picked_id_pcd应是一个列表,其中储存了选择点的索引。
s.select_points1()
s.select_points2(picked_id_pcd)
  1. 计算最佳拟合圆圆心。
s.computer_circle()
  1. 移动模型以便于计算。
s.move_center_to_O()
s.find_vector()
  1. 钉长计算。其中theta1theta2num_point这三个参数是可选的,默认为5/8度,360/40度,400点。
s.find_nail(theta1=..., theta2=..., num_point=...)
print (s.location)
# 输出举例:[array([38.44197149]), [], array([ 13.74876639, 205.71172213])]
# 输出解释:第一个数字代表求的钉长,第二个参数目前无用,第三个参数的两个值代表钉和法向量夹角以及沿着法向量旋转的角度。
  1. 计算把手位置。filename代表把手文件的位置,建议使用.stl格式。我们提供了一个把手文件。用户也可以自己绘制。
s.find_handle(filename)
  1. 计算导板形状。
s.find_guide()
  1. 放置基座。filename代表基座文件的位置,建议使用.stl格式。我们提供了一个基座文件。用户也可以自己绘制。
s.find_jizuo(filename)
  1. 将步骤4中移动所带来的变化复原。
s.go_back()
  1. 保存文件。输出包括肩胛骨模型文件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 hashes)

Uploaded Source

Built Distribution

autoRSA-0.0.6-py3-none-any.whl (8.8 kB view hashes)

Uploaded Python 3

Supported by

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