[Gmsh] Can I turn an STL or the Created Geometry in Gmsh?
Christophe Geuzaine
cgeuzaine at uliege.be
Thu Mar 19 08:03:48 CET 2020
> On 18 Mar 2020, at 13:48, Baltasar Rüchardt <baltasar.ruechardt at ds.mpg.de> wrote:
>
> Hello everyone,
>
>
> While working with gmsh and importing stls in order to create FEM-meshes
> I was confronted with a question I wasn't able to solve on my own so far:
>
> Can I merge a stl file in gmsh and rotate the stl data afterwards?
It's a bit convoluted in a .geo file (because you need to create a post-processing view) but you can do it as follows:
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dev_test_rotation_cg.geo
Type: application/octet-stream
Size: 2465 bytes
Desc: not available
URL: <http://onelab.info/pipermail/gmsh/attachments/20200319/a042b197/attachment.geo>
-------------- next part --------------
With the API you can directly modify the node coordinates.
Christophe
> Alternatively, can I rotate the geometry that was created by
> CreateGeometry; such that the fem mesh will be rotated as well?
>
> I attached an example script (dev_test_rotation.geo) where I try the
> second approach: Create the volume from the stl and then I try to rotate
> the geometrical entities. See the part "Try rotate volume" in the
> script. I also attached a simple stl geometry to test it.
>
> Do you have any ideas?
>
> The alternative that came to my mind is to rotate with e.g. meshlab
> before merging to gmsh. Is this the best / only solution?
>
> I am looking forward to your answers!
>
> Thank you and stay well
>
>
> Baltasar Rüchardt
>
>
>
>
> <example.stl><dev_test_rotation.geo>_______________________________________________
> gmsh mailing list
> gmsh at onelab.info
> http://onelab.info/mailman/listinfo/gmsh
—
Prof. Christophe Geuzaine
University of Liege, Electrical Engineering and Computer Science
http://www.montefiore.ulg.ac.be/~geuzaine
More information about the gmsh
mailing list