I found a bug with parametricRange. When I debug a program, the first time I get a 2D bounding box through this method, it seems to be fine, but when I break the debug and start it again, there are some problems with the 2D wraparound box I get. This is reflected in the returned maxpoint, which may appear as maxpoint=minpoint, or maxpoint.y=minpoint.y. When I restart VScode and Fusion 360, it returns to normal.
for face in tem_body.faces:
face_id = face.tempId
face_type = face.geometry.objectType
face_normal = face.geometry.normal
face_reversed = face.isParamReversed
face_are = face.area
centroid_point = face.centroid
point_on_face = face.pointOnFace
uvgrid(face=face, method='point')
def uvgrid(face, num_u = 10, num_v = 10, method=None, reverse = True):
assert num_u >= 2
assert num_v >= 2
eval = face.evaluator
face_para_bounding = eval.parametricRange()
point_max = face_para_bounding.maxPoint
point_min = face_para_bounding.minPoint