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.
opBoolean subtraction parameters
Hi,
I have the following inputs:
annotation { "Name" : "Start Former", "Filter" : EntityType.BODY, "MaxNumberOfPicks" : 1 }
definition.startFormer is Query;
annotation { "Name" : "End Former", "Filter" : EntityType.BODY, "MaxNumberOfPicks" : 1 } definition.endFormer is Query;
I set local consts for those queries:
const startFormer = definition.startFormer;
const endFormer = definition.endFormer;
I create sketches on faces of the above parts.
I then create a loft between the sketch elements created on those faces.
opLoft(context, id + "loft1", {
"profileSubqueries" : [ qSketchRegion(id + "sketchStartFormer"), qSketchRegion(id + "sketchEndFormer") ],
});
I then want to cut the lofted part into the startFormer and endFormer parts.
I'm having problems with the cut, I've been trying variations of:
opBoolean(context, id + "boolean1", {
"tools" : qCreatedBy(id + "loft1"),
"operationType" : BooleanOperationType.SUBTRACTION,
"targets" : qUnion(startFormer, endFormer),
"keepTools" : true
});
but I can't get past invalid input errors.
Any help appreciated.
Thank you.
Best Answer
-
Caden_Armstrong Member Posts: 169 PRO
specify entity type in qCreatedBy(id+"loft1", EntityType.BODY)
qCreatedby will give you everything. Faces, edges, verticles, etc.
But opBoolean will only take in bodies.www.smartbenchsoftware.com --- fs.place --- Renaissance
Custom FeatureScript and Onshape Integrated Applications0
Answers
specify entity type in qCreatedBy(id+"loft1", EntityType.BODY)
qCreatedby will give you everything. Faces, edges, verticles, etc.
But opBoolean will only take in bodies.
Custom FeatureScript and Onshape Integrated Applications
thank you