But I can’t figured out when I work on a trimmed surface that is not a Brep, for instant a sphere that is trimmed by a plane (see figure). Is there any thing like a IsPointOnSurface(u,v) for trimmed surfaces that are not Brep ?
I tried to get a Brep from my trimmed surface using srf.ToBrep() but the trim is lost in the process.
one solution: just do an additional “closestpoint” test and measure distance between this point and your point on surface. If its greater than tolerance, its obviously not on your visible surface.
PointOnSurface is the fundamental algorithm of Nurbs and works for any u and v, even outside of the domain. Its nothing more as a parametric equation.
Ok, I’ll do that. But anyway, could you explain why when I plug my Srf parameter in my Brep parameter (on the GH Caneva) I get a correct conversion … while in the C# component the srf.ToBrep() will ignore the surface trim ?
Technically, a GH_Surface wraps the functionality of a BrepFace. From the BrepFace you can get the owning Brep. So I think your description is accurate.