jimy-byerley / pymadcad

Simple yet powerful CAD (Computer Aided Design) library, written with Python.
https://madcad.netlify.app/
GNU Lesser General Public License v3.0
208 stars 16 forks source link

Error on OSX #36

Closed granludo closed 2 years ago

granludo commented 2 years ago

Hi, on the last OSX version 11.6 on Intel, I made a clean install of Python, Cython, and PyMadCad. I tried running the sample program (here in github) and I get this error ( the same file works fine on Ubuntu) Thanks in advance Marc

ludo@ludo-macbook gcode % python3 3dtest.py            
/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/scipy/optimize/_lsq/least_squares.py:110: UserWarning: Setting `gtol` below the machine epsilon (2.22e-16) effectively disables the corresponding termination condition.
  warn("Setting `{}` below the machine epsilon ({:.2e}) effectively "
qt.qpa.openglcontext: Could not create NSOpenGLContext with shared context, falling back to unshared context.
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/madcad/rendering.py", line 1099, in paintGL
    self.render()
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/madcad/rendering.py", line 981, in render
    ViewCommon.render(self)
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/madcad/rendering.py", line 712, in render
    self.uniforms['proj'] = proj = self.projection.matrix(w/h, self.navigation.distance)
ZeroDivisionError: division by zero
zsh: abort      python3 3dtest.py
jimy-byerley commented 2 years ago

Hello again @granludo ! glad you found your way to this issue tracker

And no window showing at all I bet ? This could be a duplicate of #33, can you check that ?

granludo commented 2 years ago

yes, I move to that discussion, sorry