From: yu.dongliang <18588496441@163.com> Date: Tue, 14 Nov 2023 03:01:11 +0000 (+0800) Subject: SCF_EDA_Inductor X-Git-Url: http://baseworks.info/?a=commitdiff_plain;h=2b04175d51ae4f2379cd06007163a1e54de2a559;p=ses.git SCF_EDA_Inductor --- diff --git a/ses_step_simplify.c b/ses_step_simplify.c index 850690e..534c3fd 100644 --- a/ses_step_simplify.c +++ b/ses_step_simplify.c @@ -60,28 +60,28 @@ void __ses_function_draw(ScfEfunction* f, cairo_t* cr) p = c->pins[SCF_EDA_Battery_POS]; if (p->y < c->y) { - cairo_move_to(cr, c->x - 8, c->y - 5); - cairo_line_to(cr, c->x + 8, c->y - 5); + cairo_move_to(cr, c->x - 12, c->y - 5); + cairo_line_to(cr, c->x + 12, c->y - 5); cairo_move_to(cr, c->x, c->y - 5); cairo_line_to(cr, p->x, p->y); - cairo_move_to(cr, c->x - 5, c->y + 5); - cairo_line_to(cr, c->x + 5, c->y + 5); + cairo_move_to(cr, c->x - 8, c->y + 5); + cairo_line_to(cr, c->x + 8, c->y + 5); p = c->pins[SCF_EDA_Battery_NEG]; cairo_move_to(cr, c->x, c->y + 5); cairo_line_to(cr, p->x, p->y); } else { - cairo_move_to(cr, c->x - 8, c->y + 5); - cairo_line_to(cr, c->x + 8, c->y + 5); + cairo_move_to(cr, c->x - 12, c->y + 5); + cairo_line_to(cr, c->x + 12, c->y + 5); cairo_move_to(cr, c->x, c->y + 5); cairo_line_to(cr, p->x, p->y); - cairo_move_to(cr, c->x - 5, c->y - 5); - cairo_line_to(cr, c->x + 5, c->y - 5); + cairo_move_to(cr, c->x - 8, c->y - 5); + cairo_line_to(cr, c->x + 8, c->y - 5); p = c->pins[SCF_EDA_Battery_NEG]; cairo_move_to(cr, c->x, c->y - 5); @@ -91,6 +91,24 @@ void __ses_function_draw(ScfEfunction* f, cairo_t* cr) cairo_stroke(cr); break; + case SCF_EDA_Inductor: + p = c->pins[SCF_EDA_Battery_POS]; + cairo_move_to(cr, c->x - 8, c->y - 5); + cairo_line_to(cr, c->x + 8, c->y - 5); + + cairo_move_to(cr, c->x, c->y - 5); + cairo_line_to(cr, p->x, p->y); + + cairo_move_to(cr, c->x - 8, c->y + 5); + cairo_line_to(cr, c->x + 8, c->y + 5); + + p = c->pins[SCF_EDA_Battery_NEG]; + cairo_move_to(cr, c->x, c->y + 5); + cairo_line_to(cr, p->x, p->y); + + cairo_stroke(cr); + break; + case SCF_EDA_Resistor: p = c->pins[0]; diff --git a/ses_steps.c b/ses_steps.c index 044cbc9..204bbab 100644 --- a/ses_steps.c +++ b/ses_steps.c @@ -144,7 +144,7 @@ int ses_steps_analyse(ScfEfunction* f, int64_t ns, int64_t count) return ret; int j; - for (j = 0; j < 3; j++) { + for (j = 0; j < 1; j++) { printf("\n\033[33m%s(), %d(), j: %d\033[0m\n", __func__, __LINE__, j); ret = __ses_steps_analyse(f, ns, i, ctx);