From 7a98c0ed3e9e9cc7cf71476c506ea9670a98a3c3 Mon Sep 17 00:00:00 2001 From: Michael Ripperger Date: Thu, 10 Dec 2020 20:38:48 -0600 Subject: [PATCH] Fixed bug to ensure line specified by cut direction is always long enough to cross mesh --- tool_path_planner/src/surface_walk_raster_generator.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tool_path_planner/src/surface_walk_raster_generator.cpp b/tool_path_planner/src/surface_walk_raster_generator.cpp index b1001451..d0810df8 100644 --- a/tool_path_planner/src/surface_walk_raster_generator.cpp +++ b/tool_path_planner/src/surface_walk_raster_generator.cpp @@ -1242,7 +1242,7 @@ vtkSmartPointer SurfaceWalkRasterGenerator::createStartCurve() Eigen::Vector3d cut_dir(config_.cut_direction); if (!cut_dir.isApprox(Eigen::Vector3d::Zero())) { - max = cut_dir; + max = cut_dir.normalized() * max.norm(); } else {