[Gmsh] Units used in STEP and MSH

Christophe Geuzaine cgeuzaine at ulg.ac.be
Fri Sep 25 19:52:58 CEST 2009


Jean-Francois Remacle wrote:
> 
> Le 24-sept.-09 à 16:08, Bastien Gorissen a écrit :
> 
>> Hello,
>>
>> I'm running into a problem when merging a STEP file with a MSH file.
>> Both are supposed to relate to the same geometry, which is roughly a
>> half-sphere with radius "50", but GMSH loads the two files using
>> apparently using different units. The STEP ends up with a radius of
>> "50000", as if GMSH understands the MSH units as mm but the STEP ones as
>> meters.
>>
>> Is there a simple way to correct that ? Except calling scaleMesh() ?
>>
> 
> scalemesh is "for my opinion" the only option

We looked at this with Bastien this afternoon, and you can fix the 
problem by editing the .step file. You have to change

   ( LENGTH_UNIT ( ) NAMED_UNIT ( * ) SI_UNIT ( $, .METRE. ) );

into

   ( LENGTH_UNIT ( ) NAMED_UNIT ( * ) SI_UNIT ( .MILLI., .METRE. ) );

I'm not sure if the behaviour of the OpenCASCADE STEP reader is correct 
or not, but at least this simple change fixes the import.

Ch.


> 
> JF
> 
> 
>> Thanks in advance,
>> -Bastien Gorissen
>>
>> _______________________________________________
>> gmsh mailing list
>> gmsh at geuz.org
>> http://www.geuz.org/mailman/listinfo/gmsh
> 
> ----------------
> Prof. Jean-Francois Remacle
> Universite catholique de Louvain (UCL)
> Tel : +32-10-472352 -- Mobile : +32-473-909930
> 
> 
> 
> 
> 
> 
> _______________________________________________
> gmsh mailing list
> gmsh at geuz.org
> http://www.geuz.org/mailman/listinfo/gmsh
> 
> 


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