在线咨询
eetop公众号 创芯大讲堂 创芯人才网
切换到宽版

EETOP 创芯网论坛 (原名:电子顶级开发网)

手机号码,快捷登录

手机号码,快捷登录

找回密码

  登录   注册  

快捷导航
搜帖子
123
返回列表 发新帖
楼主: 月开

[求助] skill中pcell实现finger的问题

[复制链接]
 楼主| 发表于 2025-3-24 16:46:46 | 显示全部楼层




  1. procedure(test_shieldingForm()
  2. let(()
  3.         width = hiCreateFloatField(
  4.                 ?name 'width
  5.                 ?prompt "Width"
  6.                 ?value 0.15
  7.                 ?defValue 0.15
  8.                 );hiCreateFloatField
  9.         shield_w = hiCreateFloatField(
  10.                 ?name 'shield_w
  11.                 ?prompt "Shield_W"
  12.                 ?value 0.15
  13.                 ?defValue 0.15
  14.                 );hiCreateFloatField
  15.         space = hiCreateFloatField(
  16.                 ?name 'space
  17.                 ?prompt "Space"
  18.                 ?value 0.15
  19.                 ?defValue 0.15
  20.                 );hiCreateFloatField
  21.         number = hiCreateIntField(
  22.                 ?name 'number
  23.                 ?prompt "Number"
  24.                 ?value 1
  25.                 ?defValue 1
  26.                 );hiCreateIntField
  27.         hiCreateAppForm(
  28.                 ?name 'myCreatForm
  29.                 ?formTitle "Shielding Bus"
  30.                 ?fields list(
  31.                                 list(width 15:10 250:35 200)
  32.                                      list(shield_w 15:50 250:35 200)  
  33.                                 list(space 15:90 250:35 200)
  34.                                      list(number 15:130 250:35 200)                                                                                                      
  35.                          );list
  36.                 ?callback "test_enterPath()"
  37.                 ?help "myCreatForm"
  38.                 )
  39.         hiDisplayForm('myCreatForm)
  40. );let
  41. );pro

  42. procedure(test_enterPath()
  43.     let(()
  44.         enterPath(
  45.             ?pathStyle "Truncate"
  46.             ?doneProc "test_DonePath")
  47.     t
  48.     );let
  49. );pro

  50. procedure(test_DonePath(w done pts)
  51.     let((offsetPaths n cv lpp width shield_w space number)
  52.         width = myCreatForm~>width~>value
  53.         shield_w = myCreatForm~>shield_w~>value
  54.         space = myCreatForm~>space~>value
  55.         n = myCreatForm~>number~>value
  56.         cv  = geGetEditCellView()
  57.         lpp = leGetEntryLayer()
  58.         for(i 1 n-1
  59.                 offsetPaths=
  60.                 cons(
  61.                         list(
  62.                         ?layer lpp
  63.                         ?width width
  64.                         ?sep (2*space*i + width*i + shield_w*i)
  65.                         );list
  66.                         offsetPaths
  67.                 );cons
  68.         );for
  69.         for(j 1 n+1
  70.                 offsetPaths=
  71.                 cons(
  72.                         list(
  73.                         ?layer lpp
  74.                         ?width shield_w
  75.                         ?sep (2*space*j + width*j + shield_w*j) - (width + width/2 + space*3 + shield_w + shield_w/2)
  76.                         );list
  77.                         offsetPaths
  78.                 );cons
  79.         );for
  80.         rodCreatePath(
  81.             ?cvId  cv
  82.             ?layer lpp
  83.             ?width width
  84.             ?pts pts
  85.             ?offsetSubPath offsetPaths
  86.         )
  87. );end let
  88. );end proc

  89. hiSetBindKey("Layout" "Super<Key>B" "test_shieldingForm()")


复制代码
 楼主| 发表于 昨天 23:22 | 显示全部楼层




  1. import pyecharts.options as opts
  2. from pyecharts.charts import Line
  3. import pandas as pd

  4. # 读取数据
  5. data_files = ['output2.txt', 'output3.txt', 'output4.txt', 'output5.txt', 'output6.txt']
  6. c = Line()
  7. c.add_xaxis(xaxis_data=["M1", "M2", "M3", "M4", "M5"])

  8. for file in data_files:
  9.     m_counts = {f'M{i}': 0 for i in range(1, 6)}
  10.     try:
  11.         with open(file, 'r', encoding='utf-8') as f:
  12.             content = f.read()
  13.             for m in m_counts:
  14.                 m_counts[m] += content.count(m)
  15.         c.add_yaxis(
  16.             series_name=file,
  17.             y_axis=list(m_counts.values()),
  18.             label_opts=opts.LabelOpts(is_show=True)
  19.         )
  20.     except FileNotFoundError:
  21.         print(f"文件 {file} 未找到,请检查文件路径。")

  22. c.set_global_opts(
  23.     title_opts=opts.TitleOpts(title="M1 - M5 的统计数量折线图"),
  24.     xaxis_opts=opts.AxisOpts(name="M 编号"),
  25.     yaxis_opts=opts.AxisOpts(name="数量"),
  26.     toolbox_opts=opts.ToolboxOpts(is_show=True)
  27. ).render("m_counts_separate_line.html")


复制代码
您需要登录后才可以回帖 登录 | 注册

本版积分规则

关闭

站长推荐 上一条 /1 下一条

X

小黑屋| 手机版| 关于我们| 联系我们| 隐私声明| EETOP 创芯网
( 京ICP备:10050787号 京公网安备:11010502037710 )

GMT+8, 2025-6-8 01:34 , Processed in 0.014513 second(s), 7 queries , Gzip On, MemCached On.

eetop公众号 创芯大讲堂 创芯人才网
快速回复 返回顶部 返回列表