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.

Intersection between Edge and Plane

martin_laabsmartin_laabs Member Posts: 6

is there is a way to get the intersection between a plane and an edge? Intersection between line and plane can be realized with intersection(...) function but I need the intersection between a plane and an edge.
Converting the edge to a line (with evEdgeTangentLine) won't work either since the line has an infinite length but I have to know whether there is an intersection within the finite edge length.
Constructing a huge face on the plane and intersect with that would work sometimes - but it will fail for very small angles between plane/long edge since the face is finite in its dimension.

Thank you,


  • kevin_o_toole_1kevin_o_toole_1 Onshape Employees, Developers, HDM Posts: 493
    A good swiss army knife for intersections, bounds and sizes is evDistance. In your case, you'll want to put the line in side0 and the plane in side1 (or vice versa). You can then check that result.distance is approximately zero (i.e. less than ZERO_LENGTH), and if so, the intersection point will be in result.sides[0].point 

    Let us know if you need a more detailed explanation or have any further questions!

  • martin_laabsmartin_laabs Member Posts: 6

    thank you for your fast reply. Unfortunately evDistance does not work with planes. From the docs:

    side0: One of the following: A query, or a point (3D Length Vector), or a Line, or an array of points, or an array of Lines.

    I also tried to call evDistance with something like
    ... "side0": plane(vector(0,0,0) * meter, vector(1,0,0)) ...

    Of cause not with hardcoded vectors but some vectors calculated previously. But the documentation is right - this call fails. There is a workaround by creating a plane with opPlane, use that object in evDistance with the extendSide0/extendSide1 argument and delete the object afterwards. But this is ugly. Maybe someone could add a plane support in evDistance.

    Thank you,

  • mahirmahir Member, Developers Posts: 1,017 ✭✭✭✭
    edited January 2018
    How about intersection()? Looks like it only works with Line types, not edges, but if you can work with that, it may get you want you want.
  • martin_laabsmartin_laabs Member Posts: 6

    unfortunately intersection won't do the job. At least not without further processing to check whether the point is part of the edge or not. But I think I will continue with the workaround described above.

    Best regards,
Sign In or Register to comment.