3d solid projected on brep (breakwater projecting to bathymetry surface)

Greetings everyone,

I’ve been banging my head on this problem for some time that I decided to reach out for second opinions. All my attempts are dead ends.

I have modelled the cross-section of a breakwater that has an underlayer & armour layer. They are controlled by a few parameters outlined in my attached file. Once the cross-section is configured, we will sweep or extrude along an alignment line. So far so good.

The problem that I can’t seem to solve is have this cross-section simultaneously project on a given bathymetry (brep) while also being extruded/sweeped on the main line, maintaining the slope of the underlayer & armour layers (the blue lines). The top level stays constant while we project the underlayer bottom surface (highlighted with green).

What I was trying to do is project the bottom surface only, and then reconstruct the cross-section and loft the surfaces to create the sloped structure by taking a simpler bathymetry (a planar brep) but I have a lot of seams misalignment, and it will fail for other bathymetry that do not have constant level.

I’ve also thought about not modelling the whole structure, but basically split it in top and bottom part, project the bottom part and then try lofting the surfaces that would connect to create the varying breakwater.

What modelling approach should I take that would make this problem solvable? Is it solvable?
I’d appreciate any insight!

revetment_trial.gh (61.6 KB)

Script requires telepathy to run.