asny / tri-mesh

A triangle mesh data structure including basic operations.
MIT License
70 stars 16 forks source link

Bevel function for contiguous suite of edges #13

Open jimy-byerley opened 4 years ago

jimy-byerley commented 4 years ago

This is a function to bevel edges. It works for a curve (a suite of edges, with no T junction) therefore passed as a [VertexID] This function is not exactly a chamfer function: a chamfer would cut the mesh leaving the remaining faces in the exactly same position and orientation. The stitch function is already there for this purpose. This operator is more a way to insert a chamfer-like edge, by displacing points around the edge (the neighboring faces are slightly moved, and not cutted).

I want to add a bevel function for vertices too. I will make an other PR.

jimy-byerley commented 4 years ago

oops, the last two commits are not for bevel_curve but for bevel_vertex that is not mature yet. (I will need something like the Shape::triangulation function for it)

asny commented 4 years ago

Looks interesting! I will take a closer look at it as soon as I have time which might not be until after Christmas, sorry!