Skip to content

Commit

Permalink
Don't show section box if clipping planes are not exactly 6 items
Browse files Browse the repository at this point in the history
  • Loading branch information
GeorgDangl committed Jul 4, 2024
1 parent c23f6eb commit fadfe35
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/IPA.Bcfier.Revit/Services/RevitViewpointDisplayService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,13 @@ public string GetName()

private void ApplyClippingPlanes(UIDocument uiDocument, View3D view, BcfViewpoint bcfViewpoint)
{
if (bcfViewpoint.ClippingPlanes?.Count != 6)
{
// Don't apply section box if it's not a full box
view.IsSectionBoxActive = false;
return;
}

AxisAlignedBoundingBox boundingBox = GetViewpointClippingBox(bcfViewpoint);

if (!boundingBox.Equals(AxisAlignedBoundingBox.Infinite))
Expand Down

0 comments on commit fadfe35

Please sign in to comment.