Select points like in the command PointCloud


#1

Hi

we are trying to select points using CRhinoGetObject::GetObjects with a geometry filter for CRhinoGetObject::point_object. But with this code we cannot select “curve points” (which are shown with the command PointsOn)
How can we achieve a point selection like in the command PointCloud?


(Dale Fugier) #2

Hi Wolfgang,

To select an object’s grips, use the CRhinoGetObject::grip_object geometry filter:

CRhinoGetObject go;
go.SetGeometryFilter(CRhinoGetObject::grip_object);
...

The PointCloud command picks points like this:

CRhinoGetObject go;
go.SetCommandPrompt(L"Select points");
go.SetGeometryFilter(CRhinoGetObject::point_object | CRhinoGetObject::grip_object);
go.EnableSubObjectSelect(false);
go.EnableGroupSelect();
go.GetObjects(1, 0);

Does this help?

– Dale


#3

Wow, cool. I thought i would be much more complicated to do so. :grinning:

Thank you for your help!