AutoCAD顧問
還沒有註冊嗎...即日起免費註冊,所有最完整的AutoCAD討論、教學及資源都在論壇裡喔~

Join the forum, it's quick and easy

AutoCAD顧問
還沒有註冊嗎...即日起免費註冊,所有最完整的AutoCAD討論、教學及資源都在論壇裡喔~
AutoCAD顧問
Would you like to react to this message? Create an account in a few clicks or log in to continue.
[分享]畫沉頭孔上或下視圖lsp Ioaoe110[分享]畫沉頭孔上或下視圖lsp 2020-310[分享]畫沉頭孔上或下視圖lsp Oiu15010[分享]畫沉頭孔上或下視圖lsp 2020-211[分享]畫沉頭孔上或下視圖lsp Ia15010[分享]畫沉頭孔上或下視圖lsp Aizyao10[分享]畫沉頭孔上或下視圖lsp Uos15010[分享]畫沉頭孔上或下視圖lsp BPl3tjj[分享]畫沉頭孔上或下視圖lsp Ziao1510
[分享]畫沉頭孔上或下視圖lsp Oo-2-110[分享]畫沉頭孔上或下視圖lsp Zuoiy_10[分享]畫沉頭孔上或下視圖lsp Aizyao11[分享]畫沉頭孔上或下視圖lsp Iyb_1510[分享]畫沉頭孔上或下視圖lsp Aoe1-111[分享]畫沉頭孔上或下視圖lsp Uos15011[分享]畫沉頭孔上或下視圖lsp Aoe2da10[分享]畫沉頭孔上或下視圖lsp Aoe2da11[分享]畫沉頭孔上或下視圖lsp Aoe10

[分享]畫沉頭孔上或下視圖lsp

3 posters

向下

[分享]畫沉頭孔上或下視圖lsp Empty [分享]畫沉頭孔上或下視圖lsp

發表 由 fu4shu 2017-04-22, 10:07

[分享]畫沉頭孔上或下視圖lsp 009710
;[counter.lsp]***畫沉頭孔上或下視圖****
(defun c:counter()
 (setvar "cmdecho" 0)    ;;指令執行過程不回應
 (setq os (getvar "osmode"))   ;;記錄原物件鎖點值
 (setvar "osmode" 39)  ;;定物件鎖點值<端點><中點><中心點><交點>
 (command "undo" "be")     ;;標記開始
 (initget "3 4 5 6 8 10 12 14 16 18 20 22 24")
 (prompt "\n只允許輸入以下規格3 4 5 6 8 10 12 14 16 18 20 22 24:<按Enter鍵為M8>")
 (setq m (getint "\n目前正視牙孔為M?<8>:"))
 (if (= m nil) (setq m 8))
 (cond ((= m 3) (run_m3))
       ((= m 4) (run_m4))
       ((= m 5) (run_m5))
((= m 6) (run_m6))
((= m 8) (run_m8))
       ((= m 10)(run_m10))
((= m 12)(run_m12))
       ((= m 14)(run_m14))
       ((= m 16)(run_m16))
((= m 18)(run_m18))
       ((= m 20)(run_m20))
       ((= m 22)(run_m22))
((= m 24)(run_m24))
  )
)
;;--run_m3-------M3-----
(defun run_m3()
 (setq md 3.5)
 (setq mm 7.0)
 (run_counter)
)
;;--run_m4-------M4-----
(defun run_m4()
 (setq md 4.5)
 (setq mm 9.0)
 (run_counter)
 )
;;--run_m5-------M5-----
(defun run_m5()
 (setq md 5.5)
 (setq mm 10.0)
 (run_counter)
)
;;--run_m6-------M6-----
(defun run_m6()
 (setq md 6.5)
 (setq mm 12.0)
 (run_counter)
)
;;--run_m8-------M8-----
(defun run_m8()
 (setq md 8.7)
 (setq mm 15.0)
 (run_counter)
 )
;;--run_m10------M10----
(defun run_m10()
 (setq md 10.7)
 (setq mm 18.0)
 (run_counter)
)
;;--run_m12-----M12-----
(defun run_m12()
 (setq md 12.7)
 (setq mm 20.0)
 (run_counter)
)
;;--run_m14-----M14-----
(defun run_m14()
 (setq md 14.7)
 (setq mm 23.0)
(run_counter)
 )
;;--run_m16-----M16-----
(defun run_m16()
 (setq md 16.7)
 (setq mm 26.0)
(run_counter)
 )
;;--run_m18-----M18-----
(defun run_m18()
 (setq md 18.7)
 (setq mm 30.0)
 (run_counter)
)
;;--run_m20-----M20-----
(defun run_m20()
 (setq md 20.7)
 (setq mm 32.0)
 (run_counter)
)
;;--run_m22-----M22-----
(defun run_m22()
 (setq md 22.7)
 (setq mm 36.0)
 (run_counter)
)
;;--run_m24-----M24-----
(defun run_m24()
 (setq md 24.7)
 (setq mm 38.0)
 (run_counter)
)
;;---run_counter----判斷上或下視沉頭孔程式----------
(defun run_counter()
(initget "U D")
(setq ud (getkword "\nU為正視圖/D為下視圖或按為U正視圖:"))
(if(= ud "nil")(setq ud "U"))
 (cond ((= ud U)(run_counter_u))
       ((= ud "D")(run_counter_d))
 )
)
;;---run_counter_u----畫上視沉頭孔程式----------
(defun run_counter_u()
(setq mr (/ md 2.0))
(setq mx (/ mm 2.0))
(setq cp (getpoint "\n點擊放置點,或按結束:"))
 (while  cp
   (setvar "osmode" 0)    ;;定物件鎖點值無
   (command  "circle" cp mr)
   (command  "circle" cp mx)
   (setvar "osmode" 39)  ;;定物件鎖點值<端點><中點><中心點><交點>
   (setq cp (getpoint "\n點擊放置點,或按結束:"))
 )
 (command "undo" "e")    ;;標記結束,在做程式復原時直接跑到標記處
 (setvar "osmode" os)     ;;回復原物件鎖點值
(prompt "\n===畫沉頭孔上或下視圖===")
(prompt "\n<<指令:counter>>程式撰寫Tseng fu-shu[[畫沉頭孔上或下視圖]]2006/4/21")
(prin1)
)
;;---run_counter_d----畫下視沉頭孔程式----------
(defun run_counter_d()
(setq mr (/ md 2.0))
(setq mx (/ mm 2.0))
(setq cp (getpoint "\n點擊放置點,或按結束:"))
 (while  cp
   (setvar "osmode" 0)    ;;定物件鎖點值無
   (command  "circle" cp mr)
   (command  "circle" cp mx "change" "l" "" "p" "lt" "HIDDEN" "")
   (setvar "osmode" 39)  ;;定物件鎖點值<端點><中點><中心點><交點>
   (setq cp (getpoint "\n點擊放置點,或按結束:"))
)
 (command "undo" "e")    ;;標記結束,在做程式復原時直接跑到標記處
 (setvar "osmode" os)     ;;回復原物件鎖點值
(prompt "\n===畫沉頭孔上或下視圖===")
(prompt "\n<<指令:counter>>程式撰寫Tseng fu-shu[[畫沉頭孔上或下視圖]]2006/4/21")
(prin1)
)
附件
[分享]畫沉頭孔上或下視圖lsp Attachment
畫沉頭孔上或下視圖.zip 您無權下載這里的附件。(2 Kb) 下載 7 次
avatar
fu4shu
初級會員
初級會員

文章總數 : 26
年齡 : 53
來自 : TAIWAN
職業 : 衝壓模具設計製造
積分 : 2
經驗值 : 5779
威望值 : 21
注冊日期 : 2008-09-15
男 天秤座 狗

回頂端 向下

[分享]畫沉頭孔上或下視圖lsp Empty 回復: [分享]畫沉頭孔上或下視圖lsp

發表 由 ttv_01 2017-04-24, 12:05

測試了一下  程式有問題喔
只能使用  上??視圖而已

____________________________________________________________________________________
[分享]畫沉頭孔上或下視圖lsp 07810
[分享]畫沉頭孔上或下視圖lsp Acad1810 [分享]畫沉頭孔上或下視圖lsp Acad2010 [分享]畫沉頭孔上或下視圖lsp Acad1810
[分享]畫沉頭孔上或下視圖lsp Acad1211 [分享]畫沉頭孔上或下視圖lsp Acad1311 [分享]畫沉頭孔上或下視圖lsp Acad1511
ttv_01
ttv_01
初級會員
初級會員

文章總數 : 145
年齡 : 34
來自 : 彰化
職業 : 倉管
愛好 : 發呆
個性 : 低調
使用年資 : 新手初學
使用版本 : AUTOCAD2008
積分 : 4
經驗值 : 5559
威望值 : 288
注冊日期 : 2011-08-16
藍鵲234號
女 金牛座 蛇

回頂端 向下

[分享]畫沉頭孔上或下視圖lsp Empty 回復: [分享]畫沉頭孔上或下視圖lsp

發表 由 Tiger&蘋果爸 2017-04-25, 10:08

ttv_01 寫到:測試了一下  程式有問題喔
只能使用  上??視圖而已
你有調整ltscale線型的整體比例嗎?
調整後就可以顯示下視圖(虛線)
[分享]畫沉頭孔上或下視圖lsp 009710
竊喜

____________________________________________________________________________________
👉[好康]🎁加入專屬B取得大補帖及看2D+3D影片(點我)👈
[分享]畫沉頭孔上或下視圖lsp Sesa2011 [分享]畫沉頭孔上或下視圖lsp Youtub11 [分享]畫沉頭孔上或下視圖lsp Oiea2011 [分享]畫沉頭孔上或下視圖lsp Oe20011 [分享]畫沉頭孔上或下視圖lsp Fbi20011 [分享]畫沉頭孔上或下視圖lsp Line2011
Tiger&蘋果爸
Tiger&蘋果爸
系統管理員
系統管理員

文章總數 : 21115
年齡 : 48
來自 : 台北市文山區
職業 : AutoCAD顧問
愛好 : 蹓狗/戶外活動/拍照/吸貓
個性 : 幽默/樂觀/善良
使用年資 : 20↑
使用版本 : AutoCAD 2022
經驗值 : 88656
威望值 : 16958
注冊日期 : 2008-04-23
2D基礎函授 2D進階函授 3D基礎函授 https://i.servimg.com/u/f11/19/71/67/71/2d3d10.png2D+3D線上 顧問外掛程式 經典問與答讀者 藍鵲1號
2009聚會勳章 2010聚會勳章 2011聚會勳章 2012聚會勳章 2013勳章-2D基礎 2014聚會勳章 2015聚會勳章 2016聚會勳章 串連貼紙成功 男 水瓶座 兔

http://mypaper.pchome.com.tw/kv1012tiger

回頂端 向下

回頂端


 
這個論壇的權限:
無法 在這個版面回復文章
[分享]畫沉頭孔上或下視圖lsp Ioaoe110[分享]畫沉頭孔上或下視圖lsp 2020-310[分享]畫沉頭孔上或下視圖lsp Oiu15010[分享]畫沉頭孔上或下視圖lsp 2020-211[分享]畫沉頭孔上或下視圖lsp Ia15010[分享]畫沉頭孔上或下視圖lsp Aizyao10[分享]畫沉頭孔上或下視圖lsp Uos15010[分享]畫沉頭孔上或下視圖lsp BPl3tjj[分享]畫沉頭孔上或下視圖lsp Ziao1510
[分享]畫沉頭孔上或下視圖lsp Oo-2-110[分享]畫沉頭孔上或下視圖lsp Zuoiy_10[分享]畫沉頭孔上或下視圖lsp Aizyao11[分享]畫沉頭孔上或下視圖lsp Iyb_1510[分享]畫沉頭孔上或下視圖lsp Aoe1-111[分享]畫沉頭孔上或下視圖lsp Uos15011[分享]畫沉頭孔上或下視圖lsp Aoe2da10[分享]畫沉頭孔上或下視圖lsp Aoe2da11[分享]畫沉頭孔上或下視圖lsp Aoe10