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.
Querying specific line created by opExtrude
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
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
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.
Custom FeatureScript and Onshape Integrated Applications
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.