IntersectWith Method

IntelliCAD 11.1 Object Library
IntersectWith Method
See Also 
IntersectingObject

The entity to be intersected.

Option

  

Dimension Object : IntersectWith Method

Description

Returns the intersection points between given objects.

Syntax

Visual Basic
Public Function IntersectWith( _
   ByVal IntersectingObject As Object, _
   ByVal Option As IntersectOptions _
) As Points

Parameters

IntersectingObject

The entity to be intersected.

Option
ValueDescription
vicExtendBoth3 = Extends both entities if necessary.
vicExtendNone

0 = Does not extend either entity.

vicExtendOtherEntity2 = Extends the second entity.
vicExtendThisEntity1 = Extends the first entity.

  

Example

Private Sub IntersectWith_Example()
' This example creates two lines and finds the points at

     ' which they intersect.

     ' Create the lines

      Dim myLine1 As IntelliCAD.Line

      Dim myLine2 As IntelliCAD.Line

     Set myDoc = Application.ActiveDocument

     Set myLine1 = myDoc.ModelSpace.AddLine(Library.CreatePoint(4, 4), Library.CreatePoint(7, 1))

     myLine1.Update

 

     Set myDoc = Application.ActiveDocument

     Set myLine2 = myDoc.ModelSpace.AddLine(Library.CreatePoint(5, 2), Library.CreatePoint(8, 4))

     myLine2.Update

 

     ' Find the intersection point.

     Dim intPoints As points

     Set intPoints = myLine1.IntersectWith(myLine2, vicExtendNone)

     MsgBox "Intersection point: " & Chr(13) & Chr(13) & "x = " & intPoints.Item(0).x & Chr(13) & "y = " & intPoints.Item(0).y & Chr(13) & "z = " & intPoints.Item(0).z

End Sub

See Also

© 2022 IntelliCAD Technology Consortium. All Rights Reserved.