Constrain "GetPoint()" to multiple meshes



In our new plug-in we use conduits to display simulation results using a
collection of dense surface meshes. We want users to be able to pick
points on the surface constrained to any of these meshes… like
GetPoint.Constrain() except with multiple meshes.

So I think we have to do the picking geometrically with mesh-line
intersections, except using Geometry.Intersect.Intersection.MeshLine() will not register an
intersection if the user picks precisely on a vertex. One solution
seems to be to perform multiple mesh-line intersection tests in the
neighborhood around the pick point, then use the nearest vertex if it is
within some epsilon of the nearest identified intersection point.

Does anyone have any other ideas to allow users to select points
constrained to be on the surface of a set of meshes?

(Menno Deij - van Rijswijk) #2

You could merge the meshes into one mesh and restrict to that, if memory allows. Dispose() the merged mesh after use to actively free its memory.

(Dale Fugier) #3

Hi Goldy,

GetPoint.Constrain will only constrain to a single mesh. So as @menno suggested, you could merge multiple meshes into a single, disjoint mesh and constrain to it. After picking a point on the merged mesh, you could run some simple tests (e.g. closest point, etc.) to determine the original mesh the picked point fell upon.

– Dale


Thanks. We will give it a try.