View Single Post
Old 13-05-2020, 12:19
VyperOne VyperOne is offline
Join Date: Feb 2003
Posts: 37

This is possible. I did something like that a while back, where you loop through a node range comparing one node to another and if it is within your tolerance it will join the two nodes thus closing the gap and eliminating a node.

Goes something like this:

 For Each nNode As CorelDRAW.Node In nr
            nLoopCount = 1
            If nNode.IsEnding = True Then

                For Each n_loop As CorelDRAW.Node In nr_loop
                    If n_loop.IsEnding = True Then

                        nodeDistance = nNode.GetDistanceFrom(n_loop)

                        If (nodeDistance <= dTolerance) And (nNode.AbsoluteIndex <> n_loop.AbsoluteIndex) Then


                            njoined += 1

                            Me.lbl_Removed.Text = "Number of Nodes Removed: " & njoined.ToString

                        End If
                    End If

                    nLoopCount = nLoopCount + 1

                Next n_loop
            End If
Reply With Quote