[Gmsh] mesh from STEP file: correct units

Marco Tiberga M.Tiberga at tudelft.nl
Wed Apr 24 14:18:43 CEST 2019


Dear Max, Victor,

Thanks a lot for your prompt replies!
And yes, your suggestions were both right. With Gmsh 4.3 I can obtain what I want.
I was not using the most updated version of Gmsh because my code cannot handle the newest mesh format at the moment, but now I have found I can still use the 2.2 format by setting Mesh.MshFileVersion=2.2.

Thanks again for your help!

Kind regards,
Marco

From: Max Orok [mailto:morok at mevex.com]
Sent: woensdag 24 april 2019 1:38
To: Marco Tiberga
Cc: gmsh at onelab.info
Subject: Re: [Gmsh] mesh from STEP file: correct units

Hi Marco,

Here is the option you're looking for:
http://gmsh.info/doc/texinfo/gmsh.html#index-Geometry_002eOCCTargetUnit

It looks like it was only introduced in Gmsh 4 and higher, hopefully that isn't an issue (h/t Prof Geuzaine and Jeremy Theler).

Here is an earlier thread about the same issue if you need more info:
http://onelab.info/pipermail/gmsh/2019/012965.html

Max

On Tue, Apr 23, 2019 at 5:24 PM Marco Tiberga <M.Tiberga at tudelft.nl<mailto:M.Tiberga at tudelft.nl>> wrote:
Dear Gmsh developers,

I want to create a mesh from a STEP file, loading it from a geo file.
The mesh should be in m (as you can see from the step file, line 2916) , but from the numbers I visualize in gmsh, I deduce the lengths are still expressed in mm (the entire domain should be around 2.5m high, but I see 2500).

How can I perform the units conversion? I tried with
factor = 1.e-3;
allpoints[] = Point "*";
Dilate{{0,0,0},{factor,factor,factor}}{Point{allpoints[]};}
but it does not seem to work.

I attached the .geo and the .stp files I am using. I use Gmsh 3.0.6.

Thanks a lot for your help and sorry if the question is stupid, but I have little experience in using gmsh with step files.

Best regards,
Marco Tiberga
PhD candidate
Delft University of Technology
Faculty of Applied Sciences
Radiation Science & Technology Department
Mekelweg 15, 2629 JB Delft, The Netherlands
E-Mail: m.tiberga at tudelft.nl<mailto:m.tiberga at tudelft.nl>
Website: http://www.nera.rst.tudelft.nl/


_______________________________________________
gmsh mailing list
gmsh at onelab.info<mailto:gmsh at onelab.info>
http://onelab.info/mailman/listinfo/gmsh


--
Max Orok
Contractor
www.mevex.com<http://www.mevex.com>

[Image removed by sender.]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://onelab.info/pipermail/gmsh/attachments/20190424/6d81808a/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.jpg
Type: image/jpeg
Size: 426 bytes
Desc: image001.jpg
URL: <http://onelab.info/pipermail/gmsh/attachments/20190424/6d81808a/attachment-0001.jpg>


More information about the gmsh mailing list