I've found my first bug: it looks like when you write floats into the file, they get the decimal separator defined by Locale, instead of the dot. Here's what i find in a file saved with MOC Builder:
The problem is in the method in LDrawUtilities, here's one of the possible solutions:
Code:
0
0 Name: spaceship2.ldr
0 Author:
0 ROTATION CENTER 0 0 0 1 "Custom"
0 ROTATION CONFIG 0 0
1 8 0,000 -8,000 -10,000 1,000 0,000 0,000 0,000 1,000 0,000 0,000 0,000 1,000 3032.dat
0
1 8 0,000 -8,000 40,000 1,000 0,000 0,000 0,000 1,000 0,000 0,000 0,000 1,000 3666.dat
The problem is in the method in LDrawUtilities, here's one of the possible solutions:
Code:
public static String outputStringForFloat(float f) {
// Locale.US ensure using dot as decimal separator
return String.format(Locale.US, "%.3f",
Math.round(f / LDrawGlobalFlag.DecimalPoint)
* LDrawGlobalFlag.DecimalPoint);
}