[ArchCurtainWall] Regression Curve Support

Fix https://github.com/FreeCAD/FreeCAD/issues/23945

"Arch_CurtainWall results in an error when trying to create it based on a sketch consisting of spline or arc."

This fixes the regression introduced in -
147e97d407 (diff-b4849bbc0941a0f60f25d13c40d4bfeca94171f55bd78a6196362343c3fdcf6fR287)
This commit is contained in:
Paul Lee
2025-09-19 08:17:28 +08:00
committed by Yorik van Havre
parent d666e8db11
commit 3569e77172

View File

@@ -287,7 +287,8 @@ class CurtainWall(ArchComponent.Component):
# Fix issue in 'Curtain wall vertical/horizontal mullion mix-up'
# https://github.com/FreeCAD/FreeCAD/issues/21845
#
face_plane = face.findPlane() # Curve face (surface) seems return no Plane
face_plane = face.findPlane()
if face_plane:
if -0.001 < face_plane.Axis[2] < 0.001: # i.e. face is vertical (normal pointing horizon)
faceVert = True
@@ -302,6 +303,9 @@ class CurtainWall(ArchComponent.Component):
horizsec = obj.HorizontalSections
else:
faceVert = False
else:
# Curve extruded face (surface) seems return no Plane - need more robust algorithm
faceVert = False
# Guess algorithm if face is not vertical
if not faceVert: