From 4b74a730f36ed9f65a0ad46395df843cf8b6a6db Mon Sep 17 00:00:00 2001 From: nicolas-f Date: Tue, 15 Oct 2024 12:05:52 +0200 Subject: [PATCH] fix building Z --- .../noise_planet/noisemodelling/pathfinder/PathFinder.java | 1 - .../noisemodelling/pathfinder/profilebuilder/Building.java | 6 +++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/noisemodelling-pathfinder/src/main/java/org/noise_planet/noisemodelling/pathfinder/PathFinder.java b/noisemodelling-pathfinder/src/main/java/org/noise_planet/noisemodelling/pathfinder/PathFinder.java index eca0566bb..b8c96bf87 100644 --- a/noisemodelling-pathfinder/src/main/java/org/noise_planet/noisemodelling/pathfinder/PathFinder.java +++ b/noisemodelling-pathfinder/src/main/java/org/noise_planet/noisemodelling/pathfinder/PathFinder.java @@ -902,7 +902,6 @@ public CnossosPath computeHEdgeDiffraction(CutProfile cutProfile , boolean bodyB Coordinate src = null; for (int i = 1; i < pts.size(); i++) { - boolean isSource = false; int k =0; int i0 = pts2D.indexOf(pts.get(i-1)); int i1 = pts2D.indexOf(pts.get(i)); diff --git a/noisemodelling-pathfinder/src/main/java/org/noise_planet/noisemodelling/pathfinder/profilebuilder/Building.java b/noisemodelling-pathfinder/src/main/java/org/noise_planet/noisemodelling/pathfinder/profilebuilder/Building.java index 61fe14a2f..d33bd33f0 100644 --- a/noisemodelling-pathfinder/src/main/java/org/noise_planet/noisemodelling/pathfinder/profilebuilder/Building.java +++ b/noisemodelling-pathfinder/src/main/java/org/noise_planet/noisemodelling/pathfinder/profilebuilder/Building.java @@ -129,7 +129,11 @@ public double updateZTopo(ProfileBuilder profileBuilder) { } public double getZ() { - return zTopo + height; + if(Double.isNaN(zTopo) || Double.isNaN(height)) { + return poly.getCoordinate().z; + } else { + return zTopo + height; + } } /**