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.
Selecting edges on surface to extend
Jed_Yeiser
Member Posts: 42 PRO
Hey there,
I'm working on a FS and I'd like to extend certain edges of a surface. These are surfaces generated in the FS. I've found very little documentation on extendSurface and opExtendSheetBody. I am able to extend an ENTIRE surface after looking at the FS generated in a part studio (I pass the surface query into the "entities" field of extendSurface), but not edges of a surface.
While I could re-write the code of the FS to create the features slightly differently, the easiest solution to my 'problem' would be to query the edges of the surface body I'd like to extend (in this particular case - edges of the surface body which are not on the front plane) and pass that query to the extendSurface command (or opExtendSheetBody - if I can find sufficient documentation).
the FS generated by a part studio when I use the Move Boundary tool shows a query (a qCompressed?) that is passed to the extendSurface command, but deciphering what that query actually is has proven difficult.
How can I extend certain edges of a surface programmatically? I've checked the std documentation as well as geomOperations.fs and not found what I'm looking for - is there somewhere else I could find documentation on these features?
Thanks!
-j
I'm working on a FS and I'd like to extend certain edges of a surface. These are surfaces generated in the FS. I've found very little documentation on extendSurface and opExtendSheetBody. I am able to extend an ENTIRE surface after looking at the FS generated in a part studio (I pass the surface query into the "entities" field of extendSurface), but not edges of a surface.
While I could re-write the code of the FS to create the features slightly differently, the easiest solution to my 'problem' would be to query the edges of the surface body I'd like to extend (in this particular case - edges of the surface body which are not on the front plane) and pass that query to the extendSurface command (or opExtendSheetBody - if I can find sufficient documentation).
the FS generated by a part studio when I use the Move Boundary tool shows a query (a qCompressed?) that is passed to the extendSurface command, but deciphering what that query actually is has proven difficult.
How can I extend certain edges of a surface programmatically? I've checked the std documentation as well as geomOperations.fs and not found what I'm looking for - is there somewhere else I could find documentation on these features?
Thanks!
-j
0
Best Answers
-
Caden_Armstrong Member Posts: 206 PROHey Jed,
If you pass in just the desired edges of the sheet body to the "entities" parameter in opExtendSheetBody, it will extend only those edges.
Entities can be either the sheet body or the edges of a sheet body.
I'll send you a code sample for reference.www.smartbenchsoftware.com --- fs.place --- Renaissance
Custom FeatureScript and Onshape Integrated Applications0 -
Caden_Armstrong Member Posts: 206 PROthe function only works on an edge with only one adjacent face. Without looking at the model/query, my best guess is an issue with the query. Checking adjacent faces with qAdjacent and debug would be a good step, or printing out the evaluated query.www.smartbenchsoftware.com --- fs.place --- Renaissance
Custom FeatureScript and Onshape Integrated Applications0 -
Jacob_Corder Member Posts: 137 PROtake your face and insert it into the below query in bold and italics.
var edgesToExtend = qEdgeTopologyFilter(qAdjacent(face, AdjacencyType.EDGE, EntityType.EDGE), EdgeTopology.ONE_SIDED)
0
Answers
If you pass in just the desired edges of the sheet body to the "entities" parameter in opExtendSheetBody, it will extend only those edges.
Entities can be either the sheet body or the edges of a sheet body.
I'll send you a code sample for reference.
Custom FeatureScript and Onshape Integrated Applications
Custom FeatureScript and Onshape Integrated Applications
var edgesToExtend = qEdgeTopologyFilter(qAdjacent(face, AdjacencyType.EDGE, EntityType.EDGE), EdgeTopology.ONE_SIDED)