[Bf-committers] Boolean tool precision
Chris Want
cwant at ualberta.ca
Tue Jul 3 17:49:52 CEST 2007
Kent Mein wrote:
> In reply to Ken Hughes (khughes at pacific.edu):
>
>> 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
>
> I vote for slower but more accurate. Whenever I've used it I haven't
> been worried about the speed it could be 4 times slower and I wouldn't
> complain. ;)
>
> Kent
My vote would be for committing this new code with a compile time flag
to enable/disable for now. I am a bit concerned about the speed, since
the C++ booleans are already much slower than the booleans created
by the megabool script.
Since most vertices are added on edges, maybe a good test would be to
adjust the "equal to zero" value as a proportion of the length of the
edge it is being added on (or if the vertex is being added in the
interior of a face, make it proportionate to the square root of the
area of the face). Anyways, I don't know the code well, so I don't
know how feasible this is.
Regards,
Chris
More information about the Bf-committers
mailing list