From 2b04175d51ae4f2379cd06007163a1e54de2a559 Mon Sep 17 00:00:00 2001 From: "yu.dongliang" <18588496441@163.com> Date: Tue, 14 Nov 2023 11:01:11 +0800 Subject: [PATCH] SCF_EDA_Inductor --- ses_step_simplify.c | 34 ++++++++++++++++++++++++++-------- ses_steps.c | 2 +- 2 files changed, 27 insertions(+), 9 deletions(-) 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); -- 2.25.1