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.

Need help to get the metadata of the edges where fillet is applied (Onshape API and Featurescript)

mohammad_sadil_khanmohammad_sadil_khan Member Posts: 8 EDU
edited June 11 in FeatureScript
Dear Onshape Community,

I am currently exploring the Onshape API and FeatureScript and have encountered a challenge that I need your help for.

https://cad.onshape.com/documents/434d4a21b8a6c0778e403fa4/w/08494f0fabeef3bd3f45494c/e/3fb329dd4fa90642555fc853

In this project, a simple geometry has been modeled where a rectangle is extruded, resulting in a solid with 12 edges and 6 faces. Subsequently, a fillet operation is applied to all 12 edges of the extruded rectangle.

I am trying to retrieve the metadata for these original 12 edges, including details such as start points, midpoints, and endpoints. While using the Onshape API, I successfully identified the geometry IDs of these 12 edges. However, I encountered some unexpected behavior related to the identification of these edges post-fillet.

Using the qCreatedBy function, I observed the following:

Post-Fillet Query: After applying the fillet operation, querying with  qCreatedBy returned 24 edges. These edge IDs do not correspond to the initial 12 edges from the extrusion. It appears that each original edge is split into two by the fillet operation, resulting in the increased count.

Suppressed Fillet: When I manually suppress the fillet feature and reapply qCreatedBy (with the extrusion id) I retrieve the 12 initial edges as expected. This indicates that the query reflects the current state of the edges not the initial edges that have been created by the extrusion operation.

I would like to know if there is any way I can obtain the metadata for the original 12 edges directly, without the need to manually suppress the fillet operation. Is there a way to query this?

Any guidance or solutions would be highly appreciated. Thank you for your time and assistance.









Best Answers

  • NeilCookeNeilCooke Moderator, Onshape Employees Posts: 5,631
    Answer ✓
    After the fillet, the edges no longer exist....
    Senior Director, Technical Services, EMEAI
  • Caden_ArmstrongCaden_Armstrong Member Posts: 139 PRO
    Answer ✓
    You can do the evaluate featurescript endpoint with rollbackBarIndex provided, just specify a point in the feature tree where those edges still exist.
    www.smartbenchsoftware.com --- fs.place --- Renaissance
    Custom FeatureScript and Onshape Integrated Applications

Answers

  • NeilCookeNeilCooke Moderator, Onshape Employees Posts: 5,631
    Answer ✓
    After the fillet, the edges no longer exist....
    Senior Director, Technical Services, EMEAI
  • Caden_ArmstrongCaden_Armstrong Member Posts: 139 PRO
    Answer ✓
    You can do the evaluate featurescript endpoint with rollbackBarIndex provided, just specify a point in the feature tree where those edges still exist.
    www.smartbenchsoftware.com --- fs.place --- Renaissance
    Custom FeatureScript and Onshape Integrated Applications
  • mohammad_sadil_khanmohammad_sadil_khan Member Posts: 8 EDU
    edited June 12
    Hello,
    Thank you. I managed to use this and get the edge information.


Sign In or Register to comment.