public IfcBoundaryNodeCondition FindOrCreateBoundaryNodeCondition(bool isPointRestraint, Triple <IfcTranslationalStiffnessSelect> translational, Triple <IfcRotationalStiffnessSelect> rotational) { string name = ""; bool partial = false; if (translational.X == null) { name += isPointRestraint ? 'F' : 'T'; } else if (!translational.X.mRigid && translational.X.mStiffness != null) { partial = true; } else { name += (translational.X.mRigid ? 'T' : 'F'); } if (translational.Y == null) { name += isPointRestraint ? 'F' : 'T'; } else if (!translational.Y.mRigid && translational.Y.mStiffness != null) { partial = true; } else { name += (translational.Y.mRigid ? 'T' : 'F'); } if (translational.Z == null) { name += isPointRestraint ? 'F' : 'T'; } else if (!translational.Z.mRigid && translational.Z.mStiffness != null) { partial = true; } else { name += (translational.Z.mRigid ? 'T' : 'F'); } if (rotational.X == null) { name += isPointRestraint ? 'F' : 'T'; } else if (!rotational.X.mRigid && rotational.X.mStiffness != null) { partial = true; } else { name += (rotational.X.mRigid ? 'T' : 'F'); } if (rotational.Y == null) { name += isPointRestraint ? 'F' : 'T'; } else if (!rotational.Y.mRigid && rotational.Y.mStiffness != null) { partial = true; } else { name += (rotational.Y.mRigid ? 'T' : 'F'); } if (rotational.Z == null) { name += isPointRestraint ? 'F' : 'T'; } else if (!rotational.Z.mRigid && rotational.Z.mStiffness != null) { partial = true; } else { name += (rotational.Z.mRigid ? 'T' : 'F'); } if (partial) { #warning implement return(new IfcBoundaryNodeCondition(mDatabase, "", translational.X, translational.Y, translational.Z, rotational.X, rotational.Y, rotational.Z)); } if (mBoundaryNodeConditions.ContainsKey(name)) { return(mBoundaryNodeConditions[name]); } IfcBoundaryNodeCondition result = new IfcBoundaryNodeCondition(mDatabase, name, translational.X, translational.Y, translational.Z, rotational.X, rotational.Y, rotational.Z); mBoundaryNodeConditions.Add(name, result); return(result); }
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); }
internal static void parseFields(IfcBoundaryNodeCondition b, List<string> arrFields, ref int ipos, Schema schema) { IfcBoundaryCondition.parseFields(b, arrFields, ref ipos); b.mTranslationalStiffnessX = IfcTranslationalStiffnessSelect.Parse(arrFields[ipos++], schema); b.mTranslationalStiffnessY = IfcTranslationalStiffnessSelect.Parse(arrFields[ipos++], schema); b.mTranslationalStiffnessZ = IfcTranslationalStiffnessSelect.Parse(arrFields[ipos++], schema); b.mRotationalStiffnessX = IfcRotationalStiffnessSelect.Parse(arrFields[ipos++], schema); b.mRotationalStiffnessY = IfcRotationalStiffnessSelect.Parse(arrFields[ipos++], schema); b.mRotationalStiffnessZ = IfcRotationalStiffnessSelect.Parse(arrFields[ipos++], schema); }
internal static IfcBoundaryNodeCondition Parse(string strDef) { IfcBoundaryNodeCondition b = new IfcBoundaryNodeCondition(); int ipos = 0; parseFields(b, ParserSTEP.SplitLineFields(strDef), ref ipos); return b; }
internal IfcBoundaryNodeCondition(IfcBoundaryNodeCondition i) : base(i) { mTranslationalStiffnessX = i.mTranslationalStiffnessX; mTranslationalStiffnessY = i.mTranslationalStiffnessY; mTranslationalStiffnessZ = i.mTranslationalStiffnessZ; mRotationalStiffnessX = i.mRotationalStiffnessX; mRotationalStiffnessY = i.mRotationalStiffnessY; mRotationalStiffnessZ = i.mRotationalStiffnessZ; }
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; }