indEdge will be the same for the 2 options, so what’s the index/info that tells me the difference? I need the face index I’m referring to through the arrows.
It turns out, there a number of ways to setup a CRhinoGetObject object to pick surface edges. Your code is one way.
An ON_BrepEdge is connector for joining ON_BrepTrim objects and representing a 3-D location of the seam they form. An edge can connect one or more trims. In the case of a simple “joined edge” there will be 2 trims, one from each adjacent face.
For example:
CRhinoGetObject go;
go.SetCommandPrompt(L"Select edges");
go.SetGeometryFilter(CRhinoGetObject::edge_object);
go.GetObjects(1, 0);
if (go.CommandResult() == CRhinoCommand::success)
{
for (int i = 0; i < go.ObjectCount(); i++)
{
const CRhinoObjRef& obj_ref = go.Object(i);
const ON_BrepEdge* edge = obj_ref.Edge();
const ON_BrepTrim* trim = obj_ref.Trim();
if (nullptr != edge && nullptr != trim)
{
const ON_BrepFace* face = trim->Face();
if (nullptr != face)
{
RhinoApp().Print(L"Edge = %d, Trim = %d, Face = %d\n",
edge->m_edge_index,
trim->m_trim_index,
face->m_face_index
);
}
}
}
}