// normal PowerTower...
double startHeight = parseHeight(start.pos.getTags(), 14) + 0.25;
double endHeight = parseHeight(end.pos.getTags(), 14) + 0.25;
VectorXYZ baseStart = getStartXYZ().addY(startHeight - 0.5);
VectorXYZ baseEnd = getEndXYZ().addY(endHeight - 0.5);
// power lines at the top left and right
addPos(baseStart, baseEnd, 2, 0.5);
addPos(baseStart, baseEnd, -2, 0.5);
if (cables >= 3) {
// additional power line at the top center
addPos(baseStart, baseEnd, 0, 0.5);
}
if (cables >= 5) {
// further power lines at the left and right below the column
addPos(baseStart, baseEnd, 1.5, -0.5);
addPos(baseStart, baseEnd, -1.5, -0.5);
}
} else {
// High voltage PowerTower ...
float default_height = voltage > 150000 ? 40 : 30;
float pole_width = voltage > 150000 ? 16 : 13;
double startHeight = parseHeight(start.pos.getTags(), default_height);
double endHeight = parseHeight(end.pos.getTags(), default_height);
double heightS = 2.5 * (((int) (startHeight / 2.5)) / 5);
double heightE = 2.5 * (((int) (endHeight / 2.5)) / 5);
VectorXYZ baseStart = getStartXYZ().addY(-0.5);
VectorXYZ baseEnd = getEndXYZ().addY(-0.5);
// power line at the tower's top
addPos(baseStart, baseEnd, 0, 5*heightS, 5*heightE);
// power lines start a little bit below the tower's columns
baseStart = baseStart.add(0, -0.2, 0);
baseEnd = baseEnd.add(0, -0.2, 0);
// power lines at the base column
addPos(baseStart, baseEnd, 0.9*pole_width, startHeight/2, endHeight/2);
addPos(baseStart, baseEnd, -0.9*pole_width, startHeight/2, endHeight/2);
if ((cables > 3) && (cables <= 9)) {