Ttube

TTUBE has so-calles divisions which are drawn by default when tube is drawn. How to draw only the contour of a tube? (“Contour only” was the default for ROOT ver. 4, and now I would like to migrate to ver. 5.)

What do you mean “contour”? The TTUBE’s contour is the rectangle.
Anyway, you can always apply the method:
root.cern.ch/root/htmldoc/TTUBE. … fDivisions to define the number of the divisions you like.
See 3 pictures made with the last ROOT and macro attached.




shapes.C (930 Bytes)

Two more pictures to complete the prev. message




Here is the picture showing what I would like to have in ROOT v. 5 (It is produced with ROOT v. 4.) Note the absence of radial lines.

:blush: I could not reproduce your picture with any ROOT 4.xx, 3.xx 2.xx and it looks wrong for me. What is your ROOT version? Can you upload your macro?
Anyway, you can get it by defining two separate nested TTUBE’s with very thin walls.

ROOT version according to root-config --version is 4.00/08.
The picture was produced with unmodified macro tutorials/geodemo.C.

So your statement is that the only way to get it are nested tubes?

[quote=“asoukhar”]ROOT version according to root-config --version is 4.00/08.
The picture was produced with unmodified macro tutorials/geodemo.C.

So your statement is that the only way to get it are nested tubes?[/quote]

No, the second way to get it - modify TTUBE::SetSegsAndPols.

[quote=“asoukhar”]ROOT version according to root-config --version is 4.00/08.
The picture was produced with unmodified macro tutorials/geodemo.C.

So your statement is that the only way to get it are nested tubes?[/quote]
I am sorry but there is no such method in ROOT like but TTUBE::SetSegsAndPols. geodemo.C macro doesn’t use any TTUBE class root.cern.ch/root/htmldoc/TTUBE.html
object at all.
It does use TGeoTube root.cern.ch/root/htmldoc/TGeoTube.html instead. I am wondering if the image you liked was due some bug in then brand-new class.[quote]No, the second way to get it - modify TTUBE::SetSegsAndPols.[/quote] Likely you should wait the class author responce to see his point after “end of Xmas holidays”. From my point of view the current implementation is correct and should not be changed.

Yes, from my POV the current implementation is correct too.
The question was about “only one way”, and I told about the second way, good or not - doesn’t matter.