This Blender Python script creates a “cutter” object from a 2D polygon that is extended along the Z-axis. It then applies a boolean modifier (using the INTERSECT operation with the EXACT solver) to ...
or the menu Mesh → Extrude → Extrude Pull Geometry. Note that a 'Boolean Modifier' is used and applied in the background. Unfortunatelly the current implementation doesn't work as expected, see the ...