<div dir="ltr"><div>Thanks Christophe for clearing that up.</div><div><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, Mar 31, 2019 at 10:49 AM Christophe Geuzaine <<a href="mailto:cgeuzaine@uliege.be">cgeuzaine@uliege.be</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>
<br>
> On 30 Mar 2019, at 21:32, Victor Kemp <<a href="mailto:victorkemp@gmail.com" target="_blank">victorkemp@gmail.com</a>> wrote:<br>
> <br>
> Thanks Jeremy and Christophe.<br>
> <br>
> 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?<br>
<br>
When "Geometry.OCCTargetUnit" is empty we don't specify any units, so indeed we use OCCT's default behavior, so exactly as in Gmsh 3. I have updated the documentation to clarify this. Thanks!<br>
<br>
> <br>
> Also, is it unsafe to use "M" because of those bugs, or have they been fixed?<br>
> <br>
<br>
We've still experienced quite a few problems with "M" - which prompted the change in the default value for the option in 4.2.<br>
<br>
Cheers,<br>
<br>
Christophe<br>
<br>
<br>
> I mean 3.0.7, not 3.8.<br>
> <br>
> <br>
> On Sun, Mar 31, 2019 at 2:21 AM Christophe Geuzaine <<a href="mailto:cgeuzaine@uliege.be" target="_blank">cgeuzaine@uliege.be</a>> wrote:<br>
> <br>
> <br>
> <br>
> > On 30 Mar 2019, at 08:22, Victor Kemp <<a href="mailto:victorkemp@gmail.com" target="_blank">victorkemp@gmail.com</a>> wrote:<br>
> > <br>
> > 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.<br>
> > <br>
> > Version 3.early: millimeter<br>
> > Version 3.8: meter<br>
> <br>
> 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.) <br>
> <br>
> > Version 4.0: meter<br>
> > Version 4.1: meter<br>
> <br>
> Gmsh 4 introduced a mechanism to choose the unit, through the "Geometry.OCCTargetUnit" option, as mentioned by Jeremy.<br>
> <br>
> 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.<br>
> <br>
> > Version 4.2: millimeter<br>
> > <br>
> <br>
> 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.<br>
> <br>
> Christophe<br>
> <br>
> <br>
> > <br>
> > _______________________________________________<br>
> > gmsh mailing list<br>
> > <a href="mailto:gmsh@onelab.info" target="_blank">gmsh@onelab.info</a><br>
> > <a href="http://onelab.info/mailman/listinfo/gmsh" rel="noreferrer" target="_blank">http://onelab.info/mailman/listinfo/gmsh</a><br>
> <br>
> — <br>
> Prof. Christophe Geuzaine<br>
> University of Liege, Electrical Engineering and Computer Science <br>
> <a href="http://www.montefiore.ulg.ac.be/~geuzaine" rel="noreferrer" target="_blank">http://www.montefiore.ulg.ac.be/~geuzaine</a><br>
> <br>
> <br>
> <br>
<br>
— <br>
Prof. Christophe Geuzaine<br>
University of Liege, Electrical Engineering and Computer Science <br>
<a href="http://www.montefiore.ulg.ac.be/~geuzaine" rel="noreferrer" target="_blank">http://www.montefiore.ulg.ac.be/~geuzaine</a><br>
<br>
<br>
<br>
</blockquote></div></div>