1
0
mirror of git://projects.qi-hardware.com/fped.git synced 2024-11-18 10:36:16 +02:00
Commit Graph

270 Commits

Author SHA1 Message Date
Werner Almesberger
b8f1add539 fped/obj.c (generate_items): handle failure to expand package name gracefully
We just use "_" in this case. Before, "expand" returned NULL, which
inst_select_pkg interprets as the global package. This in turn caused
no further packages to be defined and thus active_pkg stayed NULL.
This finally led to a crash in inst_draw.
2011-09-14 20:37:54 -03:00
Werner Almesberger
6dfbb51af9 fped/gnuplot.c (gnuplot_arc): implemented drawing of arcs 2011-09-12 20:54:58 -03:00
Werner Almesberger
e5d8fd87c3 fped/: added gnuplot output for line/rect/circle with -g (experimental) 2011-09-04 20:35:34 -03:00
Werner Almesberger
6ca5c22ea4 fped.c: cleaned up batch mode selection; batch modes are now mutually exclusive 2011-09-04 17:22:10 -03:00
Werner Almesberger
f0c0ae779a changed GUI page location, checkout instructions, and e-mail address
- Makefile (UPLOAD), README, debian/control (Homepage, Description),
  fped.1: the GUI page is now on downloads.qi-hardware.com instead
  of people.openmoko.org
- debian/copyright, fped.1: changed e-mail from werner@openmoko.org
  to werner@almesberger.net
- README: changed repository from Openmoko SVN to Qi-Hardware git
2011-07-28 06:40:46 -03:00
Werner Almesberger
9465776449 xxx 2011-07-28 06:40:46 -03:00
Werner Almesberger
6cadac8977 Makefile: switched from SVN to git
- Makefile (CFLAGS): renamed cpp macro SVN_VERSION to VERSION
- Makefile (SVN_VERSION, SVN_STATUS): renamed to GIT_VERSION and
  GIT_STATUS and switched to corresponding git command
- Makefile (.PHONY, update): removed this little-used target
2011-07-28 06:40:34 -03:00
Xiangfu Liu
6396ca8499 update to r6006 2011-03-25 08:50:51 +08:00
Xiangfu Liu
acccaee4d6 update to r6005 2011-03-25 08:42:36 +08:00
Xiangfu Liu
a49bbd2fe6 debian package update to 5999 2011-03-25 08:42:36 +08:00
Xiangfu Liu
ceaa519ccb update to r5997
Signed-off-by: Xiangfu Liu <xiangfu@sharism.cc>
2011-03-25 08:42:36 +08:00
Xiangfu Liu
4a68274e67 update the homepage to help webpage
Signed-off-by: Xiangfu Liu <xiangfu@sharism.cc>
2011-03-25 08:42:36 +08:00
Xiangfu Liu
ced96bbb13 add ghostscript to Build-Depends
Signed-off-by: Xiangfu Liu <xiangfu@sharism.cc>
2011-03-25 08:42:36 +08:00
Xiangfu Liu
5ac0cb58d8 override dh_auto_clean, use make spotless instread
Signed-off-by: Xiangfu Liu <xiangfu@sharism.cc>
2011-03-25 08:42:36 +08:00
Xiangfu Liu
5fa6038c07 update to svn rev 5986
Signed-off-by: Xiangfu Liu <xiangfu@sharism.cc>
2011-03-25 08:42:36 +08:00
Xiangfu Liu
21f2ae2bb5 remove the Build-Depends ttf-liberation
Signed-off-by: Xiangfu Liu <xiangfu@sharism.cc>
2011-03-25 08:42:36 +08:00
Xiangfu Liu
a6d21bb4bb update take svn rev: 5983
Signed-off-by: Xiangfu Liu <xiangfu@sharism.cc>
2011-03-25 08:42:36 +08:00
Xiangfu Liu
069e82ffc4 use usual name for orig tarball top-level directory
Signed-off-by: Xiangfu Liu <xiangfu@sharism.cc>
2011-03-25 08:42:36 +08:00
Xiangfu Liu
17dc8ff45c update to svn rev 5982, enable dh_auto_test
Signed-off-by: Xiangfu Liu <xiangfu@sharism.cc>
2011-03-25 08:42:36 +08:00
Xiangfu Liu
b9a6369ca2 add debian/fped.manpages for install manpage
Signed-off-by: Xiangfu Liu <xiangfu@sharism.cc>
2011-03-25 08:42:36 +08:00
Xiangfu Liu
b17ed1a7df use the new version rules.
add the get-orig-source.sh file

Signed-off-by: Xiangfu Liu <xiangfu@sharism.cc>
2011-03-25 08:42:36 +08:00
Xiangfu Liu
e394af8c90 clean up the Build-Depends.
Signed-off-by: Xiangfu Liu <xiangfu@sharism.cc>
2011-03-25 08:42:35 +08:00
Xiangfu Liu
b6807a7c0d add debian package stuff
add ITP bug number to 'debian/changelog'

Signed-off-by: Xiangfu Liu <xiangfu@sharism.cc>
2011-03-25 08:42:35 +08:00
werner
78e4ba0d9c fped: mechanical holes had incorrect layers
- inst.c (inst_hole): set inst->u.hole.layers, not inst->u.pad.layers
- layer.c (mech_hole_layers): holes don't need solder paste



git-svn-id: http://svn.openmoko.org/trunk/eda/fped@6006 99fdad57-331a-0410-800a-d7fa5415bdb3
2011-03-24 23:42:47 +00:00
werner
335ddb6e1d fpd.y: dump() requires a dummy "one" argument here too, oops
git-svn-id: http://svn.openmoko.org/trunk/eda/fped@6005 99fdad57-331a-0410-800a-d7fa5415bdb3
2011-03-23 08:25:22 +00:00
werner
2de385e9c7 hack: set errno to ENOENT when -1 fails, so that the error isn't too ugly
The caller assumes that any error would be signaled via errno. A proper
solution would be to allow also for non-errno errors.



git-svn-id: http://svn.openmoko.org/trunk/eda/fped@6004 99fdad57-331a-0410-800a-d7fa5415bdb3
2011-03-23 08:07:31 +00:00
werner
f44accdad7 fped: added option -1 package to select a single package to output with -p/-P
git-svn-id: http://svn.openmoko.org/trunk/eda/fped@6003 99fdad57-331a-0410-800a-d7fa5415bdb3
2011-03-23 07:14:13 +00:00
werner
e1f4e03a28 fped: don't output pad names consisting only of spaces
Such names have an invalid size and may trip the Postscript/PDF interpreter.

- postscript.c (ps_pad_name): don't output names consisting only of spaces



git-svn-id: http://svn.openmoko.org/trunk/eda/fped@6002 99fdad57-331a-0410-800a-d7fa5415bdb3
2011-03-23 06:45:04 +00:00
werner
1409cfafd8 - gui.c (change_world_reselect): take into account that we may get called
with a selected object but no selected instance. In this case, don't try to
  re-select. (Not perfect, but better than the crash this caused so far.)



git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5999 99fdad57-331a-0410-800a-d7fa5415bdb3
2011-01-22 00:54:56 +00:00
werner
49a1bbdd05 Added a new pad type: trace pads, for antennas and other trace-like elements.
- layer.h (enum pad_type): added pad type pt_trace
- layer.c (pad_type_to_layers, layers_to_pad_type), inst.c (inst_pad):
  "trace" pad instantition and conversion infrastructure
- fpd.y (pad_type), dump.c (print_obj): .fpd file I/O for "trace" pads
- postscript.c (prologue): added Postscript function "horpath" to produce
  horizontal stripes
- postscript.c (hatch): show "trace" pads with horizontal stripes
- gui_style.h (gc_pad_trace), gui_style.c (gc_pad_trace, gui_setup_style),
  gui_inst.c (pad_gc): added visualization of "trace" pads
- gui_status.c (show_pad_type): added "trace" pad type
- README: added description of "trace" pads
- README: added usage examples for the various pad types



git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5998 99fdad57-331a-0410-800a-d7fa5415bdb3
2011-01-18 00:30:57 +00:00
werner
0bfba12f3c - test/tsort: "Aborted" doesn't get reported on all platforms, so we just
remove it completely (reported by Nobuhiro Iwamatsu)



git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5997 99fdad57-331a-0410-800a-d7fa5415bdb3
2010-12-10 06:56:43 +00:00
werner
177fe9cc36 The box coordinates were not properly initialized in gui_draw_pad_text
- gui_inst.c (gui_draw_pad_text): box_min and box_max were initialized to
  an undefined value, upsetting valgrind and yielding an incorrect
  location if pad and hole had the same size



git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5994 99fdad57-331a-0410-800a-d7fa5415bdb3
2010-10-31 12:11:18 +00:00
werner
feae08fc9e fped/Makefile: added LDFLAGS (currently empty)
git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5986 99fdad57-331a-0410-800a-d7fa5415bdb3
2010-10-16 13:52:50 +00:00
werner
dd255ef510 fix wrong bold content in manual page fped.1
Signed-off-by: Xiangfu Liu <xiangfu@sharism.cc>



git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5983 99fdad57-331a-0410-800a-d7fa5415bdb3
2010-10-13 16:15:40 +00:00
werner
585ea5595d add DESTDIR to Makefile.
the Debian package is need DESTDIR and Debian also install binary 
to /usr/bin/

Signed-off-by: Xiangfu Liu <xiangfu@sharism.cc>



git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5982 99fdad57-331a-0410-800a-d7fa5415bdb3
2010-10-12 15:45:09 +00:00
werner
4d175e5aef add the manual page manual/fped.1
Signed-off-by: Xiangfu Liu <xiangfu@sharism.cc>

[ changed the location to ./ - manual/ is more about extra data for the
  HTML manual. - Werner ]



git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5981 99fdad57-331a-0410-800a-d7fa5415bdb3
2010-10-12 15:44:21 +00:00
werner
478bf03343 make the SVN_VERSION, SVN_STATUS run only once.
this can reduce warning "svn: '.' is not a working copy"
when we not in a svn repo.

Signed-off-by: Xiangfu Liu <xiangfu@sharism.cc>



git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5980 99fdad57-331a-0410-800a-d7fa5415bdb3
2010-10-12 15:40:57 +00:00
werner
a119e25a77 Makefile (spotless): added target to remove "fped" (suggested by Xiangfu Liu)
git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5979 99fdad57-331a-0410-800a-d7fa5415bdb3
2010-10-12 15:39:32 +00:00
werner
02518334f2 Updated regression tests for output change in r5974 and improved handling of
cores.

- test/structure, test/del_vec, test/frame_ref, test/meas_qual, test/del_frame:
  added newline after "unit" directive (reported by Xiangfu Liu)
- test/Common: new function expect_sed for post-processing of test output
- test/tsort: use expect_sed to ignore "(core dumped") after "Aborted"
- test/Common: if there is a file called "core", don't run it
- Makefile (clean): remove test/core



git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5978 99fdad57-331a-0410-800a-d7fa5415bdb3
2010-10-12 15:32:15 +00:00
werner
e6b2658a65 Added relaxation of pad overlap checking. Not GUI-settable yet.
- README, fpd.l, fpd.y: added directives "allow touch" and "allow overlap" to
  make overlap checking more permissive
- dump.c (dump_allow, dump): generate "allow" directive
- obj.h, obj.c (allow_overlap): added global variable for strictness of overlap
  checking
- overlap.h, overlap.c (overlap, ...), layer.h, layer.c (refine_layers):
  strictness of overlap checking is passed as an argument
- hole.c (check_through_hole), layer.h, layer.c (refine_copper), obj.c
  (instantiate): updated callers of "overlap" to provide "allow" argument



git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5974 99fdad57-331a-0410-800a-d7fa5415bdb3
2010-08-09 04:16:37 +00:00
werner
b2b3a46119 A bit of cleanup.
- gui_frame_drag.c (FOR_UNORDERED, drag_var_motion, drag_value_motion, 
  drag_frame_motion): moved hard to read loop into helper macro
- capitalized SWAP, to make it clear it's a macro and can multiply side-effects
- TODO: updated discussion of open issues



git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5971 99fdad57-331a-0410-800a-d7fa5415bdb3
2010-05-31 05:53:56 +00:00
werner
d4c4031b9a Added support for reordering frames in the GUI.
- gui_frame.c (build_frame_label): the root frame doesn't participate in any
  form of dragging, so we don't set up dragging for it at all
- gui_frame_drag.c (pick_table_cell, swap_table_cells_by_coord, 
  swap_table_rows): helper functions for swapping rows in a Gtk table
- gui_frame_drag.c (swap_frames, drag_frame_motion, setup_frame_drag): added
  support for reordering of frames by dragging
- gui_frame_drag.c (SWAP, swap_vars, swap_values, swap_rows): removed SWAP(). 
  Use swap() from util.h instead.
- TODO: removed frame ordering entry



git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5970 99fdad57-331a-0410-800a-d7fa5415bdb3
2010-05-30 20:30:24 +00:00
werner
7eb3ac5ba2 When dragging an endpoint of an inverted measurement, we didn't consider that
inst->base and inst->u.meas.end are swapped, causing fped to crash in vec_at.
Also introduced a universal swap() function.

- util.h (swap): new swap function for arguments of any type
- gui_meas.c (begin_drag_move_meas, draw_move_meas): swap the endpoints if
  moving an inverted measurement
- coord.c (sort_coord): use swap() instead of swap_coord
- coord.h, coord.c (swap_coord): removed
- gui_util.c (save_pix_buf): use swap() instead of open-coding the swap 
- kicad.c (kicad_centric): use sort_coord instead of "manually" sorting the
  coordinates



git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5968 99fdad57-331a-0410-800a-d7fa5415bdb3
2010-05-30 09:04:26 +00:00
werner
c9af8cd0fe The mechanism for selecting points for measurements reaches its limits when
using frames to encapsulate building blocks, e.g., like macros or functions in
a programming language. Since measurements only know about the frame containing
a vector but not the frames containing that frame, invocations of this frame
from different places can only be distinguished within the min/next/max scheme.
(See the example in README.)

To eliminate this limitation, one needs a way to tell fped to consider a point
only if it has been instantiated through a certain path, e.g., by requiring
some other frames to be visited in its instantiation. This increases the number
of distinct points available for measurements.

The mechanism chosen is to qualify a measurement point with frames that lead to
it. This list of outer frames does not have to include all frames. Without
qualifying, the old behaviour results.

Note that this doesn't cover all possible ways in which a point can appear in
different roles. Multiple frame references can also result from repeating the
same frame reference in the same parent frame. The current qualification
mechanism does not allow such paths to be distinguished. However, one can 
always introduce intermediate frames for this purpose.

Furthermore, repetitions create multiple instances of a point, although in what
should be considered the same role.

- fpd.l: make scanner support free-format a little better by switching back to
  keyword mode after frame braces. This way, one can write a simple frame in a
  single line, which is useful for regression tests.
- fpd.l, fpd.y, README, test/dbg_meas: added %meas directive to print the 
  result of a measurement
- fpd.y, README: measurements can now be labeled. Note that, due to limitations
  of the grammar, the first measurement cannot be labeled.
- error.h, error.c (yywarn): new function for non-fatal diagnostics that always
  get reported to standard error
- bitset.h, bitset.c: functions to manipulate variable-size bit sets
- meas.h, fpd.y, README, test/meas_qual: added the means to specify qualifiers
  for points used in measurements
- dump.c (print_meas_base, print_meas): dump qualifiers
- delete.c (delete_references, test/del_frame): delete measurements that
  reference a frame being deleted in their qualifiers
- obj.h, obj.c (enumerate_frames, instantiate): enumerate all frames so that we
  have an index into the bit vector of visited frames
- meas.h, meas.c (reset_samples, meas_post), obj.c (generate_vecs,
  generate_frame, instantiate): record the set of frames visited for each
  sample
- meas.c (meas_post): only treat two instances of a point as equivalent if the
  set of frames visited of one of them is a superset of set of the other. In
  this case, keep the union of the two sets.
- meas.h, meas.c (meas_find_min, meas_find_next, meas_find_max),
  test/meas_qual: instantiate_meas_pkg only select points for which all frames
  in the qualification have been visited
- gui_meas.c (is_min, is_next, is_max, is_a_next): updated for above change
- inst.h, inst.c (curr_frame, propagate_bbox, add_inst, inst_begin_frame,
  inst_end_frame, inst_start): renamed curr_frame to frame_instantiating to
  avoid clash with curr_frame in fpd.y
- inst.h, inst.c (find_meas_hint): make global
- test/structure, test/del_vec, test/del_frame: fped now warns if a measurement
  is in an unlinked frame. Changed regressions tests to avoid this warning.
- test/Common: new function expect_grep to compare only part of the output



git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5967 99fdad57-331a-0410-800a-d7fa5415bdb3
2010-05-29 21:13:48 +00:00
werner
8e60952ba1 New option "-s scale" to set the exact scale factor for full-page Postscript
output.

- postscript.h (postscript_params): didn't declare this global variable
- postscript.c (ps_package_fullpage): if postscript_params.zoom is non-zero,
  scale to this value (instead of auto-scaling) 
- fped.c (usage, main): added option "-s scale" to set the scale factor for -P



git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5954 99fdad57-331a-0410-800a-d7fa5415bdb3
2010-05-03 13:41:24 +00:00
werner
24011c74d6 Removed an old bug: parentheses and backslash are meta-characters in Postscript
strings but weren't escaped until now.

- postscript.c: output all Postscript strings with ps_string, which correctly
  escapes parentheses and backslashes
- TODO: removed the bug entry



git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5952 99fdad57-331a-0410-800a-d7fa5415bdb3
2010-04-29 21:34:29 +00:00
werner
dbace0b2fa Cleaned up the disgusting mess that was the list of frames. The changes:
- removed root_frame. "frames" now takes its place.
- removed frame->prev. In those few cases where we need the previous frame (for
  deletion and dumping), we walk the list or recurse.
- the list of frames is now in GUI order, not file order.
- when reading the .fpd file, put the root frame first and leave it there.
- instead of walking the frames list and excluding the root frame by testing
  frame->name, just start at frames->next
- likewise, instead of testing !frame->name just use frame == frames



git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5948 99fdad57-331a-0410-800a-d7fa5415bdb3
2010-04-28 00:34:32 +00:00
werner
ac535d6e03 Deleting things often left measurements behind. Fixed these bugs, enhanced %del
to also delete frames and items in other frames than the current one, and added
the corresponding regression tests.

- fpd.y, README: %del can now also delete frames
- test/del_frame: regression test for frame deletion
- fpd.y: moved all debug items into debug_item, so that they can be invoked
  after defining measurements
- README: clarified that object labels aren't entirely hidden in the GUI
- delete.c (delete_references): also delete measurements referencing the frame
  (test/del_frame)
- fpd.y (dbg_link_frame): described why we need base_frame in addition to 
  base_vec
- fpd.y, README: %del can now also reach into frames other than the current one
- delete.c (do_delete_vec): also delete references in the root frame, i.e.,
  measurements (tests/del_vec)



git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5947 99fdad57-331a-0410-800a-d7fa5415bdb3
2010-04-27 22:36:46 +00:00
werner
dc1e644da1 In the GUI, pad names were always centered on the pad. In the case of
through-hole pads, this could easily make them disappear into the hole. We now
draw them outside the hole.

- gui_inst.c: when showing through-hole pads, gui_draw_pad_text now places the
  pad name into the largest area of the pad outside the hole
- test/frame_ref: removed redundant "with" in all titles



git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5946 99fdad57-331a-0410-800a-d7fa5415bdb3
2010-04-27 10:57:09 +00:00
werner
82a12023cd I thought there was a bug in frame ordering, but it turns out that it works
fine. Anyway, here's a new debug construct (%frame) and a bunch of new 
regression tests.

- fpd.y, fpd.l, README: added new directive %frame to link frames also to other
  frames than the current one (like in the GUI)
- gui_tool.h, gui_tool.c: export is_parent_of
- test/frame_ref: regression tests to ensure that frame order remains valid,
  even if we reference late from early frames



git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5945 99fdad57-331a-0410-800a-d7fa5415bdb3
2010-04-27 01:02:24 +00:00