public static DivideXYZ ( Autodesk lhs, double rhs ) : Autodesk.Revit.DB.XYZ | ||
lhs | Autodesk | divided XYZ |
rhs | double | number |
return | Autodesk.Revit.DB.XYZ |
/// <summary> /// find the center of the BoundingBox /// </summary> /// <param name="bbox">BoundingBox</param> /// <returns>center Point</returns> private Vector FindBBoxCenter(BoundingBoxXYZ bbox) { Autodesk.Revit.DB.XYZ center = MathUtil.DivideXYZ(MathUtil.AddXYZ(bbox.Max, bbox.Min), 2.0); return(MathUtil.XYZ2Vector(center)); }
/// <summary> /// move the BoundingBox to the center of the Coordinate System, /// modify its size to the size of Geometry's BoundingBox /// </summary> /// <param name="bbox"></param> private void InitializeBBox(BoundingBoxXYZ bbox) { Autodesk.Revit.DB.XYZ size = MathUtil.SubXYZ(bbox.Max, bbox.Min); m_bbox.Max = MathUtil.DivideXYZ(size, 2.0); m_bbox.Min = MathUtil.DivideXYZ(size, -2.0); }