From b2011188dac847a73b062b1108324d5a450148d6 Mon Sep 17 00:00:00 2001 From: "yu.dongliang" <18588496441@163.com> Date: Thu, 13 Jul 2023 21:01:57 +0800 Subject: [PATCH] tmp --- main.c | 2 +- ses_layout.c | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/main.c b/main.c index cd0eda3..b66b5fc 100644 --- a/main.c +++ b/main.c @@ -58,7 +58,7 @@ int main(int argc, char* argv[]) ScfEboard* b = scf_eboard__unpack(NULL, len, pb); ses_layout_board(b, 0, 0, 500, 500); -#if 1 +#if 0 size_t i; size_t j; size_t k; diff --git a/ses_layout.c b/ses_layout.c index 64747c1..def801d 100644 --- a/ses_layout.c +++ b/ses_layout.c @@ -422,11 +422,11 @@ int ses_layout_function(ScfEfunction* f, uint32_t d, uint32_t bx, uint32_t by, u p0->x = el0->lines[0]->x0; p1->x = el1->lines[0]->x0; } else { - p0->x = el0->lines[0]->x1 + j * d; - p1->x = el1->lines[0]->x1 + j * d; + p0->x = el0->lines[0]->x1 + j * d + rand() % 10; + p1->x = el1->lines[0]->x1 + j * d + rand() % 10; - el0->lines[0]->x1 += j * d; - el1->lines[0]->x1 += j * d; + el0->lines[0]->x1 += j * d + 10; + el1->lines[0]->x1 += j * d + 10; } p0->y = el0->lines[0]->y0; @@ -458,8 +458,8 @@ int ses_layout_function(ScfEfunction* f, uint32_t d, uint32_t bx, uint32_t by, u if (SCF_EDA_Battery == c->type) p0->x = el0->lines[0]->x0; else { - p0->x = el0->lines[0]->x1 + d; - el0->lines[0]->x1 += d; + p0->x = el0->lines[0]->x1 + d + rand() % 10; + el0->lines[0]->x1 += d + 10; } p0->y = el0->lines[0]->y1; -- 2.25.1