.shortenFaces(0.03) //
.softenFaces(0.015) //
.softenFaces(0.005);
HashMap<String, Twist> twists = new HashMap<String, Twist>();
twists.put("L", new Twist(planeL, Math.PI / 2));
twists.put("L2", new Twist(planeL, Math.PI));
twists.put("L'", new Twist(planeL, -Math.PI / 2));
twists.put("R", new Twist(planeR, Math.PI / 2));
twists.put("R2", new Twist(planeR, Math.PI));
twists.put("R'", new Twist(planeR, -Math.PI / 2));
twists.put("D", new Twist(planeD, Math.PI / 2));
twists.put("D2", new Twist(planeD, Math.PI));
twists.put("D'", new Twist(planeD, -Math.PI / 2));
twists.put("U", new Twist(planeU, Math.PI / 2));
twists.put("U2", new Twist(planeU, Math.PI));
twists.put("U'", new Twist(planeU, -Math.PI / 2));
twists.put("F", new Twist(planeF, Math.PI / 2));
twists.put("F2", new Twist(planeF, Math.PI));
twists.put("F'", new Twist(planeF, -Math.PI / 2));
twists.put("B", new Twist(planeB, Math.PI / 2));
twists.put("B2", new Twist(planeB, Math.PI));
twists.put("B'", new Twist(planeB, -Math.PI / 2));
// Apply PLL
for (String move : algo.getAlgoMoves()) {
Twist t = twists.get(move);
if (t != null) {
mesh = mesh.rotateHalfspace(t.getPlane(), t.getAngle());
} else {
System.out.println("WARNING: Cannot apply algo move <" + move + "> -> Skip it...");
}
}