Skip to content

Commit 81cc34d

Browse files
Support inverse orientation of wires
1 parent 25fa220 commit 81cc34d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cadquery/selectors.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -488,7 +488,7 @@ class AreaNthSelector(_NthSelector):
488488
- closed planar Wires - a temporary face is created to compute area
489489
490490
Will ignore non-planar or non-closed wires.
491-
491+
492492
Among other things can be used to select one of
493493
the nested coplanar wires or faces.
494494
@@ -534,7 +534,7 @@ def key(self, obj: Shape) -> float:
534534
return obj.Area()
535535
elif isinstance(obj, Wire):
536536
try:
537-
return Face.makeFromWires(obj).Area()
537+
return abs(Face.makeFromWires(obj).Area())
538538
except Exception as ex:
539539
raise ValueError(
540540
f"Can not compute area of the Wire: {ex}. AreaNthSelector supports only closed planar Wires."

0 commit comments

Comments
 (0)