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.

Querying specific line created by opExtrude

jeff_day734jeff_day734 Member Posts: 9

New to FeatureScript and hoping someone can help me out!

I have extruded a part using OpExtrude, and I now need to fillet an edge. The trouble is that I can't figure out how to query the edge I need. While I know the original coordinates of the point, qContainsPoint doesn't do the trick—I believe due to floating point errors where the edge position is slightly different than the original point location. It's also tricky because the sketch coordinates are different than world coordinates.

The screenshot below shows my part and the edge that I need to query.

Is there a best practice for finding a specific edge?

Comments

  • Caden_ArmstrongCaden_Armstrong Member Posts: 195 PRO
    edited September 3

    There are a bunch of ways you can do it, I made two samples here:

    https://cad.onshape.com/documents/85be75441cf77861048e7f88/w/6f8e22e0be83a0803a9c10d6/e/d2ba80b4666075f4b8967f9c

    • You can use the selected point, and do qClosestTo while filtering out anything that would tie
    • You can make a test point and do qClosestTo (probably the better option)

      The first option is just a sample of how you can take a query and filter it down. The second option is a bit more concise since you can make a good guess at a point that should exclusively lie on that edge. The first option works if you have draft on the extrude.

    www.smartbenchsoftware.com --- fs.place --- Renaissance
    Custom FeatureScript and Onshape Integrated Applications
  • jeff_day734jeff_day734 Member Posts: 9

    Thank you, @Caden_Armstrong! qClosestTo did the trick! I suspected there might be a function like that, but I hadn't found it yet. I also needed to convert my point from the sketch plane to world coordinates, which I did using planeToWorld.

Sign In or Register to comment.