PDA

View Full Version : STL-Import


Patrick
11-30-2016, 05:10 AM
Hey,

i got the following problem. In my Vizard program i want to import a STL data created by Matlab. I did this via the viz.addChild Function.
In addition i have a Grabber tool implemented via vizconnect.
When i start the program, the STL-imported data is fixed to the upper "left corner of my frontview. When i turn right or left it disappears but it follows me when i walk around and as soon as i start looking in my initial direction its there fixed again. So i wonder why cant i fix it to a set point in the world, instead of my view or especially why it is fixed to my view? Also my hand (grabing tool) disappears when i hover over the imported "form"

Greetings

Jeff
11-30-2016, 11:36 AM
The scale of the model may not be correct in Vizard. Open up the model in Inspector and look at the bounding box dimensions in the status bar at the bottom of the window. Does that look correct?

Patrick
12-01-2016, 01:41 AM
Thats the screenshot from the inspector
it looks like the Box to move the quader is at its lower left out of the quader. Is there a way to move it to the actual figure?

Jeff
12-01-2016, 11:30 AM
The model units in Inspector and Vizard are in meters. It looks like the model needs to be scaled down by a factor of 1000 or 100. Most likely the original model units were in mm or cm. You can scale the model and move the geometry to the world origin in Inspector. Then save it out with the changes.

Patrick
12-05-2016, 07:17 AM
Thanks for the help, worked properly
So my problem is that the STL data has "wrong" parameters?
It kinda bothers me tho that i always have to scale down every STL data down to make it work properly in my World. Isnt there a possibility that the STL data comes scaled in the right way already or is that a matter of setting up the STL data?

Jeff
12-05-2016, 01:08 PM
I'm not sure if there's anything wrong with the data. If different units of measurement are used between software there must be a conversion to account for this. You maybe able to scale it before exporting. Besides scaling in Inspector, you can also scale (http://docs.worldviz.com/vizard/#commands/node3d/setScale.htm) a model in the Vizard code.

Patrick
12-06-2016, 01:05 AM
Alright then ill see if i can optimize it any further otherwise it works with that aswell ;)
Thanks a lot for the help