diff --git a/src/Mod/BIM/ArchSectionPlane.py b/src/Mod/BIM/ArchSectionPlane.py index b12bfa0f25..012ef09691 100644 --- a/src/Mod/BIM/ArchSectionPlane.py +++ b/src/Mod/BIM/ArchSectionPlane.py @@ -404,7 +404,7 @@ def getSVG( mv = pl.multVec(FreeCAD.Vector(0, 0, 1)) mv.multiply(source.ViewObject.CutMargin) pl.move(mv) - wp.align_to_placement(pl) + wp.align_to_rotation(pl.Rotation) # wp.inverse() render = ArchVRM.Renderer() render.setWorkingPlane(wp) diff --git a/src/Mod/Draft/WorkingPlane.py b/src/Mod/Draft/WorkingPlane.py index 8889535e35..5fa9329ba5 100644 --- a/src/Mod/Draft/WorkingPlane.py +++ b/src/Mod/Draft/WorkingPlane.py @@ -478,6 +478,21 @@ class PlaneBase: return True + def align_to_rotation(self, rot): + """Align the WP to a rotation. + + Parameter + --------- + rot: Base.Rotation + Rotation. + + Returns + ------- + `True` + """ + self.u, self.v, self.axis = self._axes_from_rotation(rot) + return True + def get_global_coords(self, point, as_vector=False): """Translate a point or vector from the local (WP) coordinate system to the global coordinate system. @@ -1040,7 +1055,7 @@ class Plane(PlaneBase): if rebase: super().align_to_placement(place) else: - super()._axes_from_rotation(place.Rotation) + super().align_to_rotation(place.Rotation) def inverse(self): """Invert the direction of the plane.