RhinoCommon equivalent of IsParameterOnSurface?


Looking for the above, thanks! … Oh, I’m starting out with a Surface object.

(Dale Fugier) #2

Hi Jim,

If you have a Rhino.Geometry.Surface object, you can get the surface’s domain using Rhino.Geometry.Surface.Domain. Once you have the domain, you can verify that the uv parameter falls within the bounds of the domain.

Is this what you want?


Hi Dale,

Basically what I want to do (converting something I did in VBScript,) is randomly pick coordinates on a surface and verify that those points are in the untrimmed region.

(Dale Fugier) #4

To determine whether or not a point falls on (or off) the active region of a trimmed surface, you are going to need a Rhino.Geometry.BrepFace object, not a Rhino.Geometry.Surface object.

A Rhino.Geometry.BrepFace does reference a Rhino.Geometry.Surface object. But it also knows about trims and loops. Note, a Rhino.Geometry.Brep contains one or more Rhino.Geometry.BrepFace objects.

Once you have a Rhino.Geometry.BrepFace, then you can use Rhino.Geometry.BrepFace.IsPointOnFace to determine if a point is on the active region.


Thanks, just had to figure out how to actually get a Brep, which I did by changing my selection stuff, but if I had a Surface object and wanted a reference to the Brep instead how would I do it? Do I use the function to “convert” the surface to a brep?

(Dale Fugier) #6

Hi Jim,

You cannot “convert” a surface to a Brep, although you can create as Brep from a surface.

But given a Brep, you can get it’s faces (BrepFace), and from a face, you can get its underlying surface.