I have a polycurve and two lines that intersect it. I want to form a gap between the two intersect lines.
I’ve done it like this (not put the overall curve back together but don’t worry about that)…
This just seems REALLY contrived, there must be a simpler way?
Also, I may want to split the polycurve at another point too so I think this way is going to cause me a headache…
1 - is the polycurve
2 - the two vertical cut lines
3 - the line I want to cut
And like I said I’d still have to stick it back together.
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.
Hope this helps.
CurveIntersectionTrim.dyn (38.0 KB)
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.
Here’s the virtual star I promised
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.
Not quite with you Robert. I’m wanting to delete a segment of the line not the whole line.
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.