.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Why only 1 intersection point instead of 2?

1 REPLY 1
Reply
Message 1 of 2
tanerpro
342 Views, 1 Reply

Why only 1 intersection point instead of 2?

Hello,

In the attachment please find the drawing there is a little blue line and a red region in it. When I check with DIST command both the ends of the line are with distance 0.00000000 to the region. But when I apply intersectwith method to them I get only 1 intersection. This is a sample only, I face this issue regularly.

What can I do?

Thanks,

 

    Private Sub Button31_Click(sender As Object, e As EventArgs) Handles Button31.Click
        Dim R1 As AcadEntity = Nothing, R2 As AcadEntity = Nothing
        Ut.GetEntity(R1, "seç")
        Ut.GetEntity(R2, "seç")
        Dim inters As Object = R1.IntersectWith(R2, AcExtendOption.acExtendNone)
    End Sub


or




            Dim entMain As Autodesk.AutoCAD.DatabaseServices.Entity = tr.GetObject(id, Autodesk.AutoCAD.DatabaseServices.OpenMode.ForRead)

            'Setup 3d plane and point collection
            Dim myPlaneWCS As Plane = New Plane(New Point3d(0, 0, 0), New Vector3d(0, 0, 1))
            Dim myIntPntCol As Point3dCollection = New Point3dCollection()
            Dim myintptr01 As IntPtr = New IntPtr()
            Dim myintptr02 As IntPtr = New IntPtr()
            'Get intersecting point collection
            entMain.IntersectWith(ent, Intersect.OnBothOperands, myPlaneWCS, myIntPntCol, myintptr01, myintptr02)

 

1 REPLY 1
Message 2 of 2
fenton.webb
in reply to: tanerpro

What are you expecting exactly? Intersections at the start and end points, or an infinite number of intersections? The line lays totally ontop of the region outline...




Fenton Webb
AutoCAD Engineering
Autodesk

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost