Welcome to the Onshape forum! Ask questions and join in the discussions about everything Onshape.
First time visiting? Here are some places to start:- Looking for a certain topic? Check out the categories filter or use Search (upper right).
- Need support? Ask a question to our Community Support category.
- Please submit support tickets for bugs but you can request improvements in the Product Feedback category.
- Be respectful, on topic and if you see a problem, Flag it.
If you would like to contact our Community Manager personally, feel free to send a private message or an email.
Query for body created by opBoolean resolves to nothing.
Sacha_Fabien
Member Posts: 3 ✭
Hi,
I am trying to set the property of a part created by a opBoolean operation. The Boolean operation works well, but I can't find the body created afterward. The query resolves to nothing when passed into debug.
Here is a snippet of the code that I am trying to run:
I am trying to set the property of a part created by a opBoolean operation. The Boolean operation works well, but I can't find the body created afterward. The query resolves to nothing when passed into debug.
Here is a snippet of the code that I am trying to run:
var unitedBodyQueries = [qCreatedBy(id + "thickenEngravingFaces", EntityType.BODY), qCreatedBy(id + "thickenSeedFaceOffset", EntityType.BODY)];
var bodiesToBeMerged = qUnion(unitedBodyQueries);
opBoolean(context, id + "boolean1", {
"tools" : bodiesToBeMerged,
"operationType" : BooleanOperationType.UNION
});
debug(context, qCreatedBy(id + "boolean1", EntityType.BODY));
Here is the featurescript notice:
debug: Query resolves to nothing
I am running version 1174
Thank you!
Here is the featurescript notice:
debug: Query resolves to nothing
I am running version 1174
Thank you!
0
Best Answer
-
NeilCooke Moderator, Onshape Employees Posts: 5,714Hi @Sacha_Fabien - a boolean union will take the id of the first body in the list, so query for id + "thickenEngravingFaces"
Senior Director, Technical Services, EMEAI5
Answers