Hi Martin,
I had no time to really dive into the details, but my first suspicion was that the odd face had a ReversedOrientation. Maybe I’m wrong but FWIW:
This screenshot is after running the macro and next the script with the box selected.
More info:
How to “fix” the Reversed orientation is like so iirc
for face in brep.Faces:
if face.OrientationIsReversed:
brep.Faces.StandardizeFaceSurface(face.FaceIndex)
HTH
-Willem