internal override void SetXML(XmlElement xml, BaseClassIfc host, Dictionary <string, XmlElement> processed) { base.SetXML(xml, host, processed); IfcMaterial material = Material; if (material != null) { xml.AppendChild(material.GetXML(xml.OwnerDocument, "Material", this, processed)); } xml.SetAttribute("LayerThickness", mLayerThickness.ToString()); xml.SetAttribute("IsVentilated", mIsVentilated.ToString().ToLower()); if (mDatabase.Release != ReleaseVersion.IFC2x3) { setAttribute(xml, "Name", Name); setAttribute(xml, "Description", Description); setAttribute(xml, "Category", Category); if (!double.IsNaN(mPriority)) { xml.SetAttribute("Priority", mPriority.ToString()); } } }
internal IfcMechanicalSteelMaterialProperties(IfcMaterial mat, double dynVisc, double youngs, double shear, double poisson, double thermalExp, double yieldStress, double ultimateStress, double ultimateStrain, double hardeningModule, double proportionalStress, double plasticStrain) : base(mat, dynVisc, youngs, shear, poisson, thermalExp) { mYieldStress = yieldStress; mUltimateStress = ultimateStress; mUltimateStrain = ultimateStrain; mHardeningModule = hardeningModule; mProportionalStress = proportionalStress; mPlasticStrain = plasticStrain; }
internal IfcMechanicalMaterialProperties(IfcMaterial mat, double dynVisc, double youngs, double shear, double poisson, double thermalExp) : base(mat) { mDynamicViscosity = dynVisc; mYoungModulus = youngs; mShearModulus = shear; mPoissonRatio = poisson; mThermalExpansionCoefficient = thermalExp; }
internal IfcMaterialRelationship(string name, string description, IfcMaterial mat, List<IfcMaterial> related, string expr) : base(mat.mDatabase, name, description) { mRelatingMaterial = mat.mIndex; mRelatedMaterials = related.ConvertAll(x => x.mIndex); if (!string.IsNullOrEmpty(expr)) mExpression = expr.Replace("'", ""); }
protected IfcMaterialPropertiesSuperSeded(IfcMaterial mat) : base(mat.mDatabase) { if (mat.mDatabase.mSchema != Schema.IFC2x3) throw new Exception(KeyWord + " Depreceated IFC4!"); mMaterial = mat.mIndex; }
public IfcMaterialProfileWithOffsets(string name, IfcMaterial mat, IfcProfileDef p, double startOffset,double endOffset) : base(name, mat, p) { mOffsetValues = new double[] { startOffset,endOffset }; }
internal double mPorosity = double.NaN; //: OPTIONAL IfcNormalisedRatioMeasure; #endregion Fields #region Constructors public IfcGeneralMaterialProperties(IfcMaterial material) : base(material) { }
public IfcGeneralMaterialProperties(IfcMaterial material) : base(material) { }
public IfcMaterialLayer(IfcMaterial mat, double thickness, string name) : base(mat.mDatabase) { mName = mat.Name; Material = mat; mLayerThickness = Math.Abs(thickness); if(!string.IsNullOrEmpty(name)) Name = name; }
public IfcMaterialDefinitionRepresentation(List<IfcStyledRepresentation> representations, IfcMaterial mat) : base(representations.ConvertAll(x => x as IfcRepresentation)) { mRepresentedMaterial = mat.mIndex; mat.mHasRepresentation = this; }
internal IfcMaterialDefinitionRepresentation(IfcStyledRepresentation representation, IfcMaterial mat) : base(representation) { mRepresentedMaterial = mat.mIndex; mat.mHasRepresentation = this; }
public IfcMaterialConstituent(string name, string desc, IfcMaterial mat, double fraction, string category) : base(mat.mDatabase) { Name = name; Description = desc; mMaterial = mat.mIndex; mFraction = fraction; Category = category; }
internal static void parseFields(IfcMaterial m, List<string> arrFields, ref int ipos, Schema schema) { IfcMaterialDefinition.parseFields(m, arrFields, ref ipos); m.mName = arrFields[ipos++].Replace("'", ""); if (schema != Schema.IFC2x3) { try { m.mDescription = arrFields[ipos++].Replace("'", ""); m.mCategory = arrFields[ipos++].Replace("'", ""); } catch (Exception) { } } }
internal static IfcMaterial Parse(string strDef, Schema schema) { IfcMaterial m = new IfcMaterial(); int ipos = 0; parseFields(m, ParserSTEP.SplitLineFields(strDef), ref ipos, schema); return m; }
internal IfcMaterial(IfcMaterial m) : base(m) { mName = m.mName; mDescription = m.mDescription; mCategory = m.mCategory; }
internal IfcGeneralMaterialProperties(IfcMaterial mat, double molecularWeight, double porosity, double massDensity) : base(mat) { mMolecularWeight = molecularWeight; mPorosity = porosity; mMassDensity = massDensity; }
internal IfcMaterialLayerWithOffsets(IfcMaterial mat, double thickness, string name, IfcLayerSetDirectionEnum d, double startOffset,double endOffset) : base(mat, thickness, name) { mOffsetDirection = d; mOffsetValues = new double[]{ startOffset,endOffset}; }
public IfcMaterialProfile(string name, IfcMaterial mat, IfcProfileDef p) : base(mat == null ? p.mDatabase : mat.mDatabase) { Name = name; Material = mat; Profile = p; }
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); }