1
0
mirror of git://projects.qi-hardware.com/fped.git synced 2024-06-30 22:11:40 +03:00
Commit Graph

22 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
8cd9b7b514 Added a "Save as" dialog and made fped disable "Save" if working on a manually
created file. This is a precaution against accidently saving to a manual work,
which would change the structure and remove all comments.

- fped.h, fped.c, file.c: moved declaration of save_file_name into shared 
  header
- dump.h, dump.c (MACHINE_GENERATED): moved header marking machine-generated
  files into shared macro
- gui.c (save_as_fpd): added "Save as" dialog
- fped.h, fped.c (load_file), gui.c: disable "Save" if editing a file that 
  doesn't have the machine-generated header



git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5922 99fdad57-331a-0410-800a-d7fa5415bdb3
2010-04-20 01:11:45 +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
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
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
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
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
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
b79c252d17 - dump.c didn't complete vector names used in measurements, causing them to be
lost and producing an invalid fpd file



git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5455 99fdad57-331a-0410-800a-d7fa5415bdb3
2009-08-15 22:06: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
9f2ea8cdc2 - reduced padding around item lines
- item ordering heuristics failed to properly use "."
- updated description of "need" in dump.c
- saved fbga.fpd and sc89.fpd with new ordering



git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5427 99fdad57-331a-0410-800a-d7fa5415bdb3
2009-08-12 17:01:40 +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
57e76aeb9e - vector labels are already in a per-frame namespace, so we don't need to add
the frame name when auto-generating them
- moved file I/O from gui.c to file.c
- ps_line used the wrong endpoint coordinate
- option -k makes fped write KiCad non-interactively
- option -p makes fped write Postscript non-interactively



git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5418 99fdad57-331a-0410-800a-d7fa5415bdb3
2009-08-11 20:17:39 +00:00
werner
a0f8375c97 - trying to place a frame reference upset the overlay state and caused an abort
- dump any undumped non-measurements before the measurements
- finished sc89.fpd, with the full set of measurements



git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5415 99fdad57-331a-0410-800a-d7fa5415bdb3
2009-08-10 15:13:07 +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
dc09f3435d Various bugfixes.
- also dump the part name
- if given a zero-length vector, draw_arrow now draws a vertical arrow instead 
  of overflowing
- fixed angle calculation when drawing and selecting arcs
- redraw the screen after deselecting when we begin dragging



git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5395 99fdad57-331a-0410-800a-d7fa5415bdb3
2009-08-06 12:07:24 +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
cdcd2f36b3 - started functions to dump .fpd files (automatic labeling doesn't quite work
yet)
- don't pass argc, argv to gui_main. They've been harvested before.



git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5388 99fdad57-331a-0410-800a-d7fa5415bdb3
2009-08-05 10:35:48 +00:00