Skip to content

Commit

Permalink
fix: Don't use path finding for the outline
Browse files Browse the repository at this point in the history
This fixes a bug introduced in 20fc611 where we started doing path
finding on paths that the cutter makes.  We shouldn't do that.
  • Loading branch information
eyal0 committed Apr 8, 2021
1 parent 0971c44 commit e418f32
Show file tree
Hide file tree
Showing 22 changed files with 6,200 additions and 3,950 deletions.
2 changes: 1 addition & 1 deletion surface_vectorial.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1048,7 +1048,7 @@ vector<pair<coordinate_type_fp, multi_linestring_type_fp>> Surface_vectorial::ge
}
auto cutter = dynamic_pointer_cast<Cutter>(mill);
if (cutter) {
const auto path_finding_surface = path_finding::PathFindingSurface(boost::none, multi_polygon_type_fp(), cutter->tolerance);
const auto path_finding_surface = path_finding::PathFindingSurface(multi_polygon_type_fp(), multi_polygon_type_fp(), cutter->tolerance);
const auto trace_count = vectorial_surface->first.size();
vector<vector<pair<linestring_type_fp, bool>>> new_trace_toolpaths(trace_count);

Expand Down
98 changes: 55 additions & 43 deletions testing/gerbv_example/edge-cuts-inside-cuts/expected/outline.ngc
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,61 @@ G04 P1.00000 (Wait for spindle to get up to speed)
G04 P0 ( dwell for no time -- G64 should not smooth over this point )
G00 Z0.08000 ( retract )

G00 X4.55000 Y-4.25000 ( rapid move to begin. )
G01 Z-0.00512 F50.00000 ( plunge. )
G04 P0 ( dwell for no time -- G64 should not smooth over this point )
G01 F100.00000
G01 X4.55000 Y-4.15000
G01 X4.75000 Y-4.15000
G01 X4.74808 Y-4.16951
G01 X4.74239 Y-4.18827
G01 X4.73315 Y-4.20556
G01 X4.72071 Y-4.22071
G01 X4.70556 Y-4.23315
G01 X4.68827 Y-4.24239
G01 X4.66951 Y-4.24808
G01 X4.65000 Y-4.25000
G01 X4.55000 Y-4.25000
G04 P0 ( dwell for no time -- G64 should not smooth over this point )
G00 Z0.08000 ( retract )

G00 X4.60000 Y-3.95000 ( rapid move to begin. )
G01 Z-0.00512 F50.00000 ( plunge. )
G04 P0 ( dwell for no time -- G64 should not smooth over this point )
G01 F100.00000
G01 X4.60219 Y-3.97079
G01 X4.60865 Y-3.99067
G01 X4.61910 Y-4.00878
G01 X4.63309 Y-4.02431
G01 X4.65000 Y-4.03660
G01 X4.66910 Y-4.04511
G01 X4.68955 Y-4.04945
G01 X4.71045 Y-4.04945
G01 X4.73090 Y-4.04511
G01 X4.75000 Y-4.03660
G01 X4.76691 Y-4.02431
G01 X4.78090 Y-4.00878
G01 X4.79135 Y-3.99067
G01 X4.79781 Y-3.97079
G01 X4.80000 Y-3.95000
G01 X4.79781 Y-3.92921
G01 X4.79135 Y-3.90933
G01 X4.78090 Y-3.89122
G01 X4.76691 Y-3.87568
G01 X4.75000 Y-3.86340
G01 X4.73090 Y-3.85489
G01 X4.71045 Y-3.85055
G01 X4.68955 Y-3.85055
G01 X4.66910 Y-3.85489
G01 X4.65000 Y-3.86340
G01 X4.63309 Y-3.87568
G01 X4.61910 Y-3.89122
G01 X4.60865 Y-3.90933
G01 X4.60219 Y-3.92921
G01 X4.60000 Y-3.95000
G04 P0 ( dwell for no time -- G64 should not smooth over this point )
G00 Z0.08000 ( retract )

G00 X4.35000 Y-4.35000 ( rapid move to begin. )
G01 Z-0.00512 F50.00000 ( plunge. )
G04 P0 ( dwell for no time -- G64 should not smooth over this point )
Expand All @@ -30,49 +85,6 @@ G01 X4.35000 Y-3.80000
G01 X5.05000 Y-3.80000
G01 X5.05000 Y-4.35000
G01 X4.35000 Y-4.35000
G01 X4.63309 Y-4.02431
G01 X4.61910 Y-4.00878
G01 X4.60865 Y-3.99067
G01 X4.60219 Y-3.97079
G01 X4.60000 Y-3.95000
G01 X4.60219 Y-3.92921
G01 X4.60865 Y-3.90933
G01 X4.61910 Y-3.89122
G01 X4.63309 Y-3.87568
G01 X4.65000 Y-3.86340
G01 X4.66910 Y-3.85489
G01 X4.68955 Y-3.85055
G01 X4.71045 Y-3.85055
G01 X4.73090 Y-3.85489
G01 X4.75000 Y-3.86340
G01 X4.76691 Y-3.87568
G01 X4.78090 Y-3.89122
G01 X4.79135 Y-3.90933
G01 X4.79781 Y-3.92921
G01 X4.80000 Y-3.95000
G01 X4.79781 Y-3.97079
G01 X4.79135 Y-3.99067
G01 X4.78090 Y-4.00878
G01 X4.76691 Y-4.02431
G01 X4.75000 Y-4.03660
G01 X4.73090 Y-4.04511
G01 X4.71045 Y-4.04945
G01 X4.68955 Y-4.04945
G01 X4.66910 Y-4.04511
G01 X4.65000 Y-4.03660
G01 X4.63309 Y-4.02431
G01 X4.55000 Y-4.15000
G01 X4.55000 Y-4.25000
G01 X4.65000 Y-4.25000
G01 X4.66951 Y-4.24808
G01 X4.68827 Y-4.24239
G01 X4.70556 Y-4.23315
G01 X4.72071 Y-4.22071
G01 X4.73315 Y-4.20556
G01 X4.74239 Y-4.18827
G01 X4.74808 Y-4.16951
G01 X4.75000 Y-4.15000
G01 X4.55000 Y-4.15000

G04 P0 ( dwell for no time -- G64 should not smooth over this point )
G00 Z1.000000 ( retract )
Expand Down
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit e418f32

Please sign in to comment.