[Gmsh] Merge .stp file - scaling issue
Sonntag, Daniel Alexander
daniel-alexander.sonntag at itke.uni-stuttgart.de
Tue Mar 17 15:16:45 CET 2015
Actually this is what I also thought. But to give an example: I draw a planar surface 10m x 10m and Export as .stp, this Information is correctly stored in the .stp-file
(the .stp file says: #112=(
LENGTH_UNIT()
NAMED_UNIT(*)
SI_UNIT($,.METRE.)
);
I can also load this .stp file in other drawing softwares (AutoCAD, Rhino), and it always recognises correctly the units. But once I merge this file in Gmsh, the surface gets scaled, basically the edge Point now gets the coordinates (10000, 10000, 0), even though in the .stp-file it still had the coordinates (10, 10, 0). This does not happen when the Units in the .stp files are set to Millimeters. So it is definitely Gmsh (resp. OpenCASCADE) who does something with the unit Settings.
I have figured out a workaround for now but it seems error prone to me.
Is there actually a way to control this or just to ignore Units once importing the .stp file in Gmsh?
Cheers
Daniel
-----Ursprüngliche Nachricht-----
Von: Christophe Geuzaine <cgeuzaine at ulg.ac.be>
Gesendet: Die 17 März 2015 12:50
An: Sonntag, Daniel Alexander <daniel-alexander.sonntag at itke.uni-stuttgart.de>
CC: gmsh at geuz.org
Betreff: Re: [Gmsh] Merge .stp file - scaling issue
> On 12 Mar 2015, at 18:34, Sonntag, Daniel Alexander <daniel-alexander.sonntag at itke.uni-stuttgart.de> wrote:
>
> Hello,
>
> I am currently playing around with gmsh to mesh surfaces imported as .stp file (exported from Rhino3d), but somehow once merging the .stp file the unit setting seem to get confused. Example: the .stp file is exported in meters, but once I import the file via Merge the unit gets changed to millimeters (or in other words the geometry gets scaled by a factor 1000). So once I reimport the mesh it is also scaled up by a factor 1000.
>
> Is there a way to control this or to disable such scaling?
>
We use OpenCASADE to import .stp files; if there's a 1000x scaling, probably the files have some mm units referenced in them? (Gmsh does not have any units.)
> Any help is appreciated,
>
> Cheers
> Daniel
> _______________________________________________
> 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.geuz.org/pipermail/gmsh/attachments/20150317/b5579adb/attachment.html>