[Gmsh] Units for STEP files

Christophe Geuzaine cgeuzaine at uliege.be
Sat Mar 30 14:21:12 CET 2019

> On 30 Mar 2019, at 08:22, Victor Kemp <victorkemp at gmail.com> wrote:
> How does Gmsh decide what units to use for its dimensionless mesh made from a STEP file? I've noticed that different versions seem to do it differently. Is there a setting to control this or likely future stability? It seems to change unpredictably with each new version and that makes interoperability with other software difficult.
> Version 3.early: millimeter
> Version 3.8: meter

Gmsh 2 and 3 used the coordinates in STEP files as-is, i.e. didn't handle units at all. (Note that Gmsh 3.8 does not exist.) 

> Version 4.0: meter
> Version 4.1: meter

Gmsh 4 introduced a mechanism to choose the unit, through the "Geometry.OCCTargetUnit" option, as mentioned by Jeremy.

The default value for that option was "M" (meters) in Gmsh 4.0 and Gmsh 4.1. This however led to several regressions, as the conversion for files written in other units (millimeters, inches, etc.) would sometimes lead to subtle artefacts in the geometry.

> Version 4.2: millimeter

So in Gmsh 4.2, the default value of "Geometry.OCCTargetUnit" has been set to "" (i.e. empty). This means that we don't translate units by default; but you can set the option to your preferred unit if you want to.


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

Prof. Christophe Geuzaine
University of Liege, Electrical Engineering and Computer Science 

More information about the gmsh mailing list