internal XbimSlab(XbimDocument document, XbimSlabType xbimSlabType, XbimLayerSetDirectionEnum MaterialLayersDirection, XbimDirectionSenseEnum MaterialLayersDirectionSense, float MaterialLayersOffsett) : base(document) { BaseInit(xbimSlabType); SetMaterialLayerSetUsage(MaterialLayersDirection, MaterialLayersDirectionSense, MaterialLayersOffsett); }
internal XbimRampFlightType(XbimDocument document, string name, string description, XbimRampFlightTypeEnum type) : base(document) { BaseInit(name); IfcRampFlightType.Description = description; IfcRampFlightType.PredefinedType = type.IfcRampFlightTypeEnum(); }
internal XbimLocalPlacement(XbimDocument Document, IfcLocalPlacement LocalPlacement) { if (Document == null || LocalPlacement == null) throw new ArgumentNullException(); _document = Document; _localPlacement = LocalPlacement; }
//overloaded internal constructors: internal XbimSlabType(XbimDocument document, string name) : base(document) { BaseInit(name); _document.SlabTypes.Add(this); IfcSlabType.PredefinedType = IfcSlabTypeEnum.NOTDEFINED; }
internal XbimRoof(XbimDocument document, XbimRoofTypeEnum roofType) : base(document) { _document.Roofs.Add(this); _ifcBuildingElement = _document.Model.Instances.New<IfcRoof>(); IfcRoof.ShapeType = GetIfcRoofTypeEnum(roofType); }
//overloaded internal constructors: internal XbimWindowStyle(XbimDocument document, string name) : base(document) { BaseInit(name); IfcWindowStyle.ConstructionType = IfcWindowStyleConstructionEnum.NOTDEFINED; IfcWindowStyle.OperationType = IfcWindowStyleOperationEnum.NOTDEFINED; }
internal XbimPlate(XbimDocument document, XbimPlateType xbimPlateType) : base(document) { BaseInit(xbimPlateType); _ifcBuildingElement.SetMaterialLayerSetUsage(xbimPlateType.IfcMaterialLayerSet, IfcLayerSetDirectionEnum.AXIS1, IfcDirectionSenseEnum.POSITIVE, 0); }
internal XbimWindowStyle(XbimDocument document, string name, string description, XbimWindowStyleConstructionEnum construction, XbimWindowStyleOperationEnum operation) : base(document) { BaseInit(name); IfcWindowStyle.Description = description; IfcWindowStyle.ConstructionType = construction.IfcWindowStyleConstructionEnum(); IfcWindowStyle.OperationType = operation.IfcWindowStyleOperationEnum(); }
internal XbimLocalPlacement(XbimDocument Document, double placementX, double placementY, double placementZ) { _document = Document; _localPlacement = _document.Model.Instances.New<IfcLocalPlacement>(); _localPlacement.RelativePlacement = _document.Model.Instances.New<IfcAxis2Placement3D>(); IfcAxis2Placement3D placenemt = _localPlacement.RelativePlacement as IfcAxis2Placement3D; placenemt.SetNewLocation(placementX, placementY, placementZ); }
//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); }
//overloaded internal constructors: internal XbimCurtainWallType(XbimDocument document, string name) : base(document) { IfcCurtainWallType = _document.Model.Instances.New<IfcCurtainWallType>(); IfcCurtainWallType.Name = name; _document.CurtainWallTypes.Add(this); IfcCurtainWallType.PredefinedType = IfcCurtainWallTypeEnum.NOTDEFINED; }
//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); }
/// <summary> /// Creates solid extrured from rectangle profile /// </summary> /// <param name="document"></param> /// <param name="depth">depth of the extrusion</param> /// <param name="width">Width of the rectangle profile</param> /// <param name="length">Length of the rectangle profile</param> /// <param name="direction">Direction of the extrusion</param> internal XbimExtrudedAreaSolid(XbimDocument document, double depth, double width, double length, XbimXYZ direction) : base(document) { BaseInit<IfcExtrudedAreaSolid>(); InitToRectangleProfile(width, length); IfcExtrudedAreaSolid.Depth = depth; IfcExtrudedAreaSolid.ExtrudedDirection = direction.CreateIfcDirection(Document); }
internal XbimMaterial(XbimDocument document, string materialName) { _ifcMaterial = document.Model.Instances.New<IfcMaterial>(); _ifcMaterial.Name = materialName; _document = document; document.Materials.Add(this); }
internal XbimPlateType(XbimDocument document, string name, string description, XbimPlateTypeEnum plateType) : base(document) { BaseInit(name); _ifcTypeProduct.Description = description; _document.PlateTypes.Add(this); IfcPlateType.PredefinedType = plateType.IfcPlateTypeEnum(); }
internal XbimExtrudedAreaSolid(XbimDocument document, double depth, XbimXYZ direction) :base (document) { BaseInit<IfcExtrudedAreaSolid>(); InitToCompositCurveProfile(); IfcExtrudedAreaSolid.Depth = depth; IfcExtrudedAreaSolid.ExtrudedDirection = direction.CreateIfcDirection(Document); }
internal XbimBeamType(XbimDocument document, string name, string description, XbimBeamTypeEnum type) : base(document) { BaseInit(name); IfcBeamType.Description = description; IfcBeamType.PredefinedType = type.IfcBeamTypeEnum(); _document.BeamTypes.Add(this); }
internal XbimWallType(XbimDocument document, string name, string description, XbimWallTypeEnum predefinedType) : base(document) { BaseInit(name); _ifcTypeProduct.Description = description; (_ifcTypeProduct as IfcWallType).PredefinedType = GetIfcWallTypeEnum(predefinedType); _document.WallTypes.Add(this); }
internal XbimFacetedBrep(XbimDocument document) { _document = document; _ifcFacetedBrep = _document.Model.Instances.New<IfcFacetedBrep>(); IfcClosedShell outer = _document.Model.Instances.New<IfcClosedShell>(); _ifcFacetedBrep.Outer = outer; //if (outer.CfsFaces == null) outer.CfsFaces = new XbimSet<IfcFace>(); _faces = outer.CfsFaces; }
internal XbimBuildingElementProxy(XbimDocument document, XbimBuildingElementProxyType xbimBuildingElementProxyType, XbimLayerSetDirectionEnum MaterialLayersDirection, XbimDirectionSenseEnum MaterialLayersDirectionSense, float MaterialLayersOffsett) : base(document) { BaseInit(xbimBuildingElementProxyType); EnumConvertor<XbimLayerSetDirectionEnum, IfcLayerSetDirectionEnum> conv1 = new EnumConvertor<XbimLayerSetDirectionEnum, IfcLayerSetDirectionEnum>(); IfcLayerSetDirectionEnum direction = conv1.Conversion(MaterialLayersDirection); EnumConvertor<XbimDirectionSenseEnum, IfcDirectionSenseEnum> conv2 = new EnumConvertor<XbimDirectionSenseEnum, IfcDirectionSenseEnum>(); IfcDirectionSenseEnum sense = conv2.Conversion(MaterialLayersDirectionSense); _ifcBuildingElement.SetMaterialLayerSetUsage(xbimBuildingElementProxyType.IfcMaterialLayerSet, direction, sense, MaterialLayersOffsett); }
internal XbimRevolvedAreaSolid(XbimDocument document, double angle, XbimXYZ spindleDirection, XbimXYZ spindleLocation) :base (document) { BaseInit<IfcRevolvedAreaSolid>(); IfcRevolvedAreaSolid.Angle = angle; IfcRevolvedAreaSolid.Axis = Document.Model.Instances.New<IfcAxis1Placement> (ax => { ax.Axis = spindleDirection.CreateIfcDirection(Document); ax.Location = spindleLocation.CreateIfcCartesianPoint(Document); }); }
/// <summary> /// Returns existing local placement of the object. It ignores grid placement if exists. /// </summary> /// <param name="Document">Document for Xbim object</param> /// <param name="ForObject">Xbim object for which the placement should be find</param> /// <returns>Xbim object for local placement</returns> public static XbimLocalPlacement GetExistingLocalPlacement(XbimDocument Document, IXbimRoot ForObject) { if (ForObject == null) throw new ArgumentNullException(); IfcProduct product = ForObject.AsRoot as IfcProduct; if (product == null) throw new Exception("This type of object can not contain placement"); IfcLocalPlacement placement = product.ObjectPlacement as IfcLocalPlacement; if (placement == null) return null; return new XbimLocalPlacement(Document, placement); }
internal XbimSlabType(XbimDocument document, string name, string description, XbimSlabTypeEnum predefinedType) : base(document) { BaseInit(name); _ifcTypeProduct.Description = description; EnumConvertor<XbimSlabTypeEnum, IfcSlabTypeEnum> convertor = new EnumConvertor<XbimSlabTypeEnum, IfcSlabTypeEnum>(); IfcSlabTypeEnum type = convertor.Conversion(predefinedType); IfcSlabType.PredefinedType = type; _document.SlabTypes.Add(this); }
internal XbimBuildingElementProxy(XbimDocument document, XbimBuildingElementProxyType xbimBuildingElementProxyType) : base(document) { if (xbimBuildingElementProxyType != null) { BaseInit(xbimBuildingElementProxyType); _ifcBuildingElement.SetMaterialLayerSetUsage(xbimBuildingElementProxyType.IfcMaterialLayerSet, IfcLayerSetDirectionEnum.AXIS1, IfcDirectionSenseEnum.POSITIVE, 0); } else { BaseInit(); } }
public XbimClassification(XbimDocument document, string publisherId, string name, string edition, DateTime? date) { IfcClassification _classification = document.Model.Instances.New<IfcClassification>(); _classification.Source = publisherId; _classification.Name = name; _classification.Edition = edition; if (date != null && date.HasValue) { _classification.EditionDate.DayComponent = date.Value.Day; _classification.EditionDate.MonthComponent = date.Value.Month; _classification.EditionDate.YearComponent = date.Value.Year; } }
//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); }
//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); }
internal XbimLocalPlacement(XbimDocument Document, IXbimRoot ForObject, double placementX, double placementY, double placementZ) { if (Document == null || ForObject == null) throw new ArgumentNullException(); _document = Document; if (!(ForObject.AsRoot is IfcProduct)) { throw new Exception("Object is not descendant of the Product object and can not have a placement."); } IfcProduct product = ForObject.AsRoot as IfcProduct; if (product.ObjectPlacement != null) { Debug.WriteLine("XbimLocalPlacement: Object already contains placement. It is going to be replaced with new placement."); } product.SetNewObjectLocalPlacement(placementX, placementY, placementZ); }
internal XbimStairFlightType(XbimDocument document, IfcStairFlightType beamType) : base(document) { _ifcTypeProduct = beamType; }
//overloaded internal constructors: internal XbimStairFlightType(XbimDocument document, string name) : base(document) { BaseInit(name); IfcStairFlightType.PredefinedType = IfcStairFlightTypeEnum.NOTDEFINED; }