01-13-2023
07:00 AM
- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Denunciar
01-13-2023
07:00 AM
Well, such a routine could be quite easy to do.
(defun c:LineShift ( / e p g1 g2 i e d e1 e2 x)
(if (and (setq p (cadr (entsel "\nSelect target edge: ")))
(setq s (ssget "_:L" '((0 . "LINE"))))
(setq g1 (trans (osnap p "_end") 1 0))
(setq g2 (trans (osnap p "_nea") 1 0))
)
(repeat (setq i (sslength s))
(setq e (ssname s (setq i (1- i)))
d (entget e)
e1 (cdr (assoc 10 d))
e2 (cdr (assoc 11 d))
x (inters e1 e2 g1 g2 nil))
(if (< (distance e1 x) (distance e2 x))
(entmod (append d (list (cons 10 x) (cons 11 (mapcar '+ (mapcar '- x e1) e2)))))
(entmod (append d (list (cons 10 (mapcar '+ (mapcar '- x e2) e1)) (cons 11 x)))))))
(princ)
)
Just a side note.
If you need to move something messy, pick an edge from which are the lineends that should be moved there clearly CLOSER than to the other lineends.