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

219 Commits

Author SHA1 Message Date
werner
aca443f566 Make the icon for the currently selected instance transparent so that it better
blends in and won't be mistaken for a button.

- Makefile: generate icon XPMs with transparent background
- gui_util.c (make_image): set transparency color to white
- gui_util.c (make_transparent_image): new function to return a transparent
  image created from an XPM
- gui_tool.c (get_icon_by_inst): make the returned image transparent instead of
  opaque
- icons/vec.fig, icons/arc.fig, icons/line.fig, icons/rect.fig, icons/circ.fig:
  darkened to increase contrast on grey background



git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5758 99fdad57-331a-0410-800a-d7fa5415bdb3
2009-12-16 17:25:13 +00:00
werner
b37a8599d9 It can sometimes be unclear what exactly has been selected. To improve this,
we now display an icon for the currently selected instance in the status area.



git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5757 99fdad57-331a-0410-800a-d7fa5415bdb3
2009-12-15 21:24:30 +00:00
werner
83669c6db7 When entering the first vectors, where were a number of display anomalies
such a vectors pointing in the wrong direction. They were caused by overflows
due to inadequate zoom settings.

- gui.c (change_world): if the extents have grown, zoom to extents



git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5756 99fdad57-331a-0410-800a-d7fa5415bdb3
2009-12-15 20:05:37 +00:00
werner
a830226830 When no instance is selected, show the polar coordinates of the current
pointer position relative to the user origin in the radius/angle fields.
This helps to make quick manual measurements, e.g., of clearances.

This also fixes the following bug:
- gui_canvas.c (refresh_pos): showed canvas coordinates instead of model
  coordinates



git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5755 99fdad57-331a-0410-800a-d7fa5415bdb3
2009-12-15 19:33:15 +00:00
werner
2a819a82d7 Added a crude hack to increase the robustness of font scaling. (This can
be necessary if printing unusually large components.)

- postscript.c: in "maxfont", if we get a zero-sized font, dodge the division
  by zero



git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5752 99fdad57-331a-0410-800a-d7fa5415bdb3
2009-12-10 12:02:02 +00:00
werner
c6312cd313 A bit of cleanup, as suggested by Chitlesh Goorah.
- moved all examples to examples/
- README: updated and corrected example invocation



git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5748 99fdad57-331a-0410-800a-d7fa5415bdb3
2009-12-02 15:36:00 +00:00
werner
582e2391de The absolute Y position in the status bar was actually the X position. Oopsie.
- gui_canvas.c (update_pos): display pos.y and not pos.x in the sys_y field



git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5734 99fdad57-331a-0410-800a-d7fa5415bdb3
2009-12-01 13:16:47 +00:00
werner
6f2dc7fb0b Added functions sin(), cos(), and sqrt().
git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5732 99fdad57-331a-0410-800a-d7fa5415bdb3
2009-12-01 12:43:59 +00:00
werner
9cd195bf5b When entering a name with variable expansion, the "invalid character in
variable name" error was never cleared.

- inst.c (validate_pad_name): call status_begin_reporting before expanding the
  string, to clear any previous error
- expr.c (expand): if the last character in the name is a dollar sign, print
  "incomplete variable name" instead of "invalid character [...]"



git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5731 99fdad57-331a-0410-800a-d7fa5415bdb3
2009-12-01 10:50:55 +00:00
werner
1613d4bdbc Trying to save arcs would crash fped.
- dump.c (print_obj): removed free(s2) left over from before the reduction of
  allocations



git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5728 99fdad57-331a-0410-800a-d7fa5415bdb3
2009-12-01 01:29:07 +00:00
werner
56371f440a Creation of a rounded pad could crash fped.
- gui_tool.c (end_new_rpad): didn't initialize obj->u.pad.type, which could
  cause pad_type_to_layers to abort
- postscript.c: added experimental code for full-page printing (doesn't work
  properly yet)



git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5727 99fdad57-331a-0410-800a-d7fa5415bdb3
2009-12-01 01:04:32 +00:00
werner
a26b79041b - inst.c (inst_select): cycle through instances globally, not only within the
same priority



git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5716 99fdad57-331a-0410-800a-d7fa5415bdb3
2009-11-27 23:31:03 +00:00
werner
1daa0068d5 Vector name generation could produce duplicates if vectors were moved or
deleted. The new algorithm checks for collisions and also reduces the number
of allocations.

- dump.c (generate_name): store the name in the vector being named
- dump.c (generate_name): compare the new name against all names in use
- dump.c (base_name, obj_base_name, print_label): don't allocate the name
- dump.c: changed all users of the above functions accordingly



git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5715 99fdad57-331a-0410-800a-d7fa5415bdb3
2009-11-27 19:55:25 +00:00
werner
907bcf919b Fixed some bugs in the vector list re-ordering function. This should work now,
but there's another problem in the dumping code that still spoils the fun.

- inst.c (do_move_to_vec): marking algorithm propagated an uninitialized value
- inst.c (do_move_to_vec): we have to clear the marks of vectors that are 
  before the vector being moved, because they will still be visited and 
  propagated



git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5714 99fdad57-331a-0410-800a-d7fa5415bdb3
2009-11-27 19:18:44 +00:00
werner
2dffbfeaa9 When moving a vector, the list order could get confused, resulting in a
segfault, failure to update the screen content, and assigning of invalid 
references.

- gui_tools.c: removed duplicate (harmless) line 
- inst.c: when moving a vector to a new base, we may have to reorder the list
  so that the assertion vectors always follow their bases is still maintained.



git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5713 99fdad57-331a-0410-800a-d7fa5415bdb3
2009-11-27 16:23:35 +00:00
werner
b6e5c6d20a - gui_inst.c (gui_draw_rpad): when drawing an outline instead of filling, use
two lines instead of a rectangle



git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5699 99fdad57-331a-0410-800a-d7fa5415bdb3
2009-10-21 15:04:56 +00:00
werner
549a15def5 For future extensions.
- fped.c: added cpp-like command-line options -D, -U, and -I



git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5698 99fdad57-331a-0410-800a-d7fa5415bdb3
2009-10-20 23:50:45 +00:00
werner
cd830046fa Drawing all the pad layers as filled areas can cause confusion. Now we draw
the solder mask with lines.

- gui_inst.c: draw solder mask with lines, not with filled rectangles and arcs
- gui_style.c: increase line width for solder mask from 1 to 2 pixels
- Makefile: added manual/concept-inst.png (forgot to commit this before)



git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5696 99fdad57-331a-0410-800a-d7fa5415bdb3
2009-10-19 15:00:30 +00:00
werner
c172870dfd - README: added link to the GUI manual
- added a conceptual explanation of instantiation (with picture)



git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5636 99fdad57-331a-0410-800a-d7fa5415bdb3
2009-09-13 13:16:39 +00:00
werner
192ec568d8 - inst.c: cleanup_inst leaked memory when using special pads
- changed pad classification in instances from bare/other to copper/special
- moved LAYER_* definitions from layer.h to layer.c
- after instantiation, we perform sanity checks on pads and remove layers from
  coppery pads that are handled by a special layer
- fped.y: the line number in objects was never set
- overlap.c: fixed overlap calculations
- gui_tool.c: end_new_pad didn't initialize the pad type



git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5635 99fdad57-331a-0410-800a-d7fa5415bdb3
2009-09-13 11:11:03 +00:00
werner
8df866ab2f - the set of layers of a pad is now maintained in the instance, so that we can
make adjustments when removing layers provided by specialized pads
- gui_inst.c: moved gc construction from gui_draw_pad and gui_draw_rpad to
  shared pad_gc
- layer.h: new home of all definitions related to pads and layers
- layer.c: 
- overlap.c: functions to test for overlaps of pad shapes (in progress)



git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5634 99fdad57-331a-0410-800a-d7fa5415bdb3
2009-09-13 09:58:30 +00:00
werner
c91156aac0 - gui_util.c: make container clean-out globally available as vacate_widget
- gui_status.c: the x entry are is now a vbox with variable content
- the pad type is now shown in the x entry area and can be changed by clicking
  on it



git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5633 99fdad57-331a-0410-800a-d7fa5415bdb3
2009-09-12 23:15:15 +00:00
werner
f054cdd7d5 - added "make update" that combines "svn update" with remaking the dependencies
git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5628 99fdad57-331a-0410-800a-d7fa5415bdb3
2009-09-12 07:34:02 +00:00
werner
76c3c1c1d0 - added solder mask pad type (patch by Rene Harder)
git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5627 99fdad57-331a-0410-800a-d7fa5415bdb3
2009-09-11 18:34:51 +00:00
werner
5c37256c09 - bare pads are now drawn in orange, so that one can see if a pad has a special
solder mask pattern 
- postscript.c: don't scale fonts down to nothing to make measurement text fit
  (in progress)



git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5626 99fdad57-331a-0410-800a-d7fa5415bdb3
2009-09-10 23:40:03 +00:00
werner
e04a8017b7 - postscript.c: don't try to print empty pad names, or we'll have a hard time
scaling that zero-sized box to fill the available space



git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5620 99fdad57-331a-0410-800a-d7fa5415bdb3
2009-09-08 19:37:47 +00:00
werner
bd10b18626 - postscript.c: added outline information for PDF
- postscript.c: ignore pdfmark if not supported by interpreter



git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5586 99fdad57-331a-0410-800a-d7fa5415bdb3
2009-08-30 19:38:33 +00:00
werner
276ada710f - postscript.c: added some code for frame display, but I'm not happy with it
- postscript.c: moved tedious "... maxfont maxfont ..." into new function
  "boxfont"
- postscript.c: "hcenter" was way off for diagonal text
- postscript.c: "realsize" didn't take into account the effect of rotation and
  returned only the x component in the original coordinate system
- fped.c: feed a dummy argv to gui_init, so that we can parse the arguments
  before deciding whether to bring up the GUI
- fped.c: don't bring up Gtk+ if we're not going to use it



git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5578 99fdad57-331a-0410-800a-d7fa5415bdb3
2009-08-30 06:04:00 +00:00
werner
5b9918ced0 Measurement text size looked (almost) right on the screen but the size was all
wrong when printing.

- postscript.c: "realsize" incorrectly assumed that device space used units of
  1/72 inch
- postscript.c: decreased measurement text size from 10 pt to 8.5 pt



git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5560 99fdad57-331a-0410-800a-d7fa5415bdb3
2009-08-27 23:44:40 +00:00
werner
94223a8c54 Cause in TODO, effect:
- pad type wasn't optional



git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5557 99fdad57-331a-0410-800a-d7fa5415bdb3
2009-08-27 14:24:54 +00:00
werner
8d94993c45 - added pad type (for non-solder and solder-paste-only pads) to FPD language
(GUI is still missing)



git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5554 99fdad57-331a-0410-800a-d7fa5415bdb3
2009-08-27 09:45:57 +00:00
werner
c37648e2a5 Made interactive selection of measurement points a little less inefficient.
- vectors now have their own struct in inst.u and don't share inst.u.rect.end
- when selecting points for measurements, use the highlighting we've already 
  done and don't redo all the O(n^3) searching for each mouse pointer movement
- removed debug code that printed what new measurements are like. We can now 
  use the code view for that.



git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5552 99fdad57-331a-0410-800a-d7fa5415bdb3
2009-08-27 09:01:24 +00:00
werner
3497aabf5c - destroy_obj: when deleting width expressions, check that they're actually
non-NULL
- gui.html: added more details on selecting



git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5542 99fdad57-331a-0410-800a-d7fa5415bdb3
2009-08-26 14:06:26 +00:00
werner
2c9a359c0c - renamed directory screens/ to manual/
- convert icons in the manual from XPM to PNG so that Firefox can display them
  too



git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5534 99fdad57-331a-0410-800a-d7fa5415bdb3
2009-08-24 16:53:47 +00:00
werner
d9b7ad94ec - when displaying loop iterations, we now use the active count, not just the
last count
- loop iterations now show the actual value, not the zero-based iteration 
  number
- gui.html: added a GUI manual (in progress)



git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5531 99fdad57-331a-0410-800a-d7fa5415bdb3
2009-08-22 22:55:39 +00:00
werner
63e60182bb - new visualization option: show all frames or show only current frame
- new visualization option: highlight pads and silk ("final" view)



git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5527 99fdad57-331a-0410-800a-d7fa5415bdb3
2009-08-22 19:00:55 +00:00
werner
5a2eb77629 Made life in mil-land a little less painful.
- .fpd file format: new directive "unit" to set the default unit
- new selection was too aggressive - make it only rearrange settings if we also
  fail the second vector search
- gui_draw_pad_text: calculation of height vs. width lost too much precision,
  causing pad text to be rotated arbitrarily
- drag_new_vec: display distance in mil if unit is mil
- end_new_raw_vec: store distance in mil if unit is mil
- gridify: use a 10 mil grid if unit is mil
- ps_hline: corrected gsave/grestore mismatch
- Makefile: made "all" a prerequisite of "install"
- Postscript output now mentions the default unit (if set)
- ps_package: height and width were swapped, oopsie !



git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5525 99fdad57-331a-0410-800a-d7fa5415bdb3
2009-08-22 15:58:58 +00:00
werner
18be341c2d Bug-fixing ...
- obj.c: embarrasingly, the default offset wasn't a distance
- connect_obj: didn't update the object's frame pointer, deeply confusing
  deletion



git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5524 99fdad57-331a-0410-800a-d7fa5415bdb3
2009-08-22 14:29:48 +00:00
werner
60147b98e2 - inst.c: we can drag points at a frame base again
git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5523 99fdad57-331a-0410-800a-d7fa5415bdb3
2009-08-22 13:18:15 +00:00
werner
a44530f621 Selection now tries to help us not to get lost.
- postscript.c: started adding generation of object-level frames (on-going)
- gui_canvas.c: moved call to inst_deselect into inst_select, so that 
  inst_select can keep track of the previous selection (if any)
- inst_select: if clicking on the location of the previous selection, try to 
  select the next matching item
- inst_select: if we can't find an active item, try to see if we can get
  something by changing active references or - if all else fails - by 
  activating a different frame
- end_new_frame: reset the tool after placing the frame



git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5522 99fdad57-331a-0410-800a-d7fa5415bdb3
2009-08-22 12:27:47 +00:00
werner
9e48901814 - postscript.c: added DSC comments
- postscript.c: generate a page for each package
- gui_style.h: changed monospaced font to Liberation Mono, to alleviate "l" vs.
  "1" problem



git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5519 99fdad57-331a-0410-800a-d7fa5415bdb3
2009-08-22 08:58:26 +00:00
werner
9f814ab010 Improving Postscript output (on-going)
- postscript.c: added page layout parameters and header
- postscript.c: increase initial size for maxfont from 100 to 1000, so that we 
  don't end up with zero-sized fonts for zoom = 1
- postscript.c: desired size of measurement text is no longer affected by zoom
- postscript.c: roughly doubled size of measurement text
- postscript.c: adjust zoom to package dimension and try to draw 2x and 1x 
  package next to enlarged package



git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5517 99fdad57-331a-0410-800a-d7fa5415bdb3
2009-08-21 23:28:38 +00:00
werner
347ef8aad5 When deleting frame "foo" in root->foo->bar and then linking bar from root,
bar didn't automatically become active, which was rather confusing. We now
also try harder to keep a frame active. 

- when deleting a frame, also reset all outbound active references
- when removing the active frame reference, search for a suitable replacement
  instead of just setting it to NULL
- gui_style.c: made inactive frames a little more visible



git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5516 99fdad57-331a-0410-800a-d7fa5415bdb3
2009-08-21 19:50:45 +00:00
werner
a6f73ae297 - calculation of a rounded pad's diagonal is now more sensible. We use the
length of the part of the diagonal that's on the pad. In the case of a 
  circle (BGA), this is just the diameter.
- changed label for diagonals from "r" to "d"



git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5515 99fdad57-331a-0410-800a-d7fa5415bdb3
2009-08-21 19:19:33 +00:00
werner
94f4534494 - measurement offsets can now use variables. We evaluate the offset during
instantiation and create a partially formed instance. During measurement
  instantiation, we complete that instance.
- leak.supp: finally figured out how to write a valgrind suppression file
- fped.c: we don't need the FPED_NO_GUI kludge anymore
- fped.c: moved gui_cleanup_style to gui_main
- dereference icons (seems that this doesn't deallocate everything, though)



git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5514 99fdad57-331a-0410-800a-d7fa5415bdb3
2009-08-21 18:20:37 +00:00
werner
9e7e804d1a - delete.c: added more destructor functions
- deallocate all our data structures on exit (to help find memory leaks, bad
  pointers, and general logic errors)
- fixed memory leak when allocating pad names in instantiation
- added "magic" environment variable FPED_NO_GUI to run fped without 
  initializing Gtk+
- added valgrind wrapper "leakcheck"
- delete.c: destroy() now requires a deletion to exist
- vacate_op: free string expressions
- destroy_obj: free measurement labels
- delete_references: use do_delete_obj so the we don't bump the group number
- delete_frame: delete references after deleting the frame itself, so they end
  up on the stack above the frame and get destroyed first
- do_delete_vec: like above, even though it doesn't matter here



git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5506 99fdad57-331a-0410-800a-d7fa5415bdb3
2009-08-21 08:34:17 +00:00
werner
2737f8a3fa - postscript.c: always run flattenpath before pathbbox
- postscript.c: fixed algorithm in "center"
- dump.c: reorder frames if we would end up with forward-references
- sc89.fpd, fbga.fpd: changed "part" to new "package"



git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5490 99fdad57-331a-0410-800a-d7fa5415bdb3
2009-08-19 22:13:47 +00:00
werner
4db1ade3bd - Makefile: now requires /bin/bash (for PIPESTATUS)
- Makefile: use PIPESTATUS to catch errors in the icon conversion pipe
- Makefile: whitespace and comment cleanup
- gui_style.c: removed no longer needed definition of INVALID



git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5487 99fdad57-331a-0410-800a-d7fa5415bdb3
2009-08-19 14:38:59 +00:00
werner
0e0e4ea32d - fixed precedence of unary minus, so that -(a+b) isn't printed as -a+b
- removed in_path logic (never missed not having it) and made selected vectors
  a little brighter



git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5484 99fdad57-331a-0410-800a-d7fa5415bdb3
2009-08-18 23:49:54 +00:00
werner
4920bb96fa - replaced awkward FOR_GLOBAL_INSTS / FOR_PKG_INSTS sequence with single
FOR_ALL_INSTS
- several functions only walked the active package instances, so we couldn't 
  access the origin of the root frame



git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5482 99fdad57-331a-0410-800a-d7fa5415bdb3
2009-08-18 22:03:51 +00:00