We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 30323d0 commit 56cf4c5Copy full SHA for 56cf4c5
anastruct/preprocess/truss.py
@@ -1068,7 +1068,9 @@ def __init__(
1068
ceiling_x = width / 2 - (peak_height - ceiling_y) / np.tan(roof_pitch)
1069
1070
# Validate geometry: ceiling must be at or above the wall intersection
1071
- if ceiling_y < wall_y or ceiling_x < wall_x:
+ # Use tolerance for floating point comparison
1072
+ tolerance = 1e-6
1073
+ if ceiling_y < wall_y - tolerance or ceiling_x < wall_x - tolerance:
1074
raise ValueError(
1075
f"Attic height ({ceiling_y:.2f}) is too low. "
1076
f"Minimum attic height for this configuration is {wall_y:.2f}. "
0 commit comments