SolidEdge Part: IntersectionPoint

I am trying to iterate through points in the IntersectionPoint element but I did not find a method in IntersectionPoint to do it. Is it possible to get all points in the IntersectionPoint element?


Re: SolidEdge Part: IntersectionPoint

I did a simple test with an intersection of a line and a circle. The line was completely crossing the circle and I could get the intersection points by iterating through all edges of the IntersectionPoint feature and collecting the StartVertex and EndVertex properties. You may check for duplicates as I got the same intersection points for the linear edge and the circular edge!

Re: SolidEdge Part: IntersectionPoint

Thank you for the answer. I tried to iterate through edges and collect start/end vertices, but it returns all vertices includes start/end vertices of curve. For example we have curve and box, curve intersects box, but start and end vertices of the curve don't intersect the box. So we have curve which has three edges and four vertices (start, point1, point2, end) but I need only point1 and point2.

Re: SolidEdge Part: IntersectionPoint

[ Edited ]

If you have some information about what type of objects are intersecting, you might reduce your code to support only those cases.

For example:

* If you know that you have a BSplineCurve intersecting completely a body, you can iterate through the following Vertices collection and use all of them, except the last two points (which normally represent the start/end vertex of the original curve).

 => IntersectionPoint.Edges(igQueryAll).Item(1).Body.Vertices     (all vertices, except last two)


* If your curve is a circle or a closed curve and intersecting a body, then you will have to use all vertices of the same collection (there is no start/end vertex in a closed curve).

 => IntersectionPoint.Edges(igQueryAll).Item(1).Body.Vertices      (all vertices)