Message 1 of 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi,
I'm trying tell the difference between Edge 1 and Edge 2 on the screenshot.
My first idea was to measure the angle between them and see which was larger. But the api returns 90 degrees / 1.57 radians between both A and B and B and C. Was hoping for 270 degrees in the case of Edge 1.
Any other way?
My code:
def get_angle_between_faces(app, ui):
import math
face1 = ui.selectEntity('Select face 1', 'PlanarFaces').entity
face2 = ui.selectEntity('Select face 2', 'PlanarFaces').entity
angle = math.degrees(app.measureManager.measureAngle(face1, face2).value)
# [Fusion 360 Help | Measure Sample | Autodesk](https://help.autodesk.com/view/fusion360/ENU/?guid=GUID-4b13c86c-7aa0-4555-b3e3-02f7d1b01d10)
print(f'Angle between the two faces: {angle}')
# [Fusion 360 Help | SurfaceEvaluator.getNormalAtPoint Method | Autodesk](https://help.autodesk.com/view/fusion360/ENU/?guid=GUID-602c29fe-5b96-4ce8-8c8b-4765ede9f7fb)
faceEval1 = face1.evaluator
(success, normal1) = faceEval1.getNormalAtPoint(face1.pointOnFace)
faceEval2 = face2.evaluator
(success, normal2) = faceEval2.getNormalAtPoint(face2.pointOnFace)
angle_between_normals = normal1.angleTo(normal2)
print(f'{angle_between_normals=}')
What are the correct terms for inwards and outwards corners btw?
Thanks!
Solved! Go to Solution.