minetuta.blogg.se

Cad lisp
Cad lisp





Lst ( cons ( trans ( vlax-curve-getPointAtDist ( vlax-curve-getEndParam obj ) ) ) ( vlax-curve-getDistAtPoint ( trans ( cdaddr p_lst ) ent 0 ) ) ( vlax-curve-getDistAtParam ) ) ( if ( /= 0 ( cdadr p_lst )) ( progn ( setq prec ( 1+ ( fix ( * 25 ( sqrt ( abs ( cdadr p_lst ))))))ĭist ( / ( - ( if ( cdaddr p_lst ) ( vlax-curve-getDistAtPoint ( cons ( append ( cdr ( assoc 10 p_lst )) ( list ( cdr ( assoc 38 ( entget ent )))) ) ) ) ) ) ( T ( setq p_lst ( vl-remove-if-not ' ( lambda ( x ) ( or ( = ( car x ) 10 ) ( = ( car x ) 42 ) ) ) ( entget ent ) ) ) ( while p_lst ( cons ( trans ( vlax-curve-getPointAtDist obj ( * dist ( setq n ( 1+ n )))) 0 ( vlax-get obj 'Normal ) ) OB2WO (gile) -Gilles Chanteau- 10/03/07 Creates a "Wipeout" from an object (circle, ellipse, or polyline with arcs) Works whatever the current ucs and object OCS ( defun c:ob2wo ( / ent lst nor ) ( vl-load-com ) ( if ( and ( setq ent ( car ( entsel ))) ( member ( cdr ( assoc 0 ( entget ent ))) ' ( "CIRCLE" "ELLIPSE" "LWPOLYLINE" ) ) ( setq lst ( ent2ptlst ent )) ( setq nor ( cdr ( assoc 210 ( entget ent )))) ) ( progn ( vla-StartundoMark ( vla-get-ActiveDocument ( vlax-get-acad-object )) ) ( makeWipeout lst nor ) ( initget "Yes No" ) ( if ( = ( getkword "\nDelete source object? : " ) "Yes" ) ( entdel ent ) ) ( vla-EndundoMark ( vla-get-ActiveDocument ( vlax-get-acad-object )) ) ) ) ) ENT2PTLST Returns the vertices list of the polygon figuring the curve object Coordinates defined in OCS ( defun ent2ptlst (ent / obj dist n lst p_lst prec ) ( vl-load-com ) ( if ( = ( type ent ) 'ENAME ) ( setq obj ( vlax-ename->vla-object ent )) ) ( cond (( member ( cdr ( assoc 0 ( entget ent ))) ' ( "CIRCLE" "ELLIPSE" )) ( setq dist ( / ( vlax-curve-getDistAtParam select “Yes” or “No” to erase the existing object.Select object to turn into wipeout (Circle, Ellipse, Polyline).

cad lisp

It will work on olylines, circles and ellipses.

cad lisp cad lisp

It also gives you an option to erase the existing object after it makes the wipeout.

cad lisp

This great routine allows you to select an existing object that is curved and turn it into a wipeout. If you’ve ever used wipeouts in order to mask something in your drawing, you already know that you cant used curved objects.







Cad lisp