consolidate duplicate code for extruded and non-extruded extents