Goal: Print the normal of a given face at a given location in space.
Code:
face_id = 20 #Current selection in ExtAPI.SelectionManager.CurrentSelection point = (.01,.015,0.) #point in xyz space in the CAD unit system #get the face object face = DataModel.GeoData.GeoEntityById(face_id) #get the projected point on the geometry (a curvilinar abscissa for an edge, (u,v) for a face) u,v = face.ParamAtPoint(point) #print the normal at the point print(face.NormalAtParam(param))