From: yu.dongliang <18588496441@163.com> Date: Tue, 31 Oct 2023 08:28:41 +0000 (+0800) Subject: __ses_setc_xy() X-Git-Url: http://baseworks.info/?a=commitdiff_plain;h=2044618dc1f2cb4e88d208ea223ebceb6064746d;p=ses.git __ses_setc_xy() --- diff --git a/ses_layout.c b/ses_layout.c index 4d22bd8..db86034 100644 --- a/ses_layout.c +++ b/ses_layout.c @@ -854,12 +854,19 @@ static void __ses_setc_xy(ScfEfunction* f, int d) c->y = (p0->y + p1->y) / 2; p0->x = c->x; - p1->x = c->x; - for (j = 2; j < c->n_pins; j++) { + if (2 == c->n_pins) { + p1->x = c->x; + continue; + } + + for (j = 1; j < c->n_pins; j++) { p0 = c->pins[j]; - p0->x = (p0->x + 3 * c->x) / 4; + if (j & 0x1) + p0->x = c->x - d / 3; + else + p0->x = c->x + d / 3; } } }