Hello,

I need to verify if two closed curves are one in the other but in the attached example it seems that the RhinoPlanarClosedCurveContainmentTest function returns a wrong result.

If I move the curves or enlarge/reduce the tolerance it works.

RhinoPlanarClosedCurveContainmentTest.3dm (39.5 KB)

My code is the following:

```
CRhinoCommand::result CCommandNest3::RunCommand( const CRhinoCommandContext& context )
{
CRhinoGetObject go;
go.SetCommandPrompt(L"Select curves");
go.SetGeometryFilter(CRhinoGetObject::curve_object);
go.GetObjects(2, 2);
if (go.CommandResult() != CRhinoCommand::success)
return go.CommandResult();
const ON_Curve* curve1 = go.Object(0).Curve();
if (nullptr == curve1)
return CRhinoCommand::failure;
const ON_Curve* curve2 = go.Object(1).Curve();
if (nullptr == curve2)
return CRhinoCommand::failure;
CRhinoView* view = go.View();
if (nullptr == view)
return CRhinoCommand::failure;
double tolerance = 1E-3;
const int res =
RhinoPlanarClosedCurveContainmentTest(
*curve1,
*curve2,
ON_xy_plane,
tolerance);
if (res == 3 || res == 2)
{
return CRhinoCommand::success;
}
else
{
return CRhinoCommand::failure;
}
}
```

Could you help me to check the problem?

my Rhino6 sdk version is 6.0.18012.13241

Rhino6 version is 6.19.19295.01001

Thanks you!