Merge pull request #545 from bweissinger/unstable
[Fix #544] InnerTube.getInstanceOffsets() returning Coordinate.ZERO for single inner tube
This commit is contained in:
commit
0509f9e8ec
@ -217,12 +217,15 @@ public class InnerTube extends ThicknessRingComponent implements AxialPositionab
|
||||
@Override
|
||||
public Coordinate[] getInstanceOffsets(){
|
||||
|
||||
if ( 1 == getInstanceCount())
|
||||
return new Coordinate[] { Coordinate.ZERO };
|
||||
if ( 1 == getInstanceCount()) {
|
||||
double yOffset = this.radialPosition * Math.cos(this.radialDirection);
|
||||
double zOffset = this.radialPosition * Math.sin(this.radialDirection);
|
||||
return new Coordinate[] { Coordinate.ZERO.add(0.0, yOffset, zOffset) };
|
||||
}
|
||||
|
||||
List<Coordinate> points = getClusterPoints();
|
||||
|
||||
return points.toArray( new Coordinate[ points.size()]);
|
||||
return points.toArray( new Coordinate[ points.size() ]);
|
||||
}
|
||||
|
||||
// @Override
|
||||
@ -387,4 +390,4 @@ public class InnerTube extends ThicknessRingComponent implements AxialPositionab
|
||||
return this.motors.toDebug();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user