diff options
author | Howard Trickey <howard.trickey@gmail.com> | 2020-02-29 21:23:44 +0300 |
---|---|---|
committer | Howard Trickey <howard.trickey@gmail.com> | 2020-02-29 21:26:27 +0300 |
commit | cb8b424c6bff09bd0f7a8f66c2321c803c6e0bdd (patch) | |
tree | 1fd5cd1a6cfff0b0cfbe48f4f792920b62232a0e /source/blender/blenlib/BLI_delaunay_2d.h | |
parent | a52eb7489f8daad8f68625b773276906a8fffd24 (diff) |
Made BLI_delaunay_2d_cdt_calc better at tiny feature elimination.
The 'random' unit tests and some examples from the new boolean code
triggered asserts and crashes. This fixes those.
There is a new flag in the input that optionally disables a pass
over input to snap segment edges to other segments.
Diffstat (limited to 'source/blender/blenlib/BLI_delaunay_2d.h')
-rw-r--r-- | source/blender/blenlib/BLI_delaunay_2d.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/blenlib/BLI_delaunay_2d.h b/source/blender/blenlib/BLI_delaunay_2d.h index fe81de5fc5e..9d853dd9509 100644 --- a/source/blender/blenlib/BLI_delaunay_2d.h +++ b/source/blender/blenlib/BLI_delaunay_2d.h @@ -104,6 +104,11 @@ * If zero is supplied for epsilon, an internal value of 1e-8 used * instead, since this code will not work correctly if it is not allowed * to merge "too near" vertices. + * + * Normally, if epsilon is non-zero, there is an "input modify" pass which + * checks to see if some vertices are within epsilon of other edges, and + * snapping them to those edges if so. You can skip this pass by setting + * skip_input_modify to true. (This is also useful in some unit tests.) */ typedef struct CDT_input { int verts_len; @@ -115,6 +120,7 @@ typedef struct CDT_input { int *faces_start_table; int *faces_len_table; float epsilon; + bool skip_input_modify; } CDT_input; /** |