You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am currently playing with trimesh in the context of a CAD project.
I started to implement an algorithm able to chamfer mesh vertices given a list of vertex indices.
In order to construct a chamfer for a vertex, I need to know outgoing edges (excluding edges shared by two co-planar faces) from this vertex and then compute a new vertex in the direction of the edge at a specific distance (the chamfer size)
Now I am facing an issue I didn't anticipated. Some edges are overlaping and I dont know how to get rid of that. Meshes are generated by applying boolean operations on some basic shapes, using "manifold" engine.
The following code & image highlight the issue on the vertex 7 and the edges [[3, 11], [7 12]]. I would expect, instead, [[3, 7], [7 11], [11, 12]]. Cubes are currently not considered adjacent by some edges. Is there an option for the manifold engine or another trimesh function that is able to solve this ?
Regards
importtrimeshimportvedomake_cuboid=lambdaextents: trimesh.creation.box(extents=extents)
# create two cubes that overlap on the borderbottom_cube=make_cuboid([20, 10, 10])
top_cube=make_cuboid([10, 10, 10])
top_cube.apply_translation([10, 10, 10])
# merge cubes together to create a single meshmerged=trimesh.boolean.union([bottom_cube, top_cube])
# display mesh skeleton & vertex indicesvedo_mesh=vedo.Mesh([merged.vertices, merged.faces])
points=vedo_mesh.verticeslabels= [vedo.Text3D(str(i), pos=points[i], s=1, c="red") foriinrange(len(points))]
vedo.show(vedo_mesh.wireframe(), *labels, axes=1)
The text was updated successfully, but these errors were encountered:
Hello !
I am currently playing with trimesh in the context of a CAD project.
I started to implement an algorithm able to chamfer mesh vertices given a list of vertex indices.
In order to construct a chamfer for a vertex, I need to know outgoing edges (excluding edges shared by two co-planar faces) from this vertex and then compute a new vertex in the direction of the edge at a specific distance (the chamfer size)
Now I am facing an issue I didn't anticipated. Some edges are overlaping and I dont know how to get rid of that. Meshes are generated by applying boolean operations on some basic shapes, using "manifold" engine.
The following code & image highlight the issue on the vertex 7 and the edges [[3, 11], [7 12]]. I would expect, instead, [[3, 7], [7 11], [11, 12]]. Cubes are currently not considered adjacent by some edges. Is there an option for the manifold engine or another trimesh function that is able to solve this ?
Regards
The text was updated successfully, but these errors were encountered: