CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Pre-Processing (https://www.cfd-online.com/Forums/openfoam-pre-processing/)
-   -   How to turn a STL geometry in OPENFOAM (https://www.cfd-online.com/Forums/openfoam-pre-processing/186492-how-turn-stl-geometry-openfoam.html)

SnappyMax April 20, 2017 10:56

How to turn a STL geometry in OPENFOAM
 
Hi guys,

I´ve got a Problem with my STL geometry because it needs to be turned by 180 degree.
Do you now any possbility to turn it with an Openfoam code instead of using Catia etc.

To me:
I´m a student and I´m a Beginner with Openfoam.

Thank you a lot

Max

Flowkersma April 20, 2017 11:11

Hi Max,

Here is a link for the OpenFOAM surface utilities in OFwiki. You are looking for surfaceTransformPoints.
Here is an example command:
Code:

surfaceTransformPoints yourstlfile.stl outputstlfile.stl -rotate "((1 0 0) (0 0 1))"
Best,
Mikko

LVDH April 21, 2017 07:07

With rotating by 180° using the "-rotate" command I sometimes had my problems (maybe brain). I find it easier to use "-scale" with a factor of -1 in the direction of your interest.

SnappyMax April 24, 2017 15:33

Thank you for your answers! :)

Unfortunately there is no text in the OFwiki to surfaceTransformPoints...
So i actually don´t now where to put your code Mikko ?
Where do you usually put it?

And to LVDH where can I find this scale ?

Thanks so far!

Max

Flowkersma April 24, 2017 17:41

surfaceTransformPoints is an executable which comes with OpenFOAM. So, if you have your OpenFOAM environment loaded just write the name of the utility to the terminal with the parameters (see the command in my previous post). I suggest you to look at the guide to learn the basics of OpenFOAM.

LVDH April 25, 2017 08:33

Hi,
sometimes you do not have to look that far.
With OF sourced, just type:
Code:

surfaceTransformPoints -help
This will give you this idea:
Code:

surfaceTransformPoints -scale '(1 -1 1)' <original_file.stl> <mirrored_file.stl>

akidess April 25, 2017 08:46

Quote:

Originally Posted by SnappyMax (Post 646332)
Unfortunately there is no text in the OFwiki to surfaceTransformPoints...

Surely you will fix that now? :) The wiki already has a similar entry for transforming volume meshes you can use as a guideline:
https://openfoamwiki.net/index.php/TransformPoints

By the way, first hit on google:
http://www.sourceflux.de/blog/transf...ansformpoints/

SnappyMax April 25, 2017 12:48

Thank you sooo much guys!!

I really did it!

I wish the best to all of you. :)

Max


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