# Define a hourglass solid

**URL:** <https://geant4-forum.web.cern.ch/t/define-a-hourglass-solid/4142>\
**Category:** Geometry, Fields and Transportation\
**Created:** [December 20, 2020, 9:29am UTC](https://geant4-forum.web.cern.ch/t/define-a-hourglass-solid/4142 "2020-12-20T09:29:55Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![faca87](https://geant4-forum.web.cern.ch/letter_avatar_proxy/v4/letter/f/b19c9b/32.png) [@faca87](https://geant4-forum.web.cern.ch/u/faca87)\
**Post date:** [December 20, 2020, 9:29am UTC](https://geant4-forum.web.cern.ch/t/define-a-hourglass-solid/4142/1 "2020-12-20T09:29:56Z")

</div>

Hello, I must draw two targets similiar to hourglass

1. The first one is this one

![image](https://geant4-forum.web.cern.ch/uploads/default/original/2X/d/d275b3c173bcc7cbf8e45b1a15f706fcde0ea76e.png)

modifing the code that @evc wrote me to define a meniscus, I wrote

```
G4double pHourRmax = 1.85*cm;
 G4Orb* HourOrb1 = new G4Orb("HourOrb1", pHourRmax);
G4Orb* HourOrb2 = new G4Orb("HourOrb2", pHourRmax);
G4Tubs* HourTub =    
            new G4Tubs("HourTube", //its name
                pRMin, pRMax, pDz, pSPhi, pDPhi); //its size*/
        	G4ThreeVector positionHourOrb1(0,0,1.95*cm);
        	G4ThreeVector positionHourOrb2(0,0,-1.95*cm);
        	G4VSolid* HourTmp = new G4SubtractionSolid("HourTmp", HourTub, HourOrb1, &identity, positionHourOrb1);
        	G4VSolid* HourGlass = new G4SubtractionSolid("HourGlass", HourTmp, HourOrb1, &identity, positionHourOrb2); 

```

when I look the logical volume

![image](https://geant4-forum.web.cern.ch/uploads/default/original/2X/a/ac1c3bf67c07264b41956181c886c5c4d1b1829e.png)

but when I look the targets I get these ones

![image](https://geant4-forum.web.cern.ch/uploads/default/original/2X/8/8f13ace713fa174b73a219dea691b8d6fb1fe577.png)  
 ![image](https://geant4-forum.web.cern.ch/uploads/default/original/2X/c/cf147ada52071540c7bdbe468e16343594b3c3d7.png)

the lateral view isn’t curve , but it is still linear. Is there a way to get a lateral surface somthing like  
 ![image](https://geant4-forum.web.cern.ch/uploads/default/original/2X/d/d275b3c173bcc7cbf8e45b1a15f706fcde0ea76e.png)  
???

1. I’ve to build a second target like this one  
 ![image](https://geant4-forum.web.cern.ch/uploads/default/original/2X/d/de2365ef8e26077db8bb9e3b8af4e3300363b791.png)  
ie. the lataeral surface must be curve in the up and down of it and linear at the center…  
is there a way to do it?

@evc maybe, are you able to help me to do this too?

---

<div class="post-metadata">

**Author:** ![mkelsey](https://geant4-forum.web.cern.ch/user_avatar/geant4-forum.web.cern.ch/mkelsey/32/49_2.png) [@mkelsey](https://geant4-forum.web.cern.ch/u/mkelsey)\
**Post date:** [December 20, 2020, 3:53pm UTC](https://geant4-forum.web.cern.ch/t/define-a-hourglass-solid/4142/2 "2020-12-20T15:53:06Z")

</div>

Make a `G4UnionSolid`, starting with your first shape, and joining it with a `G4Tubs`. The top and bottom flats of the cylinder be the flat portions of your shape (which you labelled “Linear” in your cross-section diagram).

---

<div class="post-metadata">

**Author:** ![evc](https://geant4-forum.web.cern.ch/user_avatar/geant4-forum.web.cern.ch/evc/32/862_2.png) [@evc](https://geant4-forum.web.cern.ch/u/evc)\
**Post date:** [December 20, 2020, 4:02pm UTC](https://geant4-forum.web.cern.ch/t/define-a-hourglass-solid/4142/3 "2020-12-20T16:02:26Z")

</div>

1. It is an illusion, the surface is not flat, it is curved. Try to draw the lens as a wire frame, like in your first image.
2. Use G4Ellipsoid instead G4Orb, it has cuts in Z.

---

<div class="post-metadata">

**Author:** ![faca87](https://geant4-forum.web.cern.ch/letter_avatar_proxy/v4/letter/f/b19c9b/32.png) [@faca87](https://geant4-forum.web.cern.ch/u/faca87)\
**Post date:** [December 22, 2020, 4:07pm UTC](https://geant4-forum.web.cern.ch/t/define-a-hourglass-solid/4142/4 "2020-12-22T16:07:04Z")

</div>

Thank you the both @mkelsey and @evc!
