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

Type mismatch on windows #2

Open
FreakTheMighty opened this issue Aug 17, 2020 · 7 comments
Open

Type mismatch on windows #2

FreakTheMighty opened this issue Aug 17, 2020 · 7 comments

Comments

@FreakTheMighty
Copy link
Contributor

Hey @jannessm I'm looking forward to trying out this library! Running on windows, I bumped into this type error. It seems that the long type is not cross compatible with windows. This project seems to have bumped into a similar issue. I wonder, is it possible to apply a similar fix to this project?

quadric-mesh-simplification\quad_mesh_simplify\simplify_test.py", line 63, in test_simplify_mesh_without_threshold
    res_pos, res_face = simplify_mesh(np.copy(pos), np.copy(face), 10 - i)
  File "quad_mesh_simplify\simplify.pyx", line 73, in quad_mesh_simplify.simplify.simplify_mesh
    face_copy = np.copy(face_in)
ValueError: Buffer dtype mismatch, expected 'DTYPE_LONG_T' but got 'long'
@jannessm
Copy link
Owner

Hey. I have released a new version that is mainly based on c to speed up the whole process. I would appreciate if you test the compatibility to windows. Please let me know if you run into issues!

@FreakTheMighty
Copy link
Contributor Author

Hey @jannessm looks like I'm having similar type issues. May I ask, what motivated you to move away from Cython?

======================================================================
ERROR: test_simplify_mesh_with_threshold (__main__.SimplifyTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File ".\simplify_test.py", line 178, in test_simplify_mesh_with_threshold
    res_pos, res_face = simplify_mesh(np.copy(pos), np.copy(face), 5, threshold=0.6)
  File "quad_mesh_simplify\simplify.pyx", line 73, in quad_mesh_simplify.simplify.simplify_mesh
ValueError: Buffer dtype mismatch, expected 'DTYPE_LONG_T' but got 'unsigned long'

======================================================================
ERROR: test_simplify_mesh_without_threshold (__main__.SimplifyTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File ".\simplify_test.py", line 141, in test_simplify_mesh_without_threshold
    res_pos, res_face = simplify_mesh(np.copy(pos), np.copy(face), 10 - i)
  File "quad_mesh_simplify\simplify.pyx", line 73, in quad_mesh_simplify.simplify.simplify_mesh
ValueError: Buffer dtype mismatch, expected 'DTYPE_LONG_T' but got 'unsigned long'

----------------------------------------------------------------------

@jannessm
Copy link
Owner

Since I am dealing with very large meshes that I want to reduce quite heavily, I wanted to speed up the code. And now I can deal without any overhead of cython which indeed speeded up the whole process. But to wrap the function for python I am still using cython ;)

@jannessm
Copy link
Owner

jannessm commented Sep 1, 2020

And sadly, I am currently very busy. I will take care of it, if I am free. Otherwise, it would be very nice if you could search for the error in the code and create a PR! Thank you very much.

@FreakTheMighty
Copy link
Contributor Author

I hear that :). I did make an attempt at fixing this, but was a bit over my head with the cython side of things. At that point I just moved over to Ubuntu and moved on.

Perhaps I'll return to this later.

@jannessm
Copy link
Owner

Hi, I have added the cibuildwheel workflow. Now it should be usable under windows. It would be very kind, if you would test the behavior and let me know if the error persists. Thank you!

@FreakTheMighty
Copy link
Contributor Author

Sorry, been very busy this week. I'll do my best to get to testing next week.

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