How to know whether a surface is trimmed?

How to know whether a surface is trimmed?

jelle's picture

some python code, self refers to a TopoDS_Face subclass

def on_trimmed(self, u, v):
'''tests whether the surface at the u,v parameter has been trimmed
'''
if self._classify_uv is None:
self._classify_uv = BRepTopAdaptor_FClass2d(self, 1e-9)
uv = gp_Pnt2d(u,v)
if self._classify_uv.Perform(uv) == TopAbs_IN:
return True
else:
return False