0 Members and 1 Guest are viewing this topic.
Quote from: LE3 on February 26, 2010, 10:58:08 AMQuote from: LE3 on February 26, 2010, 10:48:15 AMnice tools !anyone had tried them with heavy polylines? - (just tested the one Eugenio posted)dynoff works - remainds me one of the commands from intergraph microstation 4.0Excellent, thanks Luis
Quote from: LE3 on February 26, 2010, 10:48:15 AMnice tools !anyone had tried them with heavy polylines? - (just tested the one Eugenio posted)dynoff works - remainds me one of the commands from intergraph microstation 4.0
nice tools !anyone had tried them with heavy polylines? - (just tested the one Eugenio posted)
Quote from: Lee Mac on February 26, 2010, 10:59:05 AMQuote from: LE3 on February 26, 2010, 10:58:08 AMQuote from: LE3 on February 26, 2010, 10:48:15 AMnice tools !anyone had tried them with heavy polylines? - (just tested the one Eugenio posted)dynoff works - remainds me one of the commands from intergraph microstation 4.0Excellent, thanks Luis I see you started to hide your ideas, great move
Evgeniy, I have a question,why the use of 'progn' at the very start of the code? What is its purpose in this case?
Quote from: Lee Mac on February 26, 2010, 10:48:22 AMEvgeniy, I have a question,why the use of 'progn' at the very start of the code? What is its purpose in this case?This debris was left after the stage of writing ...
Good clean solution Elpanov, but having minor bug if first segment is an arc.
I can not get an error on your description ...autocad 2008 en (sp 1)
Evgeiny, I am still use Autocad 2004, maybe this cause the error.It seems that I should upgrade my acad version~~
(defun c:ofss (/ E G O P1 P2 V1 V2 V3) ;|*************************************************************************************************** by ElpanovEvgeniy 26.02.2010** ----------------* 27.02.2010 8:30* fix bug for acad 2004 (vlax-curve-getFirstDeriv e (vlax-curve-getEndParam e))* ----------------* 27.02.2010 8:55* fix bug for first arc segment************************************************************************************************* |; (setq e (entsel) p1 (cadr e) e (car e) p1 (fix (vlax-curve-getParamAtPoint e (vlax-curve-getClosestPointTo e p1))) o (vlax-ename->vla-object e) ) ;_ setq (if (= 1 (cdr (assoc 70 (entget e)))) (cond ((zerop p1) (setq p2 (1+ p1) v1 (list (vlax-curve-getPointAtParam e (vlax-curve-getEndParam e)) (vlax-curve-getFirstDeriv e (1- (vlax-curve-getEndParam e))) ) ;_ list v2 (list (vlax-curve-getPointAtParam e p1) (vlax-curve-getFirstDeriv e 0.5)) v3 (list (vlax-curve-getPointAtParam e p2) (vlax-curve-getFirstDeriv e 1.5)) ) ;_ setq ) ((= p1 (1- (vlax-curve-getEndParam e))) (setq p2 0 v1 (list (vlax-curve-getPointAtParam e (1- p1)) (vlax-curve-getFirstDeriv e (+ (1- p1) 0.5)) ) ;_ list v2 (list (vlax-curve-getPointAtParam e p1) (vlax-curve-getFirstDeriv e (+ p1 0.5))) v3 (list (vlax-curve-getPointAtParam e p2) (vlax-curve-getFirstDeriv e (+ p2 0.5))) ) ;_ setq ) ((setq p2 (1+ p1) v1 (list (vlax-curve-getPointAtParam e (1- p1)) (vlax-curve-getFirstDeriv e (+ (1- p1) 0.5)) ) ;_ list v2 (list (vlax-curve-getPointAtParam e p1) (vlax-curve-getFirstDeriv e (+ p1 0.5))) v3 (list (vlax-curve-getPointAtParam e p2) (vlax-curve-getFirstDeriv e (+ p2 0.5))) ) ;_ setq ) ) ;_ cond (cond ((zerop p1) (setq p2 (1+ p1) v2 (list (vlax-curve-getPointAtParam e 0) (vlax-curve-getFirstDeriv e 0.5)) v1 (list (car v2) (list (cadadr v2) (- (caadr v2)) 0.)) v3 (list (vlax-curve-getPointAtParam e p2) (vlax-curve-getFirstDeriv e 1.5)) ) ;_ setq ) ((= p1 (1- (vlax-curve-getEndParam e))) (setq p2 (vlax-curve-getEndParam e) v1 (list (vlax-curve-getPointAtParam e (1- p1)) (vlax-curve-getFirstDeriv e (+ (1- p1) 0.5)) ) ;_ list v2 (list (vlax-curve-getPointAtParam e p1) (vlax-curve-getFirstDeriv e (+ p1 0.5))) v3 (list (vlax-curve-getPointAtParam e p2) (list (cadadr v2) (- (caadr v2)) 0.)) ) ;_ setq ) ((setq p2 (1+ p1) v1 (list (vlax-curve-getPointAtParam e (1- p1)) (vlax-curve-getFirstDeriv e (+ (1- p1) 0.5)) ) ;_ list v3 (list (vlax-curve-getPointAtParam e p2) (vlax-curve-getFirstDeriv e (+ p2 0.5))) v2 (list (vlax-curve-getPointAtParam e p1) (vlax-curve-getFirstDeriv e (+ p1 0.5))) ) ;_ setq ) ) ;_ cond ) ;_ if (while (= (car (setq g (grread nil 5 0))) 5) (vla-put-coordinate o p1 (vlax-make-variant (vlax-safearray-fill (vlax-make-safearray 5 '(0 . 1)) (reverse (cdr (reverse (inters (car v1) (mapcar '+ (car v1) (cadr v1)) (cadr g) (mapcar '+ (cadr g) (cadr v2)) nil ) ;_ inters ) ;_ reverse ) ;_ cdr ) ;_ reverse ) ;_ vlax-safearray-fill ) ;_ vlax-make-variant ) ;_ vla-put-coordinate (vla-put-coordinate o p2 (vlax-make-variant (vlax-safearray-fill (vlax-make-safearray 5 '(0 . 1)) (reverse (cdr (reverse (inters (car v3) (mapcar '+ (car v3) (cadr v3)) (cadr g) (mapcar '+ (cadr g) (cadr v2)) nil ) ;_ inters ) ;_ reverse ) ;_ cdr ) ;_ reverse ) ;_ vlax-safearray-fill ) ;_ vlax-make-variant ) ;_ vla-put-coordinate ) ;_ while (princ))