Step Export Broken for 4+ Layers

Description

PCBs with more or equal than 4 layers create a broken step file. It looks as if the core and prepreg have broken / inverted normals.

image (on the left is a 4 layer PCB, on the right is a 2 layer PCB)

image

Hiding the soldermask layer makes this issue even more visible.

The issue can be easily reproduced by creating a 2 and a 4 layer project, adding an edge cut and exporting step. Export jobset:

image

This was not in issue in KiCad 9.


Further example of a more complex setup (4 layer PCB, 2 layer PCB, 4 layer PCB):

image

KiCad Version

Application: KiCad x64 on x64

Version: 10.0.5, release build

Libraries:
	wxWidgets 3.3.2 
	FreeType 2.13.3
	HarfBuzz 12.3.0
	FontConfig 2.17.1
	libcurl/8.18.0 Schannel zlib/1.3.1

Platform: Windows 11 (build 22631), 64-bit edition, 64 bit, Little endian, wxMSW
OpenGL: NVIDIA Corporation, NVIDIA GeForce RTX 3060/PCIe/SSE2, 4.6.0 NVIDIA 591.86

Build Info:
	Date: Jul 21 2026 21:37:42
	wxWidgets: 3.3.2 (wchar_t,STL containers)
	Boost: 1.90.0
	OCC: 7.9.2
	Curl: 8.18.0
	ngspice: 46
	Compiler: Visual C++ 1944 without C++ ABI
	KICAD_IPC_API=ON
	KICAD_USE_PCH=OFF

Locale: 
	Lang: de_DE
	Enc: UTF-8
	Num: 1.234,5
	Encoded кΩ丈: D0BACEA9E4B888 (sys), D0BACEA9E4B888 (utf8)