Supress “Tolerance had to be doubled for boolean to work” warning

Hi,

it would help me a lot to know the answer to this old question. Is there a way to supress the “Tolerance had to be doubled for boolean to work” warning when performing boolean operations in a Rhino plugin? I’m using Rhino SDK.

Redirecting the warning to the command history or elsewhere will also be a good option. We need to ensure that the calculation continues without user intervention.

Thank you!

Assigned to Developer category

Hi @AncaG,

Can you provide me a simple code sample that demonstrates what you’re seeing?

Thanks,

– Dale

Hi Dale,

We need to supress the “Tolerance had to be doubled for boolean to work” warning when executing this code:

    CRhinoDoc *pdoc= ::RhinoApp().ActiveDoc();
CUtilityFunc::deleteAllDocObjects (*pdoc); //own function

CRhinoObjectAttributes attr;
attr.Default();

CRhinoObject *object1= pdoc->AddBrepObject (**(InBrep0), &attr);
ON_wString uuid_str1;
ON_UuidToString ( object1->Attributes().m_uuid, uuid_str1 );

const CRhinoObject *object2= pdoc->AddBrepObject(**(InBrep1), &attr);
ON_wString uuid_str2;
ON_UuidToString ( object2->Attributes().m_uuid, uuid_str2 );

ON_wString cmd= "_SelID ";
cmd+= uuid_str1;
cmd+= "_Enter _BooleanDifference _SelID ";
cmd+= uuid_str2;
cmd+= " _Enter";
BOOL opOK= ::RhinoApp().RunMenuScript ((const wchar_t *)cmd.Array());

Thank you for your help!

Hi @AncaG,

If you don’t want to see the message, then don’t script the BooleanDifference command.

Rather, just perform the Boolean operation yourself.

cmdSampleBooleanDifference.cpp

– Dale

Hi Dale,

We have used this method before, but the success rate is lower than when we use the script. I don’t know what else is being done in the background when the script is running. We have to automate everything, i.e. everything has to be calculated without user intervention, just like it happens when the script is executed.

I read the answers from Boolesche Operationen - Häufig gestellte Fragen [McNeel Wiki]. However, manual editing is not an option in our case.

Are there any operations we could implement before calling RhinoBooleanDifference so that the operation has better success?

Anca

Do you have samples where the command works and the API does not?

– Dale

Hi Dale,

At the moment I don’t have such an example, as we abandoned RhinoBolleanDifference for many years and switched to the script. I’ll change this back for debugging purposes and send the example as soon as I’ll find one.

Many thanks for your support!

1 Like