internal override void ParseXml(XmlElement xml) { base.ParseXml(xml); string startParam = xml.GetAttribute("StartParam"); double param = 0; if (!string.IsNullOrEmpty(startParam) && double.TryParse(startParam, out param)) { mStartParam = new IfcParameterValue(param); } string endParam = xml.GetAttribute("EndParam"); if (!string.IsNullOrEmpty(endParam) && double.TryParse(endParam, out param)) { mEndParam = new IfcParameterValue(param); } foreach (XmlNode child in xml.ChildNodes) { string name = child.Name; if (string.Compare(name, "Directrix", true) == 0) { Directrix = mDatabase.ParseXml <IfcCurve>(child as XmlElement); } } }
public override void IfcParse(int propIndex, IPropertyValue value) { switch (propIndex) { case 0: _directrix = (IfcCurve)value.EntityVal; break; case 1: _radius = value.RealVal; break; case 2: _innerRadius = value.RealVal; break; case 3: _startParam = new IfcParameterValue(value.RealVal); break; case 4: _endParam = new IfcParameterValue(value.RealVal); break; default: this.HandleUnexpectedAttribute(propIndex, value); break; } }
public override void Parse(int propIndex, IPropertyValue value, int[] nestedIndex) { switch (propIndex) { case 0: _directrix = (IfcCurve)(value.EntityVal); return; case 1: _radius = value.RealVal; return; case 2: _innerRadius = value.RealVal; return; case 3: _startParam = value.RealVal; return; case 4: _endParam = value.RealVal; return; default: throw new XbimParserException(string.Format("Attribute index {0} is out of range for {1}", propIndex + 1, GetType().Name.ToUpper())); } }
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); Directrix = dictionary[ParserSTEP.StripLink(str, ref pos, len)] as IfcCurve; string field = ParserSTEP.StripField(str, ref pos, len); if (field.StartsWith("I")) { mStartParam = ParserIfc.parseMeasureValue(field) as IfcCurveMeasureSelect; } else { double d = ParserSTEP.ParseDouble(field); if (!double.IsNaN(d)) { mStartParam = new IfcParameterValue(d); } } field = ParserSTEP.StripField(str, ref pos, len); if (field.StartsWith("I")) { mEndParam = ParserIfc.parseMeasureValue(field) as IfcCurveMeasureSelect; } else { double d = ParserSTEP.ParseDouble(field); if (!double.IsNaN(d)) { mEndParam = new IfcParameterValue(d); } } }
public IfcSweptDiskSolid(IfcCurve __Directrix, IfcPositiveLengthMeasure __Radius, IfcPositiveLengthMeasure?__InnerRadius, IfcParameterValue __StartParam, IfcParameterValue __EndParam) { this._Directrix = __Directrix; this._Radius = __Radius; this._InnerRadius = __InnerRadius; this._StartParam = __StartParam; this._EndParam = __EndParam; }
public IfcSurfaceCurveSweptAreaSolid(IfcProfileDef __SweptArea, IfcAxis2Placement3D __Position, IfcCurve __Directrix, IfcParameterValue __StartParam, IfcParameterValue __EndParam, IfcSurface __ReferenceSurface) : base(__SweptArea, __Position) { this._Directrix = __Directrix; this._StartParam = __StartParam; this._EndParam = __EndParam; this._ReferenceSurface = __ReferenceSurface; }
public IfcRectangularTrimmedSurface(IfcSurface __BasisSurface, IfcParameterValue __U1, IfcParameterValue __V1, IfcParameterValue __U2, IfcParameterValue __V2, IfcBoolean __Usense, IfcBoolean __Vsense) { this._BasisSurface = __BasisSurface; this._U1 = __U1; this._V1 = __V1; this._U2 = __U2; this._V2 = __V2; this._Usense = __Usense; this._Vsense = __Vsense; }
public static IfcTrimmedCurve MakeSemiCircle(MemoryModel m, int radius) { var circle = m.Instances.New <IfcCircle>(); circle.Position = MakeAxis2Placement2D(m); circle.Radius = radius; var semiCircle = m.Instances.New <IfcTrimmedCurve>(); IfcParameterValue t1 = 0.0; IfcParameterValue t2 = Math.PI; semiCircle.Trim1.Add(t1); semiCircle.Trim2.Add(t2); semiCircle.MasterRepresentation = IfcTrimmingPreference.PARAMETER; semiCircle.BasisCurve = circle; return(semiCircle); }
public override void Parse(int propIndex, IPropertyValue value, int[] nestedIndex) { switch (propIndex) { case 0: _basisCurve = (IfcCurve)(value.EntityVal); return; case 1: _pointParameter = value.RealVal; return; default: throw new XbimParserException(string.Format("Attribute index {0} is out of range for {1}", propIndex + 1, GetType().Name.ToUpper())); } }
public override void IfcParse(int propIndex, IPropertyValue value) { switch (propIndex) { case 0: _basisCurve = (IfcCurve)value.EntityVal; break; case 1: _pointParameter = value.RealVal; break; default: this.HandleUnexpectedAttribute(propIndex, value); break; } }
protected override string BuildStringSTEP(ReleaseVersion release) { string parameters = "$,$"; if (release < ReleaseVersion.IFC4X3_RC2) { IfcParameterValue startParameter = mStartParam as IfcParameterValue, endParameter = mEndParam as IfcParameterValue; parameters = (startParameter == null ? "$," : ParserSTEP.DoubleToString(startParameter.Measure) + ",") + (endParameter == null ? "$" : ParserSTEP.DoubleToString(endParameter.Measure)); } else { parameters = (mStartParam == null ? "$," : mStartParam.ToString() + ",") + (mEndParam == null ? "$" : mEndParam.ToString()); } return(base.BuildStringSTEP(release) + ",#" + mDirectrix.StepId + "," + parameters); }
public override void Parse(int propIndex, IPropertyValue value, int[] nestedIndex) { switch (propIndex) { case 0: case 1: case 2: base.Parse(propIndex, value, nestedIndex); return; case 3: _paramLength = value.RealVal; return; default: throw new XbimParserException(string.Format("Attribute index {0} is out of range for {1}", propIndex + 1, GetType().Name.ToUpper())); } }
protected override void setJSON(JObject obj, BaseClassIfc host, SetJsonOptions options) { base.setJSON(obj, host, options); obj["Directrix"] = Directrix.getJson(this, options); if (mDatabase != null && mDatabase.Release < ReleaseVersion.IFC4X3_RC2) { IfcParameterValue startParameter = mStartParam as IfcParameterValue; if (startParameter != null) { obj["StartParam"] = startParameter.Measure.ToString(); } IfcParameterValue endParameter = mEndParam as IfcParameterValue; if (endParameter != null) { obj["EndParam"] = endParameter.Measure.ToString(); } } }
internal override void SetXML(XmlElement xml, BaseClassIfc host, Dictionary <string, XmlElement> processed) { base.SetXML(xml, host, processed); xml.AppendChild(Directrix.GetXML(xml.OwnerDocument, "Directrix", this, processed)); if (mDatabase != null && mDatabase.Release < ReleaseVersion.IFC4X3_RC2) { IfcParameterValue startParameter = mStartParam as IfcParameterValue; if (startParameter != null) { xml.SetAttribute("StartParam", startParameter.Measure.ToString()); } IfcParameterValue endParameter = mEndParam as IfcParameterValue; if (endParameter != null) { xml.SetAttribute("EndParam", endParameter.Measure.ToString()); } } }
internal override void parseJObject(JObject obj) { base.parseJObject(obj); JObject jobj = obj.GetValue("Directrix", StringComparison.InvariantCultureIgnoreCase) as JObject; if (jobj != null) { Directrix = mDatabase.ParseJObject <IfcCurve>(jobj); } JToken startParam = obj.GetValue("StartParam", StringComparison.InvariantCultureIgnoreCase); if (startParam != null) { mStartParam = new IfcParameterValue(startParam.Value <double>()); } JToken endParam = obj.GetValue("EndParam", StringComparison.InvariantCultureIgnoreCase); if (endParam != null) { mEndParam = new IfcParameterValue(endParam.Value <double>()); } }
public override void IfcParse(int propIndex, IPropertyValue value) { switch (propIndex) { case 0: _basisSurface = (IfcSurface)value.EntityVal; break; case 1: _u1 = value.RealVal; break; case 2: _v1 = value.RealVal; break; case 3: _u2 = value.RealVal; break; case 4: _v2 = value.RealVal; break; case 5: _uSense = value.BooleanVal; break; case 6: _vSense = value.BooleanVal; break; default: this.HandleUnexpectedAttribute(propIndex, value); break; } }
public override void Parse(int propIndex, IPropertyValue value, int[] nestedIndex) { switch (propIndex) { case 0: _basisSurface = (IfcSurface)(value.EntityVal); return; case 1: _u1 = value.RealVal; return; case 2: _v1 = value.RealVal; return; case 3: _u2 = value.RealVal; return; case 4: _v2 = value.RealVal; return; case 5: _usense = value.BooleanVal; return; case 6: _vsense = value.BooleanVal; return; default: throw new XbimParserException(string.Format("Attribute index {0} is out of range for {1}", propIndex + 1, GetType().Name.ToUpper())); } }
public IfcPointOnSurface(IfcSurface __BasisSurface, IfcParameterValue __PointParameterU, IfcParameterValue __PointParameterV) { this._BasisSurface = __BasisSurface; this._PointParameterU = __PointParameterU; this._PointParameterV = __PointParameterV; }
public IfcPointOnCurve(IfcCurve __BasisCurve, IfcParameterValue __PointParameter) { this._BasisCurve = __BasisCurve; this._PointParameter = __PointParameter; }
public IfcReparametrisedCompositeCurveSegment(IfcTransitionCode __Transition, IfcBoolean __SameSense, IfcCurve __ParentCurve, IfcParameterValue __ParamLength) : base(__Transition, __SameSense, __ParentCurve) { this.ParamLength = __ParamLength; }