def rotate(shape, x1, y1, z1, x2, y2, z2, angle): L = math.sqrt((x2 - x1)**2 + (y2 - y1)**2 + (z2 - z1)**2) direction = Common.gp_Dir((x2 - x1)/L, (y2 - y1)/L, (z2 - z1)/L) axis = Common.gp_Ax1(Common.gp_Pnt(x1, y1, z1), direction) return Construct.rotate(shape, axis, angle)
def rotate(shape, x1, y1, z1, x2, y2, z2, angle): L = math.sqrt((x2 - x1)**2 + (y2 - y1)**2 + (z2 - z1)**2) direction = Common.gp_Dir((x2 - x1) / L, (y2 - y1) / L, (z2 - z1) / L) axis = Common.gp_Ax1(Common.gp_Pnt(x1, y1, z1), direction) return Construct.rotate(shape, axis, angle)