Skip to content

Commit c2df641

Browse files
committed
Fix - error in TGeoCtub shape creation
1 parent b29b0fb commit c2df641

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

changes.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
3. Fix - correctly draw empty th2 bins when zmin<0 is specified
77
4. Fix - limit th2 text output size
88
5. Fix - use histogram fMinimum/fMaximum when drawing z axis in lego plot
9+
6. Fix - error in TGeoCtub shape creation
910

1011

1112
## Changes in 4.5.1

scripts/JSRootGeoPainter.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -371,8 +371,8 @@
371371
if (shape._typename == "TGeoCtub")
372372
for (var n=0;n<geometry.vertices.length;++n) {
373373
var vertex = geometry.vertices[n];
374-
if (vertex.z<0) vertex.z = -shape.fDz-(vertex.x*shape.fNlow[0]+vertex.x*shape.fNlow[1])/shape.fNlow[2];
375-
else vertex.z = shape.fDz-(vertex.y*shape.fNhigh[0]+vertex.y*shape.fNhigh[1])/shape.fNhigh[2];
374+
if (vertex.z<0) vertex.z = -shape.fDz-(vertex.x*shape.fNlow[0]+vertex.y*shape.fNlow[1])/shape.fNlow[2];
375+
else vertex.z = shape.fDz-(vertex.x*shape.fNhigh[0]+vertex.y*shape.fNhigh[1])/shape.fNhigh[2];
376376
}
377377

378378
var color = new THREE.Color(); // make dummy color for all faces

0 commit comments

Comments
 (0)