Sorry, I don’t understand what the issue is rn. As above, you can rotate the extruded geometry like any geometry.
Example (these geometries are based on the same path that’s extruded in different directions. If you’d like to rotate them perfectly you can also create a pivot group around an extruded geometry to control the origin point of rotations.)
If you want to extrude lines - not shapes - it would be easier to work with points and just create geometries from them, since you don’t need to extrude anything at all then.
If I’m understanding right, maybe this is half of what you are trying to do, except what you’ll want is probably extrude 3d geometry and not flat planes.
At a high level, what you could do is have a WallCreator class that takes in two points.
And from there you can create each wall based on each wall segment.
You’ll of course need to provide in the wall height and thickness so you can create or extrude the geometry correctly. You may also need to handle re-positioning the walls and rotating it into place after you create the 3D piece from each segment.
A decision you’ll have to make too is, whether to create each wall geometry at the origin and position and rotate it into place, or create the wall geometry exactly at the segment locations. Each path has it’s up and down, but I do find it’s easier to create each wall at the origin and then re-position and re-rotate the 3D object into place.