Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -118,15 +118,20 @@ public ArrayList<CSG> process(CSG incoming, int depth) {
}

public boolean isWorkplaneNotOrigin(TransformNR w) {

double epsilon = 0.00001;
RotationNR r = w.getRotation();

// Check for any translation
double abst = Math.abs(w.getX());
double abs2t = Math.abs(w.getY());
double abs3t = Math.abs(w.getZ());

if ((abst > epsilon) || (abs2t > epsilon) || (abs3t > epsilon))
return true;

// Check for any rotation
RotationNR r = w.getRotation();

double abs = Math.abs(r.getRotationAzimuthDegrees());
double abs2 = Math.abs(r.getRotationElevationDegrees());
double abs3 = Math.abs(r.getRotationTiltDegrees());
Expand All @@ -139,10 +144,12 @@ public TransformNR getLocation() {
}

public MoveCenter setLocation(TransformNR location) throws InvalidLocationMove {
if (isWorkplaneNotOrigin(location))

// if (isWorkplaneNotOrigin(location))
this.location = location;
else
throw new InvalidLocationMove();
// else
// throw new InvalidLocationMove();

return this;
}

Expand Down