Skip to content

Commit

Permalink
When exporting section boxes from Revit, apply negated model transfor…
Browse files Browse the repository at this point in the history
…mations
  • Loading branch information
GeorgDangl committed Aug 29, 2024
1 parent 718eb17 commit c408ad2
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,10 @@ private static List<BcfViewpointClippingPlane> 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();
Expand Down

0 comments on commit c408ad2

Please sign in to comment.