PDA

View Full Version : Meters in vizard


roobert
07-24-2014, 04:22 PM
Hello, could help me to know how much equals a linear unit vizard in meters.
position objects to do with:

Viz.addChild obj1 = ('Obj1.dae', pos = [0,0,0])

if I want to add another object to exactly 1 meter from the first object I would do as

* Viz.addChild obj2 = ('Obj2.dae', pos [1,0,0])

but this throws me results that are not real.

my objects are cubes which I made in SketchUp where 1m is that while each side.

doing some trial and error calculations I realize that following this
1m. = 39 units vizard.

What I can say about this
:confused::confused::confused::confused::confused: :confused::confused:

Frank Verberne
07-25-2014, 07:46 AM
Seems like a meters - inches problem. I'm not sure whether Vizard uses the metric system, but check the scaling of your object in Sketchup, especially your settings while exporting. Alternatively, you could first scale your object in Vizard to the right proportions. To check whether the scale of your object is 1 meter, import a standard box in Vizard (viz.add('box.wrl')), which is 1 cubic meter if I recall correctly. You can compare the size of your custom objects to that of the box.

roobert
07-25-2014, 08:41 AM
Thanks, I already did that but the box.wrl has Vizard is smaller than expected

roobert
07-25-2014, 12:01 PM
some work and box vizard but blender and effectively are the same size. Thanks Frank Verberne

Jeff
07-25-2014, 12:21 PM
When loading collada models use the collada scale option to convert from inches to meters:

viz.setOption('viz.model.apply_collada_scale',1)

roobert
07-25-2014, 12:26 PM
Hi Jeff.
Your code is in Vizard??? if it is, I have do it.

model=viz.Child('modelo.dae', pos=[0,0,0])
viz.setOption(model.apply_collada_scale,1)


????????????????????????????????????

Jeff
07-25-2014, 12:52 PM
Yes, but set the option before loading the model:

viz.setOption(model.apply_collada_scale,1)
model=viz.addChild('modelo.dae')

roobert
07-25-2014, 02:27 PM
Jeff.

I have error "AttributeError: 'VizChild' object has no attribute 'apply_collada_scale'"
I don't understan

My code is:
model=viz.addChild('ID_1.dae')
viz.setOption(model.apply_collada_scale,1)

Jeff
07-25-2014, 03:06 PM
Sorry, the name of the option is viz.model.apply_collada_scale. That will be applied to all collada models loaded after it is set:

viz.setOption('viz.model.apply_collada_scale',1)

myModel=viz.addChild('ID_1.dae')

roobert
07-25-2014, 03:14 PM
Excelent, it is perfect. Thanks