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

Display window dont show when using from script #10

Open
efirvida opened this issue Apr 13, 2016 · 1 comment
Open

Display window dont show when using from script #10

efirvida opened this issue Apr 13, 2016 · 1 comment

Comments

@efirvida
Copy link

Hi im triying to use ccad from script using the introduction example code

import ccad.model as cm
import ccad.display as cd
s1 = cm.sphere(2.0)
v1 = cd.view()
v1.display(s1)

when the code is run from python or ipython shell, the visualization windows shows, but when using from python script file didn’t show.

I'm using python 2.7.8 with python-occ 0.16.3

@charles-sharman
Copy link
Owner

Hi Eduardo,

Thanks for trying ccad.

When using ccad from a python script, you're doing stand-alone viewing. You need to add the line:

cd.start()

at the bottom to make the script work stand-alone. See

https://github.com/charles-sharman/ccad/blob/master/doc/html/stand_alone.html

for more details.

Please let me know if this indeed fixes the problem, so I can remove it from the issues list.

Thanks,
Charles

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

2 participants