ng80092a Posted October 22, 2016 Share Posted October 22, 2016 I've wrote the following routine, that creates 2 polygons (defun c:fuste3d (/ pin altura dsup dinf nlados esp e2) (setq pin (getpoint "\nPonto de introducao: ")) (setq dinf (getint "\nDiametro inferior: ")) (setq nlados (getint "\nNumero de lados: ")) (setq esp (getint "\nEspessura: ")) (command "polygon" nlados pin "i" (/ dinf 2)) (command "polygon" nlados pin "i" (- (/ dinf 2) esp)) ;;extrude and change taper angle (princ) ) After this, however, I'm trying to extrude the created polygons by giving them a height with the value of "altura" variable. The problem is that after using the polygon command, i don't wanna select the objects to extrude, but rather, i want the code to assume the extrude to both polygons, and later on change the taper angle to both. Quote Link to comment Share on other sites More sharing options...
ng80092a Posted October 22, 2016 Author Share Posted October 22, 2016 Ok, i've managed to extrude my polygon with the following. (defun c:fuste3d (/ pin altura dsup dinf nlados esp e2 ss1 pin1 pin2 dext dint) (setq pin (getpoint "\nPonto de introducao: ")) .... (command "_polygon" nlados pin "i" (/ dinf 2)) (setq dext (entlast)) (command "_extrude" dext "" 500) (setq dext (entlast)) (command "_polygon" nlados pin "i" (- (/ dinf 2) esp)) (setq dint (entlast)) (command "_extrude" dint "" 500) (setq dint (entlast)) (princ) ) The problem now is, how to modify the taper angle? I took a look at groupcodes, but when I try to retrieve the group codes of a 3d solid i really get a mess. Does anyone knows where the taper angle is positioned at the groupcodes? Quote Link to comment Share on other sites More sharing options...
BIGAL Posted October 23, 2016 Share Posted October 23, 2016 Look at the extrude command options "Taper" is an option when extruding dont do it after. (command "extrude" (entlast) "" "T" (getreal "enter angle") (getreal "Enter height")) Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.