📄 moldbase._ls
字号:
(setq PThk (get_tile "sbPlateThk"))
(if (>= (atoi PThk) 25)
(setq sbPThk (atof PThk)
err_PT3 nil)
(setq err_PT3 "Invalid!"
sbPThk nil)
)
(if err_PT3
(set_tile "sbPlateThk" err_PT3)
)
)
)
(if (and MoldSpecNum aPThk bPThk sbPThk)
(progn
(mode_tile "next34" 0)
(mode_tile "next34" 2)
(if (= aPThk (fix aPThk))
(setq aPThk (fix aPThk))
)
(if (= bPThk (fix bPThk))
(setq bPThk (fix bPThk))
)
(if (= sbPThk (fix sbPThk))
(setq sbPThk (fix sbPThk))
)
)
)
)
(defun setTapHoldSpec( / TapHoldLib Ta Tb TaTemp)
(setq TapHoldLib '(("15015025" "15015030" "15015035" "15015040" "15015050" "15015060" "15015070" "15020025" "15020030" "15020035" "15020040"
"15020050" "15020060" "15020070" "15025025" "15025030" "15025035" "15025040" "15025050" "15025060" "15025070" (10 20 28))
("18020025" "18020030" "18020035" "18020040" "18020050" "18020060" "18020070" "18020080" "18023025" "18020030" "18023035"
"18023040" "18023050" "18023060" "18023070" "18023080" "18025025" "18025030" "18025035" "18025040" "18025050" "18025060"
"18025070" "18025080" "20020025" "20020030" "20020035" "20020040" "20020050" "20020060" "20020070" "20020080" "20023025"
"20023030" "20023035" "20023040" "20023050" "20023060" "20023070" "20023080" "20025025" "20025030" "20025035" "20025040"
"20025050" "20025060" "20025070" "20025080" "20030025" "20030030" "20030035" "20030040" "20030050" "20030060" "20030070"
"20030080" "20035025" "20035030" "20035035" "20035040" "20035050" "20035060" "20035070" "20035080" "23030025" "23030030"
"23030035" "23030040" "23035025" "23035030" "23035035" "23035040" "25025030" "25025035" "25025040" "25027030" "25027035"
"25027040" "25030030" "20030035" "20030040" (12 24 33))
("23030050" "23030060" "23030070" "23030080" "23035050" "23035060" "23035070" "23035080" "25025050" "25025060" "25025070"
"25025080" "25025090" "250250100" "25027050" "25027060" "25027070" "25027080" "25027090" "250270100" "25030050" "25030060"
"25030070" "25030080" "25030090" "250300100" "25035030" "25035035" "25035040" "25035050" "25035060" "25035070" "25035080"
"25035090" "25035100" "25040030" "25040035" "25040040" "25040050" "25040060" "25040070" "25040080" "25040090" "250400100"
"25050030" "25050035" "25050040" "25050050" "25050060" "25050070" "25050080" "25050090" "250500100" "27030030" "27030035"
"27030040" "27030050" "27030060" "27030070" "27030080" "27030090" "270300100" "27035030" "27035035" "27035040" "27035050"
"27035060" "27035070" "27035080" "27035090" "270350100" "27040030" "27040035" "27040040" "27040050" "27040060" "27040070"
"27040080" "27040090" "270400100" "30030030" "30030035" "30030040" "30030050" "30030060" "30030070" "30030080" "30030090"
"300300100" "300300110" "300300120" "300300130" "30035030" "30035035" "30035040" "30035050" "30035060" "30035070" "30035080"
"30035090" "300350100" "300350110" "300350120" "300350130" (16 29 39))
("30040035" "30040040" "30040050" "30040060" "30040070" "30040080" "30040090" "300400100" "300400110" "300400120" "300400130"
"30045035" "30045040" "30045050" "30045060" "30045070" "30045080" "30045090" "300450100" "300450110" "300450120" "300450130"
"30050035" "30050040" "30050050" "30050060" "30050070" "30050080" "30050090" "300500100" "300500110" "300500120" "300500130"
"35035040" "35035050" "35035060" "35035070" "35035080" "35035090" "350350100" "350350110" "350350120" "350350130" "35040040"
"35040050" "35040060" "35040070" "35040080" "35040090" "350400100" "350400110" "350400120" "350400130" (20 33 46))
("30060035" "30060040" "30060050" "30060060" "30060070" "30060080" "30060090" "300600100" "300600110" "300600120" "300600130"
"35045040" "35045050" "35045060" "35045070" "35045080" "35045090" "350450100" "350450110" "350450120" "350450130" "35050040"
"35050050" "35050060" "35050070" "35050080" "35050090" "350500100" "350500110" "350500120" "350500130" "350500140" "350500150"
"35060040" "35060050" "35060060" "35060070" "35060080" "35060090" "350600100" "350600110" "350600120" "350600130" "350600140"
"350600150" "35070040" "35070050" "35070060" "35070070" "35070080" "35070090" "350700100" "350700110" "350700120" "350700130"
"350700140" "350700150" "40040040" "40040050" "40040060" "40040070" "40040080" "40040090" "400400100" "400400110" "400400120"
"400400130" "400400140" "400400150" "40045040" "40045050" "40045060" "40045070" "40045080" "40045090" "400450100" "400450110"
"400450120" "400450130" "400450140" "400450150" "40050040" "40050050" "40050060" "40050070" "40050080" "40050090" "400500100"
"400500110" "400500120" "400500130" "400500140" "400500150" "40055040" "40060040" "40070040" (24 41 56))
("40055050" "40055060" "40055070" "40055080" "40055090" "400550100" "400550110" "400550120" "400550130" "400550140" "400550150"
"40060050" "40060060" "40060070" "40060080" "40060090" "400600100" "400600110" "400600120" "400600130" "400600140" "400600150"
"40070050" "40070060" "40070070" "40070080" "40070090" "400700100" "400700110" "400700120" "400700130" "400700140" "400700150"
"45045050" "45045060" "45045070" "45045080" "45045090" "450450100" "450450110" "450450120" "450450130" "450450140" "450450150"
"450450160" "450450170" "450450180" "45050050" "45050060" "45050070" "45050080" "45050090" "450500100" "450500110" "450500120"
"450500130" "450500140" "450500150" "450500160" "450500170" "450500180" "45055050" "45055060" "45055070" "45055080" "45055090"
"450550100" "450550110" "450550120" "450550130" "450550140" "450550150" "450550160" "450550170" "450550180" "45060050" "45060060"
"45060070" "45060080" "45060090" "450600100" "450600110" "450600120" "450600130" "450600140" "450600150" "450600160" "450600170"
"450600180" "45070050" "45070060" "45070070" "45070080" "45070090" "450700100" "450700110" "450700120" "450700130" "450700140"
"450700150" "450700160" "450700170" "450700180" "50050050" "50050060" "50050070" "50050080" "50050090" "500500100" "500500110"
"500500120" "500500130" "500500140" "500500150" "500500160" "500500170" "500500180" "50055050" "50055060" "50055070" "50055080"
"50055090" "500550100" "500550110" "500550120" "500550130" "500550140" "500550150" "500550160" "500550170" "500550180" "50060050"
"50060060" "50060070" "50060080" "50060090" "500600100" "50070050" "50070060" "50070070" "50070080" "50070090" "500700100"
"55055070" "55055080" "55055090" "550550100" "55060070" "55060080" "55060090" "550600100" "55070070" "55070080" "55070090"
"550700100" "60060070" "60060080" "60060090" "600600100" "60065070" "60065080" "60065090" "600650100" "60065070" "60065080"
"60065090" "600650100" "60070070" "60070080" "60070090" "600700100" "60075070" "60075080" "60075090" "600750100" "60080070"
"60080080" "60080090" "600800100" (30 49 67))
("500600110" "500600120" "500600130" "500600140" "500600150" "500600160" "500600170" "500600180" "500700110" "500700120" "500700130"
"500700140" "500700150" "500700160" "500700170" "500700180" "550550110" "550550120" "550550130" "550550140" "550550150" "550550160"
"550550170" "550550180" "550550200" "550600110" "550600120" "550600130" "550600140" "550600150" "550600160" "550600170" "550600180"
"550600200" "550650110" "550650120" "550650130" "550650140" "550650150" "550650160" "550650170" "550650180" "550650200" "550700110"
"550700120" "550700130" "550700140" "550700150" "550700160" "550700170" "550700180" "550700200" "600600110" "600600120" "600600130"
"600600140" "600600150" "600600160" "600600170" "600600180" "600600200" "600650110" "600650120" "600650130" "600650140" "600650150"
"600650160" "600650170" "600650180" "600650200" "600700110" "600700120" "600700130" "600700140" "600700150" "600700160" "600700170"
"600700180" "600700200" "600750110" "600750120" "600750130" "600750140" "600750150" "600750160" "600750170" "600750180" "600750200"
"600800110" "600800120" "600800130" "600800140" "600800150" "600800160" "600800170" "600800180" "600800200" (36 59 82))))
(setq PlateThkLib '(25 30 35 40 50 60 70 80 90 100 110 120 130 140 150 160 170 180 200))
(setq i 1)
(setq Ta (nth 0 PlateThkLib))
(setq Tb (nth 0 PlateThkLib))
(while (< i 18)
(setq TaTemp (nth i PlateThkLib))
(if (> (abs (- aPThk Ta)) (abs (- aPThk TaTemp)))
(setq Ta TaTemp)
)
(if (> (abs (- bPThk Tb)) (abs (- bPThk TaTemp)))
(setq Tb TaTemp)
)
(setq i (+ i 1))
)
(setq aLabel (strcat (itoa (* 2 cpX)) (itoa (* 2 cpY)) (itoa Ta)))
(setq bLabel (strcat (itoa (* 2 cpX)) (itoa (* 2 cpY)) (itoa Tb)))
(foreach Lst TapHoldLib
(progn
(if (xh_get aLabel Lst)
(setq TapHaD (car (last Lst))
TapHaI (cadr (last Lst))
TapHaL (caddr (last Lst))
)
)
(if (xh_get bLabel Lst)
(setq TapHbD (car (last Lst))
TapHbI (cadr (last Lst))
TapHbL (caddr (last Lst))
)
)
)
)
)
;------------------------------------------------------------------
;Modify return pin and determine whether add spring or not
;------------------------------------------------------------------
(defun ResetRpn()
(setq RpnLst ("12" "15" "20"))
(setq SpgLst ("26" "32" "40"))
(setq IfExitMold33 t)
(load "sp_lib")
(while IfExitMold33
(if (not (new_dialog "mold33" MoldDclId))
(exit)
)
(if (not IfRpnNew)
(setq IfRpnNew "0")
)
(set_tile "IfRpnNew" IfRpnNew)
(ini_list "RpnSpecLst" RpnLst)
(if (= "0" (get_tile "IfRpnNew"))
(progn
(mode_tile "RpnSpecLst" 1)
(mode_tile "RpnSpec" 1)
)
(progn
(mode_tile "RpnSpecLst" 0)
(mode_tile "RpnSpec" 0)
)
)
(if (xh_get (itoa rpnD) RpnLst)
(progn
(set_tile "RpnSpecLst" (itoa (xh_get (itoa rpnD) RpnLst)))
(set_tile "RpnSpec" (itoa rpnD))
)
(progn
(setq IfAddSpg "0")
(mode_tile "IfAddSpg" 1)
)
)
(if (not IfAddSpg)
(setq IfAddSpg "0")
)
(set_tile "IfAddSpg" IfAddSpg)
(if (not mb)
(setq mb "M")
)
(if (= "M" mb)
(set_tile "mb" "0")
(set_tile "mb" "1")
)
(if (not SpgHolDep)
(progn
(setq SpgHolDep (fix (* 0.12 (- sbPThk epZ erpZ 5))))
(set_tile "SpgHDep" (itoa SpgHolDep))
)
(set_tile "SpgHDep" (itoa SpgHolDep))
)
(ini_list "SpgSpecLst" SpgLst)
(setSpgLst)
(setMb)
(action_tile "IfRpnNew" "(setRpnLst)")
(action_tile "IfAddSpg" "(setSpgLst)")
(action_tile "RpnSpecLst" "(RpnSpecCli)")
(action_tile "SpgSpecLst" "(SpgSpecCli)")
(action_tile "SpgLenLst" "(SpgLenCli)")
(action_tile "OK" "(ResetRpnData)")
(action_tile "mb" "(setMb)")
(start_dialog)
)
)
(defun setRpnLst()
(setq IfRpnNew (get_tile "IfRpnNew"))
(if (= "1" ifRpnNew)
(progn
(mode_tile "RpnSpecLst" 0)
(mode_tile "RpnSpec" 0)
)
(progn
(mode_tile "RpnSpecLst" 1)
(mode_tile "RpnSpec" 1)
)
)
)
(defun RpnSpecCli()
(set_tile "RpnSpec" (nth (atoi (get_tile "RpnSpecLst")) RpnLst))
(mode_tile "IfAddSpg" 0)
(if (= "1" IfAddSpg)
(progn
(set_tile "mb" "0")
(setMb)
)
)
)
(defun SpgSpecCli()
(cond
((= "M" mb)
(set_tile "SpgSpec" (nth (atoi (get_tile "SpgSpecLst")) SpgLst))
(ini_list "SpgLenLst" (nth (+ (atoi (get_tile "SpgSpecLst")) 3) (sp_lib "SPM" "spl")))
)
((= "B" mb)
(set_tile "SpgSpec" (nth (atoi (get_tile "SpgSpecLst")) (sp_lib "SPB" "spec")))
(ini_list "SpgLenLst" (nth (atoi (get_tile "SpgSpecLst")) (sp_lib "SPB" "spl")))
)
)
)
(defun SpgLenCli()
(cond
((= "M" mb)
(set_tile "SpgSpec" (strcat (nth (atoi (get_tile "SpgSpecLst")) SpgLst) "X"
(nth (atoi (get_tile "SpgLenLst")) (nth (+ (atoi (get_tile "SpgSpecLst")) 3) (sp_lib "SPM" "spl")))))
)
((= "B" mb)
(set_tile "SpgSpec" (strcat (nth (atoi (get_tile "SpgSpecLst")) (sp_lib "SPB" "spec")) "X"
(nth (atoi (get_tile "SpgLenLst")) (nth (atoi (get_tile "SpgSpecLst")) (sp_lib "SPB" "spl")))))
)
)
)
(defun setSpgLst()
(setq IfAddSpg (get_tile "IfAddSpg"))
(if (= "0" IfAddSpg)
(progn
(mode_tile "mb" 1)
(mode_tile "SpgSpecLst" 1)
(mode_tile "SpgLenLst" 1)
(mode_tile "SpgHDep" 1)
)
(progn
(mode_tile "mb" 0)
(mode_tile "SpgSpecLst" 0)
(mode_tile "SpgLenLst" 0)
(mode_tile "SpgHDep" 0)
(if (= "B" mb)
(ini_list "SpgLenLst" (nth (atoi (get_tile "SpgSpecLst")) (sp_lib "SPB" "spl")))
(progn
(set_tile "SpgSpecLst" (get_tile "RpnSpecLst"))
(set_tile "SpgSpec" (nth (atoi (get_tile "SpgSpecLst")) SpgLst))
(ini_list "SpgLenLst" (nth (+ (atoi (get_tile "SpgSpecLst")) 3) (sp_lib "SPM" "spl")))
)
)
)
)
)
(defun setMb()
(if (= "1" (get_tile "mb"))
(setq mb "B")
(setq mb "M")
)
(if (= "1" IfAddSpg)
(cond
((= "B" mb)
(ini_list "SpgSpecLst" (sp_lib "SPB" "spec"))
(ini_list "SpgLenLst" ())
(set_tile "SpgSpec" "")
)
((= "M" mb)
(ini_list "SpgSpecLst" SpgLst)
(if (= "1" IfRpnNew)
(set_tile "SpgSpecLst" (get_tile "RpnSpecLst"))
)
(set_tile "SpgSpec" (nth (atoi (get_tile "SpgSpecLst")) SpgLst))
(ini_list "SpgLenLst" (nth (+ (atoi (get_tile "SpgSpecLst")) 3) (sp_lib "SPM" "spl")))
)
)
)
)
(defun ResetRpnData()
(if (= "1" IfRpnNew)
(setq rpnD (atoi (nth (atoi (get_tile "RpnSpecLst")) RpnLst)))
)
(if (= "1" IfAddSpg)
(if (= "" (get_tile "SpgSpecLst"))
(setq Msg "Invalid Spring specification!")
(if (= "" (get_tile "SpgLenLst"))
(setq Msg "Invalid Spring length!")
(cond
((= "B" mb)
(setq SpgTyp (nth (atoi (get_tile "SpgSpecLst")) (sp_lib "SPB" "spec")))
(setq SpgLen (nth (atoi (get_tile "SpgLenLst")) (nth (xh_get SpgTyp (sp_lib "SPB" "spec")) (sp_lib "SPB" "spl"))))
(setq SpgOd (nth (atoi (get_tile "SpgSpecLst")) (sp_lib "SPB" "od")))
(setq SpgId (nth (atoi (get_tile "SpgSpecLst")) (sp_lib "SPB" "id")))
(setq SpgA (nth (atoi (get_tile "SpgSpecLst")) (sp_lib "SPB" "r1")))
(setq SpgB (nth (atoi (get_tile "SpgSpecLst")) (sp_lib "SPB" "r2")))
(setq SpgOd (* SpgOd 25.4))
(setq SpgId (* SpgId 25.4))
(setq Msg nil)
)
((= "M" mb)
(setq SpgTyp (nth (atoi (get_tile "SpgSpecLst")) SpgLst))
(setq SpgLen (nth (atoi (get_tile "SpgLenLst")) (nth (xh_get SpgTyp (sp_lib "SPM" "spec")) (sp_lib "SPM" "spl"))))
(setq SpgOd (nth (xh_get SpgTyp (sp_lib "SPM" "spec")) (sp_lib "SPM" "od")))
(setq SpgId (nth (xh_get SpgTyp (sp_lib "SPM" "spec")) (sp_lib "SPM" "id")))
(setq SpgA (nth (xh_get SpgTyp (sp_lib "SPM" "spec")) (sp_lib "SPM" "r1")))
(setq SpgB (nth (xh_get SpgTyp (sp_lib "SPM" "spec")) (sp_lib "SPM" "r2")))
(setq Msg nil)
)
)
)
)
)
(if Msg
(set_tile "MSG33" Msg)
(progn
(setq IfNext 1)
(setq SpgHolDep (atoi (get_tile "SpgHDep")))
(if (= "1" IfAddSpg)
(if (>= 0 SpgHolDep)
(setq IfNext (yn "Spring Hole depth is 0, Continuous?"))
)
)
(if (= 1 IfNext)
(progn
(done_dialog)
(setq IfExitMold33 nil)
)
(mode_tile "SpgHDep" 4)
)
)
)
)
;********************************************************************************************************;
(defun MoldPosition(/ V1BasePt V2BasePt V3BasePt V4BasePt IfExitMoldPosition gpt
MoldPosNext)
(setq IfExitMoldPos T)
(setq IfOnScr "0")
(while IfExitMoldPos
(if (not (new_dialog "mold41" MoldDclId))
(exit)
)
(IniMoldPos)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -