⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 tmp._ls

📁 plc设计编程软件
💻 _LS
字号:
(defun pline_int(point1 point2 pline_ent  mtrptlst / intpt i pt_list)
  (setq pt_list (ep_list (entget pline_ent)))

  (cond 
    ((= "L" (car pt_list))
      (if (not mtrptlst)
        (setq intpt (line_int (wtou (nth 1 pt_list)) (wtou (nth 2 pt_list)) point1 point2))
	(setq intpt (line_int (nth 1 pt_list) (nth 2 pt_list) point1 point2))
        (setq intpt (line_int (mtou (nth 1 pt_list) mtrptlst)
			      (mtou (nth 2 pt_list) mtrptlst)
			      point1 point2)
        )
      )
    )
    ((= "C" (car pt_list))
      (if mtrptlst
        (setq intpt (circ_int point1 point2 
			      (mtou (nth 1 pt_list) mtrptlst)
			      (* (nth 2 pt_list) (caddr (last mtrptlst))))
        )
        (setq intpt (circ_int point1 point2 (wtou (nth 1 pt_list)) (nth 2 pt_list)))
      )
    )
    ((= "A" (car pt_list))
      (if mtrptlst
        (setq intpt (arc_int (mtou (nth 1 pt_list) mtrptlst) 
	                     (mtou (nth 2 pt_list) mtrptlst) 
			     (mtou (nth 3 pt_list) mtrptlst)
		             point1 point2)
        )
        (setq intpt (arc_int (wtou (nth 1 pt_list)) (wtou (nth 2 pt_list)) (wtou (nth 3 pt_list)) point1 point2))
      )
    )
    ((= "PL" (car pt_list))
      (setq pt_count (- (length pt_list) 1))
      (setq i 1)
      (while (and (not intpt) (<= i pt_count))
        (setq intpt (nth i pt_list))
        (if mtrptlst
	  (cond
	    ((= "A" (car intpt))
              (setq intpt (arc_int (mtou (nth 1 intpt) mtrptlst) 
				   (mtou (nth 2 intpt) mtrptlst) 
				   (mtou (nth 3 intpt) mtrptlst) 
			           point1 point2)
              )
              (if intpt
	        (setq intpt (car intpt))
              )
            )
            ((= "L" (car intpt))
              (setq intpt (line_int (mtou (nth 1 intpt) mtrptlst) 
              			    (mtou (nth 2 intpt) mtrptlst) 
			            point1 point2)
              )
            )
            ((= intpt (nth i pt_list))
              (setq intpt nil)
            )
          )
	  (cond
	    ((= "A" (car intpt))
              (setq intpt (arc_int (wtou (nth 1 intpt)) (wtou (nth 2 intpt)) (wtou (nth 3 intpt)) point1 point2))
              (if intpt
	        (setq intpt (car intpt))
              )
            )
            ((= "L" (car intpt))
              (setq intpt (line_int (wtou (nth 1 intpt)) (wtou (nth 2 intpt)) point1 point2))
            )
            ((= intpt (nth i pt_list))
              (setq intpt nil)
            )
          )
        )
        (setq i (+ i 1))
      )
    )
  )
  intpt
)

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -