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

Viewer Freeze #408

Closed
LukasMHD opened this issue Mar 15, 2017 · 9 comments
Closed

Viewer Freeze #408

LukasMHD opened this issue Mar 15, 2017 · 9 comments

Comments

@LukasMHD
Copy link

Hello,
I have a problem, I have set up ifcopenshell and pythonocc on a new System (Laptop, Windows 10, Python 2.7, Miniconda(for 2.7), pythonocc 0.17.2, everything 64bit).
but whenever i initialize the viewer via an IDE

import ifcopenshell, ifcopenshell.geom
display = ifcopenshell.geom.utils.initialize_display()

the display window starts, but imidiately freezes as well. The Header just says
'pythonOCC-0.17.2 3d viewer ('qt-pyqt5' backend) (Not Responding)'
and thats it.
I got it running on my PC, and I cannot, for the life of me, figure out why it shoudn't work on my Laptop as well.
Thanks for any suggestions.
king regards,
Luaks.

@adam-urbanczyk
Copy link
Contributor

Just a guess: sounds like the pyqt event loop is blocked / not running.

@tpaviot
Copy link
Owner

tpaviot commented Apr 19, 2017

@LukasMHD I suggest you post to the ifcopenshell issue tracker at https://github.com/IfcOpenShell/IfcOpenShell/issues @aothms

@tpaviot tpaviot closed this as completed Apr 19, 2017
@aothms
Copy link
Contributor

aothms commented Apr 19, 2017

I also have bad experiences interfacing with the pythonocc viewer from some IDEs. Somehow they do seem to interfere with the event loop. Haven't had the time to look into it. Judging from the lack of issues I find online, I'm inclined to say it does not seem to be a generic issue with PyQt and the IDE.

@Luccifer
Copy link

Luccifer commented Sep 25, 2017

same here, why its closed? Problem is not localized. Ubuntu

@tpaviot
Copy link
Owner

tpaviot commented Sep 25, 2017

@Luccifer Closed because this issue seems to be related to ifcopenshell. If you manage to get a pythonocc only issue, please submit a new issue

@Luccifer
Copy link

All right then! Thanks for participating!

@jf---
Copy link
Contributor

jf--- commented Oct 2, 2017

@aothms , @adam-urbanczyk is right here, this is due to the event loop. ipython can much facilitate developing complex pyocc programs, by having a "primed" eventloop ( belonging to ipython, rather than pyocc, which then uses the singleton ). This works well with dynamic reloading; you dont have to restart the program from scratch, but can develop the interactive app, "interactively".

@aothms
Copy link
Contributor

aothms commented Oct 6, 2017

@jf--- that sounds like a killer feature, but I don't think its the kind of interactivity that is necessary in this simple case. If @Luccifer or @LukasMHD want to spend the effort, it wouldn't be difficult to create see whether this is an IfcOpenShell or pythonOCC related issue. ifcopenshell.geom.utils.initialize_display() is a pretty thin wrapper around OCC.Display.SimpleGui.init_display(). I don't have an IDE installed, but I have heard others complain.

https://github.com/IfcOpenShell/IfcOpenShell/blob/master/src/ifcopenshell-python/ifcopenshell/geom/occ_utils.py#L48

@Luccifer
Copy link

Luccifer commented Oct 6, 2017

Okey, I am little bit tiered of notifications, but I fixed the problem fast with
ifcopenshell.geom.utils.main_loop()
Never worked with Threads/Pipes with python, only compiled languages with UI itself

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

6 participants