[Gate-users] volume/phantom orientation and generic move

Howard lomahu at gmail.com
Thu Jun 9 16:58:19 CEST 2022


Hi Juan,

I appreciate your help very much. I might not explain my problem clearly in
my original post. What I wanted to do were two steps:

(1)  place the cylindrical phantom upright (the default position is along
z-axis which is horizontal), ie, rotate around x-axis by 90 degree to align
it with y-axis (vertical)

/gate/waterCylinder/placement/setRotationAxis 1 0 0
/gate/waterCylinder/placement/setRotationAngle 90. deg

(2) Move the phantom by rotating around y-axis in world coordinate (in the
phantom coordinate still z-axis, that's why in the generic move the
rotation axis was 0 0 1) by 1 degree/second
Time s
Rotation deg
Translation mm

0 0 0 0 1 0 0 0
1 1 0 0 1 0 0 0
2 2 0 0 1 0 0 0
3 3 0 0 1 0 0 0
4 4 0 0 1 0 0 0
...

But what you suggested was to do step (2) around the x-axis and that was
not what I wanted. I hope I stated my problem clearly this time. Thanks.

Howard



On Thu, Jun 9, 2022 at 3:20 AM Juan Sebastian Useche Parra <
js.useche10 at uniandes.edu.co> wrote:

> Hi Howard,
>
> You are right, the generic move overrides any of the placements for a
> geometry (up to my knowledge of GATE). So you have to set it to rotate each
> time it does a general movement. From my understanding, you want to rotate
> in around the X-axis so the list of placements should look like this:
>
> ###### List of placement (translation and rotation) according to time
> ###### Column 1      is Time in s (second)
> ###### Column 2      is rotationAngle in degree
> ###### Columns 3,4,5 are rotation axis
> ###### Columns 6,7,8 are translation in mm
>
> Time s
> Rotation deg
> Translation mm
>
> 0 0 1 0 0 0 0 0
> 1 1 1 0 0 0 0 0
>
>
> Hopefully it works
> Juan Sebastian Useche
> Albert-Ludwigs-Universität Freiburg
> Freiburger Materialforschungszentrum (FMF)
> Stefan-Meier-Str. 21
> 79104 Freiburg
> Germany
>
>
>
>
> From: Howard <lomahu at gmail.com>
> Sent: Wednesday, 8 June 2022 17:38
> To: Gate-users <gate-users at lists.opengatecollaboration.org>
> Subject: [Gate-users] Fwd: volume/phantom orientation and generic move
>
> Hi Gate-users,
>
> I posted this problem ~ a month ago but received no response. And I still
> could not figure out what was wrong. Could someone who is familiar with
> generic move or phantom setup help me out?
> Many thanks in advance,
> Howard
>
> ---------- Forwarded message ---------
> From: Howard <lomahu at gmail.com>
> Date: Sun, May 15, 2022 at 12:59 PM
> Subject: volume/phantom orientation and generic move
> To: Gate-users <gate-users at lists.opengatecollaboration.org>
>
> Hi Gate Users,
>
> I encountered an issue of the volume/phantom orientation when using
> generic move. Here is the detail.
>
> The phantom is rotated upright along the y-axis (vertical direction) using
> the following script:
>
> /gate/world/daughters/name waterCylinder
> /gate/world/daughters/insert cylinder
> /gate/waterCylinder/geometry/setRmin 0. mm
> /gate/waterCylinder/geometry/setRmax 8. mm
> /gate/waterCylinder/geometry/setHeight 20. mm
> /gate/waterCylinder/setMaterial Water
> /gate/waterCylinder/vis/forceWireframe
> /gate/waterCylinder/vis/setColor cyan
> /gate/waterCylinder/placement/setRotationAxis 1 0 0
> /gate/waterCylinder/placement/setRotationAngle 90. deg
>
> 1. I could make the rotation around y-axis using the following script.
> Everything is working well (see the first attached figure).
> # Apply a rotation (1 deg/sec) to the cylinder so that it will finally
> rotate around the Y axis
> # Note: the moves commands are applied onto the original orientation of
> the object (before rotations are applied)
> /gate/waterCylinder/moves/insert rotation
> /gate/waterCylinder/rotation/setSpeed 1. deg/s
> /gate/waterCylinder/rotation/setAxis 0 0 1
>
> 2. If i comment out the three lines above
>
> #/gate/waterCylinder/moves/insert rotation
> #/gate/waterCylinder/rotation/setSpeed 1. deg/s
> #/gate/waterCylinder/rotation/setAxis 0 0 1
>
> and instead use the generic move (see the following script which is placed
> in a placement file of course), the phantom shows its alignment with the
> z-axis. In other words, the action around the x-axis to rotate 90 degrees
> takes no effect. It seems like the generic move overrides the phantom
> placement action. I cannot think why unless I did not use the generic move
> correctly
>
> ###### List of placement (translation and rotation) according to time
> ###### Column 1      is Time in s (second)
> ###### Column 2      is rotationAngle in degree
> ###### Columns 3,4,5 are rotation axis
> ###### Columns 6,7,8 are translation in mm
>
> Time s
> Rotation deg
> Translation mm
>
> 0 0 0 0 1 0 0 0
> 1 1 0 0 1 0 0 0
> 2 2 0 0 1 0 0 0
> 3 3 0 0 1 0 0 0
> 4 4 0 0 1 0 0 0
> 5 5 0 0 1 0 0 0
> 6 6 0 0 1 0 0 0
> 7 7 0 0 1 0 0 0
> 8 8 0 0 1 0 0 0
> 9 9 0 0 1 0 0 0
> 10 10 0 0 1 0 0 0
> 11 11 0 0 1 0 0 0
> 12 12 0 0 1 0 0 0
> ...
>
> Is there a way to fix the issue I am encountering? Many thanks.
>
> Howard
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opengatecollaboration.org/pipermail/gate-users/attachments/20220609/182567e8/attachment.html>


More information about the Gate-users mailing list