Support inverse orientation of wires
This commit is contained in:
@ -488,7 +488,7 @@ class AreaNthSelector(_NthSelector):
|
|||||||
- closed planar Wires - a temporary face is created to compute area
|
- closed planar Wires - a temporary face is created to compute area
|
||||||
|
|
||||||
Will ignore non-planar or non-closed wires.
|
Will ignore non-planar or non-closed wires.
|
||||||
|
|
||||||
Among other things can be used to select one of
|
Among other things can be used to select one of
|
||||||
the nested coplanar wires or faces.
|
the nested coplanar wires or faces.
|
||||||
|
|
||||||
@ -534,7 +534,7 @@ class AreaNthSelector(_NthSelector):
|
|||||||
return obj.Area()
|
return obj.Area()
|
||||||
elif isinstance(obj, Wire):
|
elif isinstance(obj, Wire):
|
||||||
try:
|
try:
|
||||||
return Face.makeFromWires(obj).Area()
|
return abs(Face.makeFromWires(obj).Area())
|
||||||
except Exception as ex:
|
except Exception as ex:
|
||||||
raise ValueError(
|
raise ValueError(
|
||||||
f"Can not compute area of the Wire: {ex}. AreaNthSelector supports only closed planar Wires."
|
f"Can not compute area of the Wire: {ex}. AreaNthSelector supports only closed planar Wires."
|
||||||
|
|||||||
Reference in New Issue
Block a user