Skip to content

Nonsense milling path when using a specific isolation width #688

Description

@Lycowolf

Description of bug:

pcb2gcode generates a nonsensical milling path that goes way outside the outline. It happens when I set isolation width to 0.7 (see below). Mesing with optimization options didn't have any effect.

What did you try (include command-line arguments):

Gerber file is attached. It was generated using KiCAD.

pcb2gcode --config=../../../millproject,millproject --mill-diameters=0.5 --bridgesnum=3 --isolation-width=0.7
cat ../../../millproject                                                                                                                                                                                                      
# general
metric=true
zero-start=true
metricoutput=true

# compatibility with GRBL
nog64=true
nog81=true

# milling
mill-diameters=0.2
zwork=-0.1
zsafe=1
mill-feed=200
isolation-width=0.8
mill-speed=10000

# drilling
zdrill=-1.9
drill-speed=10000
drill-feed=50
# G-code senders misinterpret G53, WTF
zchange-absolute=false
zchange=10
onedrill=true

### outline
cutter-diameter=0.8
zcut=-1.9
cut-feed=120
cut-vertfeed=20
cut-infeed=1
cut-speed=10000
# we are single-sided
cut-front=true
bridges=1
bridgesnum=4
zbridges=-0.8

# optimization
#path-finding-limit=50000
# workaround for https://github.com/pcb2gcode/pcb2gcode/issues/687
path-finding-limit=0
cat ./millproject                                                                                                                                                                                                             
front=pcb-F_Cu.gbr
front-output=front.nc
![processed_front_final_0 6](https://github.com/user-attachments/assets/dab2be34-ea65-4c4c-808c-131bb585c197)

outline=pcb-Edge_Cuts.gbr
outline-output=outline.nc
drill=pcb-PTH.drl
drill-output=drill.nc

What happened:

See attached SVGs. The nonsense path is clearly visible

What did you expect to happen:

Similar result as when isolation-path=0.6 is set.

pcb2gcode version (run pcb2gcode --version to see this):

pcb2gcode --version                                                                                                                                                                                                         
2.5.0
Git commit: latest
Boost: 108300
Gerbv: 2.10.1-dev~ccf6a3
Geos: 3.12.2

processed_front_final-0 6
processed_front_final-0 7

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions