protected IfcBSplineCurve(DatabaseIfc db, IfcBSplineCurve c) : base(db, c) { mDegree = c.mDegree; ControlPointsList.AddRange(c.ControlPointsList.Select(x => db.Factory.Duplicate(x) as IfcCartesianPoint)); mCurveForm = c.mCurveForm; mClosedCurve = c.mClosedCurve; mSelfIntersect = c.mSelfIntersect; }
protected IfcBSplineSurface(DatabaseIfc db, IfcBSplineSurface s, DuplicateOptions options) : base(db, s, options) { mUDegree = s.mUDegree; mVDegree = s.mVDegree; foreach(LIST<IfcCartesianPoint> ps in s.ControlPointsList) mControlPointsList.Add(new LIST<IfcCartesianPoint>(ps.ConvertAll(x=>db.Factory.Duplicate(x) as IfcCartesianPoint))); mSurfaceForm = s.mSurfaceForm; mUClosed = s.mUClosed; mVClosed = s.mVClosed; mSelfIntersect = s.mSelfIntersect; }
public static string LogicalToString(IfcLogicalEnum l) { if (l == IfcLogicalEnum.TRUE) { return(".T."); } else if (l == IfcLogicalEnum.FALSE) { return(".F."); } return(".U."); }
public static IfcLogicalEnum StripLogical(string s, ref int pos, int len) { IfcLogicalEnum result = IfcLogicalEnum.UNKNOWN; int icounter = pos; while (char.IsWhiteSpace(s[icounter])) { icounter++; if (icounter == len) { break; } } if (s[icounter] == '$') { if (++icounter < len) { while (s[icounter++] != ',') { if (icounter == len) { break; } } } pos = icounter; return(result); } if (s[icounter++] != '.') { throw new Exception("Unrecognized format!"); } char c = char.ToUpper(s[icounter++]); if (c == 'T') { result = IfcLogicalEnum.TRUE; } else if (c == 'F') { result = IfcLogicalEnum.TRUE; } pos = icounter + 2; return(result); }
internal IfcIndexedPolyCurve(DatabaseIfc db, IfcIndexedPolyCurve c) : base(db, c) { Points = db.Factory.Duplicate(c.Points) as IfcCartesianPointList; mSegments.AddRange(c.mSegments); mSelfIntersect = c.mSelfIntersect; }
protected virtual void Parse(string str, ref int pos, int len) { mUDegree = int.Parse(ParserSTEP.StripField(str, ref pos, len)); mVDegree = int.Parse(ParserSTEP.StripField(str, ref pos, len)); mControlPointsList = ParserSTEP.StripListListLink(str, ref pos, len); string s = ParserSTEP.StripField(str, ref pos, len); if(s[0] == '.') Enum.TryParse<IfcBSplineSurfaceForm>(s.Replace(".", ""),out mSurfaceForm); mUClosed = ParserIfc.StripLogical(str,ref pos, len); mVClosed = ParserIfc.StripLogical(str,ref pos, len); mSelfIntersect = ParserIfc.StripLogical(str,ref pos, len); }
protected IfcAlignment2DSegment(DatabaseIfc m, bool tangential, string startTag, string endTag) : base(m) { mTangentialContinuity = (tangential ? IfcLogicalEnum.TRUE : IfcLogicalEnum.FALSE); StartTag = startTag; EndTag = endTag; }
public IfcLogical(bool value) { mValue = value ? IfcLogicalEnum.TRUE : IfcLogicalEnum.FALSE; }
public IfcLogical(bool value) { mValue = value ? IfcLogicalEnum.TRUE : IfcLogicalEnum.FALSE; }
protected IfcAlignment2DSegment(DatabaseIfc m, bool tangential, string startTag, string endTag) : base(m) { mTangentialContinuity = (tangential ? IfcLogicalEnum.TRUE : IfcLogicalEnum.FALSE); StartTag = startTag; EndTag = endTag; }
internal IfcBSplineSurfaceWithKnots(DatabaseIfc m, int uDegree, int vDegree, IfcBSplineSurfaceForm form, List<List<IfcCartesianPoint>> controlPoints, IfcLogicalEnum uClosed, IfcLogicalEnum vClosed, IfcLogicalEnum selfIntersect, List<int> uMultiplicities, List<int> vMultiplicities, List<double> uKnots, List<double> vKnots, IfcKnotType type) : base(m, uDegree, vDegree, controlPoints, form, uClosed, vClosed, selfIntersect) { mUMultiplicities.AddRange(uMultiplicities); mVMultiplicities.AddRange(vMultiplicities); mUKnots.AddRange(uKnots); mVKnots.AddRange(vKnots); }
internal IfcMaterialLayer(IfcMaterialLayer m) : base(m) { mMaterial = m.mMaterial; mLayerThickness = m.mLayerThickness; mIsVentilated = m.mIsVentilated; }
private IfcBSplineSurface(DatabaseIfc m, int uDegree, int vDegree, IfcBSplineSurfaceForm form, IfcLogicalEnum uClosed, IfcLogicalEnum vClosed, IfcLogicalEnum selfIntersect) : base(m) { mUDegree = uDegree; mVDegree = vDegree; mSurfaceForm = form; mUClosed = uClosed; mVClosed = vClosed; mSelfIntersect = selfIntersect; }
protected IfcBSplineSurface(DatabaseIfc m, int uDegree, int vDegree, List<List<IfcCartesianPoint>> controlPoints, IfcBSplineSurfaceForm form, IfcLogicalEnum uClosed, IfcLogicalEnum vClosed, IfcLogicalEnum selfIntersect) : this(m, uDegree, vDegree, form, uClosed, vClosed, selfIntersect) { foreach (List<IfcCartesianPoint> cps in controlPoints) mControlPointsList.Add(cps.ConvertAll(x => x.mIndex)); }
protected IfcBSplineSurface(IfcBSplineSurface pl) : base(pl) { mUDegree = pl.mUDegree; mVDegree = pl.mVDegree; for (int icounter = 0; icounter < pl.mControlPointsList.Count; icounter++) mControlPointsList.Add(new List<int>(pl.mControlPointsList[icounter].ToArray())); mSurfaceForm = pl.mSurfaceForm; mUClosed = pl.mUClosed; mVClosed = pl.mVClosed; mSelfIntersect = pl.mSelfIntersect; }
private IfcBSplineCurve(DatabaseIfc m, int degree, IfcBSplineCurveForm form, IfcLogicalEnum closed, IfcLogicalEnum selfIntersect) : base(m) { mDegree = degree; mCurveForm = form; mClosedCurve = closed; mSelfIntersect = selfIntersect; }
protected IfcBSplineCurve(IfcBSplineCurve pl) : base(pl) { mDegree = pl.mDegree; mControlPointsList = new List<int>(pl.mControlPointsList.ToArray()); mCurveForm = pl.mCurveForm; mClosedCurve = pl.mClosedCurve; mSelfIntersect = pl.mSelfIntersect; }
internal IfcLogical(IfcLogicalEnum value) { mValue = value; }
internal IfcIndexedPolyCurve(IfcIndexedPolyCurve p) : base(p) { mPoints = p.mPoints; mSegments.AddRange(p.mSegments); mSelfIntersect = p.mSelfIntersect; }
internal IfcCompositeCurve(IfcCompositeCurve pl) : base(pl) { mSegments = new List<int>(pl.mSegments.ToArray()); mSelfIntersect = pl.mSelfIntersect; }
public static string LogicalToString(IfcLogicalEnum l) { if (l == IfcLogicalEnum.TRUE) return ".T."; else if (l == IfcLogicalEnum.FALSE) return ".F."; return ".U."; }
internal static IfcSimpleValue parseSimpleValue(string str) { if (str.StartsWith("IFCBOOLEAN(")) { return(new IfcBoolean(string.Compare(str.Substring(11, str.Length - 12), ".T.") == 0)); } if (str.StartsWith("IFCIDENTIFIER(")) { return(new IfcIdentifier(ParserIfc.Decode(str.Substring(15, str.Length - 17)))); } if (str.StartsWith("IFCINTEGER(")) { return(new IfcInteger(long.Parse(str.Substring(11, str.Length - 12)))); } if (str.StartsWith("IFCLABEL(")) { if (str.Length <= 12) { return(new IfcLabel("")); } string s = str.Substring(10, str.Length - 12); return(new IfcLabel((str[10] == '$' || s == null ? "" : ParserIfc.Decode(s)))); } if (str.StartsWith("IFCLOGICAL(")) { string s = str.Substring(11, str.Length - 12); IfcLogicalEnum l = IfcLogicalEnum.UNKNOWN; if (s == ".T.") { l = IfcLogicalEnum.TRUE; } else if (s == ".F.") { l = IfcLogicalEnum.FALSE; } return(new IfcLogical(l)); } if (str.StartsWith("IFCREAL(")) { return(new IfcReal(ParserSTEP.ParseDouble(str.Substring(8, str.Length - 9)))); } if (str.StartsWith("IFCTEXT(")) { string s = str.Substring(9, str.Length - 11); return(new IfcText((str[9] == '$' || s == null ? "" : ParserIfc.Decode(s)))); } if (str.StartsWith("IFCURIREFERENCE(")) { return(new IfcURIReference(str[16] == '$' ? "" : ParserIfc.Decode(str.Substring(17, str.Length - 19)))); } if (str.StartsWith("IFCDURATION(")) { return(IfcDuration.Convert(str.Substring(13, str.Length - 15))); } int i = 0; if (int.TryParse(str, out i)) { return(new IfcInteger(i)); } double d = 0; if (double.TryParse(str, System.Globalization.NumberStyles.Any, ParserSTEP.NumberFormat, out d)) { return(new IfcReal(d)); } if (str == ".T.") { return(new IfcBoolean(true)); } if (str == ".F.") { return(new IfcBoolean(false)); } if (str == ".U.") { return(new IfcLogical(IfcLogicalEnum.UNKNOWN)); } return(null); }
internal IfcIndexedPolyCurve(DatabaseIfc db, IfcIndexedPolyCurve c) : base(db, c) { Points = db.Factory.Duplicate(c.Points) as IfcCartesianPointList; mSegments.AddRange(c.mSegments); mSelfIntersect = c.mSelfIntersect; }
protected IfcAlignment2DSegment(IfcAlignment2DSegment s) : base() { mTangentialContinuity = s.mTangentialContinuity; mStartTag = s.mStartTag; mEndTag = s.mEndTag; }
internal IfcPresentationLayerWithStyle(IfcPresentationLayerWithStyle o) : base(o) { mLayerOn = o.mLayerOn; mLayerFrozen = o.mLayerFrozen; mLayerBlocked = o.mLayerBlocked; mLayerStyles = new List<int>(o.mLayerStyles.ToArray()); }
protected IfcAlignment2DSegment(IfcAlignment2DSegment s) : base() { mTangentialContinuity = s.mTangentialContinuity; mStartTag = s.mStartTag; mEndTag = s.mEndTag; }
protected IfcBSplineCurve(DatabaseIfc db, IfcBSplineCurve c) : base(db, c) { mDegree = c.mDegree; ControlPointsList = c.ControlPointsList.ConvertAll(x => db.Factory.Duplicate(x) as IfcCartesianPoint); mCurveForm = c.mCurveForm; mClosedCurve = c.mClosedCurve; mSelfIntersect = c.mSelfIntersect; }
public IfcLogical(IfcLogicalEnum value) { mValue = value; }
public IfcLogical(IfcLogicalEnum value) { mValue = value; }
internal IfcLogical(IfcLogicalEnum value) { mValue = value; }
internal IfcIndexedPolyCurve(IfcIndexedPolyCurve p) : base(p) { mPoints = p.mPoints; mSegments.AddRange(p.mSegments); mSelfIntersect = p.mSelfIntersect; }
internal IfcPresentationLayerWithStyle(string name, string desc, List<IfcLayeredItem> items, string identifier, bool on, bool frozen, bool blocked, List<IfcPresentationStyle> styles ) : base(name, desc, items, identifier) { mLayerOn = (on ? IfcLogicalEnum.TRUE : IfcLogicalEnum.FALSE); mLayerFrozen = (frozen ? IfcLogicalEnum.TRUE : IfcLogicalEnum.FALSE); mLayerBlocked = (blocked ? IfcLogicalEnum.TRUE : IfcLogicalEnum.FALSE); if (styles != null && styles.Count > 0) mLayerStyles = styles.ConvertAll(x => x.Index); }
protected IfcBSplineSurface(DatabaseIfc db, IfcBSplineSurface s) : base(db,s) { mUDegree = s.mUDegree; mVDegree = s.mVDegree; List<List<IfcCartesianPoint>> points = s.ControlPointsList; foreach(List<IfcCartesianPoint> ps in points) mControlPointsList.Add(ps.ConvertAll(x=>db.Factory.Duplicate(x).mIndex)); mSurfaceForm = s.mSurfaceForm; mUClosed = s.mUClosed; mVClosed = s.mVClosed; mSelfIntersect = s.mSelfIntersect; }
internal static IfcSimpleValue parseSimpleValue(string str) { if (str.StartsWith("IFCBOOLEAN(")) { return(new IfcBoolean(string.Compare(str.Substring(11, str.Length - 12), ".T.") == 0)); } if (str.StartsWith("IFCIDENTIFIER(")) { return(new IfcIdentifier(str.Substring(15, str.Length - 17))); } if (str.StartsWith("IFCINTEGER(")) { return(new IfcInteger(int.Parse(str.Substring(11, str.Length - 12)))); } if (str.StartsWith("IFCLABEL(")) { if (str.Length <= 12) { return(new IfcLabel("DEFAULT")); } string s = str.Substring(10, str.Length - 12); return(new IfcLabel((s == "$" || string.IsNullOrEmpty(s) ? "DEFAULT" : s))); } if (str.StartsWith("IFCLOGICAL(")) { string s = str.Substring(11, str.Length - 12); IfcLogicalEnum l = IfcLogicalEnum.UNKNOWN; if (s == ".T.") { l = IfcLogicalEnum.TRUE; } else if (s == ".F.") { l = IfcLogicalEnum.FALSE; } return(new IfcLogical(l)); } if (str.StartsWith("IFCREAL(")) { return(new IfcReal(ParserSTEP.ParseDouble(str.Substring(8, str.Length - 9)))); } if (str.StartsWith("IFCTEXT(")) { string s = str.Substring(9, str.Length - 11); return(new IfcText((s == "$" || string.IsNullOrEmpty(s) ? "DEFAULT" : s))); } int i = 0; if (int.TryParse(str, out i)) { return(new IfcInteger(i)); } double d = 0; if (double.TryParse(str, out d)) { return(new IfcReal(d)); } if (str == ".T.") { return(new IfcBoolean(true)); } if (str == ".F.") { return(new IfcBoolean(false)); } if (str == ".U.") { return(new IfcLogical(IfcLogicalEnum.UNKNOWN)); } return(null); }
internal IfcShapeAspect(IfcShapeAspect a) : base() { mShapeRepresentations = new List<int>(a.mShapeRepresentations.ToArray()); mName = a.mName; mDescription = a.mDescription; mProductDefinitional = a.mProductDefinitional; mPartOfProductDefinitionShape = a.mPartOfProductDefinitionShape; }