Welcome to the Onshape forum! Ask questions and join in the discussions about everything Onshape.

First time visiting? Here are some places to start:
  1. Looking for a certain topic? Check out the categories filter or use Search (upper right).
  2. Need support? Ask a question to our Community Support category.
  3. Please submit support tickets for bugs but you can request improvements in the Product Feedback category.
  4. 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.

Options

Selecting edges on surface to extend

Jed_YeiserJed_Yeiser Member Posts: 11
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

Best Answers

  • Options
    Caden_Armstrong_Caden_Armstrong_ Member Posts: 20 PRO
    edited March 9 Answer ✓
    Hey 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
    Custom FeatureScript and Onshape Integrated Applications
  • Options
    Caden_Armstrong_Caden_Armstrong_ Member Posts: 20 PRO
    Answer ✓
    the 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
    Custom FeatureScript and Onshape Integrated Applications
  • Options
    Jacob_CorderJacob_Corder Member Posts: 126 PRO
    Answer ✓
    take 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)

Answers

  • Options
    Caden_Armstrong_Caden_Armstrong_ Member Posts: 20 PRO
    edited March 9 Answer ✓
    Hey 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
    Custom FeatureScript and Onshape Integrated Applications
  • Options
    Jed_YeiserJed_Yeiser Member Posts: 11
    Thanks, Caden! I tried passing the edges themselves and got a 'non laminar' error - I must have made a mistake somewhere else in the call. Is there somewhere I could find documentation on opExtendSheet body? The closest I've come is in geomOperations.fs. Cheers!
  • Options
    Caden_Armstrong_Caden_Armstrong_ Member Posts: 20 PRO
    Answer ✓
    the 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
    Custom FeatureScript and Onshape Integrated Applications
  • Options
    Jacob_CorderJacob_Corder Member Posts: 126 PRO
    Answer ✓
    take 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)
Sign In or Register to comment.