Limit max printable radius on delta near the endstops

When the delta mechanism is near the endstops, the max printable radius (M665 B parameter ) is lower and the printable area describes a cone until the delta mechanism don' t hit the endstops. If I try to move the head outside that cone one of the carriages will hit the endstop and crash.

Can you add to the firmware a safey to make the calculations that describe that cone and limit the head movement to be inside that cone?