Lee Mac 发表于 2022-7-6 11:57:47

我很乐意担任这个职位。在我以前工作的地方,这些家伙都很拘泥于自己的方式,甚至不会尝试LISP例程——所以当我开始学习LISP时,我非常恼火,因为那些对工作流有益的代码甚至没有被考虑。因此,当我在这里寻求帮助,发现这里的人们(大多数时候)对发布的代码非常感激时,我坚持了下来。所以,现在我在大学,我只是写代码的享受,希望有人可以利用它。

ODEY 发表于 2022-7-6 12:03:58

你好
 
又是我,你收集的例行公事真的很有帮助。这个和我需要的差不多。你或者任何人能帮我修改一下吗。附件是一张照片,具体输出我想要一个例程给我。
http://img405.imageshack.us/i/offsett.jpg/
 
这也是我目前正在使用的一个类似的例程。一、
只是在一些网站上找到的,我不记得在哪里,但没有修改,我按原样使用。它将两侧偏移并删除原件。需要提供所需厚度的一半,并手动连接。
tnx。
我承认这本书的作者,无论你是谁。
;****************************************************************************
;From the Desk of PAUL STANDING                  
;
;         
;
;                  
;
; DOUBLE OFFSET DOF.lsp vs 1.0 March 28 1996
; Function creates an offset to either side of the selected entity
; and erases the original.
;      
;      
;
;
;*****************************************************************************
(defun c:DOF (/ a b b1 p1 d pckbox)
(setq d 20 p1 nil pee (/ pi 2)e 3 pckbox (getvar "pickbox")line "                               ")
(if(= #parof nil)(setq #parof(/(getvar "viewsize")10)))
(princ "\nCurrent offset <")(princ #parof)
(setq answer(getstring ">: "))
(if (/= (atof answer) 0.0)(setq #parof(atof answer)))

   (princ line)
   (setvar "pickbox" pckbox)
   (setq ent(entsel "\nPick the line: "))
   (setvar "pickbox" 2)
   (setq point(cadr ent))
   (princ line)
       (setq side(getpoint "\nPick an offset side: "))
   (setq dist(distance side point))(setq ang(angle side point))
   (if(or(or(< ang 0.78)(> ang 5.5))(and(> ang 2.35)(< ang 3.92)))
       (setq ang(- 0 ang))(setq ang(- pi ang))
   );end if
   (setq other(polar point ang dist))
   (command "offset" #parof ent side ent other "")
       (entdel(car ent))

(setvar "pickbox" pckbox)
(prin1)
)
(Prompt "\nType DOF to envoke the command")

ODEY 发表于 2022-7-6 12:08:19

出了点问题,没有显示照片。
无论如何,这是链接
http://img405.imageshack.us/i/offsett.jpg/
页: 1 [2]
查看完整版本: 偏移曲线并连接端点p