[Bf-committers] Boolean tool precision
Ken Hughes
khughes at pacific.edu
Tue Jul 3 17:26:09 CEST 2007
Before I head out of town for a few days, thought I'd throw this at the
list and see what people's thoughts were:
Chris and I have been working on some of the bugs in the boolean tools:
http://projects.blender.org/tracker/?func=detail&atid=125&aid=6847&group_id=9
I've fixed a few problems, but the one I'm running up against now is
numeric precision. Tests for "equal to zero" are causing some resulting
meshes to have holes (i.e., non-manifold). Scaling up the sizes of the
objects prior to applying the boolean operations can fix this.
I've experimented with making the "equal to zero" tests scale based on
the size of the values being compared, using the floating point numbers
exponent and mantissa (see frexp() in math.h). This gives much better
results, but at the cost of speed: as much as 20% slower in some of my
tests.
I'm open to other suggestions how to handle this, or just live with one
of these two options: fast but possibly non-manifold, slower but almost
always manifold.
Ken
More information about the Bf-committers
mailing list