0

I'm getting messed up bounding boxes points only on North/South orientations when we rotate the true north in Revit. Please, has someone got the same issue? Thanks!

ProjectPosition position = eaSurface.Document.ActiveProjectLocation.GetProjectPosition(XYZ.Zero);
Transform t = Transform.CreateRotation(XYZ.BasisZ, position.Angle);

//Points transformed 
XYZ newNormal = t.OfPoint(eaSurface.Normal);
XYZ pNewMin = t.OfPoint(bbr.Min);
XYZ pNewMax = t.OfPoint(bbr.Max);

List<XYZ> bbPoints = new List<XYZ>(4)
{
    pNewMin, // bottom left
    new XYZ(pNewMin.X, pNewMin.Y, pNewMax.Z), // top left
    pNewMax, // top right
    new XYZ(pNewMax.X, pNewMax.Y, pNewMin.Z) // bottom right 
};

// create the curveloop
CurveLoop curveLoop = Utils.SetupCurveloop(bbPoints, newNormal, 0);
List<CurveLoop> cloops = new List<CurveLoop>() { curveLoop };

// create the solid
Solid solid = GeometryCreationUtilities.CreateExtrusionGeometry(cloops, newNormal, 1);
    return solid;

1 Answers1

0

The Building Coder points to some earlier discussions and solutions on handling true north for determining the wall orientation in Calculating Gross and Net Wall Areas.

Jeremy Tammik
  • 7,333
  • 2
  • 12
  • 17