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

cutting orthogonal to tubes ends up with two non connected polygons #17

Closed
TecDroiD opened this issue Aug 22, 2020 · 2 comments
Closed

Comments

@TecDroiD
Copy link

TecDroiD commented Aug 22, 2020

Hi there,
I try to slice a vertical tube along the xy plane. the result is two circular polygones which are not connected. the outer one is considered as complete object and covers the inner one.

I tried to visualize my results with matplotlib:
tube

this is the test object I created using openSCAD.

testtube.stl.txt

If polygones had normals, I could look them up to see what's inside and outside..
To my understanding, if a triangle is connected to the plane, it's normal must be projected onto the plane and should be normalized after..

I currently play around with your code to set the loaded stl.mesh's normals into your mesh object but since I'm completely new to numpy I have hard times recalculating the normals. I currently just ignore z because that's the normal to my plane

Here's the code I used to create that image..

buildspace.py.txt

@julienr
Copy link
Owner

julienr commented Aug 31, 2020

Hi, thank you for the report !

I am not sure I 100% understand what you are trying to achieve, but I tried to slice your provided stl with a plane on the xy axis and this seems to work (this is using a modified examples/1_stl_sphere_cut.py:

Note though that meshcut is just returning a list of polylines. It's not actually computing two new meshes (see #11 for some discussion on this). What output are you expecting ?

As a side not, I don't think the normals of the faces matter when cutting the mesh.

@julienr
Copy link
Owner

julienr commented Jan 4, 2022

Closing this as a duplicate of #11

@julienr julienr closed this as completed Jan 4, 2022
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