Blender Git Commit Log

Git Commits -> Revision 57e639c

July 30, 2021, 14:55 (GMT)
Make it optional to track input->output mapping in delaunay_2d_calc.

Some uses of delaunay_2d_calc don't need to know the original verts,
edges, and faces that correspond to output elements.
This change adds a "need_ids" value to the CDT input spec, default true,
which tracks the input ids only when true.
The python api mathutils.geometry.delaunay_2d_cdt gets an optional
final bool argument that is the value of need_ids. If the argument
is not supplied, it is true by default, so this won't break old uses
of the API.

On a sample text test, not tracking ids save about 30% of the runtime.
For most inputs the difference will not be so dramatic: it only really
kicks in if there are a lot of holes.

Commit Details:

Full Hash: 57e639caa1534cb66367eb8f5d511f99abf9b03c
Parent Commit: ceb42e4
Committed By: Fabian Schempp
Lines Changed: +167, -77

4 Modified Paths:

/source/blender/blenlib/BLI_delaunay_2d.h (+8, -0) (Diff)
/source/blender/blenlib/intern/delaunay_2d.cc (+122, -68) (Diff)
/source/blender/blenlib/tests/BLI_delaunay_2d_test.cc (+24, -7) (Diff)
/source/blender/python/mathutils/mathutils_geometry.c (+13, -2) (Diff)
By: Miika HämäläinenLast update: Nov-07-2014 14:18MiikaHweb | 2003-2021