More work on rotate method.

这个提交包含在:
craig-warren
2020-05-25 11:14:28 +01:00
父节点 c253cd080a
当前提交 4f040a1cc3
共有 9 个文件被更改,包括 70 次插入38 次删除

查看文件

@@ -53,6 +53,13 @@ class FractalBox(UserObjectGeometry):
super().__init__(**kwargs)
self.hash = '#fractal_box'
def rotate(self, axis, angle, origin=None):
pts = np.array([self.kwargs['p1'], self.kwargs['p2']])
rotation = UserObjectGeometry.rotate_2point_object
rot_pts = rotation(self, pts, axis, angle, origin)
self.kwargs['p1'] = tuple(rot_pts[0, :])
self.kwargs['p2'] = tuple(rot_pts[1, :])
def create(self, grid, uip):
try:
p1 = self.kwargs['p1']