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

Using Featurescript...easiest way to add fillets to specific edges of an opRevolve

leti_ryderleti_ryder Member Posts: 7 EDU
Hi guys!

I am learning Featurescript, and using inputted data to make a bottle like shape. In the script I use opRevolve to make a new body. I want to add a fillet 2/3 edges on this body. How do I select them programmatically for the fillet command? 



Thanks!

Best Answer

  • Options
    MichaelPascoeMichaelPascoe Member Posts: 1,718 PRO
    edited November 2022 Answer ✓

    After the revolve, you can find the revolved entities like this: 
    var revolvedEdges = qCreatedBy(id + "revolve1", EntityType.EDGE);
    Then you could do something like this to remove the edge closest to the origin:
    var closestToOrigin = qClosestTo(revolvedEdges, WORLD_ORIGIN);
    var edgesToFillet = qSubtraction([revolvedEdges, closestToOrigin]);
    In the future, if you ever need to add queries together, you can use qUnion([query1, query2, etc... ]);


    Learn more about the Gospel of Christ  ( Here )

    CADSharp  -  We make custom features and integrated Onshape apps!   cadsharp.com/featurescripts 💎

Answers

  • Options
    MichaelPascoeMichaelPascoe Member Posts: 1,718 PRO
    edited November 2022 Answer ✓

    After the revolve, you can find the revolved entities like this: 
    var revolvedEdges = qCreatedBy(id + "revolve1", EntityType.EDGE);
    Then you could do something like this to remove the edge closest to the origin:
    var closestToOrigin = qClosestTo(revolvedEdges, WORLD_ORIGIN);
    var edgesToFillet = qSubtraction([revolvedEdges, closestToOrigin]);
    In the future, if you ever need to add queries together, you can use qUnion([query1, query2, etc... ]);


    Learn more about the Gospel of Christ  ( Here )

    CADSharp  -  We make custom features and integrated Onshape apps!   cadsharp.com/featurescripts 💎
  • Options
    leti_ryderleti_ryder Member Posts: 7 EDU
    This was exactly what I was looking for! Thank you!
Sign In or Register to comment.