diff --git a/src/pab/pab.ts b/src/pab/pab.ts index cc384f647281369dd2518ff5dfb6208d61ef2623..3c693009665accac0c8897f8aeff09a0e72fc9fb 100644 --- a/src/pab/pab.ts +++ b/src/pab/pab.ts @@ -38,9 +38,9 @@ export class Pab extends Nub { public Calc(sVarCalc?: string, rInit?: number): Result { // Update array of PabCloisons with last Models current values - for (const cl of this.children) { + /* for (const cl of this.children) { cl.prms.setCurrentValuesFromModel(); - } + } */ return super.Calc(sVarCalc, rInit); } diff --git a/src/structure/parallel_structure.ts b/src/structure/parallel_structure.ts index bd8ebfd4c9c9c36c24e28001da263568cccb53e3..0b13bd5101c7360a1e6239fb61fed612fb7a7351 100644 --- a/src/structure/parallel_structure.ts +++ b/src/structure/parallel_structure.ts @@ -34,10 +34,22 @@ export class ParallelStructure extends Nub { return this._prms as ParallelStructureParams; } + /** Returns admissible LoiDebit grouped by StructureType */ public getLoisAdmissibles(): { [key: string]: LoiDebit[]; } { return loiAdmissiblesOuvrages; } + /** Returns a flat array of all admissible LoiDebit */ + public getLoisAdmissiblesArray(): LoiDebit[] { + let loisAdm: LoiDebit[] = []; + const lois = this.getLoisAdmissibles(); + // tslint:disable-next-line:forin + for (const k in lois) { + loisAdm = loisAdm.concat(lois[k]); + } + return loisAdm; + } + /** Returns the 1st deep item from LoisAdmissibles */ public getDefaultLoiDebit(): LoiDebit { const lois = this.getLoisAdmissibles();