Exemple #1
0
        internal override void parseJObject(JObject obj)
        {
            base.parseJObject(obj);
            JObject jobj = obj.GetValue("TranslationalStiffnessX", StringComparison.InvariantCultureIgnoreCase) as JObject;

            if (jobj != null)
            {
                mTranslationalStiffnessX = IfcTranslationalStiffnessSelect.parseJObject(jobj);
            }
            else
            {
                jobj = obj.GetValue("LinearStiffnessX", StringComparison.InvariantCultureIgnoreCase) as JObject;
                if (jobj != null)
                {
                    mTranslationalStiffnessX = IfcTranslationalStiffnessSelect.Parse(jobj.Value <double>().ToString(), mDatabase.Release);
                }
            }
            jobj = obj.GetValue("TranslationalStiffnessY", StringComparison.InvariantCultureIgnoreCase) as JObject;
            if (jobj != null)
            {
                mTranslationalStiffnessY = IfcTranslationalStiffnessSelect.parseJObject(jobj);
            }
            else
            {
                jobj = obj.GetValue("LinearStiffnessY", StringComparison.InvariantCultureIgnoreCase) as JObject;
                if (jobj != null)
                {
                    mTranslationalStiffnessY = IfcTranslationalStiffnessSelect.Parse(jobj.Value <double>().ToString(), mDatabase.Release);
                }
            }
            jobj = obj.GetValue("TranslationalStiffnessZ", StringComparison.InvariantCultureIgnoreCase) as JObject;
            if (jobj != null)
            {
                mTranslationalStiffnessZ = IfcTranslationalStiffnessSelect.parseJObject(jobj);
            }
            else
            {
                jobj = obj.GetValue("LinearStiffnessZ", StringComparison.InvariantCultureIgnoreCase) as JObject;
                if (jobj != null)
                {
                    mTranslationalStiffnessZ = IfcTranslationalStiffnessSelect.Parse(jobj.Value <double>().ToString(), mDatabase.Release);
                }
            }
            jobj = obj.GetValue("RotationalStiffnessX", StringComparison.InvariantCultureIgnoreCase) as JObject;
            if (jobj != null)
            {
                mRotationalStiffnessX = IfcRotationalStiffnessSelect.parseJObject(jobj);
            }
            jobj = obj.GetValue("RotationalStiffnessY", StringComparison.InvariantCultureIgnoreCase) as JObject;
            if (jobj != null)
            {
                mRotationalStiffnessY = IfcRotationalStiffnessSelect.parseJObject(jobj);
            }
            jobj = obj.GetValue("RotationalStiffnessZ", StringComparison.InvariantCultureIgnoreCase) as JObject;
            if (jobj != null)
            {
                mRotationalStiffnessZ = IfcRotationalStiffnessSelect.parseJObject(jobj);
            }
        }
Exemple #2
0
		public IfcBoundaryNodeCondition(DatabaseIfc db, string name, IfcTranslationalStiffnessSelect x, IfcTranslationalStiffnessSelect y, IfcTranslationalStiffnessSelect z, IfcRotationalStiffnessSelect xx, IfcRotationalStiffnessSelect yy, IfcRotationalStiffnessSelect zz) : base(db)
		{
			Name = name;
			if (db.mRelease < ReleaseVersion.IFC4)
			{
				if (x != null)
				{
					if (x.mRigid || x.mStiffness == null)
						mTranslationalStiffnessX = new IfcTranslationalStiffnessSelect(x.mRigid ? -1 : 0);
					else
						mTranslationalStiffnessX = x;
				}
				if (y != null)
				{
					if (y.mRigid || y.mStiffness == null)
						mTranslationalStiffnessY = new IfcTranslationalStiffnessSelect(y.mRigid ? -1 : 0);
					else
						mTranslationalStiffnessY = y;
				}
				if (z != null)
				{
					if (z.mRigid || z.mStiffness == null)
						mTranslationalStiffnessZ = new IfcTranslationalStiffnessSelect(z.mRigid ? -1 : 0);
					else
						mTranslationalStiffnessZ = z;
				}
				if (xx != null)
				{
					if (xx.mRigid || xx.mStiffness == null)
						mRotationalStiffnessX = new IfcRotationalStiffnessSelect(xx.mRigid ? -1 : 0);
					else
						mRotationalStiffnessX = xx;
				}
				if (yy != null)
				{
					if (yy.mRigid || yy.mStiffness == null)
						mRotationalStiffnessY = new IfcRotationalStiffnessSelect(yy.mRigid ? -1 : 0);
					else
						mRotationalStiffnessY = yy;
				}
				if (zz != null)
				{
					if (zz.mRigid || zz.mStiffness == null)
						mRotationalStiffnessZ = new IfcRotationalStiffnessSelect(zz.mRigid ? -1 : 0);
					else
						mRotationalStiffnessZ = zz;
				}
			}
			else
			{
				mTranslationalStiffnessX = x;
				mTranslationalStiffnessY = y;
				mTranslationalStiffnessZ = z;
				mRotationalStiffnessX = xx;
				mRotationalStiffnessY = yy;
				mRotationalStiffnessZ = zz;
			}
		}
 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);
     mTranslationalStiffnessX = IfcTranslationalStiffnessSelect.Parse(ParserSTEP.StripField(str, ref pos, len), release);
     mTranslationalStiffnessY = IfcTranslationalStiffnessSelect.Parse(ParserSTEP.StripField(str, ref pos, len), release);
     mTranslationalStiffnessZ = IfcTranslationalStiffnessSelect.Parse(ParserSTEP.StripField(str, ref pos, len), release);
     mRotationalStiffnessX    = IfcRotationalStiffnessSelect.Parse(ParserSTEP.StripField(str, ref pos, len), release);
     mRotationalStiffnessY    = IfcRotationalStiffnessSelect.Parse(ParserSTEP.StripField(str, ref pos, len), release);
     mRotationalStiffnessZ    = IfcRotationalStiffnessSelect.Parse(ParserSTEP.StripField(str, ref pos, len), release);
 }
        internal static IfcRotationalStiffnessSelect parseJObject(JObject obj)
        {
            JObject jobj = obj.GetValue("IfcBoolean", StringComparison.InvariantCultureIgnoreCase) as JObject;

            if (jobj != null)
            {
                return(new IfcRotationalStiffnessSelect(jobj.Value <bool>()));
            }
            jobj = obj.GetValue("IfcRotationalStiffnessMeasure", StringComparison.InvariantCultureIgnoreCase) as JObject;
            if (jobj != null)
            {
                return(new IfcRotationalStiffnessSelect(jobj.Value <double>()));
            }
            return(IfcRotationalStiffnessSelect.Parse(obj.Value <double>().ToString(), ReleaseVersion.IFC2x3));
        }
Exemple #5
0
 public IfcBoundaryNodeConditionWarping(DatabaseIfc m, string name, IfcTranslationalStiffnessSelect x, IfcTranslationalStiffnessSelect y, IfcTranslationalStiffnessSelect z, IfcRotationalStiffnessSelect xx, IfcRotationalStiffnessSelect yy, IfcRotationalStiffnessSelect zz, IfcWarpingStiffnessSelect w)
     : base(m, name, x, y, z, xx, yy, zz)
 {
     mWarpingStiffness = w;
 }
Exemple #6
0
 internal IfcBoundaryNodeCondition(DatabaseIfc db, IfcBoundaryNodeCondition b) : base(db, b)
 {
     mTranslationalStiffnessX = b.mTranslationalStiffnessX; mTranslationalStiffnessY = b.mTranslationalStiffnessY; mTranslationalStiffnessZ = b.mTranslationalStiffnessZ; mRotationalStiffnessX = b.mRotationalStiffnessX; mRotationalStiffnessY = b.mRotationalStiffnessY; mRotationalStiffnessZ = b.mRotationalStiffnessZ;
 }
        public IfcBoundaryNodeCondition FindOrCreateBoundaryNodeCondition(bool isPointRestraint, IfcTranslationalStiffnessSelect x, IfcTranslationalStiffnessSelect y, IfcTranslationalStiffnessSelect z, IfcRotationalStiffnessSelect xx, IfcRotationalStiffnessSelect yy, IfcRotationalStiffnessSelect zz)
        {
            string name    = "";
            bool   partial = false;
            double tol     = 1e-6;

            if (x == null)
            {
                name += isPointRestraint ? 'F' : 'T';
            }
            else if (!x.mRigid && x.mStiffness != null)
            {
                partial = true;
            }
            else
            {
                name += (x.mRigid ? 'T' : 'F');
            }
            if (y == null)
            {
                name += isPointRestraint ? 'F' : 'T';
            }
            else if (!y.mRigid && y.mStiffness != null)
            {
                partial = true;
            }
            else
            {
                name += (y.mRigid ? 'T' : 'F');
            }
            if (z == null)
            {
                name += isPointRestraint ? 'F' : 'T';
            }
            else if (!z.mRigid && z.mStiffness != null)
            {
                partial = true;
            }
            else
            {
                name += (z.mRigid ? 'T' : 'F');
            }
            if (xx == null)
            {
                name += isPointRestraint ? 'F' : 'T';
            }
            else if (!xx.mRigid && xx.mStiffness != null)
            {
                partial = true;
            }
            else
            {
                name += (xx.mRigid ? 'T' : 'F');
            }
            if (yy == null)
            {
                name += isPointRestraint ? 'F' : 'T';
            }
            else if (!yy.mRigid && yy.mStiffness != null)
            {
                partial = true;
            }
            else
            {
                name += (yy.mRigid ? 'T' : 'F');
            }
            if (zz == null)
            {
                name += isPointRestraint ? 'F' : 'T';
            }
            else if (!zz.mRigid && zz.mStiffness != null)
            {
                partial = true;
            }
            else
            {
                name += (zz.mRigid ? 'T' : 'F');
            }

            if (partial)
            {
#warning implement
                return(new IfcBoundaryNodeCondition(mDatabase, "", x, y, z, xx, yy, zz));
            }
            if (mBoundaryNodeConditions.ContainsKey(name))
            {
                return(mBoundaryNodeConditions[name]);
            }
            IfcBoundaryNodeCondition result = new IfcBoundaryNodeCondition(mDatabase, name, x, y, z, xx, yy, zz);
            mBoundaryNodeConditions.Add(name, result);
            return(result);
        }
Exemple #8
0
		internal IfcBoundaryNodeConditionWarping(DatabaseIfc m, string name, IfcTranslationalStiffnessSelect x, IfcTranslationalStiffnessSelect y, IfcTranslationalStiffnessSelect z, IfcRotationalStiffnessSelect xx, IfcRotationalStiffnessSelect yy, IfcRotationalStiffnessSelect zz, IfcWarpingStiffnessSelect w)
			: base(m, name, x, y, z, xx, yy, zz) { mWarpingStiffness = w; }
Exemple #9
0
		internal IfcBoundaryNodeCondition(DatabaseIfc m, string name, IfcTranslationalStiffnessSelect x, IfcTranslationalStiffnessSelect y, IfcTranslationalStiffnessSelect z, IfcRotationalStiffnessSelect xx, IfcRotationalStiffnessSelect yy, IfcRotationalStiffnessSelect zz)
			: base(m, name)
		{

			if (m.mSchema == Schema.IFC2x3)
			{
				if (x != null && (x.mRigid || x.mStiffness == null))
					mTranslationalStiffnessX = new IfcTranslationalStiffnessSelect(x.mRigid ? -1 : 0);
				if (y != null && (y.mRigid || y.mStiffness == null))
					mTranslationalStiffnessY = new IfcTranslationalStiffnessSelect(y.mRigid ? -1 : 0);
				if (z != null && (z.mRigid || z.mStiffness == null))
					mTranslationalStiffnessZ = new IfcTranslationalStiffnessSelect(z.mRigid ? -1 : 0);
				if (xx != null && (xx.mRigid || xx.mStiffness == null))
					mRotationalStiffnessX = new IfcRotationalStiffnessSelect(xx.mRigid ? -1 : 0);
				if (yy != null && (yy.mRigid || yy.mStiffness == null))
					mRotationalStiffnessY = new IfcRotationalStiffnessSelect(yy.mRigid ? -1 : 0);
				if (zz != null && (zz.mRigid || zz.mStiffness == null))
					mRotationalStiffnessZ = new IfcRotationalStiffnessSelect(zz.mRigid ? -1 : 0);
			}
			else
			{
				mTranslationalStiffnessX = x;
				mTranslationalStiffnessY = y;
				mTranslationalStiffnessZ = z;
				mRotationalStiffnessX = xx;
				mRotationalStiffnessY = yy;
				mRotationalStiffnessZ = zz;
			}
		}
Exemple #10
0
		internal IfcBoundaryNodeCondition(IfcBoundaryNodeCondition i) : base(i) { mTranslationalStiffnessX = i.mTranslationalStiffnessX; mTranslationalStiffnessY = i.mTranslationalStiffnessY; mTranslationalStiffnessZ = i.mTranslationalStiffnessZ; mRotationalStiffnessX = i.mRotationalStiffnessX; mRotationalStiffnessY = i.mRotationalStiffnessY; mRotationalStiffnessZ = i.mRotationalStiffnessZ; }
Exemple #11
0
 internal IfcBoundaryNodeCondition(DatabaseIfc db, IfcBoundaryNodeCondition b)
     : base(db,b)
 {
     mTranslationalStiffnessX = b.mTranslationalStiffnessX; mTranslationalStiffnessY = b.mTranslationalStiffnessY; mTranslationalStiffnessZ = b.mTranslationalStiffnessZ; mRotationalStiffnessX = b.mRotationalStiffnessX; mRotationalStiffnessY = b.mRotationalStiffnessY; mRotationalStiffnessZ = b.mRotationalStiffnessZ;
 }
Exemple #12
0
 public IfcBoundaryNodeCondition(DatabaseIfc m, string name, IfcTranslationalStiffnessSelect x, IfcTranslationalStiffnessSelect y, IfcTranslationalStiffnessSelect z, IfcRotationalStiffnessSelect xx, IfcRotationalStiffnessSelect yy, IfcRotationalStiffnessSelect zz)
     : base(m, name)
 {
     if (m.mRelease == ReleaseVersion.IFC2x3)
     {
         if (x != null)
         {
             if (x.mRigid || x.mStiffness == null)
                 mTranslationalStiffnessX = new IfcTranslationalStiffnessSelect(x.mRigid ? -1 : 0);
             else
                 mTranslationalStiffnessX = x;
         }
         if (y != null)
         {
             if (y.mRigid || y.mStiffness == null)
                 mTranslationalStiffnessY = new IfcTranslationalStiffnessSelect(y.mRigid ? -1 : 0);
             else
                 mTranslationalStiffnessY = y;
         }
         if (z != null)
         {
             if (z.mRigid || z.mStiffness == null)
                 mTranslationalStiffnessZ = new IfcTranslationalStiffnessSelect(z.mRigid ? -1 : 0);
             else
                 mTranslationalStiffnessZ = z;
         }
         if (xx != null)
         {
             if (xx.mRigid || xx.mStiffness == null)
                 mRotationalStiffnessX = new IfcRotationalStiffnessSelect(xx.mRigid ? -1 : 0);
             else
                 mRotationalStiffnessX = xx;
         }
         if (yy != null)
         {
             if (yy.mRigid || yy.mStiffness == null)
                 mRotationalStiffnessY = new IfcRotationalStiffnessSelect(yy.mRigid ? -1 : 0);
             else
                 mRotationalStiffnessY = yy;
         }
         if (zz != null)
         {
             if (zz.mRigid || zz.mStiffness == null)
                 mRotationalStiffnessZ = new IfcRotationalStiffnessSelect(zz.mRigid ? -1 : 0);
             else
                 mRotationalStiffnessZ = zz;
         }
     }
     else
     {
         mTranslationalStiffnessX = x;
         mTranslationalStiffnessY = y;
         mTranslationalStiffnessZ = z;
         mRotationalStiffnessX = xx;
         mRotationalStiffnessY = yy;
         mRotationalStiffnessZ = zz;
     }
 }