Skip to content

Commit a46d42f

Browse files
committed
breaking: Rename TransformOperation point to position
1 parent 9e828e8 commit a46d42f

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

declaracad/occ/algo.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -961,9 +961,9 @@ def _update_proxy(self, change: dict[str, Any]):
961961

962962
class TransformOperation(Atom):
963963
#: Point
964-
point = Coerced(Point, coercer=coerce_point)
964+
position = Coerced(Point, coercer=coerce_point)
965965

966-
def _default_point(self) -> Point:
966+
def _default_position(self) -> Point:
967967
return Point(0.0, 0.0, 0.0)
968968

969969

declaracad/occ/impl/occ_transform.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,13 @@ def get_transform(self):
3636
t.SetTranslation(gp_Vec(op.x, op.y, op.z))
3737
elif isinstance(op, Rotate):
3838
t.SetRotation(
39-
gp_Ax1(gp_Pnt(*op.point), gp_Dir(*op.direction)), op.angle
39+
gp_Ax1(gp_Pnt(*op.position), gp_Dir(*op.direction)), op.angle
4040
)
4141
elif isinstance(op, Mirror):
4242
Ax = gp_Ax2 if op.plane else gp_Ax1
43-
t.SetMirror(Ax(gp_Pnt(*op.point), gp_Dir(op.x, op.y, op.z)))
43+
t.SetMirror(Ax(gp_Pnt(*op.position), gp_Dir(op.x, op.y, op.z)))
4444
elif isinstance(op, Scale):
45-
t.SetScale(gp_Pnt(*op.point), op.s)
45+
t.SetScale(gp_Pnt(*op.position), op.s)
4646
result.Multiply(t)
4747
else:
4848
axis = gp_Ax3(d.position.proxy, d.direction.proxy)

0 commit comments

Comments
 (0)