WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 01-09-2006, 11:41 AM
vanier vanier is offline
Member
 
Join Date: Dec 2005
Posts: 7
Send a message via AIM to vanier
Help with Vizard crashes...

Hello, can someone look at this and tell us why we are crashing. If we run the script for too long it will most likely crash and if we close it, it crashes for sure.

Thanks for your help,

Luc, Evan and Chris.

viz.go()

PORT_PPT = 4

viz.clearcolor(1,1,1)
#viz.add('tut_ground.wrl')
#ball = viz.add('white_ball.wrl')
#ball.translate(0,2,5)
ppt = viz.add('vizppt.dls')
ppt2 = viz.add('vizppt.dls')
ppt3 = viz.add('vizppt.dls')
ball.link(ppt2)

#the following modifies the model's appearance
toon = viz.add('toon.dlm')
ball.modify(toon)

def ontimer(num):
data = ppt.get()
#this one will make the model slowly transform
#ball.size(data[0],data[1],data[2])
#this one makes the model quickly scale
ball.scale(data[0],data[1],data[2])
pos = ppt3.get()
ball.lookat(pos,0,viz.ABSOLUTE_WORLD)

#ppt.command(4.002) # Scales all by 2.0


viz.callback(viz.TIMER_EVENT, ontimer)
viz.starttimer(1,viz.FASTEST_EXPIRATION, viz.FOREVER)
__________________
Luc Vanier
Reply With Quote
  #2  
Old 01-12-2006, 03:08 PM
freeman1 freeman1 is offline
Member
 
Join Date: Jan 2006
Posts: 1
Hi Luc,

There seems nothing to be obviously wrong with your script that should make the system crash, other than the indentation after the timer, which was probably stripped out by copy/paste

PHP Code:
def ontimer(num): 
    
data ppt.get() 
    
#this one will make the model slowly transform 
    #ball.size(data[0],data[1],data[2]) 
    #this one makes the model quickly scale 
    
ball.scale(data[0],data[1],data[2]) 
    
pos ppt3.get() 
    
ball.lookat(pos,0,viz.ABSOLUTE_WORLD
Other than that, the ball you are referring to in line 16 was not defined previously, so you will need to uncomment

ball = viz.add('white_ball.wrl')

in line 7.

When running your script here with a PPT connected sending the position data of 3 points, the script runs fine and stable.
Is it possible that there are problems with Vizard due to your graphics card / computer configuration? Please make sure you use the latest graphics card drivers, update if necessary.
Also check if there are other USB devices connected to the computer that could cause problems.
Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 02:28 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Copyright 2002-2023 WorldViz LLC