Skip to content
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

[bug?] vtk viewer not updating when mesh group modified by python #12

Open
otaolafranc opened this issue Dec 29, 2024 · 0 comments
Open

Comments

@otaolafranc
Copy link

otaolafranc commented Dec 29, 2024

Hello,
I am facing an issue with the modification of mesh groups (in the least something not logic or it is a simply a bug.)

  1. I have two face groups, group_0 and group_1, with no coincident IDs in between.
  2. I add an ID from group_0 to group_1, lets say ID=1 using the edit group option in the GUI, so now the ID=1 is in group_0.GetIDs() and group_1.GetIDs(), at this stage in the vtk scene, i can see that the groups are overlapped (as the face apears in 'two colors' at same time from group_0 and group_1). until here everything works okey.
  3. now I remove the ID=1 from group_0 (so i do group_0.Remove([1]) ) if I have a look at the group_0.GetIDs() 1 is not there anymore (as exepcted). if I go to edit group in the GUI it does not shown in the list of nodes of the group either (as expected) BUT and here is the issue, if I display the groups in the VTK scene (hide them/re show them/ press F5 when VTK scene selected) this face (faceID==1) is still shown in the group_0. I tried also the classic salome.sg.updateObjBrowser() the face is still 'two colors' when showing the two groups. how can I update the VTK scene or is this a bug?

I also tested with salome.sg.Erase(salome.ObjectToID(i)) and then salome.sg.Display(salome.ObjectToID(i)) did not make any difference.
also in the GUI even if the faceID does not show in the list of faces of the group (when we use edit group on group_0) we can if we select it in the VTK scene hit remove (even if it is not in the list!) and when we apply it will then update the vtk scene correctly. this looks like there are some updates in the salome memory that is not updated when doing things in python (only partially)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant