Note added about new method overload EdgeSegmentWithinCuboid and note about handling case 3.