opExtrude failing with a query from opMergeContexts
julien_christin
Member Posts: 2 ✭
Hi,
I have a feature script ("Wren") that import a part studio ("Fin module") and try to extrude it but opExtrude throws an exception with the query form opMergeContexts.
The script and the part are here:
https://cad.onshape.com/documents/03f4ac3d6bb09fa192294621/w/695b19824c4731f7a79d0f9e/e/753184455e13c8c9c1412d4a
I have a feature script ("Wren") that import a part studio ("Fin module") and try to extrude it but opExtrude throws an exception with the query form opMergeContexts.
The script and the part are here:
https://cad.onshape.com/documents/03f4ac3d6bb09fa192294621/w/695b19824c4731f7a79d0f9e/e/753184455e13c8c9c1412d4a
Tagged:
0
Best Answer
-
Sorry, this fell through the cracks (for best results, use the FeatureScript category for things like this). The problem is that when you bring in a part studio, you're also bringing in construction planes, which are faces -- and extruding them fails. To solve you can either delete them with opDeleteBodies or filter them out in the opExtrude query using qConstructionFilter(qCreatedBy(id + "addThing", EntityType.FACE), ConstructionObject.NO)Ilya Baran \ VP, Architecture and FeatureScript \ Onshape Inc5
Answers
-
Sorry, this fell through the cracks (for best results, use the FeatureScript category for things like this). The problem is that when you bring in a part studio, you're also bringing in construction planes, which are faces -- and extruding them fails. To solve you can either delete them with opDeleteBodies or filter them out in the opExtrude query using qConstructionFilter(qCreatedBy(id + "addThing", EntityType.FACE), ConstructionObject.NO)Ilya Baran \ VP, Architecture and FeatureScript \ Onshape Inc5
-
Works like a charm. Thank you.0

