[Gmsh] Fwd: Units for STEP files

Victor Kemp victorkemp at gmail.com
Sat Mar 30 21:33:53 CET 2019


Thanks Jeremy and Christophe.

I think the manual might be wrong in saying that the default "" uses the
units from the file. I have a file with meters and inches but GMSH 4.2.2
produces a mesh in millimeters. It also doesn't make sense to use the units
from the file because there can be more than one, and they're decided
arbitrarily by the software that created the file and not easily visible to
the user. Does the default value of Geometry.OCCTargetUnit really mean that
it uses OCCT's default, which is mm, and behaves the same as Gmsh 3?

Also, is it unsafe to use "M" because of those bugs, or have they been
fixed?

I mean 3.0.7, not 3.8.


On Sun, Mar 31, 2019 at 2:21 AM Christophe Geuzaine <cgeuzaine at uliege.be>
wrote:

>
>
>
> > 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.
>
> Christophe
>
>
> >
> > _______________________________________________
> > 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
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://onelab.info/pipermail/gmsh/attachments/20190331/6e596db2/attachment.html>


More information about the gmsh mailing list