Peter Clifton [Sun, 28 Aug 2011 00:01:57 +0000 (28 01:01 +0100)]
Drawing API refactor
Peter Clifton [Sun, 28 Aug 2011 11:47:44 +0000 (28 12:47 +0100)]
more chopping
Peter Clifton [Sun, 28 Aug 2011 11:09:32 +0000 (28 12:09 +0100)]
Just start chopping things
Peter Clifton [Mon, 19 Nov 2012 00:49:05 +0000 (19 00:49 +0000)]
Push special case thindraw vs. fill polygon handling into the GUIs
This causes some code duplication, but it keeps the GUI specific
functionality a little cleaner.
Peter Clifton [Mon, 29 Aug 2011 22:19:49 +0000 (29 23:19 +0100)]
hid/png: Don't use the core's drawing functions
Peter Clifton [Mon, 29 Aug 2011 22:19:48 +0000 (29 23:19 +0100)]
hid/gerber: Don't use the core's drawing functions
Peter Clifton [Mon, 29 Aug 2011 22:19:48 +0000 (29 23:19 +0100)]
hid/ps/eps.c: Don't use core drawing routines
Peter Clifton [Mon, 29 Aug 2011 22:19:47 +0000 (29 23:19 +0100)]
hid/ps: Don't use the core's drawing functions
Peter Clifton [Sat, 17 Nov 2012 22:20:42 +0000 (17 22:20 +0000)]
XI2 HACK TEST
Ineiev [Wed, 21 Nov 2012 01:56:30 +0000 (21 01:56 +0000)]
Currently PCB user can draw arcs at limited angles (usually 90 degree step), though there is no such internal limit for arcs angles.
Now the patched tool is expected to work like this:
1.point at the center,
2.the first point of arc
(up to 270 degrees; sets the arc direction),
3.the second point of arc (the direction is the same as at the end
of 2.; when the new arc overlaps the arc drawn in step 2., a full
circle is created);
4.return to 3. until ESC (`F3' moves the starting point
to end of the latest arc and returns to 3.)
During 3. and 4. Shift-click moves the center of the arc
to the pointer.
Switching from/to Line tool draws chained segments.
HOW TO TEST
Select Arc tool; draw different arcs with lines
pressing different buttons, and `F2', `F3' and `U' keys.
Signed-off-by: Bert Timmerman <bert.timmerman@xs4all.nl>
Modified-by: Peter Clifton <Peter.Clifton@clifton-electronics.co.uk>
Updated to suit HID API changes
Removed a couple of unused variables
Squashed nasty trailing whitespace
Peter Clifton [Mon, 19 Nov 2012 21:49:35 +0000 (19 21:49 +0000)]
Split out drawing routines into vfunc table for possible replacement
The aim here is to indirect calls to the various drawing routines such
that a GUI or renderer implementation may swap out different parts of
the rendering operation at will without having to re-implement the
entire drawing stack from scratch.
Each drawing API call will now be passed the drawing API structure as
its first parameter, so we don't rely on this being a global.
As a further clean-up, the graphics context being used by the rendering
routines is now a member of the vfunc table structure. We currently
retain the old Output.*gc members, but only use them (where necessary)
to update the ->gc member of the drawing API structure as rendering
progresses.
Peter Clifton [Wed, 21 Nov 2012 20:26:36 +0000 (21 20:26 +0000)]
Move HID drawing API prototypes into a separate header file
Due to the mess of places we define various things in and the order
we pull in headers, we cannot easily create APIs in hid.h which rely
on being passed PCB data-structures.
Peter Clifton [Wed, 21 Nov 2012 20:30:50 +0000 (21 20:30 +0000)]
Rename HID_DRAW_API to just HID_DRAW
Just because its neater
Sergey Alyoshin [Wed, 1 Aug 2012 10:28:43 +0000 (1 14:28 +0400)]
Add strings to translation
Signed-off-by: Bert Timmerman <bert.timmerman@xs4all.nl>
Eugene Mikhantiev [Tue, 20 Nov 2012 19:02:03 +0000 (21 02:02 +0700)]
Updated Russian translation
Signed-off-by: Bert Timmerman <bert.timmerman@xs4all.nl>
Peter Clifton [Tue, 20 Nov 2012 03:18:51 +0000 (20 03:18 +0000)]
Revert moving common_draw_helpers_init() call in lesstif and GTK HIDs
Not a functional change.. I'm just being anal and wishing to keep these
matching the other HIDs.
Peter Clifton [Mon, 19 Nov 2012 23:01:48 +0000 (19 23:01 +0000)]
HID: Merge {fill/thindraw}_pcb_* APIs into HID_DRAW_API structure
I wanted to keep these separate from the pure graphics APIs, but
after poking at this more and more, it seems hard to justify why
we should do that.
Peter Clifton [Tue, 20 Nov 2012 02:03:38 +0000 (20 02:03 +0000)]
autoroute.c: Destroy debug graphics context when we're finished with it
I caught this one by inspection, as we don't tend to build with autorouter
debugging enabled. I tested quickly before comitting, and this change
doesn't break anything. This said, I couldn't see any debug rendering
output either (before or after this patch).. so that might be broken
somewhere.
Peter Clifton [Mon, 19 Nov 2012 23:28:17 +0000 (19 23:28 +0000)]
hid/lpr: Don't initiialise the graphics API vtable
Just being picky here..
I spent ages trying to work out why the old code didn't segfault, given
it does not call common_draw_helpers_init() to setup the various pad,
pin and polygon drawing routines.
It turns out that when we actually go to export, we call into the ps HID
directly - and ignore the lpr.c HID vtables.
Lets avoid confusion by partly setting up the lpr vtables, and leave the
graphics HID member as NULL.
Peter Clifton [Mon, 19 Nov 2012 23:19:20 +0000 (19 23:19 +0000)]
hid/batch: Fix build after splitting out graphics APIs
I forgot this one, along with build-testing lesstif - oops.
Fixes breakage from commit
273b243d90cda84e09f52b7ff995fa82afdc3de0
and from commit
741f203565ba9f92b0ace80d858073f75ced2716
Peter Clifton [Mon, 19 Nov 2012 22:47:43 +0000 (19 22:47 +0000)]
draw.c: Add hidGC parameter to DrawTextLowLevel() function
Avoid it assuming the correct gc to use is Output.fgGC
Peter Clifton [Mon, 19 Nov 2012 22:51:17 +0000 (19 22:51 +0000)]
draw.c: Add gc parameter to _draw_line() function
Avoid it assuming the correct GC is Output.fgGC
Peter Clifton [Sun, 18 Nov 2012 20:43:56 +0000 (18 20:43 +0000)]
Make lesstif_hid struct static again
Changed to non-static un-necessarily in commit
a1d8ee04cc571cca4cbe7ef86b40bef612a0c387
Eugene Mikhantiev [Sun, 18 Nov 2012 17:04:02 +0000 (18 18:04 +0100)]
lesstif: corrections on recent HID API changes.
Reported by Eugene Mikhantiev <mikhantiev@gmail.com>
PCB can not be built with `--with-gui=lesstif' due to the
HID API changes in commit
73b243d90cda84e09f52b7ff995fa82afdc3de0
Signed-off-by: Bert Timmerman <bert.timmerman@xs4all.nl>
Bert Timmerman [Thu, 15 Nov 2012 06:24:04 +0000 (15 07:24 +0100)]
configure.ac: fixed a typo.
Signed-off-by: Bert Timmerman <bert.timmerman@xs4all.nl>
Peter Clifton [Thu, 15 Nov 2012 01:43:18 +0000 (15 01:43 +0000)]
Stop "find connected" following rat-lines. Fixes confusing output.
Suppose we have two nets, A and B, and some components. If we connect
a pin of a component which was supposed to be connected to net A, to
net B, the "f" (find connected) action will falsely show the entirity
of net A and net B connected to each other. In reality, the nets are
not electrically connected, it is just the ratline between the
mis-connected component pin (mis-connected to Net B), and net A,
where the ratline for that pin should end up.
It MIGHT be better if we fix this bug by not adding rat-lines to shorted
connections, as often those rat-lines would take some convoluted route
through the copper of the net which is shorted to that connection
end-point. These rat-line(s) would no longer be spatially associated
with the mis-connected wiring, and encourage the user to further short
net A and net B together to complete the ratline.
This bug was a contributing factor to a mistake in a production board
I made recently, where as a last step in production, I added a star-
ground short between two different ground planes (analogue and digital).
The "find connected" action, "f" showed them connected together (as I
expected), but unfortunately, due to a thermal I left out, they were not
actually connected - despite PCB's green rendering suggesting that they
were.
Peter Clifton [Thu, 15 Nov 2012 00:15:05 +0000 (15 00:15 +0000)]
HID: Move non-PCB specific drawing calls into a separate API
Peter Clifton [Wed, 14 Nov 2012 23:53:50 +0000 (14 23:53 +0000)]
hid/gcode: Make gcode_hid structure static
Peter Clifton [Wed, 14 Nov 2012 23:02:58 +0000 (14 23:02 +0000)]
Convert mask type to enum
Peter Clifton [Wed, 14 Nov 2012 21:17:25 +0000 (14 21:17 +0000)]
Convert argument in HID_Flags to (void *) rather than (int)
void * allows us to pass pointers on all platforms, 64bit or
otherwise. We can still use casting macros to safely pass integer
values via this pointer.
Avoids the ugliness of castnig a size_t sized offset_of value into
an int. Due to the size of our structures, this did not cause any
actual bugs, but was not good practice.
Peter Clifton [Tue, 13 Nov 2012 23:57:20 +0000 (13 23:57 +0000)]
Remove unused references to SwitchDrawingWindow()
Peter Clifton [Wed, 14 Nov 2012 00:24:21 +0000 (14 00:24 +0000)]
Remove unused prototypes SetZoom and RedrawZoom, along with old #ifdef'd code
SetZoom() was removed in commit
94e927e03850bfc0e8a0f3b161ae99b6784747f0
There were a few references to SetZoom left under an #ifdef HAVE_LIBSTROKE,
which will not work, so I have commented those as well.
Peter Clifton [Wed, 14 Nov 2012 00:08:06 +0000 (14 00:08 +0000)]
Remove unused zoom settings from the PCB and settings data-structures
Bert Timmerman [Tue, 13 Nov 2012 08:32:25 +0000 (13 09:32 +0100)]
parse_y.y: As of November 2012 the cursor position is not written to file anymore
Signed-off-by: Bert Timmerman <bert.timmerman@xs4all.nl>
Bert Timmerman [Tue, 13 Nov 2012 06:17:32 +0000 (13 07:17 +0100)]
Removed the cursor position from being written to the pcb file.
Signed-off-by: Bert Timmerman <bert.timmerman@xs4all.nl>
Peter Clifton [Sun, 11 Nov 2012 04:40:08 +0000 (10 23:40 -0500)]
hid/common/hidgl: Add API to initialise a rendering pass
Serves as a place to perform any necessary initialisation within hidgl.c,
saving lots of separate calls being made by its callers.
Peter Clifton [Sun, 11 Nov 2012 04:07:44 +0000 (10 23:07 -0500)]
Fix outline drawing to only apply on copper layers
This matches the old comments in the code, and fixes (removes) outline
drawing on the solder mask prints.
This partially reverts commit
294494e56695251e63c0da9f243d6f59447f1c9f
"Fix PS rect/outline logic", which changed the logic, and
commit
d2458383a60b670ad1c42163ac24fcc63fcab457 where I changed
the comment to match the code.
Peter Clifton [Sun, 11 Nov 2012 04:24:15 +0000 (10 23:24 -0500)]
hid/gtk: Fix stupid (missing semicolon) bug breaking compile
I was _sure_ I'd buid tested this before pusing... obviously not!
Peter Clifton [Fri, 9 Sep 2011 01:00:24 +0000 (9 02:00 +0100)]
hid/gtk: Avoid using g_object_{set,set}_data() where we don't need to
Personally I hate to see data stashed and recalled with these functions,
especially where is just a case of passing appropriate data to callback
functions.
Peter Clifton [Sat, 10 Nov 2012 22:21:18 +0000 (10 17:21 -0500)]
Use trackball to allow rotation of 3D view
Peter Clifton [Sat, 10 Nov 2012 22:20:33 +0000 (10 17:20 -0500)]
hid/gtk: Make the trackball widget sexy
* Use cairo to render a nice sphere with radial gradients.
* Use widget sensitivity of the track-ball drawing to better.
differentiate between 2D / 3D views.
* Allow double-clicking on the track-ball to reset the 3D view.
Peter Clifton [Sat, 10 Nov 2012 22:19:54 +0000 (10 17:19 -0500)]
Add virtual trackball code
Peter Clifton [Sat, 10 Nov 2012 22:18:09 +0000 (10 17:18 -0500)]
hid/gtk: Add feature to force an immediate redraw if framerate is low
If more than a certain time (currently hard-coded at 50ms) has elapsed
since the last expose callback, invalidate_all() will wait and process
updates before returning.
This is handy to allow animation of auto-router progress, where the gui
mainloop is not hit until the auto-routing operation is fully complete.
Markus Hitter [Thu, 1 Nov 2012 11:53:03 +0000 (1 12:53 +0100)]
gocde HID: refresh all the G-code exporter tests.
There have been a lot of new features recently and a bunch
of comments refinements. Also the default unit was changed
from inch to mm, so don't be surprised too much there's
nothing left as before. All new test results have been
hand-verified in a G-code viewer.
Markus Hitter [Thu, 1 Nov 2012 21:20:49 +0000 (1 22:20 +0100)]
testsuite: regenerate also Makefile.am.
Previously, running ./run_tests.sh --regen <some test>
would have simply deleted Makefile.am, which is required by
the automatic Makefile generation mechanism. Now this file is
regenerated properly, too.
Markus Hitter [Thu, 1 Nov 2012 20:09:19 +0000 (1 21:09 +0100)]
testsuite: limit regenerations to one test at a time.
Previously, an accidental "./run_tests.sh --regen" without
arguments would regenerate all tests, causing a big mess.
Markus Hitter [Thu, 1 Nov 2012 11:28:11 +0000 (1 12:28 +0100)]
gcode HID: don't predrill drillmill holes.
As mill bits - in opposite to drill bits - are expected to be
stiff, predrilling drillmill holes is a waste of time.
Markus Hitter [Thu, 1 Nov 2012 10:51:31 +0000 (1 11:51 +0100)]
gcode HID: remove an obsolete TODO comment.
Units come along in groups, units other than mm and inch should
be handled properly already.
Markus Hitter [Thu, 1 Nov 2012 10:46:44 +0000 (1 11:46 +0100)]
gcode HID: don't drill drillmill holes.
Actually, this just avoids writing out the drill G-code file for
sizes >= drillmill diameters. While files written out can be
ignored, not writing them should reduce confusion among all the
written files.
Markus Hitter [Fri, 3 Dec 2010 17:52:26 +0000 (3 18:52 +0100)]
gcode HID: implement drill-milling.
This is, if a hole is equal or bigger than the milling tool,
use the milling tool instead of a drill tool to manufacture
the hole. Big advantage is, milling tools can create holes
of arbitrary sizes by moving a circle.
The feature is optional, on by default.
G02/G03 circle movements are avoided, as not all machine
controllers understand them. Instead, a polygon is milled,
with enough sides to stay for any hole size within the user
choosen accuracy.
If the hole is only slightly bigger than the mill tool, don't
move the circle; a simple plunge is enough.
Bert Timmerman [Sun, 28 Oct 2012 16:22:11 +0000 (28 17:22 +0100)]
Correction of two typos.
Closes-bug: lp-
1072285
Signed-off-by: Bert Timmerman <bert.timmerman@xs4all.nl>
Larry Doolittle [Mon, 3 Sep 2012 23:20:34 +0000 (3 16:20 -0700)]
pcbdiff: add PCBDIFF_DPI to allow user-defined resolution.
This should be the last part of fixing bug #
1045907.
Larry Doolittle [Mon, 3 Sep 2012 23:20:34 +0000 (3 16:20 -0700)]
pcbdiff: take out --only-visible.
This option leads to PNGs of different sizes and making stereo
images of PNGs of different sizes is (apparently) not possible.
Markus Hitter [Sun, 9 Sep 2012 14:18:06 +0000 (9 16:18 +0200)]
pcbdiff: allow spaces in file names / file paths.
Markus Hitter [Sun, 9 Sep 2012 14:08:15 +0000 (9 16:08 +0200)]
pcbdiff: add a level of abstraction for binaries.
This may help for future developments, where searching in places
other than PATH may be advised. It helps right now for quick
debugging hacks.
Larry Doolittle [Thu, 30 Aug 2012 21:02:27 +0000 (30 14:02 -0700)]
Improve documentation of ChangeLog file
Note in the file where it comes from.
Mention it and git commit messages in the README.
Larry Doolittle [Thu, 30 Aug 2012 19:16:39 +0000 (30 12:16 -0700)]
fix a format string mismatch
Larry Doolittle [Thu, 30 Aug 2012 19:10:38 +0000 (30 12:10 -0700)]
replace gpleda.org with geda-project.org
Markus Hitter [Tue, 30 Nov 2010 19:09:01 +0000 (30 20:09 +0100)]
gcode HID: add user defined feedrates for outline milling.
This includes two new fields in the GUI, as plunging (moving into
the material) has a different feedrate than the normal feedrate now.
These different feedrates are needed by many tools, e.g. end mills.
Markus Hitter [Tue, 30 Nov 2010 18:32:18 +0000 (30 19:32 +0100)]
gcode HID: add user defined feedrates for drilling.
This includes a new field in the GUI.
Markus Hitter [Tue, 30 Nov 2010 13:37:52 +0000 (30 14:37 +0100)]
gcode HID: add user defined feedrates for isolation milling.
This includes two new fields in the GUI, as plunging (moving into
the material) has a different feedrate from the normal feedrate now.
These different feedrates are needed by many tools, e.g. end mills.
Markus Hitter [Sun, 26 Aug 2012 23:16:14 +0000 (27 01:16 +0200)]
gcode HID: move all the code common on file open into a subroutine.
Markus Hitter [Sun, 26 Aug 2012 22:25:54 +0000 (27 00:25 +0200)]
gcode HID: remove an unused struct.
The common HID code has now a better alternative, anyways, so
it's unlikely this will ever be used again.
Markus Hitter [Sun, 26 Aug 2012 22:14:57 +0000 (27 00:14 +0200)]
gcode HID: fix a potential memory leak.
Markus Hitter [Sun, 26 Aug 2012 22:09:59 +0000 (27 00:09 +0200)]
gcode HID: correct a few comments.
Markus Hitter [Tue, 9 Nov 2010 21:28:07 +0000 (9 22:28 +0100)]
gcode HID: create G-code for milling the outline of the board.
This is a rarther simple implementation, which mills a rectangle
with the maximum extents of the board.
Markus Hitter [Tue, 2 Nov 2010 21:05:36 +0000 (2 22:05 +0100)]
gcode HID: reorder user interface to a more logical sequence.
The new sequence is: general - isolation milling - drilling -
milling - output options.
Also completed the term "mill" to "iso-mill", as outline milling
is around the corner.
Default measurement unit changed to mm, as I'm not aware of a
single machine accepting "mil" as G-code unit.
Markus Hitter [Wed, 22 Aug 2012 12:25:36 +0000 (22 14:25 +0200)]
gcode HID: another few cleanups.
Markus Hitter [Wed, 22 Aug 2012 12:19:10 +0000 (22 14:19 +0200)]
gcode HID: release the PNG a lot earlier.
Markus Hitter [Wed, 22 Aug 2012 12:16:34 +0000 (22 14:16 +0200)]
gcode HID: rename gcode_f2 to gcode_f.
... as there's no longer a gcode_f used.
Markus Hitter [Wed, 22 Aug 2012 12:12:43 +0000 (22 14:12 +0200)]
gcode HID: make usage of gcode_f local.
There's no need to keep a file open all the time, all the
processing is done in memory.
Markus Hitter [Wed, 22 Aug 2012 11:44:15 +0000 (22 13:44 +0200)]
gcode HID: simplify the backside flipping algorithm.
As the PNG has to be copied to a bitmap anyways, this can also
be used to flip the back layer.
The code flipping the PNG is still in place, but only needed
for the PNG written do a file (for error checking).
Markus Hitter [Wed, 22 Aug 2012 11:32:36 +0000 (22 13:32 +0200)]
gcode HID: remove an untrue comment.
Actually, gdImageCreate() creates an pallette-based image.
Markus Hitter [Wed, 22 Aug 2012 11:30:52 +0000 (22 13:30 +0200)]
gcode HID: fix the bug producing an inverted image.
For copying an pallette-based image, the pallette has to be
copied, too.
Markus Hitter [Mon, 20 Aug 2012 21:06:27 +0000 (20 23:06 +0200)]
gcode HID: make G-code output aware of dynamic extents.
This also offsets the produced G-code so the rectangular edge
closest to {0, 0} in pcb is {0, 0} in the G-code. Very useful
when actually producing boards.
The most simple way to achieve this is to draw just the part
inside the outline into the intermediate image. No change to
the PNG tracer needed.
Unfortunately, this exposes a bug, making the traced PNG
image inverted. This will be fixed with the next commit.
Kai-Martin Knaak [Mon, 13 Aug 2012 01:14:59 +0000 (13 03:14 +0200)]
make EPS boundingbox parameters integers Currently, the bounding box parameters given in the header of an EPS file are floats. The standard calls for integers, though. Some applications like epstool fail if the boundingbox is anything but integer. This patch uses llrint() to output the nearest integer as bounding box parameters. In addition, it adds a high resolution header for the benefit of applications that can use the extra precision.
Example of the bounding box lines produced by the patch:
%%BoundingBox: 0 0 370 426
%%HiResBoundingBox: 0.000000 0.000000 369.503937 426.196850
Closes-bug: lp-
1035999
Markus Hitter [Mon, 20 Aug 2012 20:01:44 +0000 (20 22:01 +0200)]
gcode HID: add header required for UpdateExtents().
Markus Hitter [Mon, 20 Aug 2012 16:54:54 +0000 (20 18:54 +0200)]
gcode HID: write board size according to dynamic extent.
This isn't much, so far, more on dynamic extent to come.
Markus Hitter [Mon, 20 Aug 2012 14:55:35 +0000 (20 16:55 +0200)]
gcode HID: make gcode_toolradius an int.
It's always used as such.
Markus Hitter [Sun, 19 Aug 2012 19:59:13 +0000 (19 21:59 +0200)]
Introduce dynamic board size.
The goal is to eventually define the board's extent by the outline
layer, only. That way, all the exporters can export properly
sized layouts.
Undoubtly, this can also influence the GUIs. For example, "zoom to fit"
becomes a slightly different meaning and drawing outside the board's
extent becomes possible. Autorouting and similars can be limited to
the actual board size. Resizing a board to the lower left no longer
requires the error-prone moving of all the stuff and keeps file diffs
small.
Markus Hitter [Sun, 15 Jul 2012 19:08:48 +0000 (15 21:08 +0200)]
gcode HID: write drill size into the file, too.
So far, drill size was given by the file name only, which can
change accidently.
Markus Hitter [Sun, 15 Jul 2012 17:55:39 +0000 (15 19:55 +0200)]
gcode HID: implement predrilling
Predrilling is using the milling tool to mark all drill spots. This
eases and enhances accuracy of manual drilling.
This resolves patch #12 and obsoletes patch #11 and #13 of
Traumflug's wishlist:
https://bugs.launchpad.net/pcb/+bug/699497
The difference between patch #12 and this patch is, drills
for predrilling are sorted regardless of size, so performance
should be better.
Eric Brombaugh [Sun, 8 Jul 2012 20:26:57 +0000 (8 13:26 -0700)]
gtk: point file selector dialogs at the current directory
Recent Gtk versions (at least 3 and onward) have broken the file
selection dialog in the case that no default directory was specified:
rather than using the current working directory, it uses a fake
"Recently Chosen Items" directory, from which save/load doesn't work.
This patch fixes the behavior.
Commit by Andrew Poelstra
Gabriel Paubert [Sun, 8 Jul 2012 04:31:35 +0000 (7 21:31 -0700)]
gerber: Implement option for metric output
Compiles cleanly, all tests pass, default behaviour is completely
unchanged. --Andrew
Andrew Poelstra [Fri, 6 Jul 2012 20:08:25 +0000 (6 13:08 -0700)]
Fix comments in golden samples for hid_bom[123] tests
With the nanometers switchover, a comment in the BOM output changes
from "output in mils" to "output in mil", breaking tests.
Andrew Poelstra [Fri, 6 Jul 2012 20:04:47 +0000 (6 13:04 -0700)]
Fix bom.c behavior regarding xy-in-mm option
If the --xy-in-mm option is passed, that should override any other
unit selection behavior (since this is a legacy option, so anyone
using it is not expecting the new many-unit features).
Also, fix a test-breaking change in output precision.
This has apparently been broken since
da403312 (audit bom.c for
the nanometers switchover), but was only noticed recently when the
HID tests were fixed.
Andrew Poelstra [Fri, 6 Jul 2012 18:07:05 +0000 (6 11:07 -0700)]
Fix bom HID tests after commit
d30d3142 changed the line ordering
Due to changes in macro.h, the ordering of the BOM output changed,
causing test failures.
Benjamin Bergman [Thu, 14 Jun 2012 19:30:20 +0000 (14 12:30 -0700)]
Add options to change photo-mode colors.
Original patchset by Benjamin Bergman. Minor changes from
Andrew Poelstra.
Closes-bug: lp-
1004796
DJ Delorie [Fri, 25 May 2012 19:56:46 +0000 (25 15:56 -0400)]
Fix ps-bloat logic
The ps-bloat option was using the int_value field instead of the
coord-value field, resulting in a bloat of zero all the time. Fixed.
Andrew Poelstra [Thu, 29 Mar 2012 23:21:46 +0000 (29 16:21 -0700)]
Remove manhattan check from rats.c
Since commit
644f8d9, I cannot get the autorouter to segfault when
it attempts to deal with ratlines connected to non-manhattan lines.
So, I see no reason not to draw such lines in the first place.
However, when the autorouter is used, it will ignore any rats which
lead to a non-manhattan line. (And therefore not connect two points,
if the shortest connection would involve connecting diagonal traces.)
This is unexpected behavior, though IMO no more unexpected than the
old behavior, which was to ignore diagonal line segments and simply
route amongst the manhattan ones.
Closes-bug: lp-699248
Andrew Poelstra [Thu, 29 Mar 2012 23:05:46 +0000 (29 16:05 -0700)]
Fix segfault when routing to non-straight pads
Since the autorouter does not handle non-manhattan lines, it will
not route to non-straight pads. Therefore, when the autorouter
searches for the pins/pads at the endpoints of a rat, it ignores
any non-straght pads, returning NULL from the search.
The autorouter then tries to dereference this pointer and crashes.
The rest of the code, it seems, works to avoid ever giving such
rats to the autorouter, but it can be done if the user explicitly
selects such a rat and selects "Auto-route selected rats".
This patch catches the NULL pointer and simply ignores the rat.
It is possible that this is the cause of bug lp-699255, but this
seems unlikely, since the backtrace on that report does not show
the same NULL dereference, and the reporter was using "10-pin
headers", which presumably have no pads that could be marked as
non-straight.
Affects-bug: lp-699255
Andrew Poelstra [Thu, 29 Mar 2012 20:50:44 +0000 (29 13:50 -0700)]
Wrap gcode_do_export in setlocale() calls
During gcode export, we temporarily switch locales to C to
ensure that output uses the proper decimal separator.
Closes-bug: lp-912077
Andrew Poelstra (local) [Thu, 29 Mar 2012 19:47:15 +0000 (29 12:47 -0700)]
Fix infinite loop on PCB::skip-drc attribute
When doing a DRC check, pcb skips checking any layers who have the
PCB::skip-drc attribute set. However, when determining whether the
check is complete (via the ListsEmpty()) function, it doesn't skip
these layers.
The result is an infinite loop, since if there is work to be done
on a skip-drc layer, the checker will keep running until it is done
-- i.e., will keep running forever.
This patch skips skip-drc layers in ListsEmpty().
Closes-bug: lp-829123
Andrew Poelstra (local) [Thu, 29 Mar 2012 05:03:01 +0000 (28 22:03 -0700)]
Make SelectLayer() respond to layer name as well as index
Closes-bug: lp-699470
Andrew Poelstra (local) [Thu, 29 Mar 2012 04:42:49 +0000 (28 21:42 -0700)]
Parse floating-point values without leading 0 correctly
Closes-bug: lp-916984
Andrew Poelstra (local) [Thu, 29 Mar 2012 03:39:24 +0000 (28 20:39 -0700)]
Add missing const in lesstif/main.c
Andrew Poelstra (local) [Thu, 29 Mar 2012 03:28:28 +0000 (28 20:28 -0700)]
Allow saving of user increment settings in Gtk.
It seems there is no clean way of implementing this without really
tearing up the setting-saving code and fixing the SettingType/PCBType
dichotomy, but at 26 lines, this was at least short.
Closes-bug: lp-699464
Andrew Poelstra (local) [Thu, 29 Mar 2012 02:15:28 +0000 (28 19:15 -0700)]
Save CONFIG_Coord settings in Gtk
The "Safe board width as default" checkbox has not been working
since commit
fa2a0e35 back in August, when I added HID_Coord and
CONFIG_Coord to a couple of enums and forgot to update a switch
statement.
This patch fixes that. :-}
Andrew Poelstra (local) [Wed, 28 Mar 2012 17:40:55 +0000 (28 10:40 -0700)]
Add grid-increment-mm (and similar) settings
Added the following settings:
grid-increment-mm grid-increment-mil
size-increment-mm size-increment-mil
line-increment-mm line-increment-mil
clear-increment-mm clear-increment-mil
These behave differently than the old settings of the same names (from
20090929 and earlier). They take a measure, not a real number. The -mm
versions affect the increment settings when the user is using a metric
grid, and the -mil versions affect the settings for imperial grids.
Old ~/.pcb/preferences files likely have lines like
grid-increment-mil = 5
which have been hanging around for several pcb versions. These should
be safely ignored, since, for example, "5" is now read as "5nm", which
is well below the minimum allowed increment setting.
These settings can be read but (so far) not written out, either to the
pcb or to the preferences file.
Andrew Poelstra (local) [Wed, 28 Mar 2012 18:57:49 +0000 (28 11:57 -0700)]
Add separate metric and imperial increment settings to Gtk gui.