Skip to content

Commit

Permalink
fix building Z
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolas-f committed Oct 15, 2024
1 parent 49b57e7 commit 4b74a73
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}

/**
Expand Down

0 comments on commit 4b74a73

Please sign in to comment.