Query the target of an opBoolean subtract operation
martin_laabs
Member Posts: 6 ✭✭
Hi,
I have the following code in my FS:
I have the following code in my FS:
opBoolean(context, id + "booleanInset", {
"tools" : qCreatedBy(id + "extrudeInset", EntityType.BODY),
"targets" : mortiseBody,
"operationType" : BooleanOperationType.SUBTRACTION,
"targetsAndToolsNeedGrouping": true,
"keepTools" : false
});
Obviously the mortiseBody variable contains a query to the target. However - the query is not valid
after the subtraction as the edge used for that query does not exist anymore after the subtraction.
Unfortunately I need a query to the modified object for further processing.
Is there is a standard way to obtain a query to the modified part by the opBoolean operation? I could
try to build something around the tool object but matching faces and or vertices of that will introduce
some ambiguities as there are many parts with shared faces nearby.
Thank you,
Martin
Obviously the mortiseBody variable contains a query to the target. However - the query is not valid
after the subtraction as the edge used for that query does not exist anymore after the subtraction.
Unfortunately I need a query to the modified object for further processing.
Is there is a standard way to obtain a query to the modified part by the opBoolean operation? I could
try to build something around the tool object but matching faces and or vertices of that will introduce
some ambiguities as there are many parts with shared faces nearby.
Thank you,
Martin
0
Comments
-
Try using:qCreatedBy( id + "booleanInset", EntityType.BODY )This queries all bodies that were created by your opBoolean operation (which you gave the Id of 'id + "booleanInset"'. Keep in mind, if the subtraction yields more than one body, then so will this query.0
-
You can assign
mortiseBody = qUnion(evaluateQuery(context, mortiseBody));
Before the opBoolean call. That query should resolve to the target body after the operation as well
1 -
Thank you - this did the job.
0

