-
Notifications
You must be signed in to change notification settings - Fork 10
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
Cannot use mouse in view #9
Comments
IIRC ccad has its own viewer, so likely Charles ( author of ccad ) can provide you with better feedback... |
Hi Reza, Thanks for trying ccad. What kind of mouse problems are you having? Mouse operation differs between OCC.Display.SimpleGUI and ccad.display. ccad.display follows older Blender conventions: MMB drag (Hold the Middle Mouse Button down while draggin) orbits, Shift MMB drag pans, RMB selects a shape. A little can be found in the documentation: https://github.com/charles-sharman/ccad/blob/master/doc/html/using_display.html Zoom In/Out is only keyboard driven. Are you trying these mouse operations, and it doesn't work? |
Hi Charles I tried it out and the mouse commands seem no to work, but almost all of the keyboard commands work. What is not working is pan with Shift+2/4/6/8 and Ctrl+q for closing the window. |
Hi Reza, Thanks for trying my suggestions. I tried it myself this morning and everything worked fine, particularly mouse commands and keyboard panning. ccad was originally designed for an older pythonocc version (0.16.0, I think), but I checked through the function names, and didn't see any changes. I assume you're using PyQt4 or Pyside, right? When you try the pan with keyboard presses, are you using the numeric keypad? That's what was intended. What do you see displayed in the Status Bar? The Status Bar should display what key is pressed. I suspect a key mapping error there. If that is the issue and you feel like hacking, change the self.key_table dictionary very close to the beginning of display.py to use the keys you want. Ultimately, I plan to pull the key table out to a config file so people can change it as they prefer. I don't know what's causing the Mouse issues. If you feel like hacking, the mouseMoveEvent and mousePressEvent methods are called on mouse press and motion. You can put some print statements to debug. Overall, though, I feel there's a general system difference between yours and mine: maybe a platform dependency, maybe a PyQt4 versus PyQt5 thing. But I'm obviously groping. I did notice PythonOCC supports PyQt5 while ccad does not. Sorry I can't help more, but I'd like to hear what you find. |
Hi Reza, I recently installed the latest pythonocc (0.16.5) to see if that was the issue. ccad still works seamlessly with it on my system (Debian 7), including the gui, and its mouse and keyboard commands. Are you using PyQt4 or Pyside? PyQt5 does not work with ccad. |
When using the
OCC.Display.SimpleGui
module in pythonocc I can zoom, rotate and pan with the mouse. But when I use theccad.display
module my mouse seems blocked and I can only use the keyboard commands. Is this intended or a bug?The text was updated successfully, but these errors were encountered: