Revit BoundingBoxXYZ True North

时间:2018-07-16 12:45:15

标签: revit-api revit

当我们在Revit中旋转真正的北时,我只会把北/南方向上的边界框点弄乱了。拜托,有人遇到同样的问题吗?谢谢!

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 个答案:

答案 0 :(得分:0)

建筑编码人员指出了有关determining the wall orientation中的Calculating Gross and Net Wall Areas处理真北的一些早期讨论和解决方案。