/*------------------------------------------------------------------------- * 功能描述:ParseCore * 作者:xulisong * 创建时间: 2019/6/13 18:03:03 * 版本号:v1.0 * -------------------------------------------------------------------------*/ using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using JBIM; using JBIM.Component; using RevitToJBim.Common; namespace RevitToJBim.ComponentParse { /* * 核心解析类不解析关系 */ /// /// 核心解析类 /// public class ParseCore { public static BimObject GetObject(object obj) { return null; } public static Connector CreateConnector(Autodesk.Revit.DB.Connector connector) { var result= new Connector(); result.SourceId = RevitIdGenerator.GetConnectorId(connector); switch (connector.Domain) { case Autodesk.Revit.DB.Domain.DomainHvac: { result.Domain = ConnectorDomain.DomainHvac.ToString(); break; } case Autodesk.Revit.DB.Domain.DomainPiping: { result.Domain = ConnectorDomain.DomainPiping.ToString(); break; } } result.IsConnected = connector.IsConnected; result.Description = connector.Description; result.Origin = BimConverter.ConvertToXYZ(connector.Origin); return result; } public static MepSystem CreateConnector(Autodesk.Revit.DB.MEPSystem mepSystem) { var result= new MepSystem(); result.Name = mepSystem.Name; result.SourceId = mepSystem.Id.ToString(); return result; } public static MepSystemType CreateConnector(Autodesk.Revit.DB.MEPSystemType mepSystemType) { var result = new MepSystemType(); result.Name = mepSystemType.Name; result.SourceId = mepSystemType.Id.ToString(); return result; } } }