tdswanson
2009-03-26, 03:36 PM
Morning all,
I'm trying to write a LISP that will create a 3DSolid for a drilled hole, with a 118 degree point at the bottom. Basically, I'm using the cylinder command, then wanting to extrude the bottom face at on a 59 degree angle. I'm cool with the cylinder command, but I can't seem to get the bottom face of the cylinder selected for extrusion. Here's my code at the moment, most of which I've hacked together from other routines I've found online..... I'm pretty new to this.
Basically, I'm trying to pass the face into a selection set, then run the SolidEdit command to extrude that face, and I can't get the face into the selection set variable. Any help or other suggestions would be much appreciated.
; DRILL SUB-ROUTINE
(DEFUN C:DRILL ()
(COMMAND "CYLINDER" PAUSE "D" PAUSE PAUSE)
;;select the faces
(prompt "Select 3dface(s) to Extrude: ")
(setq ss (ssget '((0 . "3dsolid"))))
(COMMAND "SOLIDEDIT" "FACE" "EXTRUDE" ss "2" "59")
(PRINC)
)
(PROMPT "\nLoaded DRILL for 3D drilled holes")
I'm trying to write a LISP that will create a 3DSolid for a drilled hole, with a 118 degree point at the bottom. Basically, I'm using the cylinder command, then wanting to extrude the bottom face at on a 59 degree angle. I'm cool with the cylinder command, but I can't seem to get the bottom face of the cylinder selected for extrusion. Here's my code at the moment, most of which I've hacked together from other routines I've found online..... I'm pretty new to this.
Basically, I'm trying to pass the face into a selection set, then run the SolidEdit command to extrude that face, and I can't get the face into the selection set variable. Any help or other suggestions would be much appreciated.
; DRILL SUB-ROUTINE
(DEFUN C:DRILL ()
(COMMAND "CYLINDER" PAUSE "D" PAUSE PAUSE)
;;select the faces
(prompt "Select 3dface(s) to Extrude: ")
(setq ss (ssget '((0 . "3dsolid"))))
(COMMAND "SOLIDEDIT" "FACE" "EXTRUDE" ss "2" "59")
(PRINC)
)
(PROMPT "\nLoaded DRILL for 3D drilled holes")