PDA

View Full Version : fail to scale a .dae file


armo
03-29-2014, 10:53 AM
Hello

I have the vizard version 3.18.0002 and I'm currently having many problems when scaling a .dae file imported from google sketchup.

I've read in other threads that the following line is useful to the task:

"viz.setOption('viz.model.apply_collada_scale',1)
.
.
.
viz.add('file.dae')"


but in my script it just doesn't work. It does nothing wherever I write it.

Can anyone explain me where I'm doing wrong?


P.S.some time ago I found a thread on the worldviz site where the author stated that applying the following formula would do the same job:

object.setScale([0.0254]*3)

Is there a difference with the former formula?

Jeff
04-01-2014, 02:46 AM
Both the viz.model.apply_collada_scale option and the scale command with the inches to meters factor should have the same effect on the model. Does the model still appear to big? Do you see some effect if you scale it down further?
object.setScale([0.001]*3)

armo
04-01-2014, 05:36 AM
Both the viz.model.apply_collada_scale option and the scale command with the inches to meters factor should have the same effect on the model. Does the model still appear to big? Do you see some effect if you scale it down further?
object.setScale([0.001]*3)


Dear Jeff


I have tried the scale command with the inches to meters factor and it works pretty well!

Nonetheless, the viz.model.apply_collada_scale command still doesn't. Is there a specific line where I should put this last command so I don't have to scale every object only with tha inches to meters factor (I have more than 100 objects to load...)?


Best regards, armo

Jeff
04-01-2014, 08:44 AM
The viz.model.apply_collada_scale option was added in Vizard 4 so you'll need to scale each model after it's added.