绘制三维电动机的程序
绘制Y系列三维电动机的程序本帖最后由 寒潮大冬瓜 于 2025-2-27 08:20 编辑
电动机顺利绘出
谢谢楼主的分享
看来楼主的专业是电机方面
期待其他分享资料 看起来不错,但运行出错了。
程序不错,但运行不了 本帖最后由 null. 于 2025-2-27 11:20 编辑
(defun sanjiao ()
(if (null ang2)(setq ang2 0.0))
(if (null ang3)(setq ang3 0.0))
(if (null ang4)(setq ang4 0.0))
(if (null ang1)(setq ang1 0.0))
)
(defun chushihua ()
(princ)
)
(defun rtod (R )
(* R 2.0)
)
补充程序这几个函数,程序就不出错了。
本帖最后由 null. 于 2025-2-27 11:30 编辑
(defun sanjiao();;ang1 ang2 ang3 ang4
(setq ang1 0)
(setq ang2 (/ PI 2))
(setq ang3 PI)
(setq ang4 (/ (* 3 PI) 2))
)
chushihua
(defun chushihua(/ pLw delobj_old clay clt osm orth tbL1 tbL2 tbL3 tbL4 tbL5 tbL6 tbL7 tbL8)
(setvar "cmdecho" 0)
(setvar "blipmode" 0)
(setq plw (getvar "PLINEWID"))
(setq delobj_old (getvar "delobj"))
(setq clay (getvar "clayer"))
(setq clt (getvar "CELTYPE"))
(setq osm (getvar "osmode"))
(setq orth (getvar "orthomode"))
(setvar "delobj" 1)
(setvar "orthomode" 1)
(setvar "PLINEWID" 0)
;;;(setvar "3dosmode" 1)
(vl-load-com)
(setq tbL1 (tbLsearch "ltype" "center"))
(if(= tbL1 nil) (command "-linetype" "L" "center" "acadiso" ""))
(setq tbL2 (tbLsearch "ltype" "divide"))
(if(= tbL2 nil) (command "-linetype" "L" "divide" "acadiso" ""))
(setq tbL3 (tbLsearch "ltype" "hidden"))
(if(= tbL3 nil) (command "-linetype" "L" "hidden" "acadiso" ""))
(setq tbL4 (tbLsearch "layer" "cen_lay"))
(if(= tbL4 nil) (command "-layer" "N" "cen_lay" "L" "center" "cen_lay" "C" 1 "cen_lay" ""))
(setq tbL5 (tbLsearch "layer" "dim_lay"))
(if(= tbL5 nil) (command "-layer" "N" "dim_lay" "L" "continuous" "dim_lay" "C" 6 "dim_lay" ""))
(setq tbL6 (tbLsearch "layer" "suports_lay"))
(if(= tbL6 nil) (command "-layer" "N" "suports_lay" "L" "continuous" "suports_lay" "C" 4 "suports_lay" ""))
(setq tbL7 (tbLsearch "layer" "pipe_lay"))
(if(= tbL7 nil) (command "-layer" "N" "pipe_lay" "L" "continuous" "pipe_lay" "C" 112 "pipe_lay" ""))
(setq tbL8 (tbLsearch "layer" "equipment_lay"))
(if(= tbL8 nil) (command "-layer" "N" "equipment_lay" "L" "continuous" "equipment_lay" "C" 4 "equipment_lay" ""))
(command "VSCURRENT" 2 )
);;end chushihua
(defun rtod(val);;val
(/ (* val 180.0) PI); 弧度转十进位度
)补充这几个函数,就正常了
请重新下载此文件。并解压到C盘上。然后加载C:\3wcad\main program\目录中的程序文件 又搞错了。
页:
[1]