Skip to content
Snippets Groups Projects
Commit cac551a6 authored by François Grand's avatar François Grand Committed by AUBRY JEAN-PASCAL
Browse files

fix: MacroRugoRemous form: restore section generation select, fix NaNs

refs #609
parent 83f986f5
No related branches found
No related tags found
2 merge requests!252release: version 4.18.0,!213Resolve "Ajout du module courbe de remous d'une passe à macro-rugosité"
......@@ -742,7 +742,7 @@ export class GenericCalculatorComponent implements OnInit, DoCheck, AfterViewChe
// true if CourbeRemous results are present
public get hasCourbeRemousResults() {
return this.is(CalculatorType.CourbeRemous) && this.hasResults;
return (this.is(CalculatorType.CourbeRemous) || this.is(CalculatorType.MacroRugoRemous)) && this.hasResults;
}
// true if current Nub is PAR
......@@ -1012,8 +1012,7 @@ export class GenericCalculatorComponent implements OnInit, DoCheck, AfterViewChe
*/
public get courbeRemousPoints(): any[] {
if (this.hasCourbeRemousResults) {
const crForm = this._formulaire as FormulaireCourbeRemous;
for (const r of crForm.results) {
for (const r of this._formulaire.results) {
if (r instanceof RemousResults) {
return r.points;
}
......
......@@ -40,6 +40,7 @@ export class FormulaireMacroRugoRemous extends FormulaireFixedVar {
protected reaffectResultComponents() {
const mrr = this.currentNub as MacroRugoRemous;
mrr.syncSectionMacroRugo();
// variable supplémentaire à calculer
this._remousResults.extraParamSymbol = mrr.getPropValue("varCalc");
......@@ -50,6 +51,9 @@ export class FormulaireMacroRugoRemous extends FormulaireFixedVar {
const prmMRR = mrr.prms as MacroRugoRemousParams;
this._remousResults.parameters = prmMRR;
// calcul
this._remousResults.result = mrr.CalcSerie();
const sect: acSection = mrr.Sn;
this.resultYn = sect.CalcSection("Yn"); // hauteur normale
this.resultYc = sect.CalcSection("Yc"); // hauteur critique
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment