Ejemplo n.º 1
0
        protected override void setJSON(JObject obj, BaseClassIfc host, SetJsonOptions options)
        {
            base.setJSON(obj, host, options);
            IfcDimensionalExponents exponents = Dimensions;

            if (exponents != null)
            {
                obj["Dimensions"] = exponents.getJson(this, options);
            }
            obj["UnitType"] = mUnitType.ToString();
        }
Ejemplo n.º 2
0
        protected override void setJSON(JObject obj, BaseClassIfc host, HashSet <int> processed)
        {
            base.setJSON(obj, host, processed);
            IfcDimensionalExponents exponents = Dimensions;

            if (exponents != null)
            {
                obj["Dimensions"] = exponents.getJson(this, processed);
            }
            obj["UnitType"] = mUnitType.ToString();
        }
Ejemplo n.º 3
0
		protected IfcNamedUnit(DatabaseIfc m, IfcUnitEnum unitEnum, bool gendims) : base(m)
		{
			mUnitType = unitEnum;
			if (gendims)
			{
				if (unitEnum == IfcUnitEnum.LENGTHUNIT)
					mDimensions = new IfcDimensionalExponents(m, 1, 0, 0, 0, 0, 0, 0).mIndex;
				else if (unitEnum == IfcUnitEnum.AREAUNIT)
					mDimensions = new IfcDimensionalExponents(m, 2, 0, 0, 0, 0, 0, 0).mIndex;
				else if (unitEnum == IfcUnitEnum.VOLUMEUNIT)
					mDimensions = new IfcDimensionalExponents(m, 3, 0, 0, 0, 0, 0, 0).mIndex;
				else if (unitEnum == IfcUnitEnum.PLANEANGLEUNIT)
					mDimensions = new IfcDimensionalExponents(m, 0, 0, 0, 0, 0, 0, 0).mIndex;
			}
		}
Ejemplo n.º 4
0
 protected IfcNamedUnit(DatabaseIfc db, IfcUnitEnum unitEnum, bool gendims) : base(db)
 {
     mUnitType = unitEnum;
     if (gendims)
     {
         if (unitEnum == IfcUnitEnum.LENGTHUNIT)
         {
             Dimensions = new IfcDimensionalExponents(db, 1, 0, 0, 0, 0, 0, 0);
         }
         else if (unitEnum == IfcUnitEnum.AREAUNIT)
         {
             Dimensions = new IfcDimensionalExponents(db, 2, 0, 0, 0, 0, 0, 0);
         }
         else if (unitEnum == IfcUnitEnum.VOLUMEUNIT)
         {
             Dimensions = new IfcDimensionalExponents(db, 3, 0, 0, 0, 0, 0, 0);
         }
         else if (unitEnum == IfcUnitEnum.MASSUNIT)
         {
             Dimensions = new IfcDimensionalExponents(db, 0, 1, 0, 0, 0, 0, 0);
         }
         else if (unitEnum == IfcUnitEnum.TIMEUNIT)
         {
             Dimensions = new IfcDimensionalExponents(db, 0, 0, 1, 0, 0, 0, 0);
         }
         else if (unitEnum == IfcUnitEnum.ELECTRICCURRENTUNIT)
         {
             Dimensions = new IfcDimensionalExponents(db, 0, 0, 0, 1, 0, 0, 0);
         }
         else if (unitEnum == IfcUnitEnum.THERMODYNAMICTEMPERATUREUNIT)
         {
             Dimensions = new IfcDimensionalExponents(db, 0, 0, 0, 0, 1, 0, 0);
         }
         else if (unitEnum == IfcUnitEnum.AMOUNTOFSUBSTANCEUNIT)
         {
             Dimensions = new IfcDimensionalExponents(db, 0, 0, 0, 0, 0, 1, 0);
         }
         else if (unitEnum == IfcUnitEnum.LUMINOUSINTENSITYUNIT)
         {
             Dimensions = new IfcDimensionalExponents(db, 0, 0, 0, 0, 0, 0, 1);
         }
         else if (unitEnum == IfcUnitEnum.PLANEANGLEUNIT)
         {
             Dimensions = new IfcDimensionalExponents(db, 0, 0, 0, 0, 0, 0, 0);
         }
     }
 }
Ejemplo n.º 5
0
		internal static IfcDimensionalExponents Parse(string strDef) { IfcDimensionalExponents e = new IfcDimensionalExponents(); int ipos = 0; parseFields(e, ParserSTEP.SplitLineFields(strDef), ref ipos); return e; }
Ejemplo n.º 6
0
		internal static void parseFields(IfcDimensionalExponents e, List<string> arrFields, ref int ipos)
		{
			e.mLengthExponent = int.Parse(arrFields[ipos++]);
			e.mMassExponent = int.Parse(arrFields[ipos++]);
			e.mTimeExponent = int.Parse(arrFields[ipos++]);
			e.mElectricCurrentExponent = int.Parse(arrFields[ipos++]);
			e.mThermodynamicTemperatureExponent = int.Parse(arrFields[ipos++]);
			e.mAmountOfSubstanceExponent = int.Parse(arrFields[ipos++]);
			e.mLuminousIntensityExponent = int.Parse(arrFields[ipos++]);
		}
Ejemplo n.º 7
0
		internal IfcDimensionalExponents(IfcDimensionalExponents e) : base()
		{
			mLengthExponent = e.mLengthExponent;
			mMassExponent = e.mMassExponent;
			mTimeExponent = e.mTimeExponent;
			mElectricCurrentExponent = e.mElectricCurrentExponent;
			mThermodynamicTemperatureExponent = e.mThermodynamicTemperatureExponent;
			mAmountOfSubstanceExponent = e.mAmountOfSubstanceExponent;
			mLuminousIntensityExponent = e.mLuminousIntensityExponent;
		}
Ejemplo n.º 8
0
 public IfcNamedUnit(IfcDimensionalExponents dimensions, IfcUnitEnum unitType)
     : base(dimensions.Database)
 {
     Dimensions = dimensions; UnitType = unitType;
 }