There are a handful of ways to accomplish the goal. I think this will be the quickest path to success…
Assuming your .STL is good:
• In FreeCAD, load the ‘Part’ workbench
• Open the .STL
• Select the .STL
• Part>Create_Shape_From_Mesh
• Select the Meshed item (best to Hide all other items)
• Export>(select DXF as the type to export)
• In Kicad, Import_Graphics [load the DXF]
• Now do your work/traces/parts…etc
Note(s):
1)You can select lines and delete them to make a cleaner work area
2)You can Modify the Meshed part in FreeCAD(adding features and cutting holes…)
Example:
All of my boxes are a bit complex so, to simplify this example, I created a box with some mount-bosses and a hole
[ADDED INFO]
Won’t go into details but, will add the following options:
In FreeCAD, load the enclosure’s STL, Mesh it, Create Solid-From-Mesh. Then, create a faux PCB and add lines as needed to guide your PCB/parts placements (in Kicad).
Or,
In FreeCAD, load the enclosure’s STL, Mesh it, Create Solid-From-Mesh.
Then, Export it as STEP (with colors. Either from PartDesign, Part or Step-Up). But, Step-Up can export it as a Footprint, so, that will save you from making a Footprint in Kicad).
Now, load the Footprint in Kicad and design the PCB/shape with needed parts…
Last Example, below (PCB designed in PCBnew using the Enclosure’s Footprint and my guide…
Using The Enclosure’s FootPrint As A Guide