This is my first post in this forum, so I hope it goes well. I am using toxiclibs to read an STL file as a WETriangle mesh. I am then trying to use the Mesh Lattice Builder function to create a new lattice mesh of the original mesh. The problem I am encountering is that the lattice builder just creates the mesh in a section of the original mesh. I've tried scaling down the origial, but the error still occurs. I think it has to do with how it computes the voxel space, but I'm not sure.
Here's my original code. If you want, the original STL file I'm using can be found
here. Much of the code was copied from toxi's open processing profile, as well as the ReadSTL example.
import processing.opengl.*;
import toxi.geom.*;
import toxi.geom.mesh.*;
import peasy.*;
import toxi.processing.*;
import toxi.volume.*;
PeasyCam cam;
WETriangleMesh mesh;
WETriangleMesh newMesh;
ToxiclibsSupport gfx;
int VOXEL_RES=64;
int VOXEL_STROKE_WEIGHT=2;
int SMOOTH_ITER=5;
void setup() {
size(600, 600, OPENGL);
cam = new PeasyCam(this, 1000);
mesh = new WETriangleMesh();
TriangleMesh tmesh = (TriangleMesh) new STLReader().loadBinary(sketchPath("lampSTL.stl"), STLReader.TRIANGLEMESH);