1
0
mirror of git://projects.qi-hardware.com/fped.git synced 2024-11-25 20:09:21 +02:00

- 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
This commit is contained in:
werner 2009-08-15 23:25:05 +00:00
parent b79c252d17
commit 230de72552
4 changed files with 19 additions and 6 deletions

View File

@ -10,6 +10,8 @@
# (at your option) any later version.
#
PREFIX = /usr/local
OBJS = fped.o expr.o coord.o obj.o delete.o inst.o util.o error.o \
unparse.o file.o dump.o kicad.o postscript.o meas.o \
cpp.o lex.yy.o y.tab.o \
@ -67,7 +69,7 @@ endif
# ----- Rules -----------------------------------------------------------------
.PHONY: all dep depend clean
.PHONY: all dep depend clean install uninstall
.SUFFIXES: .fig .xpm
@ -111,6 +113,14 @@ endif
# ----- Cleanup ---------------------------------------------------------------
clean:
clean:
rm -f $(OBJS) $(XPMS:%=icons/%)
rm -f lex.yy.c y.tab.c y.tab.h y.output .depend
# ----- Install / uninstall ---------------------------------------------------
install:
install -m 755 fped $(PREFIX)/bin/
uninstall:
rm -f $(PREFIX)/bin/fped

View File

@ -229,6 +229,8 @@ static void do_delete_obj(struct obj *obj)
del = new_deletion(dt_obj);
del->u.obj.ref = obj;
del->u.obj.prev = prev;
if (obj->type == ot_frame && obj->u.frame.ref->active_ref == obj)
obj->u.frame.ref->active_ref = NULL;
}

7
inst.c
View File

@ -804,12 +804,13 @@ int inst_arc(struct obj *obj, struct coord center, struct coord start,
struct inst *inst;
double r, a1, a2;
inst = add_inst(&arc_ops, ip_arc, center);
a1 = theta(center, start);
a2 = theta(center, end);
inst = add_inst(&arc_ops,
fmod(a1, 360) == fmod(a2, 360) ? ip_circ : ip_arc, center);
inst->obj = obj;
r = hypot(start.x-center.x, start.y-center.y);
inst->u.arc.r = r;
a1 = theta(center, start);
a2 = theta(center, end);
inst->u.arc.a1 = a1;
inst->u.arc.a2 = a2;
inst->u.arc.width = width;

View File

@ -145,7 +145,7 @@ static void kicad_circ(FILE *file, const struct inst *inst)
units_to_kicad(inst->base.x),
-units_to_kicad(inst->base.y),
units_to_kicad(inst->base.x),
units_to_kicad(inst->base.y+inst->u.arc.r),
-units_to_kicad(inst->base.y+inst->u.arc.r),
units_to_kicad(inst->u.arc.width),
layer_silk_top);
}