Blender Git Loki

Git Commits -> Revision 72d1ddf

Revision 72d1ddf by Howard Trickey (master)
July 18, 2021, 19:10 (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: 72d1ddfc9ce44afcf39226aa035249e2c29c1f5e
Parent Commit: 4ed029f
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)
Tehnyt: Miika HämäläinenViimeksi päivitetty: 07.11.2014 14:18MiikaH:n Sivut a.k.a. MiikaHweb | 2003-2021