BIM: fix placement issue in BIM_View (#27015)

* BIM: fix placement issue in BIM_View

* BIM: fix placement issue in BIM_View
This commit is contained in:
Roy-043
2026-01-19 17:30:04 +01:00
committed by GitHub
parent 548c1ee638
commit fbb8e07e60
2 changed files with 17 additions and 2 deletions

View File

@@ -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)

View File

@@ -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.