Can I make my feature error out if the tools and targets do not intersect for a boolean subtract?
RhettRobinson
Member Posts: 250 ✭✭✭✭
I basically want this message to be generated as well as my feature to error out if the boolean subtract does not create a change in geometry.
Here is what I have so far, but I am not sure if this is the right way to go about it. The standard boolean feature will show this error message but still complete (no red in the tree), but I'm wondering if I could make that happen too. Otherwise the message will suffice.
Tagged:
0
Best Answer
-
You could just check if any geometry has been created by the operation.
if(isQueryEmpty(context, qCreatedBy(id + "boolean1"))) { reportFeatureWarning(context, id, "NON-INTERSECT"); }www.smartbenchsoftware.com --- Renaissance --- Kestrel -- SmartLink
Experts in Onshape Automation - Custom Features and Integrated Applications2
Answers
-
You could just check if any geometry has been created by the operation.
if(isQueryEmpty(context, qCreatedBy(id + "boolean1"))) { reportFeatureWarning(context, id, "NON-INTERSECT"); }www.smartbenchsoftware.com --- Renaissance --- Kestrel -- SmartLink
Experts in Onshape Automation - Custom Features and Integrated Applications2 -
Wow, that is even easier. Thanks!
0


