diff --git a/libraries/bowler-script-kernel b/libraries/bowler-script-kernel index 0ccf7f8a5..8ac4060cd 160000 --- a/libraries/bowler-script-kernel +++ b/libraries/bowler-script-kernel @@ -1 +1 @@ -Subproject commit 0ccf7f8a5e7e0394f21e94ae17bc24ea46560c42 +Subproject commit 8ac4060cdcb51849c99e07441c79866984773005 diff --git a/src/main/java/com/neuronrobotics/bowlerstudio/BowlerStudio.java b/src/main/java/com/neuronrobotics/bowlerstudio/BowlerStudio.java index 71289b517..23d8a4b82 100644 --- a/src/main/java/com/neuronrobotics/bowlerstudio/BowlerStudio.java +++ b/src/main/java/com/neuronrobotics/bowlerstudio/BowlerStudio.java @@ -177,7 +177,7 @@ public static void main(String[] args) throws Exception { } CSG.setDefaultOptType(CSG.OptType.CSG_BOUND); - CSG.setPreventNonManifoldTriangles(true); + //CSG.setPreventNonManifoldTriangles(true); Plane.setEPSILON(1.0e-9); Vector3d.setEXPORTEPSILON(10); diff --git a/src/main/java/com/neuronrobotics/bowlerstudio/BowlerStudioMenu.java b/src/main/java/com/neuronrobotics/bowlerstudio/BowlerStudioMenu.java index bdccb206e..1b9c65aba 100644 --- a/src/main/java/com/neuronrobotics/bowlerstudio/BowlerStudioMenu.java +++ b/src/main/java/com/neuronrobotics/bowlerstudio/BowlerStudioMenu.java @@ -1614,6 +1614,7 @@ public void onLogin(String arg0) { CheckMenuItem showRuler = new CheckMenuItem("Show Ruler "); showRuler.setSelected(true); CheckMenuItem showCSGProgress = new CheckMenuItem("Show CSG Update"); + CheckMenuItem useAdvancedSTL = new CheckMenuItem("Generate Advanced STL (Fully Manifold)"); CSG.setProgressMoniter((currentIndex, finalIndex, type, intermediateShape) -> { try { int i = currentIndex + 1; @@ -1623,8 +1624,8 @@ public void onLogin(String arg0) { + finalIndex; if (showCSGProgress.isSelected()) { System.out.println(x); - if(finalIndex>100) { - if(percent>99) { + if(finalIndex>50) { + if(percent>90) { SplashManager.closeSplash(); }else { SplashManager.renderSplashFrame((int)percent, x); @@ -1638,6 +1639,11 @@ public void onLogin(String arg0) { ex.printStackTrace(); } }); + useAdvancedSTL.setOnAction(event -> { + boolean selected = useAdvancedSTL.isSelected(); + ConfigurationDatabase.setObject("MenueSettings", "CSG_Advanced_STL", selected); + CSG.setPreventNonManifoldTriangles(selected); + }); showCSGProgress.setOnAction(event -> { ConfigurationDatabase.setObject("MenueSettings", "printCSG", showCSGProgress.isSelected()); }); @@ -1649,13 +1655,17 @@ public void onLogin(String arg0) { // } // }); Runnable r = () -> { + boolean parseBoolean = Boolean + .parseBoolean(ConfigurationDatabase.getObject("MenueSettings", "CSG_Advanced_STL", CSG.isPreventNonManifoldTriangles()).toString()); + CSG.setPreventNonManifoldTriangles(parseBoolean); + useAdvancedSTL.setSelected(parseBoolean); showCSGProgress.setSelected(Boolean .parseBoolean(ConfigurationDatabase.getObject("MenueSettings", "printCSG", true).toString())); }; new Thread(r).start(); CreatureLab3dController.getEngine().setControls(showRuler, idlespin, autohighlight); - WindowMenu.getItems().addAll(showRuler, idlespin, autohighlight, showCSGProgress); + WindowMenu.getItems().addAll(showRuler, idlespin, autohighlight, showCSGProgress,useAdvancedSTL); new Thread() { public void run() {