Selection filter CRhinoGetObject::curve_object finds also mesh edges

When I start a Curve selection with CRhinoGetObject::curve_object in Rhino 8 in a command and the Curve is on top of a mesh the selection finds also mesh edges. This is very annoying and was not the case in earlier versions. Example:

____

unsigned int geometry_type_filter = 0;
geometry_type_filter |= CRhinoGetObject::curve_object;

CRhinoGetObject getInputObject;
getInputObject.SetCommandPrompt(L"Select 2 to 4 Curves");
getInputObject.SetGeometryFilter(geometry_type_filter);

CRhinoGet::result myResult = getInputObject.GetObjects(2, 4);

____

How can I avoid it programmatically? I know, when I switch off the “Mesh” filter in the GUI the selection returns only a curve or surface edge, but I would like to configure it in my code prior the selection.

I tried also getInputObject.SetGeometryAttributeFilter() but did not know what input to use.

Hi @Peter_Salzman,

Maybe this?

CRhinoGetObject go;
go.SetCommandPrompt(L"Select curves");
go.SetGeometryFilter(CRhinoGetObject::curve_object);
go.EnableMeshSelections(false);
go.EnableSubDSelections(false);
go.GetObjects(1, 0);
if (go.CommandResult() != CRhinoCommand::success)
  return go.CommandResult();

– Dale

Great, it works! Many thanks!

I saw this calls were introduced in the R8 SDK, since I still support R7 in parallel… But I hope the R9 SDK will soon be available, then I plan to drop R7 support.