internal override void ParseXml(XmlElement xml) { base.ParseXml(xml); foreach (XmlNode child in xml.ChildNodes) { string name = child.Name; if (string.Compare(name, "RelatedElements") == 0) { List <IfcProduct> products = new List <IfcProduct>(); foreach (XmlNode cn in child.ChildNodes) { IfcProduct p = mDatabase.ParseXml <IfcProduct>(cn as XmlElement); if (p != null) { products.Add(p); } } RelatedElements = products; } else if (string.Compare(name, "RelatingStructure") == 0) { RelatingStructure = mDatabase.ParseXml <IfcSpatialElement>(child as XmlElement); } } }
internal IfcGeographicElement(IfcProduct host, IfcObjectPlacement p, IfcProductRepresentation r) : base(host, p, r) { if (mDatabase.mRelease == ReleaseVersion.IFC2x3) { throw new Exception(KeyWord + " only supported in IFC4!"); } }
internal override void parseJObject(JObject obj) { base.parseJObject(obj); JArray array = obj.GetValue("ShapeOfProduct", StringComparison.InvariantCultureIgnoreCase) as JArray; if (array != null) { foreach (JObject jobj in array) { IfcProduct product = mDatabase.ParseJObject <IfcProduct>(jobj); if (product != null) { mShapeOfProduct.Add(product); } } } array = obj.GetValue("HasShapeAspects", StringComparison.InvariantCultureIgnoreCase) as JArray; if (array != null) { List <IfcShapeAspect> aspects = mDatabase.extractJArray <IfcShapeAspect>(array); for (int icounter = 0; icounter < aspects.Count; icounter++) { aspects[icounter].PartOfProductDefinitionShape = this; } } }
internal void updateReferences() { IfcObjectDefinition objectDefinition = mObject as IfcObjectDefinition; if (objectDefinition != null) { foreach (IfcRelDefinesByProperties isDefinedBy in mIsDefinedBy) { isDefinedBy.RelatedObjects.Add(objectDefinition); } if (mDecomposes != null) { mDecomposes.RelatedObjects.Add(objectDefinition); } if (mNests != null) { mNests.RelatedObjects.Add(objectDefinition); } IfcObject obj = mObject as IfcObject; if (obj != null) { IfcProduct product = objectDefinition as IfcProduct; if (product != null) { if (mContainedIn != null) { mContainedIn.RelatedElements.Add(product); } } } } }
internal override void ParseXml(XmlElement xml) { base.ParseXml(xml); foreach (XmlNode child in xml.ChildNodes) { string name = child.Name; if (string.Compare(name, "ShapeOfProduct") == 0) { foreach (XmlNode cn in child.ChildNodes) { IfcProduct product = mDatabase.ParseXml <IfcProduct>(cn as XmlElement); if (product != null) { mShapeOfProduct.Add(product); } } } if (string.Compare(name, "HasShapeAspects") == 0) { foreach (XmlNode cn in child.ChildNodes) { IfcShapeAspect aspect = mDatabase.ParseXml <IfcShapeAspect>(cn as XmlElement); if (aspect != null) { mHasShapeAspects.Add(aspect); } } } } }
public IfcBridgePrismaticElement(IfcProduct host, IfcObjectPlacement p, IfcProductRepresentation r, IfcBridgePrismaticElementType type) : base(host, p, r) { if (mDatabase.mRelease == ReleaseVersion.IFC2x3 || mDatabase.mRelease == ReleaseVersion.IFC4 || mDatabase.mRelease == ReleaseVersion.IFC4A1) { throw new Exception(KeyWord + " only supported in IFC5!"); } mPredefinedType = type; }
protected IfcObjectPlacement(DatabaseIfc db, IfcProduct p) : base(db) { if (p != null) { p.Placement = this; if (!mPlacesObject.Contains(p)) mPlacesObject.Add(p); } }
public IfcBridgeSegment(IfcProduct host, IfcObjectPlacement p, IfcProductRepresentation r, IfcBridgeSegmentType type, List <IfcCivilElementPart> parts) : base(host, p, r) { if (mDatabase.mRelease == ReleaseVersion.IFC2x3 || mDatabase.mRelease == ReleaseVersion.IFC4 || mDatabase.mRelease == ReleaseVersion.IFC4A1) { throw new Exception(KeyWord + " only supported in IFC5!"); } mSegmentType = type; mSegmentParts = parts.ConvertAll(x => x.mIndex); }
public IfcWallStandardCase(IfcProduct container, IfcMaterialLayerSetUsage layerSetUsage, IfcAxis2Placement3D placement, double length, double height) : base(container, new IfcLocalPlacement(container.Placement, placement), null) { DatabaseIfc db = mDatabase; double tol = mDatabase.Tolerance; setMaterial(layerSetUsage); IfcShapeRepresentation asr = IfcShapeRepresentation.GetAxisRep(new IfcPolyline(new IfcCartesianPoint(db, 0, 0, 0), new IfcCartesianPoint(db, length, 0, 0))); List <IfcShapeModel> reps = new List <IfcShapeModel>(); reps.Add(asr); double t = layerSetUsage.ForLayerSet.MaterialLayers.ToList().ConvertAll(x => x.LayerThickness).Sum(); reps.Add(new IfcShapeRepresentation(new IfcExtrudedAreaSolid(new IfcRectangleProfileDef(db, "", length, t), new IfcAxis2Placement3D(new IfcCartesianPoint(db, length / 2.0, layerSetUsage.OffsetFromReferenceLine + (layerSetUsage.DirectionSense == IfcDirectionSenseEnum.POSITIVE ? 1 : -1) * t / 2.0, 0)), height))); Representation = new IfcProductDefinitionShape(reps); }
internal static void parseFields(IfcGrid g, List <string> arrFields, ref int ipos, ReleaseVersion schema) { IfcProduct.parseFields(g, arrFields, ref ipos); g.mUAxes = ParserSTEP.SplitListLinks(arrFields[ipos++]); g.mVAxes = ParserSTEP.SplitListLinks(arrFields[ipos++]); string s = arrFields[ipos++]; if (s != "$") { g.mWAxes = ParserSTEP.SplitListLinks(s); } if (schema != ReleaseVersion.IFC2x3) { s = arrFields[ipos++]; if (s[0] == '.') { g.mPredefinedType = (IfcGridTypeEnum)Enum.Parse(typeof(IfcGridTypeEnum), s.Replace(".", "")); } } }
internal GlobalIdChangeManager(BaseClassIfc obj) { mObject = obj; IfcObjectDefinition objectDefinition = obj as IfcObjectDefinition; if (objectDefinition != null) { mIsDefinedBy.AddRange(objectDefinition.mIsDefinedBy); foreach (IfcRelDefinesByProperties rdp in mIsDefinedBy) { rdp.RelatedObjects.Remove(objectDefinition); } mDecomposes = objectDefinition.mDecomposes; if (mDecomposes != null) { mDecomposes.RelatedObjects.Remove(objectDefinition); } mNests = objectDefinition.mNests; if (mNests != null) { mNests.RelatedObjects.Remove(objectDefinition); } IfcObject o = mObject as IfcObject; if (o != null) { IfcProduct product = objectDefinition as IfcProduct; if (product != null) { mContainedIn = product.mContainedInStructure; if (mContainedIn != null) { mContainedIn.RelatedElements.Remove(product); } } } } }
internal IfcElectricTimeControl(IfcProduct host, IfcObjectPlacement placement, IfcProductRepresentation representation, IfcDistributionSystem system) : base(host, placement, representation, system) { }
protected static void parseFields(IfcPositioningElement p, List <string> arrFields, ref int ipos) { IfcProduct.parseFields(p, arrFields, ref ipos); }
internal IfcGeographicElement(IfcProduct host, IfcObjectPlacement p, IfcProductRepresentation r) : base(host, p, r) { if (mDatabase.mSchema == Schema.IFC2x3) throw new Exception(mKW + " only supported in IFC4!"); }
internal IfcUnitaryControlElement(IfcProduct host, IfcObjectPlacement p, IfcProductRepresentation r, IfcDistributionSystem system) : base(host, p, r, system) { }
internal IfcWasteTerminal(IfcProduct host, IfcObjectPlacement placement, IfcProductRepresentation representation, IfcDistributionSystem system) : base(host, placement, representation, system) { }
internal IfcTendonAnchor(IfcProduct host, IfcObjectPlacement placement, IfcProductRepresentation representation) : base(host, placement, representation) { }
public IfcElement GenerateMappedItemElement(IfcProduct container, IfcCartesianTransformationOperator transform) { string typename = this.GetType().Name; typename = typename.Substring(0, typename.Length - 4); IfcProductDefinitionShape pds = new IfcProductDefinitionShape(new IfcShapeRepresentation(new IfcMappedItem(RepresentationMaps[0], transform))); IfcElement element = IfcElement.constructElement(typename, container,null, pds); element.RelatingType = this; return element; }
public IfcVibrationIsolator(IfcProduct host, IfcObjectPlacement p, IfcProductRepresentation r) : base(host, p, r) { }
internal IfcBridgeContactElement(IfcProduct host, IfcObjectPlacement placement, IfcProductRepresentation representation) : base(host, placement, representation) { }
protected void ReplaceDatabase(BaseClassIfc revised) { IfcRoot thisRoot = this as IfcRoot, revisedRoot = revised as IfcRoot; if (thisRoot != null && revisedRoot != null) { revisedRoot.GlobalId = thisRoot.GlobalId; revisedRoot.OwnerHistory = thisRoot.OwnerHistory; revisedRoot.Name = thisRoot.Name; revisedRoot.Description = thisRoot.Description; IfcObjectDefinition thisObjectDefinition = this as IfcObjectDefinition, revisedObjectDefinition = revised as IfcObjectDefinition; if (thisObjectDefinition != null && revisedObjectDefinition != null) { foreach (IfcRelAggregates rel in thisObjectDefinition.IsDecomposedBy.ToList()) { rel.RelatingObject = revisedObjectDefinition; } foreach (IfcRelNests rel in thisObjectDefinition.IsNestedBy.ToList()) { rel.RelatingObject = revisedObjectDefinition; } foreach (IfcRelAssigns assigns in thisObjectDefinition.HasAssignments.ToList()) { assigns.RelatedObjects.Remove(thisObjectDefinition); assigns.RelatedObjects.Add(revisedObjectDefinition); } IfcRelDeclares relDeclares = thisObjectDefinition.HasContext; if (relDeclares != null) { relDeclares.RelatedDefinitions.Remove(thisObjectDefinition); relDeclares.RelatedDefinitions.Add(revisedObjectDefinition); } foreach (IfcRelAssociates associates in thisObjectDefinition.HasAssociations.ToList()) { associates.RelatedObjects.Remove(thisObjectDefinition); associates.RelatedObjects.Add(revisedObjectDefinition); } IfcObject thisObject = this as IfcObject, revisedObject = revised as IfcObject; if (thisObject != null && revisedObject != null) { revisedObject.ObjectType = thisObject.ObjectType; if (thisObject.mIsTypedBy != null) { thisObject.mIsTypedBy.mRelatedObjects.Remove(thisObject); } IfcProduct thisProduct = this as IfcProduct, revisedProduct = revised as IfcProduct; if (thisProduct != null && revisedProduct != null) { thisProduct.detachFromHost(); IfcElement thisElement = this as IfcElement, revisedElement = revised as IfcElement; if (thisElement != null && revisedElement != null) { revisedElement.Tag = thisElement.Tag; } } } else { IfcTypeObject thisTypeObject = this as IfcTypeObject, revisedTypeObject = revised as IfcTypeObject; if (thisTypeObject != null && revisedTypeObject != null) { IfcTypeProduct thisTypeProduct = this as IfcTypeProduct, revisedTypeProduct = revised as IfcTypeProduct; if (thisTypeProduct != null && revisedTypeProduct != null) { revisedTypeProduct.Tag = thisTypeProduct.Tag; IfcElementType thisElementType = this as IfcElementType, revisedElementType = revised as IfcElementType; if (thisElementType != null && revisedElementType != null) { revisedElementType.ElementType = thisElementType.ElementType; } } } } } } else { IfcRepresentationItem representationItem = this as IfcRepresentationItem, revisedItem = revised as IfcRepresentationItem; if (representationItem != null && revisedItem != null) { IfcStyledItem styledItem = representationItem.StyledByItem; if (styledItem != null) { styledItem.Item = revisedItem; } foreach (IfcShapeModel shapeModel in representationItem.mRepresents.ToList()) { shapeModel.Items.Remove(representationItem); shapeModel.Items.Add(revisedItem); } IfcPresentationLayerAssignment layerAssignment = representationItem.mLayerAssignment; if (layerAssignment != null) { layerAssignment.AssignedItems.Remove(representationItem); layerAssignment.AssignedItems.Add(revisedItem); } } } mDatabase[revised.mIndex] = null; revised.mIndex = mIndex; mDatabase[mIndex] = revised; }
internal IfcAnnotation(IfcProduct host) : base(host) { if (mDatabase.mModelView != ModelView.If2x3NotAssigned && mDatabase.mModelView != ModelView.Ifc4NotAssigned) throw new Exception("Invalid Model View for " + KeyWord + " : " + mDatabase.ModelView.ToString()); }
internal IfcAirToAirHeatRecovery(IfcProduct host, IfcObjectPlacement placement, IfcProductRepresentation representation, IfcDistributionSystem system) : base(host, placement, representation, system) { }
internal IfcUnitaryControlElement(IfcProduct host, IfcObjectPlacement p, IfcProductRepresentation r, IfcDistributionSystem system) : base(host,p,r, system) { }
internal static IfcElement constructElement(string className, IfcProduct container, IfcObjectPlacement pl, IfcProductRepresentation r) { return constructElement(className, container, pl, r, null); }
public IfcCurtainWall(IfcProduct host, IfcObjectPlacement p, IfcProductRepresentation r) : base(host, p, r) { }
public IfcElementAssembly(IfcProduct host, IfcAssemblyPlaceEnum place, IfcElementAssemblyTypeEnum type) : base(host.mDatabase) { mHost = host; AssemblyPlace = place; PredefinedType = type; }
internal IfcCableCarrierFitting(IfcProduct host, IfcObjectPlacement placement, IfcProductRepresentation representation, IfcDistributionSystem system) : base(host, placement, representation, system) { }
internal IfcEvaporativeCooler(IfcProduct host, IfcObjectPlacement placement, IfcProductRepresentation representation, IfcDistributionSystem system) : base(host, placement, representation, system) { }
public IfcCivilElement(IfcProduct host, IfcObjectPlacement p, IfcProductRepresentation r) : base(host, p, r) { if (mDatabase.mSchema == Schema.IFC2x3) throw new Exception(KeyWord + " only supported in IFC4!"); }
public IfcColumn(IfcProduct host, IfcObjectPlacement p, IfcProductRepresentation r) : base(host, p, r) { }
public IfcWallStandardCase(IfcProduct container, IfcMaterialLayerSetUsage layerSetUsage, IfcAxis2Placement3D placement, double length, double height) : base(container,new IfcLocalPlacement(container.Placement, placement),null) { DatabaseIfc db = mDatabase; double tol = mDatabase.Tolerance; setMaterial(layerSetUsage); IfcShapeRepresentation asr = IfcShapeRepresentation.GetAxisRep(new IfcPolyline(new IfcCartesianPoint(db,0,0,0),new IfcCartesianPoint(db,length,0,0))); List<IfcShapeModel> reps = new List<IfcShapeModel>(); reps.Add(asr); double t = layerSetUsage.ForLayerSet.MaterialLayers.ConvertAll(x=>x.LayerThickness).Sum(); reps.Add(new IfcShapeRepresentation( new IfcExtrudedAreaSolid(new IfcRectangleProfileDef(db,"",length, t), new IfcAxis2Placement3D(new IfcCartesianPoint(db,length/2.0, layerSetUsage.OffsetFromReferenceLine + (layerSetUsage.DirectionSense == IfcDirectionSenseEnum.POSITIVE ? 1 : -1) * t/2.0, 0)), height))); Representation = new IfcProductDefinitionShape(reps); }
internal IfcMechanicalFastener(IfcProduct host, IfcObjectPlacement placement, IfcProductRepresentation representation) : base(host, placement, representation) { }
internal IfcDistributionElement(IfcProduct host, IfcObjectPlacement p, IfcProductRepresentation r, IfcDistributionSystem system) : this(host,p,r) { if (system != null) system.assign(this); }
internal IfcBridgeSegmentPart(IfcProduct host, IfcObjectPlacement placement, IfcProductRepresentation representation) : base(host, placement, representation) { }
internal void setAggregate(BaseClassIfc obj) { IfcProduct product = obj as IfcProduct; if (product != null) { mProducts.Add(product); IfcBuildingStorey buildingStorey = obj as IfcBuildingStorey; if (buildingStorey != null) { mBuildingStories.Add(buildingStorey); } IfcGrid grid = obj as IfcGrid; if (grid != null) { mGrids.Add(grid); } IfcSlab slab = product as IfcSlab; if (slab != null) { mSlabs.Add(slab); } IfcStructuralItem structuralItem = obj as IfcStructuralItem; if (structuralItem != null) { mStructItems.Add(structuralItem); } IfcWall wall = product as IfcWall; if (wall != null) { mWalls.Add(wall); } return; } //IfcApplication application = obj as IfcApplication; //if (application != null) // mApplications.Add(application); IfcComplexProperty cp = obj as IfcComplexProperty; if (cp != null) { mComplexProperties.Add(cp); return; } IfcCoordinateOperation coordOp = obj as IfcCoordinateOperation; if (coordOp != null) { mCoordinateOperations.Add(coordOp); return; } IfcEdgeCurve edgeCurve = obj as IfcEdgeCurve; if (edgeCurve != null) { mEdgeCurves.Add(edgeCurve); return; } IfcExternalReferenceRelationship externalReferenceRelationship = obj as IfcExternalReferenceRelationship; if (externalReferenceRelationship != null) { mExternalRelationships.Add(externalReferenceRelationship); return; } //IfcExtrudedAreaSolid extrudedAreaSolid = result as IfcExtrudedAreaSolid; //if(extrudedAreaSolid != null) //{ // if(result as IfcExtrudedAreaSolidTapered == null) // aggregate.mExtrusions.Add(extrudedAreaSolid); // return extrudedAreaSolid; //} IfcGeometricRepresentationSubContext geometricRepresentationContext = obj as IfcGeometricRepresentationSubContext; if (geometricRepresentationContext != null) { mGeomContexts.Add(geometricRepresentationContext); return; } IfcGroup group = obj as IfcGroup; if (group != null) { IfcZone zone = group as IfcZone; if (zone != null) { mZones.Add(zone); return; } mGroups.Add(group); return; } IfcIndexedColourMap indexedColourMap = obj as IfcIndexedColourMap; if (indexedColourMap != null) { mIndexedColourMap.Add(indexedColourMap); return; } IfcIndexedTextureMap indexedTextureMap = obj as IfcIndexedTextureMap; if (indexedTextureMap != null) { mIndexedTextureMap.Add(indexedTextureMap); return; } IfcLocalPlacement localPlacement = obj as IfcLocalPlacement; if (localPlacement != null) { mLocalPlacements.Add(localPlacement); return; } IfcMappedItem mi = obj as IfcMappedItem; if (mi != null) { mMappedItems.Add(mi); return; } IfcMaterial material = obj as IfcMaterial; if (material != null) { mMaterials.Add(material); return; } IfcMaterialProperties materialProperties = obj as IfcMaterialProperties; if (materialProperties != null) { mMaterialProperties.Add(materialProperties); return; } IfcMaterialPropertiesSuperSeded materialPropertiesSS = obj as IfcMaterialPropertiesSuperSeded; if (materialPropertiesSS != null) { mMaterialPropertiesSS.Add(materialPropertiesSS); return; } // IfcMechanicalFastener mechanicalFastener = result as IfcMechanicalFastener; //if(mechanicalFastener != null) //{ // mFasteners.Add(mechanicalFastener); // return mechanicalFastener; //} //IfcOwnerHistory ownerHistory = result as IfcOwnerHistory; //if(ownerHistory != null) //{ // mOwnHistories.Add(ownerHistory); // return ownerHistory; //} IfcPresentationLayerAssignment presentationLayerAssignment = obj as IfcPresentationLayerAssignment; if (presentationLayerAssignment != null) { mPresentationLayerAssignments.Add(presentationLayerAssignment); return; } IfcProductRepresentation productRepresentation = obj as IfcProductRepresentation; if (productRepresentation != null) { mProductReps.Add(productRepresentation); return; } IfcPropertySet propSet = obj as IfcPropertySet; if (propSet != null) { mPropertySets.Add(propSet); return; } //IfcProfileDef profileDef = obj as IfcProfileDef; //if (profileDef != null) //{ // mProfiles.Add(profileDef); // return profileDef; //} IfcRelationship relationship = obj as IfcRelationship; if (relationship != null) { mRelationships.Add(relationship); return; } IfcRepresentation representation = obj as IfcRepresentation; if (representation != null) { mRepresentations.Add(representation); return; } //IfcRepresentationMap representationMap = obj as IfcRepresentationMap; //if (representationMap != null) //{ // mRepMaps.Add(representationMap); // return representationMap; //} IfcResourceConstraintRelationship rcr = obj as IfcResourceConstraintRelationship; if (rcr != null) { mConstraintRelationships.Add(rcr); return; } IfcShapeAspect shapeAspect = obj as IfcShapeAspect; if (shapeAspect != null) { mShapeAspects.Add(shapeAspect); return; } IfcStyledItem styledItem = obj as IfcStyledItem; if (styledItem != null) { mStyledItems.Add(styledItem); return; } IfcTypeProduct typeProduct = obj as IfcTypeProduct; if (typeProduct != null) { mTypeProducts.Add(typeProduct); return; } setCustomAggregate(obj); }
public IfcRoof(IfcProduct host, IfcObjectPlacement placement, IfcProductRepresentation representation) : base(host, placement, representation) { }
internal IfcElectricFlowStorageDevice(IfcProduct host, IfcObjectPlacement placement, IfcProductRepresentation representation, IfcDistributionSystem system) : base(host, placement, representation, system) { }
internal IfcReinforcingMesh(IfcProduct host, IfcObjectPlacement placement, IfcProductRepresentation representation) : base(host, placement, representation) { }
protected IfcElement(IfcProduct host, IfcObjectPlacement p, IfcProductRepresentation r) : base(host, p, r) { }
public IfcRampFlight(IfcProduct host, IfcObjectPlacement p, IfcProductRepresentation r) : base(host, p, r) { }
internal static IfcElement constructElement(string className, IfcProduct container, IfcObjectPlacement pl, IfcProductRepresentation r, IfcDistributionSystem system) { string str = className, definedType = ""; if (!string.IsNullOrEmpty(str)) { string[] fields = str.Split(".".ToCharArray()); if (fields.Length > 1) { str = fields[0]; definedType = fields[1]; } } IfcElement element = null; Type type = Type.GetType("GeometryGym.Ifc." + str); if (type != null) { ConstructorInfo ctor = type.GetConstructor(new[] { typeof(IfcProduct), typeof(IfcObjectPlacement), typeof(IfcProductRepresentation) }); if (ctor == null) { ctor = type.GetConstructor(new[] { typeof(IfcProduct), typeof(IfcObjectPlacement), typeof(IfcProductRepresentation), typeof(IfcDistributionSystem) }); if (ctor == null) throw new Exception("XXX Unrecognized Ifc Constructor for " + className); else element = ctor.Invoke(new object[] { container, pl, r, system }) as IfcElement; } else element = ctor.Invoke(new object[] { container, pl, r }) as IfcElement; } if (element == null) element = new IfcBuildingElementProxy(container, pl, r); if (!string.IsNullOrEmpty(definedType)) { if (container.mDatabase.mSchema == Schema.IFC2x3) element.ObjectType = definedType; else { type = element.GetType(); PropertyInfo pi = type.GetProperty("PredefinedType"); if (pi != null) { Type enumType = Type.GetType("GeometryGym.Ifc." + type.Name + "TypeEnum"); if (enumType != null) { FieldInfo fi = enumType.GetField(definedType); if (fi == null) { element.ObjectType = definedType; fi = enumType.GetField("NOTDEFINED"); } if (fi != null) { int i = (int)fi.GetValue(enumType); object newEnumValue = Enum.ToObject(enumType, i); pi.SetValue(element, newEnumValue, null); } else element.ObjectType = definedType; } else element.ObjectType = definedType; } else element.ObjectType = definedType; } } return element; }
protected IfcBridgeElement(IfcProduct host, IfcObjectPlacement p, IfcProductRepresentation r) : base(host, p, r) { }
protected IfcElementComponent(IfcProduct host, IfcObjectPlacement placement, IfcProductRepresentation representation) : base(host,placement,representation) { }
internal IfcHeatExchanger(IfcProduct host, IfcObjectPlacement placement, IfcProductRepresentation representation, IfcDistributionSystem system) : base(host, placement, representation, system) { }
internal IfcEnergyConversionDevice(IfcProduct host, IfcObjectPlacement placement, IfcProductRepresentation representation, IfcDistributionSystem system) : base(host, placement, representation, system) { }
internal IfcUnitaryEquipment(IfcProduct host, IfcObjectPlacement placement, IfcProductRepresentation representation, IfcDistributionSystem system) : base(host, placement, representation, system) { }
internal IfcTendon(IfcProduct host, IfcObjectPlacement placement, IfcProductRepresentation representation, double diam, double area, double forceMeasure, double pretress, double fricCoeff, double anchorSlip, double minCurveRadius) : base(host, placement,representation) { mNominalDiameter = diam; mCrossSectionArea = area; mTensionForce = forceMeasure; mPreStress = pretress; mFrictionCoefficient = fricCoeff; mAnchorageSlip = anchorSlip; mMinCurvatureRadius = minCurveRadius; }
internal IfcLightFixture(IfcProduct host, IfcObjectPlacement placement, IfcProductRepresentation representation, IfcDistributionSystem system) : base(host, placement, representation, system) { }
internal IfcTransportElement(IfcProduct host, IfcObjectPlacement placement, IfcProductRepresentation representation) : base(host, placement, representation) { }
public IfcBeamStandardCase(IfcProduct host, IfcMaterialProfileSetUsage profile, IfcAxis2Placement3D placement, double length) : base(host, profile, placement, length) { }
internal IfcValve(IfcProduct host, IfcObjectPlacement placement, IfcProductRepresentation representation, IfcDistributionSystem system) : base(host, placement, representation, system) { }
public IfcBeamStandardCase(IfcProduct host, IfcMaterialProfileSetUsage profile, IfcAxis2Placement3D placement, Tuple <double, double> arcOrigin, double arcAngle) : base(host, profile, placement, arcOrigin, arcAngle) { }
public IfcWall(IfcProduct host, IfcObjectPlacement p, IfcProductRepresentation r) : base(host, p, r) { }
protected IfcBuildingElement(IfcProduct host, IfcMaterialProfileSetUsage profile, IfcAxis2Placement3D placement, Tuple <double, double> arcOrigin, double arcAngle) : base(host, profile, placement, arcOrigin, arcAngle) { }
protected void ReplaceDatabase(BaseClassIfc revised) { IfcRoot thisRoot = this as IfcRoot, revisedRoot = revised as IfcRoot; if (thisRoot != null && revisedRoot != null) { revisedRoot.GlobalId = thisRoot.GlobalId; revisedRoot.OwnerHistory = thisRoot.OwnerHistory; revisedRoot.Name = thisRoot.Name; revisedRoot.Description = thisRoot.Description; IfcObjectDefinition thisObjectDefinition = this as IfcObjectDefinition, revisedObjectDefinition = revised as IfcObjectDefinition; if (thisObjectDefinition != null && revisedObjectDefinition != null) { foreach (IfcRelAggregates rel in thisObjectDefinition.IsDecomposedBy.ToList()) { rel.RelatingObject = revisedObjectDefinition; } foreach (IfcRelNests rel in thisObjectDefinition.IsNestedBy.ToList()) { rel.RelatingObject = revisedObjectDefinition; } IfcRelAggregates relAggregates = thisObjectDefinition.Decomposes; if (relAggregates != null) { relAggregates.RelatedObjects.Remove(thisObjectDefinition); relAggregates.RelatedObjects.Add(revisedObjectDefinition); } IfcRelNests relNests = thisObjectDefinition.Nests; if (relNests != null) { relNests.RelatedObjects.Remove(thisObjectDefinition); relNests.RelatedObjects.Add(thisObjectDefinition); } foreach (IfcRelDefinesByProperties relDefinesByProperties in thisObjectDefinition.mIsDefinedBy.ToList()) { relDefinesByProperties.RelatedObjects.Remove(thisObjectDefinition); relDefinesByProperties.RelatedObjects.Add(revisedObjectDefinition); } foreach (IfcRelAssigns assigns in thisObjectDefinition.HasAssignments.ToList()) { assigns.RelatedObjects.Remove(thisObjectDefinition); assigns.RelatedObjects.Add(revisedObjectDefinition); } IfcRelDeclares relDeclares = thisObjectDefinition.HasContext; if (relDeclares != null) { relDeclares.RelatedDefinitions.Remove(thisObjectDefinition); relDeclares.RelatedDefinitions.Add(revisedObjectDefinition); } foreach (IfcRelAssociates associates in thisObjectDefinition.HasAssociations.ToList()) { associates.RelatedObjects.Remove(thisObjectDefinition); associates.RelatedObjects.Add(revisedObjectDefinition); } IfcObject thisObject = this as IfcObject, revisedObject = revised as IfcObject; if (thisObject != null && revisedObject != null) { if (!string.IsNullOrEmpty(thisObject.ObjectType)) { revisedObject.ObjectType = thisObject.ObjectType; } if (thisObject.mIsTypedBy != null) { thisObject.mIsTypedBy.mRelatedObjects.Remove(thisObject); } IfcProduct thisProduct = this as IfcProduct, revisedProduct = revised as IfcProduct; if (thisProduct != null && revisedProduct != null) { IfcRelContainedInSpatialStructure containedInSpatialStructure = thisProduct.mContainedInStructure; if (containedInSpatialStructure != null) { containedInSpatialStructure.RelatedElements.Remove(thisProduct); containedInSpatialStructure.RelatedElements.Add(revisedProduct); } IfcElement thisElement = this as IfcElement, revisedElement = revised as IfcElement; if (thisElement != null && revisedElement != null) { revisedElement.Tag = thisElement.Tag; List <IfcRelVoidsElement> voids = thisElement.HasOpenings.ToList(); foreach (var relVoids in voids) { relVoids.RelatingBuildingElement = revisedElement; } } IfcSpatialElement thisSpatial = this as IfcSpatialElement, revisedSpatial = revised as IfcSpatialElement; if (thisSpatial != null && revisedSpatial != null) { foreach (IfcRelContainedInSpatialStructure contained in thisSpatial.ContainsElements.ToList()) { contained.RelatingStructure = revisedSpatial; } } else if (revisedSpatial != null && thisElement != null) { if (containedInSpatialStructure != null) { containedInSpatialStructure.RelatedElements.Remove(revisedProduct); containedInSpatialStructure.RelatingStructure.AddAggregated(revisedProduct); } List <IfcProduct> subProducts = thisObjectDefinition.IsDecomposedBy.SelectMany(x => x.RelatedObjects).OfType <IfcProduct>().ToList(); if (subProducts.Count > 0) { new IfcRelContainedInSpatialStructure(subProducts, revisedSpatial); } foreach (IfcRelAssociatesMaterial associates in revisedSpatial.HasAssociations.OfType <IfcRelAssociatesMaterial>().ToList()) { associates.RelatedObjects.Remove(revisedSpatial); } IfcFacilityPart facilityPart = revisedSpatial as IfcFacilityPart; if (facilityPart != null) { IfcFacility facility = revisedSpatial.FindHost <IfcFacility>(); if (facility != null) { facility.AddAggregated(revisedSpatial); } } } } } else { IfcTypeObject thisTypeObject = this as IfcTypeObject, revisedTypeObject = revised as IfcTypeObject; if (thisTypeObject != null && revisedTypeObject != null) { IfcTypeProduct thisTypeProduct = this as IfcTypeProduct, revisedTypeProduct = revised as IfcTypeProduct; if (thisTypeProduct != null && revisedTypeProduct != null) { revisedTypeProduct.Tag = thisTypeProduct.Tag; IfcElementType thisElementType = this as IfcElementType, revisedElementType = revised as IfcElementType; if (thisElementType != null && revisedElementType != null) { revisedElementType.ElementType = thisElementType.ElementType; } } } } } } else { IfcRepresentationItem representationItem = this as IfcRepresentationItem, revisedItem = revised as IfcRepresentationItem; if (representationItem != null && revisedItem != null) { IfcStyledItem styledItem = representationItem.StyledByItem; if (styledItem != null) { styledItem.Item = revisedItem; } foreach (IfcShapeModel shapeModel in representationItem.Represents.ToList()) { shapeModel.Items.Remove(representationItem); shapeModel.Items.Add(revisedItem); } IfcPresentationLayerAssignment layerAssignment = representationItem.mLayerAssignment; if (layerAssignment != null) { layerAssignment.AssignedItems.Remove(representationItem); layerAssignment.AssignedItems.Add(revisedItem); } } } mDatabase[revised.mStepId] = null; revised.mStepId = StepId; mDatabase[StepId] = revised; }
public IfcBuildingElementProxy(IfcProduct host, IfcMaterialProfileSetUsage profile, IfcAxis2Placement3D placement, double length) : base(host, profile, placement, length) { }
public IfcWallStandardCase(IfcProduct container, IfcMaterialLayerSetUsage layerSetUsage, IfcAxis2Placement3D placement, IfcProductDefinitionShape shape) : base(container, new IfcLocalPlacement(container.Placement, placement), null) { setMaterial(layerSetUsage); Representation = shape; }
internal IfcDistributionElement(IfcProduct host, IfcObjectPlacement p, IfcProductRepresentation r) : base(host, p, r) { }