SetGeometryFilter Distinguish between curves and edges, and do not get face of poly surface

Hi;

    CRhinoGetObject go;
	go.SetCommandPrompt(L"Select curve or surface");
	go.SetGeometryFilter(CRhinoGetObject::surface_object |
		CRhinoGetObject::CRhinoGetObject::curve_object);
	go.EnableGroupSelect(true);
	CRhinoGet::result res = go.GetObjects(1, 0);
	if (go.CommandResult() != CRhinoCommand::success)
		return go.CommandResult();

My code is going to cause error, it’s going to pick edge or a surface of a polysurface, How can I solve these problems ?

Use the attribute filter and disable edge curves

https://developer.rhino3d.com/api/cpp/class_c_rhino_get_object.html#af197df25c14058e1f73a077f9983a2a8

https://developer.rhino3d.com/api/cpp/class_c_rhino_get_object.html#a2bdaa3986aa68178956dea9d2b6093e3

Hi@menno;
Thank you :grinning: