function for cross-section extraction of 3d-models