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
|
@Override
|
||||||
public Coordinate[] getInstanceOffsets(){
|
public Coordinate[] getInstanceOffsets(){
|
||||||
|
|
||||||
if ( 1 == getInstanceCount())
|
if ( 1 == getInstanceCount()) {
|
||||||
return new Coordinate[] { Coordinate.ZERO };
|
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();
|
List<Coordinate> points = getClusterPoints();
|
||||||
|
|
||||||
return points.toArray( new Coordinate[ points.size()]);
|
return points.toArray( new Coordinate[ points.size() ]);
|
||||||
}
|
}
|
||||||
|
|
||||||
// @Override
|
// @Override
|
||||||
@ -387,4 +390,4 @@ public class InnerTube extends ThicknessRingComponent implements AxialPositionab
|
|||||||
return this.motors.toDebug();
|
return this.motors.toDebug();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user