Closed 1939938853 closed 9 months ago
Hello What are these "unknown" edges ? As the documentations says, it is indeed needed to provide the set of edges you want to bevel. Do you mean you don't know how to extract such a set of the edges you want to bevel ?
Hello Jimy,
Yes. Is there any function in pymadcad that can be used to extract edges, like the one in pyvista?
Yes there is in fact 2 steps for doing so:
madcad.reverse.segmentation()
]() to, so edges will appear to distinguish groups (groups are regular portions of surface)Mesh.frontiers()
in combinations with Mesh.groupnear()
madcad.selection.select()
Note that the first step is in case you do not have surface grouping at all, if your mesh comes from madcad.extrusion()
, it has already groups defined
Option 1 could look like this:
raw_part = ... # mesh without group informations
part = mc.reverse.segmentation(raw_part)
# suppose we want to select the edges arround the top face and a side face
edges = part.frontiers(
part.groupnear(vec3(0,0,1)), # assuming this point is somewhere above the mesh
part.groupnear(vec3(2,0,0)), # asuming this point is somewhere next to the mesh
)
# then do whatever you want with these edges
bevel(part, edges, ('width', 0.1))
Hi,
In fact, I'm going to round/bevel a "free form" mesh boundary edges done by Madcad thicken, as shown below. It seems a little bit difficult either to group or to extract edges or to bevel.
Are you sure this mesh is an output from thinken
on a madcad-generated mesh ?
It looks like either - you are thinkening an imported soup of triangles (like a stl file) - or you used an other operation than thinkening
Hi Jimy,
It is true that the mesh is imported from a stl file. Can you give me some suggestions on how to make an organized mesh from soup triangles? Thank you!
Can you give me some suggestions on how to make an organized mesh from soup triangles?
In a stl file, the triangles points are supposed to coincide with neighboring triangles, so you just need to merge the close points together to obtain a connex mesh
part = read('myfile.stl')
part.mergeclose()
Then you can apply the operations you want, like any madcad-generated mesh. While thinkening, you will see that the border are much cleaner ;) Thinkening the triangle soup instead was extruding each triangle individually, resulting in what you got.
Hello,
Is it possible to round the "unknown" sharp offset (thicken) edges with pymadcad? Perhaps need to extract all original edge points first and then apply pymadcad Bevel operation?