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

23 Commits

Author SHA1 Message Date
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
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
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
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
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
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
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
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
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
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
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
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
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
1dfb8da99a - change file save logic to write to a temporary file first, so that we don't
leave an empty/corrupt main file if we crash during saving
- started adding Postscript output
- renamed "Save as KiCad" to "Write KiCad"
- switched from "manual" menu bar creation to GtkItemFactory



git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5417 99fdad57-331a-0410-800a-d7fa5415bdb3
2009-08-11 01:20:15 +00:00