Skip to content
Snippets Groups Projects
Commit 04e0fb7b authored by mathias.chouet's avatar mathias.chouet
Browse files

PAB profile: plot ZRMB in apron line, along with ZRAM

parent bdb2ea1f
No related branches found
No related tags found
1 merge request!55Resolve "PAB : interpoler en tenant compte de la longueur des bassins"
......@@ -8,7 +8,7 @@ import { ResultsComponent } from "../fixedvar-results/results.component";
import { PabResults } from "../../results/pab-results";
import { IYSeries } from "../../results/y-series";
import { CloisonAval } from "jalhyd";
import { CloisonAval, Cloisons } from "jalhyd";
@Component({
selector: "pab-profile-graph",
......@@ -226,22 +226,29 @@ export class PabProfileGraphComponent extends ResultsComponent {
const pabLength = Number(xs[xs.length - 1]) - Number(xs[0]);
const pabLength5Pct = (pabLength * 5) / 100;
// 1. fond du machin
// 1. radier (cotes amont et mi-bassin)
const dataF: { x: string, y: string }[] = [];
const nDigits = this.appSetupService.displayDigits;
// extend upstrem
// extend upstream
dataF.push({
x: (Number(xs[0]) - pabLength5Pct).toFixed(nDigits),
y: this._results.cloisonsResults[0].resultElement.getValue("ZRAM").toFixed(nDigits)
});
// regular walls
for (let i = 0; i < this._results.cloisonsResults.length; i++) {
const c = (this._results.result.sourceNub.getChildren()[i] as Cloisons);
const cr = this._results.cloisonsResults[i];
const ZRAM = cr.resultElement.getValue("ZRAM"); // any ResultElement will do
const ZRMB = cr.resultElement.getValue("ZRMB"); // any ResultElement will do
const halfLB = c.prms.LB.singleValue / 2;
dataF.push({
x: xs[i],
y: ZRAM.toFixed(nDigits)
});
dataF.push({
x: (Number(xs[i]) + halfLB).toFixed(nDigits),
y: ZRMB.toFixed(nDigits)
});
}
// downwall
const dw = (this._results.cloisonAvalResults.sourceNub as CloisonAval);
......
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