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.

qFarthestAlong not behaving as expected

wickedDesignswickedDesigns Member Posts: 6
I am working on a FeatureScript which begins by finding the furthest parallel planar face which is part of the same body as a selected planar face.  To do this, I am finding the vector opposite the normal vector of the selected face and using this as the direction for qFarthestAlong; however, debugging this query seems to be showing me the closest plane, not the farthest.  Am I not understanding the expected behavior of qFarthestAlong, or am I doing something else wrong?

Additionally, though less important, does this seem like a reasonable method with which to find the plane I am looking for?  Reading answers to other questions, it sounds like I would be better off not explicitly evaluating queries in my FeatureScript.  Is there a way to find the planar face I am looking for using only queries?

Best Answer

Answers

  • mahirmahir Member, Developers Posts: 1,291 ✭✭✭✭✭
    I recreated what you're describing. You can get qFarthestAlong to work the way you want by NOT inverting the face normal vector, but I agree that this isn't how you would expect it to work. It seems to be querying faces in the direction opposite of the direction vector you feed it.

    As for finding a better way to do this, I'm sure there are other alternatives, but I don't see anything wrong with doing it this way. In my example evPlane takes all of 1ms to run. No reason to optimize that.

  • wickedDesignswickedDesigns Member Posts: 6
    Thanks Mahir.  I will use it that way for now.  Should I report this as a bug?
  • mahirmahir Member, Developers Posts: 1,291 ✭✭✭✭✭
    It wouldn't hurt. Though depending on how many features out there use that particular query, OS may choose not to "fix" it. 
  • wickedDesignswickedDesigns Member Posts: 6
    I'd love to get some feedback from the designers on whether this is working the intended way or not
  • mahirmahir Member, Developers Posts: 1,291 ✭✭✭✭✭
    @ilya_baran, what's your take on this?
Sign In or Register to comment.