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

thicken does not work on directly imported STL #17

Closed donaldlee2008 closed 2 years ago

donaldlee2008 commented 2 years ago

from madcad import from madcad.io import from madcad.generation import * print("runing here ") surface=read("data/aa.stl") print("runing here 0") surface = thicken(surface,0.1 ,0.5) print("runing here 1") write(surface, 'data/A12.stl') print("runing here 2") show([surface])

python thickentest.py runing here runing here 0

that mean I can't run thicken(surface,0.1 ,0.5) . the STL file is fine. I can open it on other software

donaldlee2008 commented 2 years ago

inflateoffsets, inflate have the same problem

donaldlee2008 commented 2 years ago

there is no any error or warning. just no result

jimy-byerley commented 2 years ago

Can you please format the code you post in proper markdown ? It's hard to read without a monospaced font,with no tabs nor colors. Can you also post a .stl file having this issue ? so I could try to reproduce the issue. inflate always worked in my use cases.

donaldlee2008 commented 2 years ago

please see file attached. code and stl file code_and_data.zip

jimy-byerley commented 2 years ago

Hello, the probleme is pretty simple in fact:

Note that the edges visible on the mesh in the first picture of the image are surface contours. Because by default, edges between adjacent triangles are not displayed (for convenience). So you can easily check when one imported mesh has badly connected components.