CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Meshing & Mesh Conversion

[mesh manipulation] Rotating 2D mesh

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 31, 2017, 06:26
Default Rotating 2D mesh
  #1
Member
 
Emre
Join Date: Nov 2015
Location: Izmir, Turkey
Posts: 97
Rep Power: 11
ordinary is on a distinguished road
Hello,

I'm trying to rotate my 2D mesh by centroid of the object. (i.e. I'm yawing it 50 degrees)

Code:
surfaceTransformPoints -rollPitchYaw (0 0 50) old.stl new.stl
Unfortunately it rotates the object by global coordinate system. Here it is:

yaw.png


I tried to change relevant source code below, but it seems confusing:

Code:
    else if (args.optionFound("rollPitchYaw"))
    {
        vector v(args.optionLookup("rollPitchYaw")());

        Info<< "Rotating points by" << nl
            << "    roll  " << v.x() << nl
            << "    pitch " << v.y() << nl
            << "    yaw   " << v.z() << endl;


        // Convert to radians
        v *= pi/180.0;

        quaternion R(v.x(), v.y(), v.z());

        Info<< "Rotating points by quaternion " << R << endl;
        points = transform(R, points);
    }
If you have any idea, please do not hesitate to reply.
Thank you.
ordinary is offline   Reply With Quote

Reply

Tags
rollpitchyaw, rotating, surfacetransformpoints


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Star CCM Overset Mesh Error (Rotating Turbine) thezack Siemens 7 October 12, 2016 12:14
Rotating Mesh with pympleDyMFoam WernerW OpenFOAM Running, Solving & CFD 1 August 20, 2015 15:34
[ICEM] Rotating Mesh and export Mesh ahmadreza ANSYS Meshing & Geometry 10 July 12, 2015 05:17
[snappyHexMesh] external flow with snappyHexMesh chelvistero OpenFOAM Meshing & Mesh Conversion 11 January 15, 2010 20:43
How to control Minximum mesh space? hung FLUENT 7 April 18, 2005 10:38


All times are GMT -4. The time now is 14:37.