Extend volume / trim volume

Hello!
I have a problem which needs expert advice, please help.
I have a surface generated by a loft curves. I need to :

  1. Expend the faces of the breeb generated by loft curves along the direction of the line.
  2. Generate a volume with the extendet loft surface (the caps are perpendicular to the direction of expension line)
  3. trim the extendet volume with the box and select one of the parts optain from division.

I tried to use the script for extend face but it doesnt considers the intersection between faces … thats the bigest problem …Any suggestions are apreciated … Thank you!
extend volume,trim volume.gh (12.6 KB)