edisonzheng1986 发表于 2024-9-29 10:32:20

设置2oz层间距规则

我在制作一个导入初始化间距规则的skill。使用的when+axlCNSSetSpacing。
对于2oz层,间距规则要求更大,比如6mil。请问when()括号中的条件参数应该怎么设?

markgoob 发表于 2024-10-1 09:49:40

;用axlGetXSection能獲取完整層別/疊構資訊
xsec_list = axlGetXSection()
foreach(s_xsec xsec_list

Layer_Function = nth(1 s_xsec)
Layer_Th_Val = nth(3 s_xsec)
Layer_Th_Val_int = car(parseString(Layer_Th_Val " "))
SET_NAME = "DEFAULT"

;使用axlMKS2UU() 在任何單位下都可以自動轉換
D4_ALL_over_2oz = axlMKS2UU(sprintf(nil "%L mil" 6))
D4_ALL_s_2oz = axlMKS2UU(sprintf(nil "%L mil" 4))
;string to float數值轉換
when(Layer_Th_Val_int != nil Layer_Th_Val_int = atof(Layer_Th_Val_int))

;判斷CONDUCTOR名稱
when(Layer_Function == "CONDUCTOR" || Layer_Function == "PLANE"

        if(Layer_Th_Val >= 2.36 then

;;;;;;;;;;;;;; >>> 在這邊設定cmgr 大於2oz <<< ;;;;;;;;;;;;;;
;預設全數值 axlCNSGetSpacing(nil nil nil) 可查看可設定值
        foreach(x axlCNSGetSpacing(nil nil nil) axlCNSSetSpacing(SET_NAME nil x D4_ALL_over_2oz))
       
        else
;;;;;;;;;;;;;; >>> 在這邊設定cmgr 小於2oz <<< ;;;;;;;;;;;;;;
;預設全數值
        foreach(x axlCNSGetSpacing(nil nil nil) axlCNSSetSpacing(SET_NAME nil x D4_ALL_s_2oz))
        );END IF

);WHEN CONDUCTOR PLANE
);END FOREACH
页: [1]
查看完整版本: 设置2oz层间距规则