Anastrut的API不支持直接添加铰接连接(销钉连接),但可以通过以下步骤模拟铰接连接:
anastrut.create_cylinder_constraint(node_name='Node1', node_xyz=(0, 0, 0), u_coefficients=(1,0,0), v_coefficients=(0,1,0), radius=0.1, rotatable=True)
anastrut.create_cylinder_constraint(node_name='Node2', node_xyz=(0, 0, 0), u_coefficients=(1,0,0), v_coefficients=(0,1,0), radius=0.1, rotatable=False)
这样就模拟了一个类似铰接连接的效果,元素间可以绕Node1进行旋转,但不能绕Node2旋转。可以根据需求调整Node1和Node2的位置和限制的长度和半径等参数。