Skip to content

Commit

Permalink
Adding prints for export and push
Browse files Browse the repository at this point in the history
  • Loading branch information
madhephaestus committed Nov 10, 2024
1 parent 034d5a3 commit bf15e4c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -154,11 +154,12 @@ public ArrayList<File> generateManufacturingParts(List<CSG> totalAssembly , File
if(freecadParts.size()>0){
allCadStl.add(makeFreecad(nameBase,freecadParts));// default to stl
}
System.out.println("Finished Export!");
return allCadStl;
}
private File makeFreecad(String nameBase,List<CSG> current ) throws IOException{
File blend = new File(nameBase + ".FCStd");
com.neuronrobotics.sdk.common.Log.error("Writing "+blend.getAbsolutePath());
System.out.println("Writing "+blend.getAbsolutePath());
for(CSG tmp:current)
FreecadLoader.addCSGToFreeCAD( blend,tmp);
return blend;
Expand All @@ -168,20 +169,20 @@ private File makeStl(String nameBase,CSG tmp ) throws IOException{
File stl = new File(nameBase + ".stl");

FileUtil.write(Paths.get(stl.getAbsolutePath()), tmp.toStlString());
com.neuronrobotics.sdk.common.Log.error("Writing "+stl.getAbsolutePath());
System.out.println("Writing "+stl.getAbsolutePath());
return stl;
}
private File makeObj(String nameBase,CSG tmp ) throws IOException{
File stl = new File(nameBase + ".obj");

FileUtil.write(Paths.get(stl.getAbsolutePath()), tmp.toObjString());
com.neuronrobotics.sdk.common.Log.error("Writing "+stl.getAbsolutePath());
System.out.println("Writing "+stl.getAbsolutePath());
return stl;
}

private File makeBlender(String nameBase,List<CSG> current ) throws IOException{
File blend = new File(nameBase + ".blend");
com.neuronrobotics.sdk.common.Log.error("Writing "+blend.getAbsolutePath());
System.out.println("Writing "+blend.getAbsolutePath());
for(CSG tmp:current)
BlenderLoader.toBlenderFile(tmp, blend);
return blend;
Expand Down Expand Up @@ -212,7 +213,7 @@ private File makeSvg(String nameBase, List<CSG> currentCsg) throws IOException {

}

com.neuronrobotics.sdk.common.Log.error("Writing " + stl.getAbsolutePath());
System.out.println("Writing " + stl.getAbsolutePath());
} catch (Throwable t) {
com.neuronrobotics.sdk.common.Log.error("ERROR, NO pixelization engine availible for slicing");
t.printStackTrace();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1067,7 +1067,7 @@ public static void pushCodeToGit(String remoteURI, String branch, String FileNam
git.push().setCredentialsProvider(PasswordManager.getCredentialProvider())
.setProgressMonitor(getProgressMoniter("Pushing ", remoteURI)).call();
closeGit(git);
com.neuronrobotics.sdk.common.Log.error("PUSH OK! file: " + desired + " on branch " + getBranch(remoteURI));
System.out.println("PUSH OK! file: " + desired + " on branch " + getBranch(remoteURI));
} catch (Exception ex) {
ex.printStackTrace();
closeGit(git);
Expand Down

0 comments on commit bf15e4c

Please sign in to comment.