// ReSharper disable PossibleNullReferenceException public KnotVectorDialog(decimal[] dCanvasKnotVector, int dCanvasDegree) { this.InitializeComponent(); this.Owner = Application.Current.MainWindow; this._degree = dCanvasDegree; this.KnotVector = dCanvasKnotVector; this._backup = dCanvasKnotVector; this._autogenerated = NurbsLogic.GenerateKnotVector(((InputWindow)this.Owner).DCanvas.ControlPoints.Count, ((InputWindow)this.Owner).DCanvas.Degree); this.Bar(); }
public void ResetKnotVector() { this.DCanvas.KnotVector = NurbsLogic.GenerateKnotVector(this.DCanvas.ControlPoints.Count, this.DCanvas.Degree); this.TbKnotVector.Text = string.Join(" ", this.DCanvas.KnotVector.Select(u => System.Math.Round(u, 4))); }