Code Red > AutoLISP (Vanilla / Visual)

Offset automatic - Help please

(1/1)

fabiocosta81:
How can I create a lisp that does this drawing? It's a polyline that has a thickness of 0.04 and has this overlap, I can use the red line to offset 0.08 and build it, but I would like to automate.
ONLY THE PINK LINES.

fabiocosta81:
I managed to make it this far

(DEFUN c:man ()

     (SETQ objeto (CAR (ENTSEL "\nSelecione o objeto: ")))

     (setq p1 (getpoint "\n-->Clique no lado do Afastamento: "))
     (command "offset" 0.08 objeto p1 "")

     (SETQ dadoslinha (entget (ENTLAST)))
     (SETQ novalinha (SUBST (CONS 8 "MANTA") (ASSOC 8 dadoslinha) dadoslinha))
     (SETQ novalinha (SUBST (CONS 43 0.04)(ASSOC 43 novalinha)novalinha))
     (ENTMOD novalinha)
     (command "offset" 0.08 (entlast) p1 "")
)

BIGAL:
Look at the break point and do just that break at 2 points.
Offset the right hand pline
Draw a line from the top pline at an angle join to top pline
fillet line to new offset
trim new line to right of arc

Need to think about best way to approach task maybe pick 2 points.

Need a dwg so can see all of the pline.

fabiocosta81:
(DEFUN c:man ()

     (SETQ osnape (GETVAR "osmode"))
     (SETVAR "osmode" 0)
 
     (SETQ objeto (CAR (ENTSEL "\nSelecione o objeto: ")))

     (setq p1 (getpoint "\n-->Clique no lado do Afastamento: "))
     (command "offset" 0.08 objeto p1 "")

     (SETQ dadoslinha (entget (ENTLAST)))
     (SETQ novalinha (SUBST (CONS 8 "MANTA") (ASSOC 8 dadoslinha) dadoslinha))
     (SETQ novalinha (SUBST (CONS 43 0.04)(ASSOC 43 novalinha)novalinha))
     (ENTMOD novalinha)
     (command "offset" 0.08 (entlast) p1 "")

     (SETVAR "osmode" 1)
     (setq p2 (getpoint "\n-->Clique vértice da sobreposição Horizoltal: "))
     (setq p3 (getpoint "\n-->Clique vértice da sobreposição Vertical: "))
     (setq p4 (polar p3 (* 90 (/ pi 180)) 1))
     (setq p5 (list (+ (car p4)0.1)(+ (cadr p4)0.05)(caddr p4)))
     (setq p6 (list (- (car p4)0.02)(+ (cadr p4)0.05)(caddr p4)))

     (SETVAR "osmode" 0)
     (command "xline" "v" (polar p2 0 1)"")
     (command "xline" "h" p4 "")
     (command "xline" "h" (polar p3 (* 90 (/ pi 180)) 1.1)"")
     (command "trim" "f" "" p5 p6 "")
     (SETVAR "osmode" osnape)
)

Navigation

[0] Message Index

Go to full version