-
Notifications
You must be signed in to change notification settings - Fork 264
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Vedo Points becomes White or Transparent #1039
Comments
Thanks for reporting, this is a weird bug in VTK which happens only on some machines. mypoints.render_points_as_spheres(False) |
Thank you Marcomusy! The code above did work initially. Unfortunately, we passed the first plot but the later plot causes fatal errors. Due to biz reason we can't provide the code here. The working logic is simple: we first plot the raw point cloud, then do different works against those points and passed the new points, numpy array, to ploter to replot it. at the plotter we do: mypoints = Points(self.xyz,c ="rainbow") This was running in a multithreading framework of pyside2. That means a worker to do the data process and the main thread deal with plotting. Data passed between them are numpy arrays. The error codes are : Windows fatal exception: access violation Thread 0x00002af4 (most recent call first): Appreciate if you can provide further assistance. DR. |
BTW, we did plt.clear() before the plotting |
The code was running in a spyder console, The final error msg following above are : Main thread: |
This seems related to the qt widget line 3235 is
can you try it on the dev version:
|
PS: also add
|
Hello,2024.5.0+dev31 installed. where to pu the following settings? in my working py or vedo setting files? settings.enable_default_mouse_callbacks = False |
Installed dev31 and put settings into our py code. The result2 are:
File our_env\site-packages\vedo\plotter.py:3288 in show |
We did further tests ,here are some information:
File out_envs\lib\site-packages\vedo\plotter.py:3489 in clear PS |
There are problems connecting to git. Just a quick question: where to put those settings?
发自我的荣耀手机
…-------- 原始邮件 --------
发件人: Marco Musy ***@***.***>
日期: 2024年1月30日周二 半夜11:03
收件人: marcomusy/vedo ***@***.***>
抄送: DRLing2021 ***@***.***>, Author ***@***.***>
主 题: Re: [marcomusy/vedo] Vedo Points becomes White or Transparent (Issue #1039)
PS: also add
settings.enable_default_mouse_callbacks = False
settings.enable_default_keyboard_callbacks = False
settings.enable_pipeline = False
―
Reply to this email directly, view it on GitHub<#1039 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/A2XDDDVVCVUDGO5KB7FWWK3YREDVDAVCNFSM6AAAAABCQSMKQGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMJXGA4DQMRTGA>.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
Hi Marco, would you please advise what to do to deal with the new error messages? File our_env\site-packages\vedo\plotter.py:3288 in show |
Sorry, i was away, you put the senttings in your script on top E.g.: import vedo
vedo.settings.enable_default_mouse_callbacks = False
vedo.settings.enable_default_keyboard_callbacks = False to add and remove object do not use clear() rather give individual objects a name and add/remove them individualy: def mycallback(event):
# in some callback:
obj1 = vedo.Points(...)
obj1.name = "mypoints"
# remove some other previous Points and add the new one:
plotter.remove("mypoints").add(obj1, obj2, ...)
# plotter.reset_camera() # if needed
plotter.render()
plotter = vedo.Plotter()
plotter.add_callback("key press", mycallback)
plotter.show(some objects, ....) there are many examples showing this mechanism e.g.:
|
No problem Macro. We did what you suggested with some changes as the plots' show use different parms as following: The first plot use no remove command as there is nothing yet but we give it a name The following re-plots with new data we use the following codes:
Unfortunately we got following errors: self.plt.remove("last") ##.add(self.Show_PC) File our_env\lib\site-packages\vedo\plotter.py:995 in remove |
1 similar comment
No problem Macro. We did what you suggested with some changes as the plots' show use different parms as following: The first plot use no remove command as there is nothing yet but we give it a name The following re-plots with new data we use the following codes:
Unfortunately we got following errors: self.plt.remove("last") ##.add(self.Show_PC) File our_env\lib\site-packages\vedo\plotter.py:995 in remove |
Hi Macro, We‘ve tried serval ways but the "remove " seems never work. Basically what we do are as:
Step2: Processed the raw data and get new data
The error msg are:
Would you mind to advice what to do to fix it? Do we do it in a right way or are there something missing here to make it run? We need to fix it to move the work ahead. Your help is highly appreciated. |
The definition of self.plt in our code is
This is different from the sample codes we got from vedo --search xxxx. It this reason why we encountered those errors? |
Hi Macro, we did further investigation and got the latest results as following:
Our running enviroment:
Would you mind to kindely help us to move it forward as our work has been suspended for days waiting to see the visual result to descide the next step. Thanks in advance.! @marcomusy |
Hi Marcro, Just want to let you know that after various experiments, we figured out that if Show() is BEFORE add(), things are ok. This is weired. But add/remove issues is fixed ! |
Hi @DRLing2021 sorry for the delay - i'm happy that you managed to fix the problem, just to confirm that the general structure is def somecallback():
# here you call add(), remove(), render()
# or plt += some_object
# but NOT show()
# in your main script you define the Plotter and call show() only once, which does a number of inittializations
plt = Plotter()
plt += Sphere()
...
plt.add_callback("key press", somecallback)
plt.show() Obviously you can have plt as a member of a class, but the general idea is the same. |
Hi Marco, thanks for you coments. Sorry for late update as I have been on leave last weeks. The code we run on experimental env is different from what suggested above in that the plotter.show() has to be BEFORE add(). The sample code is as following: The questions regarding above codes are :
PS we use pyside2 that is different from the sample examples/other/qt_*.py, We guess it should not be a problem Regards. |
We encountered problems when plotting point cloud points by Vedo in a pyside2 environment. It was good before however, without any notice of system change, points become white or transparent when run the same code recently. We tried the explore5D sample code on our system and got the same issue. Are there any suggestions to fix it?
Attached the explore5D output as FYI
Python 3.9.7
vedo: 2023.5.0
matplotlib: 3.7.3
The text was updated successfully, but these errors were encountered: