[surface model] Fix exiting boolean frames
In this MR, a change in the exiting of frames is introduced.
For exiting a framed surface, all the parent frames need to be checked whether they are boolean or not. If they are boolean, a thorough check must be performed if the ray is still in the boolean or not because the exited framed surface might be a child of the outer boolean surface but the frames are not overlapping.
The bottom box surface that is hit and the top box surface are both children of the top boolean surface, which has as a fDefaultState
the top volume. Thus, before this MR the state when exiting the bottom box surface was set to the fDefaultState
as top volume but in fact the ray is still within the boolean. Therefore, it must be checked whether the parent frame of the boolean is actually exited and then the exit state must be set either to the boolean (in case the boolean top frame is not exited) or to the top volume (in case the boolean top frame is exited).