I am currently into re-programming some old NX Open GRIP programms using NX Snap language.
Using GRIP, it was/is possible to compute the intersection of two curves (lines), even if they do not directly touch each other.
Is there a convienient way using NX SNAP to manage this? Or do i have to use NX Open functions? If so, which functions do i have to use?
Or do I even have to calculate the Intersections myself?
Solved! Go to Solution.
SNAP will allow you to find the intersection, even if the lines do not touch. FOr example:
Imports Snap, Snap.Create
Public Class MyProgram
Public Shared Sub Main()
Dim line1 As NX.Line = Line(0, 0, 0, 100, 0, 0)
Dim line2 As NX.Line = Line(150, -25, 0, 150, 25, 0)
Dim nearPoint As New Position(125, 0, 0)
' Get intersection point
Dim point As Position? = Compute.Intersect(line1, line2, nearPoint)
InfoWindow.WriteLine("Intersect Position : " & point.Value.ToString())
The output looks like this:
Intersect Position : ( 150 , 0 , 0 )
Thank you very much
I missinterpreted the "Near Point" functionality by thinking it "filters" multiple intersections to only show the intersection closest to the given point.
I did not notice it also allows these intersections