How do I query an object after a boolean union?
monroe_weber_shirk
Member Posts: 103 EDU
I'm creating a feature that allows me to extend multiple walls up to a target height.
I see the advice to use startTracking and I've tried that, but no luck.
What am I missing?
Below is my code snippet and a link to the FeatureScript
- Select the top face of a wall element.
- opExtrude a calculated distance to create a new wall element.
- opBoolean union to join the two parts
- I need to select the part created with the opBoolean to modify its attributes.
I see the advice to use startTracking and I've tried that, but no luck.
What am I missing?
Below is my code snippet and a link to the FeatureScript
opExtrude(context, id + "extrude1", {
"entities" : entity,
"direction" : myMate.zAxis,
"endBound" : BoundingType.BLIND,
"endDepth" : extendedH,
});
const partsToBoolean = qUnion(qOriginalPart, qCreatedBy(id + "extrude1", EntityType.BODY));
var mergedPart = startTracking(context, partsToBoolean);
opBoolean(context, id + "boolean1", {
"tools" : partsToBoolean,
"operationType" : BooleanOperationType.UNION
});
debug(context, mergedPart, DebugColor.GREEN);
Tagged:
0
Best Answers
-
Have you tried makeRobustQuery() ?
Something like this perhaps:var partsToBoolean = qUnion(qOriginalPart, qCreatedBy(id + "extrude1", EntityType.BODY)); partsToBoolean = makeRobustQuery(context, partsToBoolean); opBoolean(context, id + "boolean1", { "tools" : partsToBoolean, "operationType" : BooleanOperationType.UNION }); debug(context, partsToBoolean, DebugColor.GREEN);
▚▞▚▞▚▞▚▞▚0 -
Here are the steps I take:- Select the code in FS and copy.
- Within the forum post, select the paragraph format "code".
- Paste the code into the code formatted area.
▚▞▚▞▚▞▚▞▚0
Answers
-
Have you tried makeRobustQuery() ?
Something like this perhaps:var partsToBoolean = qUnion(qOriginalPart, qCreatedBy(id + "extrude1", EntityType.BODY)); partsToBoolean = makeRobustQuery(context, partsToBoolean); opBoolean(context, id + "boolean1", { "tools" : partsToBoolean, "operationType" : BooleanOperationType.UNION }); debug(context, partsToBoolean, DebugColor.GREEN);
▚▞▚▞▚▞▚▞▚0 -
MichaelPascoe. This works like a charm. Quick question! How do you format your code in your forum response?1
-
Here are the steps I take:- Select the code in FS and copy.
- Within the forum post, select the paragraph format "code".
- Paste the code into the code formatted area.
▚▞▚▞▚▞▚▞▚0
