qFarthestAlong not behaving as expected

wickedDesigns
wickedDesigns 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

  • mahir
    mahir Member, Developers Posts: 1,324 ✭✭✭✭✭
    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.

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