setMesh(mesh);
List<Float> edgeLengths = new ArrayList<Float>(mesh.edges.size());
for (WingedEdge e : mesh.edges.values()) {
edgeLengths.add(e.getLength());
}
FloatRange range = FloatRange.fromSamples(edgeLengths);
ScaleMap brushSize = new ScaleMap(range.min, range.max, stroke.min,
stroke.max);
for (WingedEdge e : mesh.edges.values()) {
brush.setSize((float) brushSize.getClippedValueFor(e.getLength()));
createLattice(brush, e, drawStep);