Use contain and avoid areas to control tool path
Limit the Z level of a toolpath using Z limits
Control the extents of a toolpath using the Automatic contain area
Control the XY and Z extens of a toolpath with Rest Machining settings