1
0
mirror of git://projects.qi-hardware.com/fped.git synced 2024-07-01 09:54:33 +03:00
Commit Graph

30 Commits

Author SHA1 Message Date
werner
1dda2ac2ae When creating an object in the GUI, its label wasn't initialized. Added
infrastructure for hole objects. (Postscript and KiCad output are still 
missing, and so does sanity checking.)

- gui_tool.c (new_obj_unconnected): set obj->name to NULL
- added hole objects to tool bar, all the various GUI routines, the .fpd
  parser, and the .fpd dumper



git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5939 99fdad57-331a-0410-800a-d7fa5415bdb3
2010-04-25 10:58:07 +00:00
werner
59335b63b0 The partial order algorithm in dump.c sometimes dumped objects before a vector
they referenced. As a band-aid, we now explicitly keep track of which vectors 
have been dumped, and defer objects accordingly. A more correct solution would
be to properly abstract the partial order algorithms (along with the heuristics
for maximizing the number of ".") and to implement it properly.

- fpd.y (debug_item): new rule for %dump and %exit, which can appear also among
  measurements
- fpd.y (frame_items, measurements):  rearranged grammar to allow debug_item
  also in measurements. To avoid ambiguities, the "measurements" section can no
  longer be empty, but it can be omitted as a whole.
- obj.h, dump.c (later, recurse_vec, order_frame): vectors now also have a
  "dumped" flag which is used in "later" to defer dumping an object until all
  the vectors it depends on have been dumped.



git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5928 99fdad57-331a-0410-800a-d7fa5415bdb3
2010-04-20 21:01:16 +00:00
werner
6374b3a61a Added debugging directives to the fped language. They're describe at the end
of README.

- fpd.l, fpd.y, README: added debugging directives %del, %move, %print, %dump,
  and %exit
- obj.h, fpd.y (find_obj, find_label, new_obj): objects can now be labeled
- obj.c (obj_anchors), inst.c (inst_anchors): gathering the list of anchors is 
  now a per-object function, not an instance "method". inst_anchors implements 
  the vector vs. object switch.
- inst.h, inst.c: removed all *_op_anchors functions
- expr.c (str_unit): in the past, we returned a malloc'ed string, but these 
  times are long gone. Thus, don't stralloc("").



git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5919 99fdad57-331a-0410-800a-d7fa5415bdb3
2010-04-19 14:39:57 +00:00
werner
8a0039f202 When clicking on an instance, fped used to select the currenly active instance
of the corresponding object but didn't change any table or loop selection to
make it active. (It did already change the frame reference.) This meant that,
upon clicking on an instance, often a different instance of the same object
would be selected. This was confusing at best.

With the below changes, table rows and loop iterations are adjusted such that 
the instance that was clicked on becomes active. If the algorithm fails, fped 
will print "__inst_select: tries exhausted" and fail safely. Please report if 
this happens.

- obj.c (search_inst, find_inst, instantiate): added mechanism to search for 
  instances matching a previous instance
- obj.c (run_loops, iterate_tables): record matches in found_* elements of the
  object's struct
- obj.c (reset_found, activate_found): helper functions to initialize and apply
  the activation leading to the instance found
- inst.c (activate_item): added comment explaining how activate_item is
  supposed to work and the fallacies of that logic
- inst.c (inst_select): added tries counter to avoid infinite recursion when
  results don't converge
- inst.c (__inst_select): when selecting an instance in the same frame, adjust
  tables and loops such that the instance becomes active
- inst.c: added call to find_inst after most instance creations (add_inst)
- obj.h: documented the meaning of the curr[ent]*, active*, and found* fields



git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5792 99fdad57-331a-0410-800a-d7fa5415bdb3
2010-01-12 02:18:58 +00:00
werner
09186de7a8 When selecting an expression of an assignment and then selecting another
expression, the background of the first expression did not revert to its 
original color.

- gui_style.h (COLOR_CHOICE_SELECTED): made blue a bit lighter, to improve
  contrast of black foreground text
- gui_frame.c (unselect_value): build_assignment uses COLOR_EXPR_PASSIVE for
  expressions in assignments, so we also have to do the same here.



git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5763 99fdad57-331a-0410-800a-d7fa5415bdb3
2009-12-31 09:34:17 +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
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
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
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
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
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
de044ca61f We can now generate part families.
- README: added build prerequisites
- "part name" is now more correctly called "package name"
- changed keyword "part" to "package"
- removed inst_debug and struct inst_ops.debug functions - never really used 
  them anyway
- we can now generate multiple packages from a single file



git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5478 99fdad57-331a-0410-800a-d7fa5415bdb3
2009-08-17 20:42:51 +00:00
werner
d39ae30f6e - added rounded pads
- initialize item_widget to NULL if not showing items or bad things happen



git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5440 99fdad57-331a-0410-800a-d7fa5415bdb3
2009-08-14 10:18:40 +00:00
werner
8e54c1f7c3 - added the usual COLOR_ prefix also to TOOL_SELECTED/TOOL_UNSELECTED
- instantiate_meas if a mesurements has no samples, do the next one, don't stop
  completely
- when instantiation fails, the corresponding vector, object, or loop is now
  marked red in the variables/items list.



git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5432 99fdad57-331a-0410-800a-d7fa5415bdb3
2009-08-13 09:30:16 +00:00
werner
e65d90947c - put hbox around frame table so that it doesn't grow when we give it more
space than it needs
- dump.c: separated ordering function from actual printing
- added list of vectors and object (on the right side of the variables)



git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5423 99fdad57-331a-0410-800a-d7fa5415bdb3
2009-08-12 10:45:52 +00:00
werner
4a0fd61016 More work on measurements. Getting there ...
- removed support for old-style measurements
- new-style measurements are now embedded in "struct obj", so we can dump and 
  delete them
- "measxy" is now called "meas"
- updated examples to use new-style measurements



git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5412 99fdad57-331a-0410-800a-d7fa5415bdb3
2009-08-09 00:06:54 +00:00
werner
1a18292883 - added icons for new-style measurements (on-going)
- increased default window size for make room for new icons
- switch the canvas to dark blue when instantiation fails
- modularized point lookup logic of instantiate_meas
- added highlight mode (on-going)



git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5404 99fdad57-331a-0410-800a-d7fa5415bdb3
2009-08-07 21:47:51 +00:00
werner
d046f9306c - fpd.y: fixed check for empty part name
- added new-style measurements (experimental)



git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5400 99fdad57-331a-0410-800a-d7fa5415bdb3
2009-08-07 13:37:51 +00:00
werner
30664583a1 - when dragging the endpoint of an arc, show a helper line to visually connect
the point being dragged
- added pop-up menus for all frame and variable items (on-going)
- clickable items in the frame/var area now only respond to the left button,
  unless they have a pop-up
- removed the frame delete icon - use pop-up instead



git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5396 99fdad57-331a-0410-800a-d7fa5415bdb3
2009-08-06 20:19:00 +00:00
werner
995aa4ca04 - added menu item "Save" to dump the footprint to stdout
- added temporary solution for having a part name
- added part name to FPD example files
- reduced area in which the frame delete button responds



git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5393 99fdad57-331a-0410-800a-d7fa5415bdb3
2009-08-06 06:54:41 +00:00
werner
b5dd18c564 - dumping now labels all vectors, even those we only reference as .
- dump objects only after all the vectors they reference have been dumped
- instead of relying on clever algorithms to dump each object only once, just
  mark them
- left "dump" enabled in "main", oops



git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5392 99fdad57-331a-0410-800a-d7fa5415bdb3
2009-08-06 04:56:47 +00:00
werner
68b4fec921 - undelete after recursive delete now brings back everything deleted in that
operation, not just one object at a time
- vector reference counting is not needed now that we have recursive delete.
  Removed it.
- completed recursive delete of vectors
- gridify: give new vectors a minimum length, so that we don't get a weird
  display when starting a new footprint.



git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5391 99fdad57-331a-0410-800a-d7fa5415bdb3
2009-08-06 04:33:49 +00:00
werner
3db91b5c1b Added delete/undelete.
- when moving a point, we no longer restrict the area around the original
  position once the drag radius has been left
- objects can now be deleted by selecting them and pressing Delete
- deleted objects can be restored by pressing "u"



git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5387 99fdad57-331a-0410-800a-d7fa5415bdb3
2009-08-05 00:32:38 +00:00
werner
5add8b5229 GUI can create silk screen objects.
- made xpm name manipulation compatible with older versions of ImageMagick
  (reported by Alvaro Lopes)
- corrected all lines beginning with five or more spaces
- Makefile
- README: fixed loop example (reported by Joerg Reisenweber)
- moved draw_arc and draw_circle from gui_inst.c to gui_util.c
- added dragging and hovering
- added creation of lines, rectangles, and arcs via GUI
- removed arc tool (use circle instead)
- fixed reference counting in vectors



git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5384 99fdad57-331a-0410-800a-d7fa5415bdb3
2009-08-04 12:06:04 +00:00
werner
96d41a37ab - moved building of an activator into new function add_activator
- added loop value selection (quick and dirty)



git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5379 99fdad57-331a-0410-800a-d7fa5415bdb3
2009-08-03 22:58:15 +00:00
werner
6c2734f6ac - combined frame and variable view into a single table
- make_var now sets up all back pointers, so we don't crash when deselecting a
  variable (this bug was uncovered by cleanup in the previous commit)
- report_parse_error didn't print a newline at the end of the message
- introduced frame reference selection and the data structures needed for it
- bounding box calculation of arcs used x for y
- added frame reference selection example quad.fpd



git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5377 99fdad57-331a-0410-800a-d7fa5415bdb3
2009-08-03 21:10:49 +00:00
werner
e1e758b54f - keyboard functions for the canvas: - zoom out, + or = zoom in, . center,
* zoom and center to extents
- variables in tables weren't properly initialized, causing stray recursive
  evaluation errors
- replaced table->active index with table->active_row pointer
- added row selection
- for fun, added tab.fpd row selection example 



git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5375 99fdad57-331a-0410-800a-d7fa5415bdb3
2009-08-03 17:58:32 +00:00
werner
e455b37abb Moved fped over to /trunk/eda
git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5374 99fdad57-331a-0410-800a-d7fa5415bdb3
2009-08-03 16:12:47 +00:00