sshirokov/csgtool — pull request #60 by sshirokov (2014-09-16 20:01:30+00:00)
Title: Implement a clamp on the LERP alpha val

Prevent the LERP alpha from leaving the [0, 1] range, which prevents
polygons from growing super-long edges.

In my testing, this appears to **eliminate** out of bounds artifacting during BSP construction

Original stl analysis:

```
~/src/csgtool$ stltwalker -R -r -I hard-old.stl
[INFO] (src/stltwalker.c:181) Raw out is now ON
[INFO] (src/stltwalker.c:176) Raw load is now ON
[INFO] (src/stltwalker.c:171) Setting memcopy collection mode.
[INFO] (/Users/yshirokov/src/self/stltwalker/src/stl.c:173) Header: [[STL/ASCII]: 'solid ascii']
[INFO] (/Users/yshirokov/src/self/stltwalker/src/stl.c:186) ASCII solid ended. Loaded 2326 facets
[INFO] (src/stltwalker.c:210) NOT Centering 'hard-old.stl'
[INFO] (src/stltwalker.c:217) hard-old.stl center: (-125.000000, 151.000000, 20.250000). Size: 43.000000x18.000000x39.500000
```

BSP geometric identity stl analysis

```
~/src/csgtool$ stltwalker -R -r -I hard-old.stl.bsp.stl
[INFO] (src/stltwalker.c:181) Raw out is now ON
[INFO] (src/stltwalker.c:176) Raw load is now ON
[INFO] (src/stltwalker.c:171) Setting memcopy collection mode.
[INFO] (/Users/yshirokov/src/self/stltwalker/src/stl.c:224) Expecting to read 69818 triangles.
[INFO] (src/stltwalker.c:210) NOT Centering 'hard-old.stl.bsp.stl'
[INFO] (src/stltwalker.c:217) hard-old.stl.bsp.stl center: (-125.000000, 151.000000, 20.250000). Size: 43.000000x18.000000x39.500000
```

Which also seems visually sane. :sparkles: :tada: :gun: