How to tilt an STL

Theo_Score's picture
Submitted by Theo_Score on Thu, 02/18/2016 - 08:17

Hi All,

I want to tilt the geometry as initially shown on 1 in the attached file with first fix command.

fix d_feed all mesh/surface file meshes/drop_feed.stl type 1 move 0.0 0.0 0.0 rotate axis 0.0 0.0 -1.0 angle 0.0 curvature 1e-6

After doing the below command to rotate the geometry, it positions as 2 yet I just want it to tilt at its centroid in position 1.

fix d_feed all mesh/surface file meshes/drop_feed.stl type 1 move 0.0 0.0 0.0 rotate axis 0.0 0.0 -1.0 angle 45.0 curvature 1e-6

Kindly help on how I can do this.

AttachmentSize
Image icon Move_Rotate_Style28.65 KB
ckloss's picture

ckloss | Mon, 02/22/2016 - 11:35

Hi,

"tilt" is nothing else than move+rotate. Any arbitrary position and orientation can be achieved by combining move+rotate

Best wishes
Christoph

gukargl | Wed, 07/06/2016 - 11:52

For combined linear and rotation of a mesh you should keep track of the rotation axis. I had a similar problem and below is part of the script I used to solve that problem.

# track position of rotation axis
variable startstep equal step #
variable xposition equal ${mshxpos}+${scm_vx}*(step-${startstep})*dt
variable zposition equal ${mshzpos}+${scm_vz}*(step-${startstep})*dt #
variable anglpos equal ${mshangle}+${rotSpeed_c}*${rot_dir}*(step-${startstep})*dt #

fix movecadlin all move/mesh mesh cad1 linear ${scm_vx} 0.0 ${scm_vz}
fix movecadang all move/mesh mesh cad1 rotate origin ${mshxpos} 0.0 ${mshzpos} axis 0.0 1.0 0.0 period ${rotPeriod} # rotate scoop