diff --git a/scripts/pathdropcutter_test_2.py b/scripts/pathdropcutter_test_2.py index e0f4611c..b589a731 100644 --- a/scripts/pathdropcutter_test_2.py +++ b/scripts/pathdropcutter_test_2.py @@ -95,8 +95,9 @@ t_after = time.time() calctime = t_after-t_before print " done in ", calctime," s" - cl_filtered = f.getCLPoints() + print " after filter we have", len(cl_filtered),"cl-points" + aclp_lifted2=[] for p in cl_filtered: p2 = ocl.Point(p.x,p.y,p.z) + ocl.Point(0,0,1) diff --git a/scripts/tsp/tsp_01.py b/scripts/tsp/tsp_01.py index fb638050..e364716b 100644 --- a/scripts/tsp/tsp_01.py +++ b/scripts/tsp/tsp_01.py @@ -6,6 +6,19 @@ import math import gzip +# Travelling Salesman Problem +# a.k.a. drill-path optimization +# +# we have multiple points in the 2D plane to visit. +# the task is to optimize the distance travelled by the tool while +# visiting all points +# +# uses data from TSPLIB (not included in opencamlib) +# +# ocl.TSPSolver() is a wrapper for boost::metric_tsp_approx() +# https://www.boost.org/doc/libs/1_67_0/libs/graph/doc/metric_tsp_approx.html + + def drawPoints(myscreen, pts): c=camvtk.PointCloud( pts ) c.SetPoints()