Anuncios

The Autodesk Community Forums has a new look. Read more about what's changed on the Community Announcements board.

leeminardi
en respuesta a: ltastan1

Here's a simple lisp program that will create a single polyline all to one side of a selfintersecting polyline.  You must select the polyline at a point of the loop.  For example, the green dot not the red dot.  It's best if the point specifed for the side is near the selection point.

 

leeminardi_0-1701709112298.png

 

(defun c:offset2 (/)
; creates an offset all to one side of a selfintersecting polyline  
  (setq	ent (entsel
	      "\nSelect polyline at point on self intersecting loop."
	    )
	p2  (getpoint "\nSpecify point to the side you want the offset."
	    )
	d   (getreal "\nSpecify offset distance: ")
	en1 (car ent)
	p1  (cadr ent)
  )
  (command "_break" en1 p1 "@")
  (setq en2 (entlast))
  (command "_offset" d en1 p2 "e")
  (setq en3 (entlast))
  (command "_offset" d en2 p2 "e")
  (setq en4 (entlast))
  (command "_join" en3 en4 "")
  (princ)
)

 

lee.minardi