I think your best bet here in using the ‘Curve Split by Parameter’ node to isolate and remove the piece between the two points of intersection. See attached image and file.
Does that work with the polycurve as opposed to the single line though? You’re still going to have to work out if it intersects and isolate that index?
I’m not sure how that’ll work with two openings? Any ideas?
Will work the same with a polycurve it will just change the value of the parameter given as a result of the ‘Parameter at Point’ test to reflect the increased length of curve.
As for two openings - You could do a further intersection test with the other openinng and just increase the list of parameters to split the curve by. Then you would just remove item at index of 1 & 3.
Can do another further visual representation tomorrow.
Concept for the intersection test: take the four endpoints that comprise the splitting lines and draw Dynamo lines from Line1 Endpoints to Line 2 Endpoints. If the test lines intersect a line segment that segment is filtered out for deletion.
When you have multiple splitting line pairs you’d would group the pairs before generating lines.
This achieves what you were looking for and can actually accept multiple entrances:
Pretty sure my list compilation at the end is wrong and there are just loads of instances stacked on top of each other. But as far as splitting the original polyline/boundary goes this does that.