GeometryUtil.equallyDistributePointsAlong(
stepLength, true, startWithOffset, endWithOffset);
List<VectorXYZ> stepBorderPositions = new ArrayList<VectorXYZ>();
for (VectorXZ posXZ : stepBorderPositionsXZ) {
VectorXYZ posXYZ = interpolateElevation(posXZ,
centerline.get(0),
centerline.get(centerline.size() - 1));
stepBorderPositions.add(posXYZ);
}
/* draw steps */
for (int step = 0; step < stepBorderPositions.size() - 1; step++) {
VectorXYZ frontCenter = stepBorderPositions.get(step);
VectorXYZ backCenter = stepBorderPositions.get(step+1);
double height = abs(frontCenter.y - backCenter.y);
VectorXYZ center = (frontCenter.add(backCenter)).mult(0.5);
center = center.subtract(Y_UNIT.mult(0.5 * height));
VectorXZ faceDirection = segment.getDirection();
if (frontCenter.y < backCenter.y) {
//invert if upwards
faceDirection = faceDirection.invert();