pcb

GCode generator - wrong outline

Bug #1390439 reported by VaclavPe
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
gEDA project
Confirmed
Medium
Unassigned
pcb
Confirmed
High
Unassigned

Bug Description

I created following test PCB file and generated GCode. PCB file contains non-rectangular outline but GCode does not reflect it.

Tags: gcode-export
Revision history for this message
VaclavPe (vaclavpe) wrote :
Revision history for this message
Peter Clifton (pcjc2) wrote :

Verified.

Looks like the proximity of the outline to the board edge may be the first problem here, but also, there is some strange offsetting between the arc and line segments.

Changed in pcb:
status: New → Incomplete
status: Incomplete → Confirmed
Revision history for this message
VaclavPe (vaclavpe) wrote :

I looked at the gcode exporter code. And the only problem is that exporter takes the smallest posssible rectange for outline. there is no PNG curve tracing implemented.

tags: added: gcode-export
Traumflug (mah-jump-ing)
Changed in geda-project:
importance: Undecided → Medium
status: New → Confirmed
Changed in pcb:
importance: Undecided → High
Revision history for this message
Bert Timmerman (bert-timmerman) wrote :

Hi,

I just tested your example file and compared my gernerated gcode output with the provided gcode output (it's all in the zipfile).

Attached diff shows that in git HEAD 819db34a1482c9d5b08a9859ff0cf798eaa79cf3 the correct outline dimensions are generated.

Revision history for this message
Bert Timmerman (bert-timmerman) wrote :
Revision history for this message
Bert Timmerman (bert-timmerman) wrote :

Regarding the non-rectangular outline not reflected by gcode output, this needs to be implemented as is stated in the source code (gcode.c:1037):

    /*
     * Currently this is a rather simple implementation, which mills
     * the rectangular extents of the board and nothing else. This should
     * be sufficient for many use cases.
     *
     * A better implementation would have to group the lines and polygons
     * on the outline layer by outer polygon and inner holes, then offset
     * all of them to the right side and mill that.
     */
    /* a better implementation might look like this:
    LAYER_TYPE_LOOP (PCB->Data, max_copper_layer, LT_OUTLINE);
      {
        LINE_LOOP (layer);
          {
            ... calculate the offset for all lines and polygons of this layer,
            mirror it if is_bottom, then mill it ...
          }
        END_LOOP;
      }
    END_LOOP;

Changed in pcb:
milestone: none → next-feature-release
Changed in pcb:
milestone: pcb-4.1.0 → pcb-4.1.1
Changed in pcb:
milestone: pcb-4.1.1 → pcb-4.2.0
Changed in pcb:
milestone: pcb-4.2.0 → future-bug-fix-release
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.