What’s the best way to cut a square shaped hole in the cap of a cylinder? The resulting mesh should be work well with the subdivision surface modifier.
I’ve tried several approaches, but not matter what I do, I end up messing up the geometry of the cap so that there are odd bumps and creases after subsurf is applied.
Extruded down, edge crease to 1 (shift+E, mouse drag and accept, or 3D view properties: mean crease), same edges marked as sharp (ctrl+E -> mark as sharp, or tool shelf)
Subdivision surface modifier added, autosmooth option on in object data properties. You can only do sharp edges with this method because creasing alone gives bad shading.
B - Bevel modifier:
Rectangle in the middle
inset outer
Edge bevel weight to 1 (ctrl+E -> edge bevel weight)
Bevel modifier: segments 2, profile 1, limit by weight. Subdivision surface modifier added. This gives rounded edges and shading is good, but bevel creates n-gons. It works because those n-gons get restricted on a flat surface and the edges have a continuous quad face loop around them.