Closed donaldlee2008 closed 2 years ago
inflateoffsets, inflate have the same problem
there is no any error or warning. just no result
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.
please see file attached. code and stl file code_and_data.zip
Hello, the probleme is pretty simple in fact:
first thing first, your model is of size 1000
, so inflating/thickening of 0.1
doesn't make a big difference ;)
show([ surface, note_bounds(surface) ])
inflate
works by moving points along their normal. But a .stl
file only gives separated triangles (no information about which triangle is connected to which). Thus the points are moved separately and the triangles get floating apart from each others.
surface = read('data/aa.stl')
inflated = inflate(surface, 5)
show([surface], options={'display_groups': False})
To make the triangles connected, you can just merge the points that are close enough
surface = read('data/aa.stl')
surface.mergeclose()
inflated = inflate(surface, 5)
show([surface], options={'display_groups': False})
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.
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])
that mean I can't run thicken(surface,0.1 ,0.5) . the STL file is fine. I can open it on other software