also as an additional info, instead of using dictionary the flattening like on the posted topics. I just get the values that I want to change via python script. here’s the code:
walls = IN[0]
updated_walls = []
for wall in walls:
if wall == 136:
updated_walls.append(135)
elif wall == 46:
updated_walls.append(45)
elif wall == 91:
updated_walls.append(90)
else:
updated_walls.append(wall)
OUT = updated_walls
just an update, found a solution. Thanks @christian.stan for the tip. I can’t quite follow what’s happening on the api but i made it as a guide to figure out with minimal python script.
so the workflow was:
1.get the angle of the element, find the direction (you would want to rotate the element on the start point as the origin);
2. whatever the angle, catch it so it would go to the nearest 45deg. on my case i made a range of 20deg (+10deg/ -10deg from whatever 45deg)
3. rotate the geometry then set the location.