[Gate-users] Volume rotation along x, y and z different for each axis

Matt D edw.d at outlook.fr
Tue Feb 23 16:36:14 CET 2016


Dear Gaters, 
I have difficulties rotating my volume as I want.
I've searched in previous mails from the mailing list and I saw that I was not alone !
From: Kesava S Kalluri <kkalluri at lsu.edu>
"hi,/gate/cylinder/placement/enable/gate/cylinder/placement/setRotationAxis  -0.571 0.571 0.571                    #(1/sqrt(3))/gate/cylinder/placement/setRotationAngle 45 deg/gate/cylinder/placement/setTranslation 1 1 1 cm
Following up with a previous thread, I was able to orient it @ 45* to each axis using these commands. Now I would like to orient the cylinder at 3 different angles with respect to each axis  . Any ideas?"


First I've discovered that setRotationAxis acts as a boolean, so no need to put anything esle than 0 or 1.
So for example if I want to rotate my_volume 35° in both the x and y plan I would write :
/gate/my_volume/setRotationAxis 1 1 0/gate/my_volume/setRotationAngle 35 deg
So that's all working fine, but now what if I want to rotate my volume, let's say, 10° in the x plan, 20° in the y and 30° in the z ?
If anyone has an answer to that, i'm ready to ship a mars bar !
I thought about a possible solution which is to:- rotate a volume in one plan- create a daughter to this volume (benefiting from the initial rotation) and rotate it in another plan- create a third grand-daughter volume and rotate in the last plan if needed
But first, it seems crazy complicated to do something that I'm sure is really simple (and I'm too dumb to have thought about it), and second, each time I rotate the daughter volume I need to expand the mother volume and I create some dead space where I cannot put any other volume if I don't want deadly overlapping volumes.
Any ideas would be much appreciated :)
Ed




 		 	   		  
-------------- section suivante --------------
Une pi?ce jointe HTML a ?t? nettoy?e...
URL: <http://lists.opengatecollaboration.org/mailman/private/gate-users/attachments/20160223/33d98ad3/attachment.html>


More information about the Gate-users mailing list