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

101 Commits

Author SHA1 Message Date
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
werner
f368014b3c - stupid typo made us crash when setting the package name
git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5481 99fdad57-331a-0410-800a-d7fa5415bdb3
2009-08-18 20:57:09 +00:00
werner
37b52f23fe Finally found a nice way to draw arcs in the GUI.
- we freed a package's samples list after recalculating the number of samples,
  which caused a crash after adding a new vector. We now record the original 
  list length in the package structure.
- when dragging a circle, offer the end point first, so that it becomes an arc



git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5480 99fdad57-331a-0410-800a-d7fa5415bdb3
2009-08-18 20:52:09 +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
9e1631df30 - ctime(3) already provides a newline, so don't add an extra one to the .mod
file, possibly confusing KiCad



git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5463 99fdad57-331a-0410-800a-d7fa5415bdb3
2009-08-16 12:24:03 +00:00
werner
be86e276b8 - adjust measurement bbox for projection (still not perfect, but better)
- we can now scroll-wheel through table rows
- added menu branch "View" with zoom and var/code display controls
- commented out is_min_of_next until its fate is decided, so that we don't get 
  a warning



git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5462 99fdad57-331a-0410-800a-d7fa5415bdb3
2009-08-16 12:04:01 +00:00
werner
5a86125002 Added Postscript outout for measurements, plus assorted changes.
- postscript.c: added patterns backhatchpath and crosspath (for pad overlaid 
  with solder paste)
- postscript.c: added measurements
- postscript.c: prefixed style parameters with PS_ to avoid future conflicts
  with gui_style.h
- when changing the default unit, we now cancel the selection, and refresh 
  canvas and current position
- on-screen measurements now suppress the unit if set to anything but "auto"
- use  __attribute__((format(printf, ...))) for printf-like functions
- the unit selector now has a white background to make it clearer that it can 
  be clicked



git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5461 99fdad57-331a-0410-800a-d7fa5415bdb3
2009-08-16 11:21:48 +00:00
werner
e3794589a8 - when editing a value list, we need to return the values and free them in case
of successful validation
- free previous expression in set_col_values
- added rapid entry also for table values (fill the row)



git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5460 99fdad57-331a-0410-800a-d7fa5415bdb3
2009-08-16 05:05:12 +00:00
werner
64f80e84a2 Columns and loops can now be entered in one step as var = val, val, ...
- moved definition of expr_result from expr.c to fpd.y
- new header file fpd.h with all the things fpd.l and fpd.y export
- edit_var already calls edit_nothing, so there's no need to call it before
- added rapid entry option for loops, variables, and columns: var = val, ...



git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5459 99fdad57-331a-0410-800a-d7fa5415bdb3
2009-08-16 04:12:37 +00:00
werner
233fc4b683 - added KiCad export of arcs
- added pad names to Postscript export



git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5458 99fdad57-331a-0410-800a-d7fa5415bdb3
2009-08-16 01:51:21 +00:00
werner
230de72552 - Makefile: fixed odd indentation of "clean" target
- Makfile: added "install" and "uninstall" targets
- when deleting the currently active frame reference, reset active_ref of the
  frame, so that it can be set to a new value later
- during instantiation, circles were classified as arcs
- end point of KiCad circle didn't mirror the Y axis



git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5457 99fdad57-331a-0410-800a-d7fa5415bdb3
2009-08-15 23:25:05 +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
ef58598695 - added -std=gnu99 so that we can use "round" and M_PI
- added unit status and selection (in lower right corner)
- added automatic unit selection
- pointer coordinates are now shown with their unit
- updated display of X, Y, width, offset, and radius for unit selection



git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5454 99fdad57-331a-0410-800a-d7fa5415bdb3
2009-08-15 20:52:08 +00:00
werner
6f00ab6ac2 - KiCad is very liberal when it comes to valid part names, and so are we now
(i.e., we now accept anything but control and non-ASCII characters)



git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5446 99fdad57-331a-0410-800a-d7fa5415bdb3
2009-08-14 22:12:16 +00:00
werner
7af014b516 - when selecting an item in the canvas, we now check that the underlying object
is still connected. This prevents surprises when making extensive changes
  during instantiation failure.



git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5445 99fdad57-331a-0410-800a-d7fa5415bdb3
2009-08-14 15:53:21 +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
dbcfae8261 - objects selected via the item view can now be edited directly, even if no
instance is found. This allows recovery from mistakes where a failing item
  never gets instantiated.



git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5434 99fdad57-331a-0410-800a-d7fa5415bdb3
2009-08-13 10:57:39 +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
2d8b36d65c - named vectors in sc89.fpd
- README: described use of "loop" as "if" and change fbga.fpd to use this



git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5428 99fdad57-331a-0410-800a-d7fa5415bdb3
2009-08-12 17:56:55 +00:00