-
-
Notifications
You must be signed in to change notification settings - Fork 390
Open
Labels
Description
I separated my visualization functionality to a separate function, like this:
from OCC.Display.SimpleGui import init_display
def core:
# Set up a `TopoDS_Shape` object, called `shape`
# ...
# Call the plotting function
plot_shape(shape)
def plot_shape(shape):
display, start_display, add_menu, add_function_to_menu = init_display()
display.DisplayShape(shape, update=True)
input("Press Enter to continue...")
The last line is there to prevent the figure from being closed. However, this is not a good solution because
- the program termination is paused
- I cannot focus on the figure, so I cannot rotate, zoom, pan, etc.
Metadata
Metadata
Assignees
Labels
Projects
Milestone
Relationships
Development
Select code repository
Activity
efirvida commentedon Jun 15, 2020
try;
CsatiZoltan commentedon Jun 16, 2020
@efirvida Thanks, that works. However, the execution is suspended until I keep the window open. Is there a way to make the display independent of the main program thread?