Making All Internal Angles of Polyline Curves 90 Degrees

So I’ve been searching for a solution to the ongoing problem of messy linework. Typically when we work with siteplans we end up with lots of near straight curves made up of an excessive number of points and minor angles in between. Ideally for creating extrusions we’d just wipe out all the needless points in between the corners, very obvious to a person viewing, but getting the computer to understand this is a struggle.

So I have tried FitCrv (both Grasshopper and Rhino), Rebuild, and SimplifyCrv, and none of these really provide suitable outputs. Ultimately, you end up with pretty rubbish geometry which removes excessive points and does things such as turning rectangles into triangles (despite angle threshold).

I’ve used Grasshopper with Kangaroo to cull neighbouring points with an angle below a threshold to clean up the linework.

Ultimately getting closer, but seeking a better/proper solution for this, how would you go about recreating a similar polyline curve where the internal angles of the shape are clean 90 degree (perpendicular corners)?

I’ve uploaded an example of the type of file we deal with commonly. Any further queries or ideas, please let me know.

Perpendiculars Only.3dm (64.4 KB) !

Perpendiculars%20Only|690x388