OFFSET WITH 20% OF MEASURED DISTANCE.
Dear All,
Please help me on this.
I am looking for code with following steps
1) Select object to Offset
2) pick point P1 & P2 for offset distance
3) Pick Point on Side to Offset
and with step 2 I need offset distance 20% of distance between p1 & p2.
any help will be much appreciate.
Thanks,
Re: OFFSET WITH 20% OF MEASURED DISTANCE.
Try this .
Code:
(defun c:Test (/ 1p 2p o s)
;; Tharwat 05.June.2014 ;;
(if (and (setq 1p (getpoint "\n Specify first point :"))
(setq 2p (getpoint "\n Specify second point :" 1p))
(setq o (/ (distance 1p 2p) 5.))
)
(while (setq s (ssget "_+.:S:L" '((0 . "*LINE,CIRCLE,ARC,ELLIPSE"))))
(command "_.offset" o s pause "")
)
)
(princ)
)
Re: OFFSET WITH 20% OF MEASURED DISTANCE.
Thank you so much Mr. Tharwat,
Exactly i was needed same
Thanks.
Quote:
Originally Posted by
Tharwat
Try this .
Code:
(defun c:Test (/ 1p 2p o s)
;; Tharwat 05.June.2014 ;;
(if (and (setq 1p (getpoint "\n Specify first point :"))
(setq 2p (getpoint "\n Specify second point :" 1p))
(setq o (/ (distance 1p 2p) 5.))
)
(while (setq s (ssget "_+.:S:L" '((0 . "*LINE,CIRCLE,ARC,ELLIPSE"))))
(command "_.offset" o s pause "")
)
)
(princ)
)
Re: OFFSET WITH 20% OF MEASURED DISTANCE.
Quote:
Originally Posted by
aijazahmed
Thank you so much Mr. Tharwat,
Exactly i was needed same
Thanks.
You're welcome :)