IntersectWith Method

Can anyone help me to get a working "intersectWith" Method in C#

I create a Line and a Polyline and now i want the intersection points of these two elements.

I don't know which values i have to pass.

I have tried something like this

Polyline _poly=new Polyline(); Line _line=new Line(); Point3dCollection _pnt=new Point3dCollection();

....

_line.IntersectWith(_poly, Intersect.ExtendThis, _pnt, ????) - isn't there an option for Intersect.ExtendNone?

Comments

  • Hi!

    Use something like this (VB.NET) :

    Dim points As New Point3dCollection
     - points is empty and will populate if find intersection
                 
    _line.IntersectWith(_poly, Intersect.OnBothOperands, points, IntPtr.Zero, IntPtr.Zero)

     - if points collection is empty then line and polyline doesn't intersect 



  • Thanks

    You helped me a lot!

This discussion has been closed.