> On 18 Mar 2020, at 13:48, Baltasar Rüchardt <[email protected]> 
> 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:

Attachment: dev_test_rotation_cg.geo
Description: Binary data


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
> [email protected]
> http://onelab.info/mailman/listinfo/gmsh

— 
Prof. Christophe Geuzaine
University of Liege, Electrical Engineering and Computer Science 
http://www.montefiore.ulg.ac.be/~geuzaine



_______________________________________________
gmsh mailing list
[email protected]
http://onelab.info/mailman/listinfo/gmsh

Reply via email to