tmp
authoryu.dongliang <18588496441@163.com>
Thu, 13 Jul 2023 13:01:57 +0000 (21:01 +0800)
committeryu.dongliang <18588496441@163.com>
Thu, 13 Jul 2023 13:01:57 +0000 (21:01 +0800)
main.c
ses_layout.c

diff --git a/main.c b/main.c
index cd0eda33e7153510966c3a6a066dcef1d47e54dd..b66b5fc1782405c51ff14c2724df486e309bbd04 100644 (file)
--- 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;
index 64747c1944abada761bc29e014fe20de4a5a3331..def801dfa440afab2b831d1d0f20f324642fb538 100644 (file)
@@ -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;