From cea60b446311601352cc17eab419baa6488c4d21 Mon Sep 17 00:00:00 2001 From: Roy-043 <70520633+Roy-043@users.noreply.github.com> Date: Mon, 17 Oct 2022 19:48:05 +0200 Subject: [PATCH 1/2] Draft: Make Std_TransformManip work for Draft_Point --- src/Mod/Draft/draftobjects/point.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/Mod/Draft/draftobjects/point.py b/src/Mod/Draft/draftobjects/point.py index 24bc6fab08..f4d6e6e908 100644 --- a/src/Mod/Draft/draftobjects/point.py +++ b/src/Mod/Draft/draftobjects/point.py @@ -60,9 +60,15 @@ class Point(DraftObject): import Part shape = Part.Vertex(App.Vector(0, 0, 0)) obj.Shape = shape - obj.Placement.Base = App.Vector(obj.X.Value, - obj.Y.Value, - obj.Z.Value) + obj.Placement.Base = App.Vector(obj.X, obj.Y, obj.Z) + + def onChanged(self, obj, prop): + if prop == "Placement" \ + and obj.Placement.Base != App.Vector(obj.X, obj.Y, obj.Z): + base = obj.Placement.Base + obj.X = base.x + obj.Y = base.y + obj.Z = base.z # Alias for compatibility with v0.18 and earlier From 9c397cb38781a77ce698e36443ae1cb4d0db55a6 Mon Sep 17 00:00:00 2001 From: Roy-043 <70520633+Roy-043@users.noreply.github.com> Date: Tue, 18 Oct 2022 12:36:29 +0200 Subject: [PATCH 2/2] Update point.py --- src/Mod/Draft/draftobjects/point.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Mod/Draft/draftobjects/point.py b/src/Mod/Draft/draftobjects/point.py index f4d6e6e908..fda5800a74 100644 --- a/src/Mod/Draft/draftobjects/point.py +++ b/src/Mod/Draft/draftobjects/point.py @@ -60,7 +60,8 @@ class Point(DraftObject): import Part shape = Part.Vertex(App.Vector(0, 0, 0)) obj.Shape = shape - obj.Placement.Base = App.Vector(obj.X, obj.Y, obj.Z) + if obj.Placement.Base != App.Vector(obj.X, obj.Y, obj.Z): + obj.Placement.Base = App.Vector(obj.X, obj.Y, obj.Z) def onChanged(self, obj, prop): if prop == "Placement" \