Merging fillets with surfaces into one brep?

Hi everyone,
I’m trying to create brep model in the form of letter T. So, I used two tubes with orthogonal intersection and I’m using Rhino SDK function RhinoSimpleRollingBallFillet which returns fillet surfaces. I try many ways to merge those surfaces (tubes and fillets) to create one brep but no result. I want to achieve same effect like Fillet Surfaces Rhino function (from the interface, choosing this function and then Join surfaces).

Regards,
Filip

You might consider using RhinoJoinBreps(). see rhinoSdkUtilities.h for details.

RhinoJoinBreps() does not join intersection breps, more better solution would be using Boolean Union but this function also does not combine the breps. So, I had to do several operations to achieve the goal, including RhinoSplitBrepFace() end searching for the mated edges and then excluding some breps until finally you are able to use RhinoJoinBreps().
Thanks for the replay.

How did you find the mated edges? I am trying to obtain a similar result, could you share your achievements?

Hi Alberto,
This is the easiest way:

ON_SimpleArray<const ON_Curve*> matedEdges;
for (int i = 0; i < brep->m_E.Count(); i++)
{
ON_BrepEdge* edge = brep->Edge(i);
for (int j = 0; j < edge->TrimCount(); j++)
{
ON_BrepTrim* trim = edge->Trim(j);
ON_BrepTrim::TYPE tp = trim->m_type;
if (tp == ON_BrepTrim::mated || tp == ON_BrepTrim::seam)
{
matedEdges.Append(edge->EdgeCurveOf());
break;
}
}
}

in my case I had to include seam edges, but is not necessary…depends what you want to achieve.

Cool! Thanks a lot!