Rhino.Geometry.BrepFace.ClosestPoint()

Hi all,

Does anyone any info on the rhino common command below, I cannot find it in the documentation or any example of it .

I assume if it works it would constrain the closest point to the face and not use the brep edge unlike Brep.ClosestPoint or am I being stupid.

Rhino.Geometry.BrepFace.ClosestPoint()

https://developer.rhino3d.com/api/rhinocommon/rhino.geometry.surface/closestpoint

BrepFace does not implement a ClosestPoint override. Thus, when you call ClosestPoint on a Brep face, you’re actually calling ClosestPoint on the Brep face’s underlying (untrimmed) surface.

Keep in mind that BrepFace inherits from Surface.

So no, BrepFace.ClosestPoint does not deal with Brep edges.

Note, if you want to know if the results BrepFace.ClosestPoint fall in the active region of the face, use BrepFace.IsPointOnFace.

– Dale