public class STLFormatter extends Object
| Modifier and Type | Field and Description |
|---|---|
private static DecimalFormat |
FLOAT_FMT
A DecimalFormat that will be used to format numbers to 5 decimal
places.
|
| Constructor and Description |
|---|
STLFormatter() |
| Modifier and Type | Method and Description |
|---|---|
static String |
toSTLFormat(Vector<Triangle3DFloat> triangles,
String objName)
This method turns a vector of Triangle3DFloat into a string
representing a STL file.
|
static String |
toSTLFormat(Vector<Triangle3DFloat> triangles,
String objName,
float scale)
This method turns a vector of Triangle3DFloat into a string
representing a STL file.
|
private static final DecimalFormat FLOAT_FMT
public static String toSTLFormat(Vector<Triangle3DFloat> triangles, String objName, float scale)
triangles - A vector of triangles. The vector may be obtained fromobjName - The object name to be used inside the obj file.scale - A scale to multiply each point by.MarchingCubes.triangulateHull(float, float, int, float, float, int, float, float, int, frink.graphics.Field3DFloat, float)public static String toSTLFormat(Vector<Triangle3DFloat> triangles, String objName)
triangles - A vector of triangles. The vector may be obtained fromobjName - The object name to be used inside the obj file.MarchingCubes.triangulateHull(float, float, int, float, float, int, float, float, int, frink.graphics.Field3DFloat, float)