Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5

curves processed out of order in curve follow project

#1
I am writing a python script to take scan data and create a path from the data. However importing them into a curve follow project, they are being ran out of order optimized based on distance rather than sequence. 

Code:
points_object = None

for line in pathList:
   RDK.AddCurve(line,points_object, True)

This is adding the curves sequentially from a list. However if the lines are spaced too close together, or too far apart, the curves are processed out of order (i.e. 0,2,1,4,5,7,6). I've turned off all approach/retracts. Lumping them all into a single RDK.AddCurve() does not work as I need to keep them separated out so I can start/stop the tool at the beginning and end of each line.

   

Is there a way to override this behavior?
#2
   

This is an example of a simple number of paths. Line 1 is above Line 0, but the curve follow project decides to cut across to L2, L3, and then back to L1.
#3
Can you provide us with a working example? RoboDK may try to arrange the order of the curves so the path is as continuous as possible.

Alternatively, would you consider merging each separate curve as one curve?
Or each small curve as a separate curve follow project?
#4
I have uploaded the test file. I am just using a pickle dump (test.dill) as the external library has some dependencies that you would have to build on your machine to get it working. You will have to install the dill package as pickle didn't work with collections.

Code:
pip3 install dill

Thanks!


Attached Files
.py   repair.py (Size: 15.34 KB / Downloads: 458)
.rdk   robodk_help_toolframe.rdk (Size: 1.29 MB / Downloads: 670)
.zip   test.zip (Size: 3.94 KB / Downloads: 479)
  




Users browsing this thread:
1 Guest(s)