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.
Overriding 'Expected Query' when running an imported feature within another
Jonathan_Hutchinson
Member Posts: 136 PRO
I've had a little dabble with importing and running a feature from a different document within another feature's body. What I'm experiencing though is that where the imported function expected queries for vertices etc, I would like to be able to pass in vertices which have, for instance, been calculated/determined in a way that isn't just related to clicked query parameters.
Does that make sense? The bind I'm seeing is that it appears I need to go backwards from a Vertex, to a query (which in this case isn't possible given it's not a vertex that belongs to an entity). My workaround at the moment is to instantiate the thing I calculate so it is an entity, a vertex in this case via opPoint, feed that into the query, and delete it afterwards. Just hunting to see if I'm missing a trick somewhere in the original defining function.
Does that make sense? The bind I'm seeing is that it appears I need to go backwards from a Vertex, to a query (which in this case isn't possible given it's not a vertex that belongs to an entity). My workaround at the moment is to instantiate the thing I calculate so it is an entity, a vertex in this case via opPoint, feed that into the query, and delete it afterwards. Just hunting to see if I'm missing a trick somewhere in the original defining function.
Tagged:
0
Comments
The Onsherpa | Reach peak Onshape productivity
www.theonsherpa.com
// Creates planes to use for making an enclosure opPlane(context, id + "leftPlane", { "plane" : leftFace }); opPlane(context, id + "rightPlane", { "plane" : evPlane(context, { "face" : definition.rightReturn }) }); opPlane(context, id + "bottomPlane", { "plane" : bottomFace }); opPlane(context, id + "topPlane", { "plane" : evPlane(context, { "face" : definition.topFloor }) }); opPlane(context, id + "backPlane", { "plane" : evPlane(context, { "face" : definition.backFace }) }); opPlane(context, id + "frontPlane", { "plane" : evPlane(context, { "face" : definition.frontFace }) }); var planes = qUnion([qCreatedBy(id + "leftPlane", EntityType.FACE), qCreatedBy(id + "rightPlane", EntityType.FACE), qCreatedBy(id + "bottomPlane", EntityType.FACE), qCreatedBy(id + "topPlane", EntityType.FACE), qCreatedBy(id + "backPlane", EntityType.FACE), qCreatedBy(id + "frontPlane", EntityType.FACE)]); opEnclose(context, id + "enclose", { "entities" : planes });chadstoltzfus@premiercb.com
The Onsherpa | Reach peak Onshape productivity
www.theonsherpa.com
chadstoltzfus@premiercb.com
The Onsherpa | Reach peak Onshape productivity
www.theonsherpa.com
The Onsherpa | Reach peak Onshape productivity
www.theonsherpa.com
The Onsherpa | Reach peak Onshape productivity
www.theonsherpa.com