From c408ad20f496cc8a1b8e550e21c3c245008c0ef8 Mon Sep 17 00:00:00 2001 From: Georg Dangl Date: Thu, 29 Aug 2024 15:34:40 +0200 Subject: [PATCH] When exporting section boxes from Revit, apply negated model transformations --- .../Services/RevitViewpointCreationService.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/IPA.Bcfier.Revit/Services/RevitViewpointCreationService.cs b/src/IPA.Bcfier.Revit/Services/RevitViewpointCreationService.cs index 9c01974..d9a84c1 100644 --- a/src/IPA.Bcfier.Revit/Services/RevitViewpointCreationService.cs +++ b/src/IPA.Bcfier.Revit/Services/RevitViewpointCreationService.cs @@ -214,6 +214,10 @@ private static List GetBcfClippingPlanes(UIDocument u } BoundingBoxXYZ sectionBox = view3D.GetSectionBox(); + + var transform = uiDocument.Document.ActiveProjectLocation.GetTransform().Inverse; + sectionBox.Transform = transform; + XYZ transformedMin = sectionBox.Transform.OfPoint(sectionBox.Min); XYZ transformedMax = sectionBox.Transform.OfPoint(sectionBox.Max); Vector3 minCorner = transformedMin.ToVector3().ToMeters();