internal override void SetXML(XmlElement xml, BaseClassIfc host, Dictionary <int, XmlElement> processed) { base.SetXML(xml, host, processed); xml.AppendChild(BasisSurface.GetXML(xml.OwnerDocument, "BasisSurface", this, processed)); xml.SetAttribute("PointParameterU", mPointParameterU.ToString()); xml.SetAttribute("PointParameterV", mPointParameterV.ToString()); }
/// <summary> /// overrides <see cref="Surface.Normal(double, double)"/>. /// </summary> /// <param name="u">Specifies the parameter u in [0,1]</param> /// <param name="v">Specifies the parameter v in [0,1]</param> /// <returns>the normal vector.</returns> public override xyz Normal(double u, double v) { if (Distance < 0) { return(BasisSurface.vDerivation(u, v) & BasisSurface.uDerivation(u, v)); } return(BasisSurface.uDerivation(u, v) & BasisSurface.vDerivation(u, v)); }
/// <summary> /// overrides the <see cref="Surface.Copy"/> method and sets the belonging fields. /// </summary> /// <returns>the copied surface</returns> public override Surface Copy() { OffsetSurface Result = base.Copy() as OffsetSurface; Result.BasisSurface = BasisSurface.Copy(); Result.Distance = Distance; return(Result); }
public override string GetStepParameters() { var parameters = new List <string>(); parameters.Add(BasisSurface != null ? BasisSurface.ToStepValue() : "$"); parameters.Add(ReferenceCurve != null ? ReferenceCurve.ToStepValue() : "$"); return(string.Join(", ", parameters.ToArray())); }
protected override void setJSON(JObject obj, BaseClassIfc host, HashSet <int> processed) { base.setJSON(obj, host, processed); obj["BasisSurface"] = BasisSurface.getJson(this, processed); obj["OuterBoundary"] = OuterBoundary.getJson(this, processed); if (mInnerBoundaries.Count > 0) { obj["InnerBoundaries"] = new JArray(InnerBoundaries.ConvertAll(x => x.getJson(this, processed))); } }
public override string GetStepParameters() { var parameters = new List <string>(); parameters.Add(BasisSurface != null ? BasisSurface.ToStepValue() : "$"); parameters.Add(OuterBoundary != null ? OuterBoundary.ToStepValue() : "$"); parameters.Add(InnerBoundaries != null ? InnerBoundaries.ToStepValue() : "$"); return(string.Join(", ", parameters.ToArray())); }
public override string GetStepParameters() { var parameters = new List <string>(); parameters.Add(BasisSurface != null ? BasisSurface.ToStepValue() : "$"); parameters.Add(PointParameterU != null ? PointParameterU.ToStepValue() : "$"); parameters.Add(PointParameterV != null ? PointParameterV.ToStepValue() : "$"); return(string.Join(", ", parameters.ToArray())); }
protected override void setJSON(JObject obj, BaseClassIfc host, SetJsonOptions options) { base.setJSON(obj, host, options); obj["BasisSurface"] = BasisSurface.getJson(this, options); obj["OuterBoundary"] = OuterBoundary.getJson(this, options); if (mInnerBoundaries.Count > 0) { obj["InnerBoundaries"] = new JArray(InnerBoundaries.ToList().ConvertAll(x => x.getJson(this, options))); } }
internal override void SetXML(XmlElement xml, BaseClassIfc host, Dictionary <int, XmlElement> processed) { base.SetXML(xml, host, processed); xml.AppendChild(BasisSurface.GetXML(xml.OwnerDocument, "BasisSurface", this, processed)); xml.SetAttribute("U1", mU1.ToString()); xml.SetAttribute("V1", mV1.ToString()); xml.SetAttribute("U2", mU2.ToString()); xml.SetAttribute("V2", mV2.ToString()); xml.SetAttribute("Usense", mUsense.ToString()); xml.SetAttribute("Vsense", mVsense.ToString()); }
public override string GetStepParameters() { var parameters = new List <string>(); parameters.Add(BasisSurface != null ? BasisSurface.ToStepValue() : "$"); parameters.Add(U1 != null ? U1.ToStepValue() : "$"); parameters.Add(V1 != null ? V1.ToStepValue() : "$"); parameters.Add(U2 != null ? U2.ToStepValue() : "$"); parameters.Add(V2 != null ? V2.ToStepValue() : "$"); parameters.Add(Usense != null ? Usense.ToStepValue() : "$"); parameters.Add(Vsense != null ? Vsense.ToStepValue() : "$"); return(string.Join(", ", parameters.ToArray())); }
/// <summary> /// overrides <see cref="Surface.Value(double, double)"/>. /// </summary> /// <param name="u">first parameter.</param> /// <param name="v">second parameter.</param> /// <returns>point of the surface.</returns> public override xyz Value(double u, double v) { xyz Result = new xyz(0, 0, 0); if (BasisSurface != null) { Result = BasisSurface.Value(u, v) + (this.uDerivation(u, v) & this.vDerivation(u, v)).normalized() * Distance; if (ZHeight(u, v) > 0) { Result = Result + BasisSurface.Normal(u, v) * ZHeight(u, v); } } return(Result); }
internal override void SetXML(XmlElement xml, BaseClassIfc host, Dictionary <int, XmlElement> processed) { base.SetXML(xml, host, processed); xml.AppendChild(BasisSurface.GetXML(xml.OwnerDocument, "BasisSurface", this, processed)); xml.AppendChild(OuterBoundary.GetXML(xml.OwnerDocument, "OuterBoundary", this, processed)); if (mInnerBoundaries.Count > 0) { XmlElement element = xml.OwnerDocument.CreateElement("InnerBoundaries"); xml.AppendChild(element); foreach (IfcCurve c in InnerBoundaries) { element.AppendChild(c.GetXML(xml.OwnerDocument, "", this, processed)); } } }
/// <summary> /// overrides <see cref="Surface.vDerivation(double, double)"/> /// </summary> /// <param name="u">Specifies the parameter u in [0,1]</param> /// <param name="v">Specifies the parameter v in [0,1]</param> /// <returns>partial v derivation</returns> public override xyz vDerivation(double u, double v) { return(BasisSurface.vDerivation(u, v)); }