using Autodesk.Revit.DB; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace CDM.Interop.Revit.CDMComponent { class CDMOpening : CDMComponent { public CDMOpening(Opening Opening, View3D view3D) { self = Opening; var boundingBox = Opening.get_BoundingBox(view3D); Length = (boundingBox.Max.X - boundingBox.Min.X) * 304.8; Width = (boundingBox.Max.Y - boundingBox.Min.Y) * 304.8; //Xl = boundingBox.Min.X * 304.8 / 1000; //Yw = boundingBox.Min.Y * 304.8 / 1000; //Zh = boundingBox.Min.Z * 304.8 / 1000; Xl = boundingBox.Min.X * 304.8 / 1000; Yw = boundingBox.Min.Y * 304.8 / 1000 + Width / 1000 / 2; Zh = boundingBox.Min.Z * 304.8 / 1000; } public double Length { get; private set; } public double Width { get; private set; } public Opening self; } }