Skip to content

Commit

Permalink
Re-Adding the placement transforms
Browse files Browse the repository at this point in the history
  • Loading branch information
madhephaestus committed Dec 27, 2024
1 parent b282378 commit 2181545
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
2 changes: 1 addition & 1 deletion BowlerStudio
13 changes: 6 additions & 7 deletions src/main/java/com/commonwealthrobotics/ShapesPallet.java
Original file line number Diff line number Diff line change
Expand Up @@ -211,13 +211,13 @@ private Button setupButton(HashMap<Map, String> names, HashMap<String, String> k
try {
TransformNR currentAbsolutePose = workplane.getCurrentAbsolutePose();
AbstractAddFrom setAddFromScript = new AddFromScript()
.set(key.get("git"), key.get("file"));
.set(key.get("git"), key.get("file")).setLocation(currentAbsolutePose);
String string = key.get("copyFile");
if(string!=null) {
if(Boolean.parseBoolean(string)) {
try {
File f = ScriptingEngine.fileFromGit(key.get("git"), key.get("file"));
setAddFromScript = new AddFromFile().set(f);
setAddFromScript = new AddFromFile().set(f).setLocation(currentAbsolutePose);
} catch (InvalidRemoteException e) {
//
e.printStackTrace();
Expand All @@ -230,16 +230,15 @@ private Button setupButton(HashMap<Map, String> names, HashMap<String, String> k
}
}
}

ap.addOp(setAddFromScript).join();

HashSet<String> namesAdded = setAddFromScript.getNamesAdded();
ArrayList<String> namesBack = new ArrayList<String>();
namesBack.addAll(namesAdded);

MoveCenter mc = new MoveCenter().setNames(namesBack)
.setLocation(currentAbsolutePose);
ap.addOp(mc).join();
//
// MoveCenter mc = new MoveCenter().setNames(namesBack)
// .setLocation(currentAbsolutePose);
// ap.addOp(mc).join();
session.selectAll(namesAdded);

if (!workplane.isClicked())
Expand Down

0 comments on commit 2181545

Please sign in to comment.