public JsonResult TrazadorSujeto(TrazadorCubicoSujeto_model model, string submitbutton) { TrazadoresCubicos trazSuj = new TrazadoresCubicos(); model.ans = new Answer_Model(); try { for (int start = 0; start < model.values.Count; start++) { trazSuj.AddPoint(Decimal.Parse(model.values[start].x), Decimal.Parse(model.values[start].y)); } trazSuj.AddFPO(model.FPOd); trazSuj.AddFPN(model.FPNd); model.ans.Res = trazSuj.SolveS(); } catch (Exception e) { model.ans.Res = "Intruduzca Correctamente los Valores."; } model.ans.status = 0; if (model.ans.Res[0] == 'J') { model.ans.status = 1; } else { model.ans.status = 2; } return(Json(model.ans)); }
public JsonResult TrazadorNatural(TrazadorCubicoNatural_model model, string submitbutton) { TrazadoresCubicos trazNat = new TrazadoresCubicos(); model.ans = new Answer_Model(); for (int start = 0; start < model.values.Count; start++) { trazNat.AddPoint(Decimal.Parse(model.values[start].x), Decimal.Parse(model.values[start].y)); } model.ans.Res = trazNat.Solve(); model.ans.status = 0; if (model.ans.Res[0] == 'J') { model.ans.status = 1; } else { model.ans.status = 2; } return(Json(model.ans)); }