Commit bd53550e authored by Mathias Chouet's avatar Mathias Chouet :spaghetti:
Browse files

ParallelStructures: new method for array of admissible LoiDebit

Showing with 14 additions and 2 deletions
+14 -2
...@@ -38,9 +38,9 @@ export class Pab extends Nub { ...@@ -38,9 +38,9 @@ export class Pab extends Nub {
public Calc(sVarCalc?: string, rInit?: number): Result { public Calc(sVarCalc?: string, rInit?: number): Result {
// Update array of PabCloisons with last Models current values // Update array of PabCloisons with last Models current values
for (const cl of this.children) { /* for (const cl of this.children) {
cl.prms.setCurrentValuesFromModel(); cl.prms.setCurrentValuesFromModel();
} } */
return super.Calc(sVarCalc, rInit); return super.Calc(sVarCalc, rInit);
} }
......
...@@ -34,10 +34,22 @@ export class ParallelStructure extends Nub { ...@@ -34,10 +34,22 @@ export class ParallelStructure extends Nub {
return this._prms as ParallelStructureParams; return this._prms as ParallelStructureParams;
} }
/** Returns admissible LoiDebit grouped by StructureType */
public getLoisAdmissibles(): { [key: string]: LoiDebit[]; } { public getLoisAdmissibles(): { [key: string]: LoiDebit[]; } {
return loiAdmissiblesOuvrages; 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 */ /** Returns the 1st deep item from LoisAdmissibles */
public getDefaultLoiDebit(): LoiDebit { public getDefaultLoiDebit(): LoiDebit {
const lois = this.getLoisAdmissibles(); const lois = this.getLoisAdmissibles();
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment