Search the Community
Showing results for tags 'offset explode fillet'.
-
Hi all, this might be one of my first lisp scripts....and I am kind of stuck. What I want to create is an app that automatizes the process of creating a boundary, making an internal offset, fillet the created offset, and finally delete the original boundary. All should work while picking points. As I found out that I have to explode the offset element first, to make all segments into polylines for proper filleting (otherwise arcs etc don't work), that's where I got stuck. If somebody had any helpful hints for me, this would be highly appreciated. thnx. careca Here's the code of how far I got: (defun c:xfillet (/ pt) ; while picking point ----------------------------- (while (setq pt (getpoint "\nPick internal point: ")) (command "_.-boundary" "_a" "_i" "_n" "" "" "_non" pt "") ; store original boundary object (setq original_boundary (entlast)) ; make offset (command "_.offset" 10 (entlast) "_non" pt "") ; explode offset (command "_.explode" (entlast)) ; load selection set (setq ss (ssget "_P")) ;counter (setq x 1) ;loop for all elements ------------------- (repeat (sslength ss) (setq pa (getvar "peditaccept")) ; convert all segments into polylines -> so fillet works on all elements (setvar "peditaccept" 1) (command "pedit" ss nil) (setvar "peditaccept" pa) ; copy element onto layer 0 (command "_.chprop" (entlast) "" "LA" "0" "") ; change color of element (included just for texting) (command "change" (entlast) "" "prop" "color" x "") ; ++++++++++++++++++++++++++++++++ ; ++++++++++++++++++++++++++++++++ ; what I want to accomplish ; store first element if x = 1 then store element in el1 ; loop though elements, make fillets bit by bit if x >= 2 make fillet with el1 store new element as el1 ; ++++++++++++++++++++++++++++++++ ; ++++++++++++++++++++++++++++++++ (setvar "peditaccept" pa) ; counter up (setq x (+ x 1)) ; _end repeat ) ; delete original boundary (command "_.erase" original_boundary "") ) ; end while ;(princ) ) ; end