import stl

Report crashes, strange behaviour, or apparent bugs
Post Reply
markusi
Posts: 11
Joined: 19 Apr 2013, 09:47

import stl

Post by markusi »

When importing an stl (without recentering flag checked) stl seems to be recentered nevertheless...

coppelia
Site Admin
Posts: 10339
Joined: 14 Dec 2012, 00:25

Re: import stl

Post by coppelia »

Hello,

We just tested it here, and it works fine: try to drag a shape into the scene, move it to one corner of the floor, export it as STL, then re-import it again while leaving the recenter flag unchecked: the shape is not centered.

Cheers

markusi
Posts: 11
Joined: 19 Apr 2013, 09:47

Re: import stl

Post by markusi »

Hi,

I tested it slightly different.

I saved a .stl (in Solidworks) in a very special coordinate frame. Then I load it into vrep. in vrep it seems the internally used coordinate frame is not where it was in the CAD program (what would be useful especially for sepereate files in an assembly...). It seems vrep recenters those .stls...

coppelia
Site Admin
Posts: 10339
Joined: 14 Dec 2012, 00:25

Re: import stl

Post by coppelia »

I see what you mean now.

The recenter flag recenters the whole imported data in the middle of the scene (and above the ground level). But shapes in V-REP have their reference frame always centered. You can attach a dummy to the shape that indicates the original reference frame of the shape.

Not sure yet anymore how the STL works, but shouldn't the original reference frame of the mesh (i.e. the frame of the mesh in Solidworks for instance) be located at (0,0,0) when importing that mesh? Then simply add a dummy to the scene (it will be at (0,0,0) by default), then attach it to the shape.

Cheers

Post Reply