[Gate-users] Fwd: volume/phantom orientation and generic move
Howard
lomahu at gmail.com
Wed Jun 8 17:37:58 CEST 2022
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/20220608/f32cf7c7/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: correct_orientation.png
Type: image/png
Size: 18835 bytes
Desc: not available
URL: <http://lists.opengatecollaboration.org/pipermail/gate-users/attachments/20220608/f32cf7c7/attachment-0002.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: wrong_orientation.png
Type: image/png
Size: 18404 bytes
Desc: not available
URL: <http://lists.opengatecollaboration.org/pipermail/gate-users/attachments/20220608/f32cf7c7/attachment-0003.png>
More information about the Gate-users
mailing list