コード例 #1
0
ファイル: SimpleGroup.cs プロジェクト: bnaand/xBim-Toolkit
 private SimpleBuildingElementType GetTypeFromHierarchy(IfcTypeProduct type)
 {
     return (GetTypeFromHierarchy(type, Root));
 }
コード例 #2
0
 public SimpleBuildingElementType(IfcTypeProduct type)
 {
     _type = type;
     Init();
 }
コード例 #3
0
ファイル: SimpleGroup.cs プロジェクト: bnaand/xBim-Toolkit
 private static SimpleBuildingElementType GetTypeFromHierarchy(IfcTypeProduct type, SimpleGroup group)
 {
     SimpleBuildingElementType simpleType = group._buildingElementTypes.Where(t => t.IfcType == type).FirstOrDefault();
     if (simpleType != null) return simpleType;
     foreach (var subGroup in group._children)
     {
         simpleType = GetTypeFromHierarchy(type, subGroup);
         if (simpleType != null) return simpleType;
     }
     return null;
 }
コード例 #4
0
        void RelationChanged(object sender, PropertyChangedEventArgs e)
        {
            //this would mean major change and it is necessary to recompute everything
            if (e.PropertyName == "RelatingType" || e.PropertyName == "RelatedObjects")
            {
                IfcRelDefinesByType rel = sender as IfcRelDefinesByType;
                IfcTypeProduct type = rel.RelatingType as IfcTypeProduct;
                if (type == null) return;

                _type = type;
                Init();

                OnPropertyChanged("Name");
                OnPropertyChanged("Elements");
                OnPropertyChanged("ElementsCarbonData");
                OnPropertyChanged("CarbonData");
            }
        }