internal void DisplayOutputs(SetupChange_Outputs setup_OP_FL, SetupChange_CornerVariables cvFL, SetupChange_Outputs setup_OP_FR, SetupChange_CornerVariables cvFR, SetupChange_Outputs setup_OP_RL, SetupChange_CornerVariables cvRL, SetupChange_Outputs setup_OP_RR, SetupChange_CornerVariables cvRR) { bool Converged = true; ///<summary>Setting the Front Left Outputs</summary> SetupChangeFL_Results.DisplayIndividualOutputs(OC_FL, setup_OP_FL, cvFL, SetupChangeFL_Results, SetupChangeFL_Results.vGridControl1, ref Converged); ///<summary>Plotting the User's and Calculated Bump Steer Curve. If they are not requested, their count will be zero and it will be taken care of </summary> SetupChangeFL_Results.PlotBumpSteerGraph(setup_OP_FL, cvFL, SetupChangeFL_Results); ///<summary>Setting the Front Right Outputs</summary> SetupChangeFR_Results.DisplayIndividualOutputs(OC_FR, setup_OP_FR, cvFR, SetupChangeFR_Results, SetupChangeFR_Results.vGridControl1, ref Converged); ///<summary>Plotting the User's and Calculated Bump Steer Curve. If they are not requested, their count will be zero and it will be taken care of </summary> SetupChangeFR_Results.PlotBumpSteerGraph(setup_OP_FR, cvFR, SetupChangeFR_Results); ///<summary>Setting the Rear Left Outputs</summary> SetupChangeRL_Results.DisplayIndividualOutputs(OC_RL, setup_OP_RL, cvRL, SetupChangeRL_Results, SetupChangeRL_Results.vGridControl1, ref Converged); ///<summary>Plotting the User's and Calculated Bump Steer Curve. If they are not requested, their count will be zero and it will be taken care of </summary> SetupChangeFR_Results.PlotBumpSteerGraph(setup_OP_RL, cvRL, SetupChangeRL_Results); ///<summary>Setting the Rear Right Outputs</summary> SetupChangeRR_Results.DisplayIndividualOutputs(OC_RR, setup_OP_RR, cvRR, SetupChangeRR_Results, SetupChangeRR_Results.vGridControl1, ref Converged); ///<summary>Plotting the User's and Calculated Bump Steer Curve. If they are not requested, their count will be zero and it will be taken care of </summary> SetupChangeRR_Results.PlotBumpSteerGraph(setup_OP_RR, cvRR, SetupChangeRR_Results); ///<summary>Displaying the Results Panel in a Floating Style</summary> FloatOutputDockPanel(); }
public void PlotBumpSteerGraph(SetupChange_Outputs _setupOP, SetupChange_CornerVariables _cv, XUC_SetupChangeResults _resultsGUI) { for (int i = 0; i < _resultsGUI.bumpSteerCurve1.chartControl1.Series.Count; i++) { _resultsGUI.bumpSteerCurve1.chartControl1.Series[i].Points.Clear(); } if (_cv.monitorBumpSteer || _cv.BumpSteerChangeRequested) { ///<summary> ///Ensuring that the <see cref="SetupChange_Outputs.Calc_BumpSteerChart"/> is not null ///Basically this ensures that the if the user Ran a simulation with Bump Steer Change but didn't create a BS Chart the software doesnt't fail /// </summary> if (_setupOP.Calc_BumpSteerChart != null) { ///<summary>If the Bump Steer Change is requested then setting the Enaled status to true so that the user can scroll and zoom the Bump Steer Contro </summary> _resultsGUI.bumpSteerCurve1.Enabled = true; _resultsGUI.bumpSteerCurve1.chartControl1.Series[0].Points.Clear(); ///<summary>Setting the <see cref="BumpSteerCurve.IsOutputChart"/> value to true to teach the CHart that the Output is calling it. ///---IMPORTANT--- This is an important step so that the accidentally clicking the control doesn;t create a series point /// </summary> _resultsGUI.bumpSteerCurve1.IsOutputChart = true; for (int i = 0; i < _setupOP.Req_BumpSteerChart.Count; i++) { _resultsGUI.bumpSteerCurve1.AddPointToChart(_resultsGUI.bumpSteerCurve1.chartControl1, _cv.BS_Params.WheelDeflections[_cv.BS_Params.HighestBumpindex + i], _setupOP.Req_BumpSteerChart[i].Degrees, 0, true); } _resultsGUI.bumpSteerCurve1.AddSeriesToChart(_resultsGUI.bumpSteerCurve1.chartControl1); ///<summary>Plotting the Computed Bump Steer Chart</summary> for (int i = 0; i < _setupOP.Calc_BumpSteerChart.Count; i++) { _resultsGUI.bumpSteerCurve1.AddPointToChart(_resultsGUI.bumpSteerCurve1.chartControl1, _cv.BS_Params.WheelDeflections[_cv.BS_Params.HighestBumpindex + i], _setupOP.Calc_BumpSteerChart[i].Degrees, 1, true); } _resultsGUI.bumpSteerCurve1.Enabled = true; } } }
/// <summary> /// Method to Clone all the properpties and variables of the <see cref="SetupChange_Outputs"/> Class from one Object to another /// </summary> /// <returns></returns> public SetupChange_Outputs Clone() { SetupChange_Outputs tempOP = new SetupChange_Outputs(); tempOP.Corner = this.Corner; tempOP.Identifier = this.Identifier; tempOP.TopFrontLength = this.TopFrontLength; tempOP.TopRearLength = this.TopRearLength; tempOP.BottomFrontLength = this.BottomFrontLength; tempOP.BottomRearLength = this.BottomRearLength; tempOP.PushrodLength = this.PushrodLength; tempOP.ToeLinklength = this.ToeLinklength; tempOP.ToeLinkInboard = this.ToeLinkInboard; tempOP.TopCamberShimsLength = this.TopCamberShimsLength; tempOP.TopCamberShimsNo = this.TopCamberShimsNo; tempOP.BottomCamberShimsLength = this.BottomCamberShimsLength; tempOP.BottomCamberShimsNo = this.BottomCamberShimsNo; tempOP.Calc_Camber = this.Calc_Camber; tempOP.Calc_Toe = this.Calc_Toe; tempOP.Calc_Caster = this.Calc_Caster; tempOP.Calc_KPI = this.Calc_KPI; tempOP.Req_Camber = this.Req_Camber; tempOP.Req_Toe = this.Req_Toe; tempOP.Req_Caster = this.Req_Caster; tempOP.Req_KPI = this.Req_KPI; tempOP.Calc_RideHeight = this.Calc_RideHeight; tempOP.Req_RideHeight = this.Req_RideHeight; tempOP.Calc_BumpSteerChart = this.Calc_BumpSteerChart; tempOP.Req_BumpSteerChart = this.Req_BumpSteerChart; tempOP.Caster_Conv = this.Caster_Conv; tempOP.KPI_Conv = this.KPI_Conv; tempOP.Camber_Conv = this.Camber_Conv; tempOP.Toe_Conv = this.Toe_Conv; tempOP.BumpSteer_Conv = this.BumpSteer_Conv; tempOP.RideHeight_Conv = this.RideHeight_Conv; tempOP.Total_Conv = this.Total_Conv; return(tempOP); }
/// <summary> /// Method to display the Outputs of Each Setup Change. If a particular param is not requested the initial value is shown /// </summary> /// <param name="_oc"></param> /// <param name="_setupOP"></param> /// <param name="_cv"></param> /// <param name="_resultsGUI"></param> /// <param name="_resultsGrid"></param> /// <param name="_converged"></param> public void DisplayIndividualOutputs(OutputClass _oc, SetupChange_Outputs _setupOP, SetupChange_CornerVariables _cv, XUC_SetupChangeResults _resultsGUI, VGridControl _resultsGrid, ref bool _converged) { string test = _cv.kpiAdjustmentTool.ToString(); ///<summary>Assining the KPI Outputs</summary> _resultsGrid.SetCellValue(_resultsGUI.rowKPIAngle, 1, Convert.ToString(Math.Round(Angle.FromRadians(_oc.KPI).Degrees, 2)) + " | " + Convert.ToString(Math.Round(_setupOP.Calc_KPI.Degrees, 2))); if (_cv.KPIChangeRequested || _cv.constKPI || _cv.CasterChangeRequested || _cv.constCaster) { if (_cv.Master_Adj["Caster/KPI"].ContainsKey(AdjustmentTools.TopFrontArm.ToString())) { _resultsGrid.SetCellValue(_resultsGUI.rowTopFrontAdj, 1, Convert.ToString(Math.Round(_setupOP.TopFrontLength, 3))); _resultsGUI.rowTopFrontAdj.Visible = true; } else { _resultsGUI.rowTopFrontAdj.Visible = false; } if (_cv.Master_Adj["Caster/KPI"].ContainsKey(AdjustmentTools.TopRearArm.ToString())) { _resultsGrid.SetCellValue(_resultsGUI.rowTopRearAdj, 1, Convert.ToString(Math.Round(_setupOP.TopRearLength, 3))); _resultsGUI.rowTopRearAdj.Visible = true; } else { _resultsGUI.rowTopRearAdj.Visible = false; } if (_cv.Master_Adj["Caster/KPI"].ContainsKey(AdjustmentTools.BottomFrontArm.ToString())) { _resultsGrid.SetCellValue(_resultsGUI.rowBottomFrontAdj, 1, Convert.ToString(Math.Round(_setupOP.BottomFrontLength, 3))); _resultsGUI.rowBottomFrontAdj.Visible = true; } else { _resultsGUI.rowBottomFrontAdj.Visible = false; } if (_cv.Master_Adj["Caster/KPI"].ContainsKey(AdjustmentTools.BottomRearArm.ToString())) { _resultsGrid.SetCellValue(_resultsGUI.rowBottomRearAdj, 1, Convert.ToString(Math.Round(_setupOP.BottomRearLength, 3))); _resultsGUI.rowBottomRearAdj.Visible = true; } else { _resultsGUI.rowBottomRearAdj.Visible = false; } } else { _resultsGUI.rowTopFrontAdj.Visible = false; _resultsGUI.rowTopRearAdj.Visible = false; _resultsGUI.rowBottomFrontAdj.Visible = false; _resultsGUI.rowBottomRearAdj.Visible = false; } _resultsGrid.SetCellValue(_resultsGUI.rowKPIConvergance, 1, _setupOP.KPI_Conv.ConvergenceStatus); ///<summary>Assingint the Caster Outputs</summary> _resultsGrid.SetCellValue(_resultsGUI.rowCasterAngle, 1, Convert.ToString(Math.Round(Angle.FromRadians(_oc.Caster).Degrees, 2)) + " | " + Convert.ToString(Math.Round(_setupOP.Calc_Caster.Degrees, 2))); _resultsGrid.SetCellValue(_resultsGUI.rowCasterConvergance, 1, _setupOP.Caster_Conv.ConvergenceStatus); ///<summary>Assining the Camber Outputs</summary> _resultsGrid.SetCellValue(_resultsGUI.rowCamberAngle, 1, Convert.ToString(Math.Round(Angle.FromRadians(_oc.waOP.StaticCamber).Degrees, 3)) + " | " + Convert.ToString(Math.Round(_setupOP.Calc_Camber.Degrees, 3))); if (_cv.CamberChangeRequested || _cv.constCamber) { if (_cv.Master_Adj["Camber"].ContainsKey(AdjustmentTools.TopCamberMount.ToString())) { _resultsGrid.SetCellValue(_resultsGUI.rowTopCamberMount, 1, Convert.ToString(Math.Round(_setupOP.TopCamberShimsLength, 3))); _resultsGrid.SetCellValue(_resultsGUI.rowShimsTopCamberMount, 1, Convert.ToString(Math.Round(_setupOP.TopCamberShimsNo, 3))); _resultsGUI.rowTopCamberMount.Visible = true; } else { _resultsGUI.rowTopCamberMount.Visible = false; } if (_cv.Master_Adj["Camber"].ContainsKey(AdjustmentTools.BottomCamberMount.ToString())) { _resultsGrid.SetCellValue(_resultsGUI.rowBottomCamberMount, 1, Convert.ToString(Math.Round(_setupOP.BottomCamberShimsLength, 3))); _resultsGrid.SetCellValue(_resultsGUI.rowShimsBottomCamberMount, 1, Convert.ToString(Math.Round(_setupOP.BottomCamberShimsNo, 3))); _resultsGUI.rowBottomCamberMount.Visible = true; } else { _resultsGUI.rowBottomCamberMount.Visible = false; } } else { _resultsGUI.rowTopCamberMount.Visible = false; _resultsGUI.rowBottomCamberMount.Visible = false; } _resultsGrid.SetCellValue(_resultsGUI.rowCamberConvergance, 1, _setupOP.Camber_Conv.ConvergenceStatus); ///<summary>Assigning the Toe Outputs</summary> _resultsGrid.SetCellValue(_resultsGUI.rowToeAngle, 1, Convert.ToString(Math.Round(Angle.FromRadians(_oc.waOP.StaticToe).Degrees, 3)) + " | " + Convert.ToString(Math.Round(_setupOP.Calc_Toe.Degrees, 3))); if (_cv.ToeChangeRequested || _cv.constToe) { if (_cv.Master_Adj["Toe"].ContainsKey(AdjustmentTools.ToeLinkLength.ToString())) { _resultsGrid.SetCellValue(_resultsGUI.rowToeLink, 1, Convert.ToString(Math.Round(_setupOP.ToeLinklength, 3))); _resultsGUI.rowToeLink.Visible = true; } else { _resultsGUI.rowToeLink.Visible = false; } } else { _resultsGUI.rowToeLink.Visible = false; } _resultsGrid.SetCellValue(_resultsGUI.rowToeConvergance, 1, _setupOP.Toe_Conv.ConvergenceStatus); ///<summary>Assigning the Ride Height</summary> _resultsGrid.SetCellValue(_resultsGUI.rowRideHeight, 1, _setupOP.Calc_RideHeight); _resultsGrid.SetCellValue(_resultsGUI.rowLinkRHName, 1, _cv.rideheightAdjustmentTool.ToString()); _resultsGrid.SetCellValue(rowLinkRHDelta, 1, Convert.ToString(Math.Round(_setupOP.PushrodLength, 3))); _resultsGrid.SetCellValue(_resultsGUI.rowRHConvergance, 1, _setupOP.RideHeight_Conv.ConvergenceStatus); ///<summary>Setting the results of the Bump Steer</summary> if (_cv.BumpSteerChangeRequested) { _resultsGrid.SetCellValue(rowToeLinkInboard_x, 1, Convert.ToString(Math.Round(_setupOP.ToeLinkInboard.X, 3))); _resultsGUI.rowToeLinkInboard_x.Visible = true; _resultsGrid.SetCellValue(rowToeLinkInboard_y, 1, Convert.ToString(Math.Round(_setupOP.ToeLinkInboard.Y, 3))); _resultsGUI.rowToeLinkInboard_y.Visible = true; _resultsGrid.SetCellValue(rowToeLinkInboard_z, 1, Convert.ToString(Math.Round(_setupOP.ToeLinkInboard.Z, 3))); _resultsGUI.rowToeLinkInboard_z.Visible = true; } else { _resultsGUI.rowToeLinkInboard_x.Visible = false; _resultsGUI.rowToeLinkInboard_y.Visible = false; _resultsGUI.rowToeLinkInboard_z.Visible = false; } _resultsGrid.SetCellValue(rowBSConvergence, 1, _setupOP.BumpSteer_Conv.ConvergenceStatus); }