Beispiel #1
0
 //internal constructor for creation from XbimObjectCreator
 internal XbimSpace(XbimDocument document, string name, XbimSpatialStructureElement parentElement, XbimElementCompositionEnum compositionEnum)
     : base(document, document.Model.Instances.New<IfcSpace>())
 {
     Space.CompositionType = GeIfcElementCompositionEnum(compositionEnum);
     Space.Name = name;
     if (parentElement != null) parentElement.AddToSpatialDecomposition(this);
     Document.Spaces.Add(this);
 }
 //internal constructor for creation from XbimObjectCreator
 internal XbimBuildingStorey(XbimDocument document, string name, XbimSpatialStructureElement parentElement, XbimElementCompositionEnum compositionEnum)
     : base(document, document.Model.Instances.New<IfcBuildingStorey>())
 {
     Storey.Name = name;
     Storey.CompositionType = GeIfcElementCompositionEnum(compositionEnum);
     if (parentElement != null) parentElement.AddToSpatialDecomposition(this);
     document.Storeys.Add(this);
 }
Beispiel #3
0
 //internal constructor for creation from XbimObjectCreator
 internal XbimBuilding(XbimDocument document, string name, XbimSpatialStructureElement parentElement, XbimElementCompositionEnum compositionEnum)
     : base(document, document.Model.Instances.New<IfcBuilding>())
 {
     Building.Name = name;
     Building.CompositionType = GeIfcElementCompositionEnum(compositionEnum);
     if (parentElement != null) parentElement.AddToSpatialDecomposition(this);
     if (Document.ModelView == XbimModelView.CoordinationView)
     {
         IfcLocalPlacement lp = Document.Model.Instances.New<IfcLocalPlacement>();
         lp.RelativePlacement = Document.WCS;
         if (parentElement != null)  lp.PlacementRelTo = parentElement.GetObjectPlacement();
         Building.ObjectPlacement = lp;
     }
     Document.Buildings.Add(this);
     
 }
Beispiel #4
0
        //internal constructor for creation from XbimObjectCreator
        internal XbimSite(XbimDocument document, string name, XbimSpatialStructureElement parentElement, XbimElementCompositionEnum compositionEnum)
            : base(document, document.Model.Instances.New<IfcSite>())
        {
            Site.Name = name;
            Site.CompositionType = GeIfcElementCompositionEnum(compositionEnum);
            if (parentElement != null) parentElement.AddToSpatialDecomposition(this);

            //add the site to the structure of the project if there is not different parrent object
            if (parentElement == null) ((IfcProject)_document.Model.IfcProject).AddSite(Site);
            if (Document.ModelView == XbimModelView.CoordinationView)
            {
                IfcLocalPlacement lp = Document.Model.Instances.New<IfcLocalPlacement>();
                lp.RelativePlacement = Document.WCS;
                if (parentElement != null)  lp.PlacementRelTo = parentElement.GetObjectPlacement();
                Site.ObjectPlacement = lp;
            }
            Document.Sites.Add(this);
        }
 public void AddToSpatialDecomposition(XbimSpatialStructureElement child)
 {
     _spatialElement.AddToSpatialDecomposition(child.SpatialStructureElement);
 }