I have an object and it should cut a curved line at two points. In the image below, I want the line to reach the object and invisible inside the object and then continue after the object. How can I do so?
One good idea is to sink the curve behind the other shape, simply drag it downwards in the objects panel. It's tried in top right:
That probably was like a bad joke, if you are not going to cover your curve, you only want a gap with certain size and placement,
In the bottom it's made with Object > Mask. The mask has a hole. It's created by subtracting the green shape from the orange one.
Of course you can also remove a part of your curve. Select the curve, insert with the node tool new nodes to the crossing points with your measuring shape:
Be sure you have snap at crossings ON, insert the new nodes by double clicking with the node tool. Then select those new nodes, be sure that no other nodes are selected and click in the node tool option bar "Delete segment"
You got 2 separate curves. Their ends are formed like normal stroke ends, defined by the stroke style settings. They do not obey the form of the green shape. If that's needed, you can convert the curve to a filled path with Path > Stroke to Path and subtract the unmask shape. It's like having a mask with hole, but destructive and the curve isn't any more a simple stroke, you get 2 curve-like filled paths.