Clarifications on new IPC API

The intention is quite the opposite. If you’ve already got a mechanical enclosure, you can extract the PCB outline from it, export it, and import it in KiCad. You can do this with any mechanical CAD program that can export to one of the file formats KiCad can read (SVG & DXF), or a more direct approach with for example the KiCad-Stepup workbench in FreeCAD.

Drawing a complex outline in KiCad itself is quite cumbersome, and then doing it only with Python from within KiCad sounds like a horror story to me.