But since both faces 1 and 3 have the same normal, selecting either 1 and 2 or 2 and 3 yields 120 degrees. How can I distinguish between these cases?
I would expect 2,3 to be 60 degrees and 1,2 to be 300 degrees.
Code: Select all
import math
f1 = FreeCADGui.Selection.getSelectionEx()[0].SubObjects[0]
f2 = FreeCADGui.Selection.getSelectionEx()[0].SubObjects[1]
v1 = f1.normalAt(0,0)
v2 = f2.normalAt(0,0)
print(math.degrees(v2.getAngle(v1)))