Jump to content

Extruding a element after creating it - newb question


ng80092a

Recommended Posts

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.

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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"))

Link to comment
Share on other sites

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...