pcb

Traumflug's wishlist (G-code exporter enhancements)

Bug #699497 reported by Traumflug
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
pcb
Fix Released
Medium
Unassigned

Bug Description

A whole bunch of enhancements for the G-code exporter. This started there: http://sourceforge.net/tracker/?func=detail&aid=3093302&group_id=161080&atid=818428 , but I was asked to move it here.

All patches are created with git-format-patch, ready to be applied with git-am.

The patchset no longer applies to current Git. See comment #44 for the latest version along with the required checkout.

The good news is, many of the patches have been applied to Git master already or have been made obsolete by other means (which is good!). To follow the current state, watch the last comment or subscribe to this bug.

Revision history for this message
Traumflug (mah-jump-ing) wrote :
Revision history for this message
Traumflug (mah-jump-ing) wrote :
Revision history for this message
Traumflug (mah-jump-ing) wrote :
Revision history for this message
Traumflug (mah-jump-ing) wrote :
Revision history for this message
Traumflug (mah-jump-ing) wrote :
Revision history for this message
Traumflug (mah-jump-ing) wrote :
Revision history for this message
Traumflug (mah-jump-ing) wrote :
Revision history for this message
Traumflug (mah-jump-ing) wrote :
Revision history for this message
Traumflug (mah-jump-ing) wrote :
Revision history for this message
Traumflug (mah-jump-ing) wrote :
Revision history for this message
Traumflug (mah-jump-ing) wrote :

Current patches are against 262ec1ab712879aa27a4e1b318b8128a8bf45fd4

Revision history for this message
Traumflug (mah-jump-ing) wrote :

New set changes the old set to add a single flag "advanced G-code" instead of "use variables", "use drillcycle", etc. as suggested in geda-users. The last three patches make the G-code export respecting the outline layer.

Revision history for this message
Traumflug (mah-jump-ing) wrote :
Revision history for this message
Traumflug (mah-jump-ing) wrote :
Revision history for this message
Traumflug (mah-jump-ing) wrote :
Revision history for this message
Traumflug (mah-jump-ing) wrote :
Revision history for this message
Traumflug (mah-jump-ing) wrote :
Revision history for this message
Traumflug (mah-jump-ing) wrote :

Replaced patches 0011 ... 0021 to avoid a glitch where M5 M9 M2 would be written to the mill file (and stop the machine) before predrilling.

Revision history for this message
Traumflug (mah-jump-ing) wrote :
Revision history for this message
Traumflug (mah-jump-ing) wrote :
Revision history for this message
Traumflug (mah-jump-ing) wrote :
Revision history for this message
Traumflug (mah-jump-ing) wrote :

Replaced patches 0016 ... 0021 to leave in sorting by hole-to-hole distance, as suggested on geda-users.

With that, all suggestions from geda-users are taken care of.

Revision history for this message
Traumflug (mah-jump-ing) wrote :

Patches 0022 ... 0024 add outline milling.

Revision history for this message
Traumflug (mah-jump-ing) wrote :
Revision history for this message
Traumflug (mah-jump-ing) wrote :
Revision history for this message
Traumflug (mah-jump-ing) wrote :
Revision history for this message
Traumflug (mah-jump-ing) wrote :

Replaced patches 19...24 to fix a bug when an existing, but insufficient outline layer caused a segfault. Insufficient was for example a layer with only a single vertical line on it.

Revision history for this message
Traumflug (mah-jump-ing) wrote :
Revision history for this message
Traumflug (mah-jump-ing) wrote :
Revision history for this message
Traumflug (mah-jump-ing) wrote :
Revision history for this message
Traumflug (mah-jump-ing) wrote :
Revision history for this message
Traumflug (mah-jump-ing) wrote :
Revision history for this message
Traumflug (mah-jump-ing) wrote :
Revision history for this message
Traumflug (mah-jump-ing) wrote :
Revision history for this message
Traumflug (mah-jump-ing) wrote :

Replaced patches 0022...0024 to fix a minor bug.
Patches 0026...0028 add user definable feedrates and different feedrates for plunging vs. horizontal milling.

Revision history for this message
chrysn (chrysn-users) wrote :

segfaults for me with the attached file test20101202.pcb and the default settings, after being applied to 4e22cf4e.

Revision history for this message
chrysn (chrysn-users) wrote :

well, i seem not to be allowed to upload attachments here (or i just don't find the button), the test can be found at http://pastebin.com/1HPgw03E

Revision history for this message
Traumflug (mah-jump-ing) wrote :
Revision history for this message
Traumflug (mah-jump-ing) wrote :
Revision history for this message
Traumflug (mah-jump-ing) wrote :

Last not least, I've added drill-milling. This completes my current list of wishes.

Known issues:

- machine path estimate at the end of each output file still isn't accurate.

- no option to use G02/G03 circled movements

- no voronoi mode (milling only a single patch between each two traces).

Heck, anyone has to stop one day.

Revision history for this message
Traumflug (mah-jump-ing) wrote :

Changed the group to "next feature release", as the set of new features is completed and found to work well, so there's no need to hide this from users.

Revision history for this message
DJ Delorie (djdelorie) wrote :

Please don't change the group unless you have commit rights and have agreed to do the work to get it into the next release. I use the group code to keep track of what's planned for which releases.

Peter Clifton (pcjc2)
Changed in pcb:
status: New → Confirmed
status: Confirmed → New
Revision history for this message
Traumflug (mah-jump-ing) wrote :

FWIW, I updated the patchset to current git. One patch less, because this one is now obsolete.

description: updated
Revision history for this message
Traumflug (mah-jump-ing) wrote :

Rebased patchset, now against f6c2d4907583614a10918a121f45670620f1946e

Felix Ruoff (felixruoff)
Changed in pcb:
assignee: nobody → Felix Ruoff (felixruoff)
Revision history for this message
gpleda.org commit robot (gpleda-launchpad-robot) wrote :

A commit was made which affects this bug
git master commit 2fc46c54ae1a149586f21f7a244f151f678cce61
http://git.gpleda.org/?p=pcb.git;a=commit;h=2fc46c54ae1a149586f21f7a244f151f678cce61

commit 2fc46c54ae1a149586f21f7a244f151f678cce61
Author: Markus Hitter <email address hidden>
Commit: Felix Ruoff <email address hidden>

    HID-gcode: make use of MAXPATHLEN.

    Affects-bug: lp-699497

Revision history for this message
Felix Ruoff (felixruoff) wrote :

Just a hint to myself: The bug/feature-request lp-846359 is related to this bug!

And a second comment (for everyone): Have just pushed some of the patches. Will need some additional time to review and merge the other patches.

Revision history for this message
Ben Gamari (bgamari) wrote :

Is there a plan for merging this?

Revision history for this message
Felix Ruoff (felixruoff) wrote :

The actual status is:
- Patch 1 to 10 is already pushed to master
- Patch 18-20 are obsolete, because this is done by another patch in Spring 2011
The other patches needs some work to fit them to actual git-head. I sometimes work on this but it is hard work for me because there were so many changes. If you or another one has the time and fun to rebase some or all of the left-over patches, please do so and post them to this bug-report.

Revision history for this message
Traumflug (mah-jump-ing) wrote : Re: [Bug 699497] Re: Traumflug's wishlist (G-code exporter enhancements)

Am 23.04.2012 um 00:51 schrieb Ben Gamari:

> Is there a plan for merging this?
>
> --
> You received this bug notification because you are subscribed to
> the bug
> report.
> https://bugs.launchpad.net/bugs/699497
>
> Title:
> Traumflug's wishlist (G-code exporter enhancements)

I'd like to, but they won't let me. Perhaps you can get this effort
going if you ping the geda-users mailing list and/or rebase this
patchset with current git. So far I'm about the only one who spoke up
to get it into the official distribution.

Markus

- - - - - - - - - - - - - - - - - - -
Dipl. Ing. (FH) Markus Hitter
http://www.jump-ing.de/

Revision history for this message
Traumflug (mah-jump-ing) wrote :

Oh, I see it's this new habit of bug tracking sites to send email which look like ordinary email.

I wasn't aware your efforts already got that far, Felix, and I'm happy to see this.

Revision history for this message
Traumflug (mah-jump-ing) wrote :

I've just commited the predrilling feature. This brings in patch #12 and mankes #11 and #13 obsolete.

Revision history for this message
Traumflug (mah-jump-ing) wrote :

Patches #14, #15, #16 and #17 are done, too. Almost everything was already in the repo or obsoleted by others.

Revision history for this message
Felix Ruoff (felixruoff) wrote :

Thank you for committing this! I had in mind to do this, but not enough time to carefully test it...

Changed in pcb:
assignee: Felix Ruoff (felixruoff) → nobody
Revision history for this message
Traumflug (mah-jump-ing) wrote :

*shhht* I don't put too much efforts into testing either, I just check for clean, readable code and obvious regressions. For in depth testing we have the community with their hundreds of use cases, don't we?

Revision history for this message
Traumflug (mah-jump-ing) wrote :

Patch #18 ("don't do isolation milling on the outline or route layer") turns out to be not very useful. In case layer "outline" is part of the frontside or backside group, it's drawn regardless. If it's not part of these groups, the G-code goes into its own file where it doesn't disturb.

The problem has probably to be solved upstairs: "outline" and "route" should become special layers, like frontsilk, backsilk and such.

Patch #19 is applied. The extents finding code went centrally into src/change.c, UpdateExtents(), so everybody can use it. Perhaps you've seen my RFC on the geda-user list.

Revision history for this message
KaiMartin (kmk-familieknaak) wrote :

Just a note on layers:
IIRC, there are plans to get rid of "special layers". Instead, make them all general layers, but with different attributes.

---<)kaimartin(>---

Revision history for this message
Traumflug (mah-jump-ing) wrote :

Patch #20 is in.

The G-code exporter is now the first HID being dynamic extents aware. On how this is done, see
http://git.geda-project.org/pcb/commit/?id=4e0ac837ca1d357c378f1bcb9704b89bc591b0fa and
http://git.geda-project.org/pcb/commit/?id=8ae982ef97d61ff4e5a5e6fa849ddcbacea023fc

In short:

Call UpdateExtents() to make PCB->ExtentMinX, PCB->ExtentMinY etc. valid, then take the offset into account.

Traumflug (mah-jump-ing)
description: updated
Revision history for this message
Traumflug (mah-jump-ing) wrote :

Patches #21, #22, #23 are in, #24 intentionally dropped (renaming command line options might disappoint some people).

Revision history for this message
Traumflug (mah-jump-ing) wrote :

Patches #25, #26 and #27 are in, only #28 left.

Revision history for this message
Traumflug (mah-jump-ing) wrote :

All patches are in! Yay!

Now working on getting the unit tests right again ...

Revision history for this message
Traumflug (mah-jump-ing) wrote :

OK, it's done. Two or three non-essential things are left, for which I'll open separate bugs.

Changed in pcb:
status: New → Fix Committed
Changed in pcb:
status: Fix Committed → Fix Released
Changed in pcb:
milestone: future-feature-release → pcb-20140316
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Patches

Remote bug watches

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