添加项目文件。
This commit is contained in:
33
CDMUtil/ToCDM/CDMOpening.cs
Normal file
33
CDMUtil/ToCDM/CDMOpening.cs
Normal file
@@ -0,0 +1,33 @@
|
||||
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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user