Ejemplo n.º 1
0
 internal override void parse(string str, ref int pos, ReleaseVersion release, int len, ConcurrentDictionary <int, BaseClassIfc> dictionary)
 {
     mName        = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
     mDescription = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
     mMaterial    = dictionary[ParserSTEP.StripLink(str, ref pos, len)] as IfcMaterial;
     mFraction    = ParserSTEP.StripDouble(str, ref pos, len);
     mCategory    = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
 }
Ejemplo n.º 2
0
 protected override string BuildStringSTEP(ReleaseVersion release)
 {
     return(base.BuildStringSTEP(release) + "," + ParserSTEP.DoubleOptionalToString(mCompressiveStrength) + "," +
            ParserSTEP.DoubleOptionalToString(mMaxAggregateSize) +
            (string.IsNullOrEmpty(mAdmixturesDescription) ? ",$," : ",'" + ParserIfc.Encode(mAdmixturesDescription) + "',") +
            (string.IsNullOrEmpty(mWorkability) ? "$," : "'" + mWorkability + "',") + ParserSTEP.DoubleOptionalToString(mProtectivePoreRatio) +
            (string.IsNullOrEmpty(mWaterImpermeability) ? ",$" : ",'" + ParserIfc.Encode(mWaterImpermeability) + "'"));
 }
Ejemplo n.º 3
0
 internal override void parse(string str, ref int pos, ReleaseVersion release, int len, ConcurrentDictionary <int, BaseClassIfc> dictionary)
 {
     base.parse(str, ref pos, release, len, dictionary);
     if (release > ReleaseVersion.IFC2x3)
     {
         mLongName = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
     }
 }
Ejemplo n.º 4
0
 internal override void parse(string str, ref int pos, ReleaseVersion release, int len, ConcurrentDictionary <int, BaseClassIfc> dictionary)
 {
     mIdentification = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
     mName           = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
     mDescription    = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
     Roles.AddRange(ParserSTEP.StripListLink(str, ref pos, len).ConvertAll(x => dictionary[x] as IfcActorRole));
     mAddresses.AddRange(ParserSTEP.StripListLink(str, ref pos, len).ConvertAll(x => dictionary[x] as IfcAddress));
 }
Ejemplo n.º 5
0
 protected override string BuildStringSTEP(ReleaseVersion release)
 {
     if (release < ReleaseVersion.IFC4 || mMaterialProfiles.Count == 0)
     {
         return("");
     }
     return((string.IsNullOrEmpty(mName) ? "$," : "'" + ParserIfc.Encode(mName) + "',") + (string.IsNullOrEmpty(mDescription) ? "$,(#" : "'" + ParserIfc.Encode(mDescription) + "',(") + string.Join(",", mMaterialProfiles.Select(x => "#" + x.StepId)) + ")," + ParserSTEP.ObjToLinkString(mCompositeProfile));
 }
Ejemplo n.º 6
0
 internal override void parse(string str, ref int pos, ReleaseVersion release, int len, ConcurrentDictionary <int, BaseClassIfc> dictionary)
 {
     base.parse(str, ref pos, release, len, dictionary);
     ParentContext = dictionary[ParserSTEP.StripLink(str, ref pos, len)] as IfcGeometricRepresentationContext;
     mTargetScale  = ParserSTEP.StripDouble(str, ref pos, len);
     Enum.TryParse <IfcGeometricProjectionEnum>(ParserSTEP.StripField(str, ref pos, len).Replace(".", ""), true, out mTargetView);
     mUserDefinedTargetView = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
 }
Ejemplo n.º 7
0
 internal override void parse(string str, ref int pos, ReleaseVersion release, int len, ConcurrentDictionary <int, BaseClassIfc> dictionary)
 {
     MaterialLayers.AddRange(ParserSTEP.StripListLink(str, ref pos, len).Select(x => dictionary[x] as IfcMaterialLayer));
     mLayerSetName = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
     if (release != ReleaseVersion.IFC2x3)
     {
         mDescription = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
     }
 }
Ejemplo n.º 8
0
 internal override void parse(string str, ref int pos, ReleaseVersion release, int len, ConcurrentDictionary <int, BaseClassIfc> dictionary)
 {
     mName        = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
     mDescription = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
     foreach (IfcMaterialConstituent constituent in ParserSTEP.StripListLink(str, ref pos, len).Select(x => dictionary[x] as IfcMaterialConstituent))
     {
         mMaterialConstituents[constituent.Name] = constituent;
     }
 }
Ejemplo n.º 9
0
 internal override void parse(string str, ref int pos, ReleaseVersion release, int len, ConcurrentDictionary <int, BaseClassIfc> dictionary)
 {
     base.parse(str, ref pos, release, len, dictionary);
     double.TryParse(ParserSTEP.StripField(str, ref pos, len), System.Globalization.NumberStyles.Any, ParserSTEP.NumberFormat, out mTimeValue);
     if (release > ReleaseVersion.IFC2x3)
     {
         mFormula = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
     }
 }
Ejemplo n.º 10
0
 internal override void parse(string str, ref int pos, ReleaseVersion release, int len, ConcurrentDictionary <int, BaseClassIfc> dictionary)
 {
     base.parse(str, ref pos, release, len, dictionary);
     mMethodOfMeasurement = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
     foreach (IfcPhysicalQuantity quantity in ParserSTEP.StripListLink(str, ref pos, len).Select(x => dictionary[x] as IfcPhysicalQuantity))
     {
         addQuantity(quantity);
     }
 }
Ejemplo n.º 11
0
 internal override void parse(string str, ref int pos, ReleaseVersion release, int len, ConcurrentDictionary <int, BaseClassIfc> dictionary)
 {
     base.parse(str, ref pos, release, len, dictionary);
     if (release != ReleaseVersion.IFC2x3)
     {
         mDescription        = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
         mReferencedDocument = dictionary[ParserSTEP.StripLink(str, ref pos, len)] as IfcDocumentInformation;
     }
 }
Ejemplo n.º 12
0
        internal override void parse(string str, ref int pos, ReleaseVersion release, int len, ConcurrentDictionary <int, BaseClassIfc> dictionary)
        {
            base.parse(str, ref pos, release, len, dictionary);

            Enum.TryParse <IfcEventTypeEnum>(ParserSTEP.StripField(str, ref pos, len).Replace(".", ""), true, out mPredefinedType);
            Enum.TryParse <IfcEventTriggerTypeEnum>(ParserSTEP.StripField(str, ref pos, len).Replace(".", ""), true, out mEventTriggerType);
            mUserDefinedEventTriggerType = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
            mEventOccurrenceTime         = dictionary[ParserSTEP.StripLink(str, ref pos, len)] as IfcEventTime;
        }
Ejemplo n.º 13
0
 protected override string BuildStringSTEP(ReleaseVersion release)
 {
     if (mProperties.Count == 0)
     {
         return("");
     }
     return(base.BuildStringSTEP(release) + ",(#" + string.Join(",#", mProperties.Values.Select(x => x.StepId)) +
            (string.IsNullOrEmpty(mDescription) ? "),$,'" : "),'" + ParserIfc.Encode(mDescription) + "','") + ParserIfc.Encode(mName) + "'");
 }
Ejemplo n.º 14
0
 internal override void parse(string str, ref int pos, ReleaseVersion release, int len, ConcurrentDictionary <int, BaseClassIfc> dictionary)
 {
     base.parse(str, ref pos, release, len, dictionary);
     mCompressiveStrength   = ParserSTEP.StripDouble(str, ref pos, len);
     mMaxAggregateSize      = ParserSTEP.StripDouble(str, ref pos, len);
     mAdmixturesDescription = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
     mWorkability           = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
     mProtectivePoreRatio   = ParserSTEP.StripDouble(str, ref pos, len);
     mWaterImpermeability   = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
 }
Ejemplo n.º 15
0
 protected override string BuildStringSTEP(ReleaseVersion release)
 {
     if (release < ReleaseVersion.IFC4)
     {
         return("");
     }
     return(base.BuildStringSTEP(release) + ",#" + mRelatingMaterial.StepId + ",(" +
            string.Join(",", mRelatedMaterials.Select(x => "#" + x.StepId)) +
            (string.IsNullOrEmpty(mMaterialExpression) ? "),$" : "),'" + ParserIfc.Encode(mMaterialExpression) + "'"));
 }
Ejemplo n.º 16
0
 internal override void parse(string str, ref int pos, ReleaseVersion release, int len, ConcurrentDictionary <int, BaseClassIfc> dictionary)
 {
     Elements.AddRange(ParserSTEP.StripListLink(str, ref pos, len).Select(x => dictionary[x] as IfcDerivedUnitElement));
     Enum.TryParse <IfcDerivedUnitEnum>(ParserSTEP.StripField(str, ref pos, len).Replace(".", ""), true, out mUnitType);
     mUserDefinedType = ParserSTEP.StripString(str, ref pos, len);
     if (release >= ReleaseVersion.IFC4X3)
     {
         mName = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
     }
 }
Ejemplo n.º 17
0
        internal override void parse(string str, ref int pos, ReleaseVersion release, int len, ConcurrentDictionary <int, BaseClassIfc> dictionary)
        {
            string s = ParserSTEP.StripField(str, ref pos, len);

            mValueComponent = ParserIfc.parseValue(s);
            if (mValueComponent == null)
            {
                mVal = s;
            }
            mUnitComponent = ParserSTEP.StripLink(str, ref pos, len);
        }
Ejemplo n.º 18
0
        protected override string BuildStringSTEP(ReleaseVersion release)
        {
            string result = base.BuildStringSTEP(release);

            if (release < ReleaseVersion.IFC4)
            {
                return(result);
            }
            return(result + (string.IsNullOrEmpty(mDescription) ? ",$," : ",'" + ParserIfc.Encode(mDescription) + "',") +
                   (string.IsNullOrEmpty(mLanguage) ? "$," : "'" + ParserIfc.Encode(mLanguage) + "',") + ParserSTEP.ObjToLinkString(mReferencedLibrary));
        }
Ejemplo n.º 19
0
        internal override void parse(string str, ref int pos, ReleaseVersion release, int len, ConcurrentDictionary <int, BaseClassIfc> dictionary)
        {
            base.parse(str, ref pos, release, len, dictionary);
            mLongName = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
            string s = ParserSTEP.StripField(str, ref pos, len);

            if (s.StartsWith("."))
            {
                Enum.TryParse <IfcDistributionSystemEnum>(s.Replace(".", ""), true, out mPredefinedType);
            }
        }
Ejemplo n.º 20
0
        internal static IfcValue extractValue(XmlNode node)
        {
            string name = node.Name;

            if (name.EndsWith("-wrapper"))
            {
                name = name.Substring(0, name.Length - 8);
                return(ParserIfc.extractValue(name, node.InnerText));
            }

            return(null);
        }
Ejemplo n.º 21
0
        protected override string BuildStringSTEP(ReleaseVersion release)
        {
            string result = "'" + ParserIfc.Encode(mName) + (string.IsNullOrEmpty(mVersion) ? "',$," : "','" + ParserIfc.Encode(mVersion) + "',") +
                            (mPublisher == null? "$" : "#" + mPublisher.StepId);

            if (mDatabase.Release < ReleaseVersion.IFC4)
            {
                return(result + (mVersionDateSS == null ? ",$" : ",#" + mVersionDateSS.StepId) + ",(" + string.Join(",", mHasConstraintRelationships.Select(x => "#" + x.StepId)) + ")");
            }
            return(result + "," + IfcDateTime.STEPAttribute(mVersionDate) + "," +
                   (string.IsNullOrEmpty(mLocation) ? "$," : "'" + ParserIfc.Encode(mLocation) + "',") +
                   (string.IsNullOrEmpty(mDescription) ? "$" : "'" + ParserIfc.Encode(mDescription) + "'"));
        }
Ejemplo n.º 22
0
        internal override void parse(string str, ref int pos, ReleaseVersion release, int len, ConcurrentDictionary <int, BaseClassIfc> dictionary)
        {
            base.parse(str, ref pos, release, len, dictionary);
            mBenchmarkValues.AddRange(ParserSTEP.StripListLink(str, ref pos, len).Select(x => dictionary[x] as IfcConstraint));
            string s = ParserSTEP.StripField(str, ref pos, len);

            if (s[0] == '.')
            {
                Enum.TryParse <IfcLogicalOperatorEnum>(s.Replace(".", ""), true, out mLogicalAggregator);
            }
            Enum.TryParse <IfcObjectiveEnum>(ParserSTEP.StripField(str, ref pos, len).Replace(".", ""), true, out mObjectiveQualifier);
            mUserDefinedQualifier = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
        }
Ejemplo n.º 23
0
 protected override string BuildStringSTEP(ReleaseVersion release)
 {
     if (mProperties.Count == 0)
     {
         return("");
     }
     if (release < ReleaseVersion.IFC4)
     {
         return("");
     }
     return((string.IsNullOrEmpty(mName) ? "$," : "'" + ParserIfc.Encode(mName) + "',")
            + (string.IsNullOrEmpty(mDescription) ? "$,(#" : "'" + ParserIfc.Encode(mDescription) + "',(#") + string.Join(",#", mProperties.Values.Select(x => x.StepId)) + ")");
 }
Ejemplo n.º 24
0
 internal override void parse(string str, ref int pos, ReleaseVersion release, int len, ConcurrentDictionary <int, BaseClassIfc> dictionary)
 {
     mName = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
     if (release != ReleaseVersion.IFC2x3)
     {
         try
         {
             mDescription = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
             mCategory    = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
         }
         catch (Exception) { }
     }
 }
Ejemplo n.º 25
0
        internal override void parse(string str, ref int pos, ReleaseVersion release, int len, ConcurrentDictionary <int, BaseClassIfc> dictionary)
        {
            mDegree = int.Parse(ParserSTEP.StripField(str, ref pos, len));
            ControlPointsList.AddRange(ParserSTEP.StripListLink(str, ref pos, len).Select(x => dictionary[x] as IfcCartesianPoint));
            string s = ParserSTEP.StripField(str, ref pos, len);

            if (s[0] == '.')
            {
                Enum.TryParse <IfcBSplineCurveForm> (s.Replace(".", ""), true, out mCurveForm);
            }
            mClosedCurve   = ParserIfc.StripLogical(str, ref pos, len);
            mSelfIntersect = ParserIfc.StripLogical(str, ref pos, len);
        }
Ejemplo n.º 26
0
 internal override void parse(string str, ref int pos, ReleaseVersion release, int len, ConcurrentDictionary <int, BaseClassIfc> dictionary)
 {
     base.parse(str, ref pos, release, len, dictionary);
     if (release != ReleaseVersion.IFC2x3)
     {
         string s = ParserSTEP.StripField(str, ref pos, len);
         mLagValue = ParserIfc.parseValue(s) as IfcTimeOrRatioSelect;
         s         = ParserSTEP.StripField(str, ref pos, len);
         if (s.StartsWith("."))
         {
             Enum.TryParse <IfcTaskDurationEnum>(s.Replace(".", ""), true, out mDurationType);
         }
     }
 }
Ejemplo n.º 27
0
        internal override void parse(string str, ref int pos, ReleaseVersion release, int len, ConcurrentDictionary <int, BaseClassIfc> dictionary)
        {
            base.parse(str, ref pos, release, len, dictionary);
            Enum.TryParse <IfcBenchmarkEnum>(ParserSTEP.StripField(str, ref pos, len).Replace(".", ""), true, out mBenchMark);
            mValueSource = ParserSTEP.StripString(str, ref pos, len);
            string s = ParserSTEP.StripField(str, ref pos, len);

            mDataValueValue = ParserIfc.parseValue(s);
            if (mDataValueValue == null)
            {
                mDataValue = ParserSTEP.ParseLink(s);
            }
            mReferencePath = ParserSTEP.StripLink(str, ref pos, len);
        }
Ejemplo n.º 28
0
 internal override void parse(string str, ref int pos, ReleaseVersion release, int len, ConcurrentDictionary <int, BaseClassIfc> dictionary)
 {
     base.parse(str, ref pos, release, len, dictionary);
     foreach (int i in ParserSTEP.StripListLink(str, ref pos, len))
     {
         IfcProperty property = dictionary[i] as IfcProperty;
         if (property != null)
         {
             mProperties[property.Name] = property;
         }
     }
     mDescription = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
     mName        = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
 }
Ejemplo n.º 29
0
        internal override void parse(string str, ref int pos, ReleaseVersion release, int len, ConcurrentDictionary <int, BaseClassIfc> dictionary)
        {
            mName        = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
            mDescription = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
            Material     = dictionary[ParserSTEP.StripLink(str, ref pos, len)] as IfcMaterial;
            Profile      = dictionary[ParserSTEP.StripLink(str, ref pos, len)] as IfcProfileDef;
            string s = ParserSTEP.StripField(str, ref pos, len);
            double d = 0;

            if (double.TryParse(s, System.Globalization.NumberStyles.Any, ParserSTEP.NumberFormat, out d))            //Was normalizedRatioMeasure
            {
                Priority = (int)d;
            }
            mCategory = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
        }
Ejemplo n.º 30
0
        internal override void parse(string str, ref int pos, ReleaseVersion release, int len, ConcurrentDictionary <int, BaseClassIfc> dictionary)
        {
            base.parse(str, ref pos, release, len, dictionary);
            string s = ParserSTEP.StripField(str, ref pos, len);

            if (!double.TryParse(s, System.Globalization.NumberStyles.Any, ParserSTEP.NumberFormat, out mNumberValue))
            {
                if (s.StartsWith("IFCNUMERICMEASURE"))
                {
                    s = s.Substring(16, s.Length - 17);
                    double.TryParse(s, System.Globalization.NumberStyles.Any, ParserSTEP.NumberFormat, out mNumberValue);
                }
            }
            mFormula = ParserIfc.Decode(ParserSTEP.StripString(str, ref pos, len));
        }