create gaps between spline points with animation nodes Following this answer  curve intersection with volume in animation nodes, I've managed to create a spline which i use to distribute objects inside a volume.

Here is how:



But I still need to avoid having distributed objects along the spline when this one gets outside the volume along the gap
:

How can it be done? I've tried substracting those points (outside volume) from the ones that are generating the spline that is used to distribute the objects but as it now look obvious the spline will still be generated. So my second option is to do it inside the distribution objects loop but don't know how, any ideas?
 

EDIT

AS @Omar Ahmad proposes finding inside points is straight forward using BVHTREE but this way we cant control the distance between the volume faces and the points. 

EDIT 2

@Omar Ahmad solution does the job but putting the tool to some tricky situations give inconsistent results like this ones:




I'll be trying the other solution proposed, far more complex, which I'm already struggling to replicate.
This answer will be using the technique described in my answer here. After getting the parameters of the intersections, we prepend it with zero and append it with 1 representing the start and end of the spline respectively. The prepended list represents the starting parameters of the sub-splines between intersection points while the appended list represents the ending parameters. We can generate those sub-splines by trimming as follows:



We can then loop over the sub-splines, evaluate a point in the middle and see if it is inside the object or not, if yes, we append the spline:



And that is it, you now have the interior splines which you can evaluate to get what you want. For instance: