Featurescript Boolean of Booleans not working
Hi!
I am having trouble with booleans in featurescript when using the result of a boolean as a tool for another boolean.
I have attached a simple example to explain my problem better. In this case, I generate 3 intersecting cylinders: I want to do a Boolean to combine the first two and then another Boolean to intersect the resulting part from the first Boolean operation with the third cylinder.
I know I could do everything in one step, but this is just to show the issue I am facing.
I traced the error back to the fact that if I do println(evaluateQuery(context, boolResult)), where boolResult is the result of the first Boolean operation, I get "[]" in the featurescript notice.
I tried everything I found on the internet but I wasn't able to solve this.
Can anyone help me with this, please?
Cheers,
Pierre
Best Answer
-
var boolResult = qCreatedBy(id + "cylinder1", EntityType.BODY);
The result of a boolean has the same id as the first body in the boolean operation.
Senior Director, Technical Services, EMEA1
Answers
-
var boolResult = qCreatedBy(id + "cylinder1", EntityType.BODY);
The result of a boolean has the same id as the first body in the boolean operation.
Senior Director, Technical Services, EMEA1 -
Thanks Neil,
I missed that piece of logic to understand what I was doing wrong.
Also, I think it is worth mentioning another similar discussion that I just found and that provides a good workaround (of which now I understand the logic): query bodies created by boolean? — Onshape
Cheers
1

