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

TypeError when using mandoline on my .stl file #5

Open
nneibaue opened this issue Oct 2, 2020 · 3 comments
Open

TypeError when using mandoline on my .stl file #5

nneibaue opened this issue Oct 2, 2020 · 3 comments

Comments

@nneibaue
Copy link

nneibaue commented Oct 2, 2020

Hello! First of all, thanks for the awesome library... I'm excited to get into it.

I am having an issue running mandoline with my own stl file... here is my command and the stack trace:

image

I did not have this problem when using the cube.stl file included in the test models. Is there something wrong with my stl file? I can't upload it here, but I can send it to you for testing if desired.

Thanks!

@Spiritdude
Copy link

It's related to that mandoline consider the normal vector in STL, whereas most software (importing & exporting) ignores it. A normal vector in your STL file is likely 0,0,0 - I can't provide an actual fix yet as I don't understand the last error message.

@Spiritdude
Copy link

I know now the problem, two issues in vector.py:

  • def normalize: it must be l = self.length() add "()"
  • def __div__ must be changed to def __truediv__ (python 2 vs python 3 issue)
    but there are other issues with extrusion calculation - I'm currently extending mandoline a lot, I actually got a 20mm cube printing properly, but my working style doesn't align well with git, so I end up with a larger PR soon.

@Spiritdude
Copy link

I just synced my repo https://github.com/Spiritdude/mandoline-py with many fixes and some improvements; you might like to test it before I make a PR (I'm a newbie with Python, and struggled with developing the code without build/install so I had to change most imports; locally testing and build/install worked for me but like to get feedback from others).

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