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.

Fastest way to tell if a line touches any of a set of faces?

EvanReeseEvanReese Member, Mentor Posts: 2,135 ✭✭✭✭✭
I have a whole bunch of curves, and I want to tell if they touch any selected target faces. I first thought of evCollisions(), but I'm not sure it works with faces and curves (does it?). This is making me lean toward evDistance() and seeing if the distance is zero, which should work, but can anyone recommend something that will perform better? I'm looking for a high-performance solution since this operation could happen hundreds of times.
Evan Reese

Answers

  • MichaelPascoeMichaelPascoe Member Posts: 1,988 PRO

    I know evCollisions() works with curves and curves so I assume it will work with curves and faces. Not sure how high performance this will be.


    Learn more about the Gospel of Christ  ( Here )

    CADSharp  -  We make custom features and integrated Onshape apps!   Learn How to FeatureScript Here 🔴
  • GregBrownGregBrown Member, Onshape Employees, csevp Posts: 197
    I've actually been doing something with curves and faces and also mate connectors and faces - it's working well. In one test case I checked 300 curves against a spline surface... this evaluates all collisions in 30ms. 
  • EvanReeseEvanReese Member, Mentor Posts: 2,135 ✭✭✭✭✭
    ok cool I'll spend more time chasing that one down then. I've not used evCollisions() yet, so I need to learn it.
    Evan Reese
  • christopher_dziubachristopher_dziuba Member Posts: 57 ✭✭
    evCollisions is a big part of a lot of the tools I want to make but it seems to me like it only evaluates faces when given solid bodies. How have you been finding it?
  • EvanReeseEvanReese Member, Mentor Posts: 2,135 ✭✭✭✭✭
    @christopher_dziuba
    I ended up sticking with evDistance() for it, but it's been long enough that I don't remember if I first tried evCollissions() and it was slower, or I just felt it was good enough as-is.
    Evan Reese
  • christopher_dziubachristopher_dziuba Member Posts: 57 ✭✭
    @Evan_Reese
    That's fair. I'm noticing that the featurescript has a bit of a gaping whole with this limitation in being able to evaluate interaction between entities. That being said there's enough there for us to be able to make work-around's for now so I'm working with it.
Sign In or Register to comment.