瀏覽代碼

mxg:添加可识别对象柱,设备,部件

mengxiangge 5 年之前
父節點
當前提交
87b7ba2b33

+ 9 - 5
JBIM/JBIM/BimObject.cs

@@ -22,24 +22,28 @@ namespace JBIM
         {
             ElementType = GetElementType();
         }
-       public BimId Id { get;internal set; }
-       public string ElementType { get;protected set; }
+        public BimId Id { get; internal set; }
+        public string ElementType { get; protected set; }
+        /// <summary>
+        /// 附加信息,预留
+        /// </summary>
+        public string Tag { get; set; }
         /// <summary>
         /// 获取类型Type
         /// </summary>
         /// <returns></returns>
         protected string GetElementType()
         {
-           var attributes= this.GetType().GetCustomAttributes(typeof(TypeDefinitonAttribute), true);
+            var attributes = this.GetType().GetCustomAttributes(typeof(TypeDefinitonAttribute), true);
             string result = null;
             if (attributes.Any())
             {
-                result=(attributes[0] as TypeDefinitonAttribute)?.GetTypeDefiniton();
+                result = (attributes[0] as TypeDefinitonAttribute)?.GetTypeDefiniton();
             }
 
             if (string.IsNullOrEmpty(result))
             {
-                result= TypeDefinitonUtil.GetTypeDefiniton(TypeDefinition.BimObject);
+                result = TypeDefinitonUtil.GetTypeDefiniton(TypeDefinition.BimObject);
             }
             return result;
         }

+ 27 - 0
JBIM/JBIM/Component/Column.cs

@@ -0,0 +1,27 @@
+/*-------------------------------------------------------------------------
+ * 功能描述:柱子
+ * 作者:xulisong
+ * 创建时间: 2019/6/12 14:11:03
+ * 版本号:v1.0
+ *  -------------------------------------------------------------------------*/
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using JBIM.Common;
+using JBIM.Definition;
+
+namespace JBIM.Component
+{
+    [TypeDefiniton(TypeDefinition.Space)]
+    public class Column : VisibleComponentObject
+    {
+        public Column()
+        {
+            BoundarySegments = new List<List<BimId>>();
+        }
+        public List<List<BimId>> BoundarySegments { get; private set; }
+    }
+}

+ 27 - 0
JBIM/JBIM/Component/EquipPart.cs

@@ -0,0 +1,27 @@
+/*-------------------------------------------------------------------------
+ * 功能描述:部件
+ * 作者:xulisong
+ * 创建时间: 2019/6/12 14:11:03
+ * 版本号:v1.0
+ *  -------------------------------------------------------------------------*/
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using JBIM.Common;
+using JBIM.Definition;
+
+namespace JBIM.Component
+{
+    [TypeDefiniton(TypeDefinition.Space)]
+    public class EquipPart : Equipment
+    {
+        public EquipPart()
+        {
+            BoundarySegments = new List<List<BimId>>();
+        }
+        public List<List<BimId>> BoundarySegments { get; private set; }
+    }
+}

+ 31 - 0
JBIM/JBIM/Component/Equipment.cs

@@ -0,0 +1,31 @@
+/*-------------------------------------------------------------------------
+ * 功能描述:设备
+ * 作者:xulisong
+ * 创建时间: 2019/6/12 14:11:03
+ * 版本号:v1.0
+ *  -------------------------------------------------------------------------*/
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using JBIM.Common;
+using JBIM.Definition;
+
+namespace JBIM.Component
+{
+    [TypeDefiniton(TypeDefinition.Space)]
+    public class Equipment : VisibleComponentObject
+    {
+        public Equipment()
+        {
+            
+        }
+
+
+        public string FamilyName { get; set; }
+        public string FamilyName { get; set; }
+        public string FamilyName { get; set; }
+    }
+}

+ 23 - 0
JBIM/JBIM/Component/Parameter.cs

@@ -0,0 +1,23 @@
+/* ==============================================================================
+ * 功能描述:Parameter  
+ * 创 建 者:Garrett
+ * 创建日期:2019/6/21 17:29:09
+ * ==============================================================================*/
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace JBIM.Component
+{
+    /// <summary>
+    /// Parameter
+    /// </summary>
+    class Parameter
+    {
+        public ParameterDefinition Definition { get; set; }
+
+        public string Value { get; set; }
+    }
+}

+ 40 - 0
JBIM/JBIM/Component/ParameterDefinition.cs

@@ -0,0 +1,40 @@
+/* ==============================================================================
+ * 功能描述:ParameterDefinition  
+ * 创 建 者:Garrett
+ * 创建日期:2019/6/22 13:03:46
+ * ==============================================================================*/
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace JBIM.Component
+{
+    /// <summary>
+    /// ParameterDefinition
+    /// </summary>
+    class ParameterDefinition
+    {
+        public string Id { get; set; }
+        public string Name { get; set; }
+        /// <summary>
+        /// 参数类型:Test,Area,Number,etc
+        /// </summary>
+        public ParameterType ParameterType { get; set; }
+
+        public bool Visible { get; set; } 
+    }
+
+    public enum ParameterType
+    {
+        Invalid=-1,
+        Text=0,
+        Integer,
+        Number,
+        Length,
+        Area,
+        Volume,
+        Angle
+    }
+}

+ 14 - 0
JBIM/JBIM/Definition/TypeDefinition.cs

@@ -41,6 +41,20 @@ namespace JBIM.Definition
         EquipPart,
         [Description("Column")]
         Column,
+        [Description("VirtualWall")]
+        SpaceSeparationLine,
+        [Description("Door")]
+        Door,
+        [Description("Window")]
+        Window,
+
+        [Description("Unit")]
+        Unit,
+        [Description("Grid")]
+        Grid,
+        [Description("Level")]
+        Level,
+
         #region 关系类型相关
         [Description("Relationship")]
         Relationship = -25000,

+ 5 - 0
JBIM/JBIM/JBIM.csproj

@@ -65,7 +65,12 @@
     <Compile Include="Component\Duct.cs" />
     <Compile Include="Component\MepSystem.cs" />
     <Compile Include="Component\MepSystemType.cs" />
+    <Compile Include="Component\Parameter.cs" />
+    <Compile Include="Component\ParameterDefinition.cs" />
     <Compile Include="Component\Pipe.cs" />
+    <Compile Include="Component\EquipPart.cs" />
+    <Compile Include="Component\Column.cs" />
+    <Compile Include="Component\Equipment.cs" />
     <Compile Include="Component\Space.cs" />
     <Compile Include="Component\VisibleComponentObject.cs" />
     <Compile Include="Definition\ConnectorShape.cs" />