It might be small, but it is beautifully formed :-) You might want to sample it (or buy of course) from the location below:
It might be small, but it is beautifully formed :-) You might want to sample it (or buy of course) from the location below:
Well too bad. The old blenderthings.blogspot.com keeps on working but unfortunately all links pointing to www.swineworld.org are now broken, even the ones inside articles that link to other articles on the same blog. I'll try and fiz that as much as I can but I am certainly not renewing this domain with Network Solutions because the first thing they did is auctioning it of for a ridiculous price.
The new version is of course available on GitHub. (this is a single python file: select File->Save As... from your browser and save it somewhere as planks.py. Then in Blender, select File->User preferences->Add-ons->install from file... (don't forget to remove an earlier version if you have one).
If you select a non-zero thinkness each plank gets a random extra thickness up to the chosen maximum. 
The option is located together with the other randomization options (which can be applied in parallel.)
import bpy from mathutils import Vector from mathutils.bvhtree import BVHTree def q_inside(ob, point_in_object_space): direction = Vector((1,0,0)) epsilon = direction * 1e-6 count = 0 result, point_in_object_space, normal, index = ob.ray_cast(point_in_object_space, direction) while result: count += 1 result, point_in_object_space, normal, index = ob.ray_cast(point_in_object_space + epsilon, direction) return (count % 2) == 1
q_inside(ob, (0,0,0))Note that the point to check is in object space so if you want to check if a point in world space lies within the mesh you should convert it first using the inverted wordl matrix of the object.
sc = bpy.context.scene
bvhtree = BVHTree.FromObject(ob, sc)
q_inside(bvhtree, (0,0,0))
| faces | object | bvhtree | gain% |
|---|---|---|---|
| 128000 | 3.547 | 3.241 | 8.6 |
| 32000 | 3.526 | 1.892 | 46.3 |
| 8000 | 3.473 | 1.715 | 50.6 |
| 2000 | 3.393 | 1.639 | 51.7 |
| 500 | 3.391 | 1.597 | 52.9 |

| faces | object | bvhtree | gain% |
|---|---|---|---|
| 128000 | 3.608 | 3.148 | 12.7 |
| 32000 | 3.434 | 1.836 | 46.5 |
| 8000 | 3.381 | 1.637 | 51.6 |
| 2000 | 3.277 | 1.558 | 52.4 |
| 500 | 3.294 | 1.528 | 53.6 |

| faces | object | bvhtree | gain% |
|---|---|---|---|
| 128000 | 1.534 | 2.417 | -57.6 |
| 32000 | 1.544 | 1.011 | 34.5 |
| 8000 | 1.52 | 0.832 | 45.2 |
| 2000 | 1.523 | 0.796 | 47.7 |
| 500 | 1.534 | 0.783 | 49 |

In practice you would probably also try to avoid seams to line up in adjacent rows but if this happens you can easily switch to another random seed already.
The images below show the vertex color map (for clarity) with (left) and without a minimum offset of 12 cm, resulting in less short 'stubs'. 