# Rotating 2D mesh

 Register Blogs Members List Search Today's Posts Mark Forums Read

 January 31, 2017, 06:26 Rotating 2D mesh #1 Member   Emre Join Date: Nov 2015 Location: Izmir, Turkey Posts: 58 Rep Power: 4 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.

 Tags rollpitchyaw, rotating, surfacetransformpoints

 Thread Tools Display Modes Linear Mode

 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 OffTrackbacks are On Pingbacks are On Refbacks are On Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post thezack Siemens 7 October 12, 2016 11:14 bobburnquist OpenFOAM Native Meshers: snappyHexMesh and Others 6 August 26, 2015 09:38 ahmadreza ANSYS Meshing & Geometry 10 July 12, 2015 04:17 chelvistero OpenFOAM 11 January 15, 2010 20:43 hung FLUENT 7 April 18, 2005 09:38

All times are GMT -4. The time now is 13:51.