|LITIGATION GRAPHICS - COMPUTER ANIMATION - TECHNICAL ILLUSTRATION - CAD DRAFTING - AUTOLISP PROGRAMMING
3423 Rivers Edge Trail
Houston, Texas 77339
Copyright 2008 - Pixel Graphics, Inc. All rights reserved.
AutoLisp Program: Dividing a 3D Face into Equal Sub-Faces
Overview of the Autolisp Program Div_Faces.lsp
As promised, sooner than even I thought, here's the Autolisp program code for subdividing an AutoCAD
3D face into sub-faces. I'm not going to do a tutorial on this one, you're on your own in deciphering the
program code, but I've commented it well enough to make it easy.
After loading the program into AutoCAD ( Tools -> Load Application...-> then selecting the file, simply type
div_face at the AutoCAD command prompt to run the command. It will first ask you to select a 3D face,
then ask for the number of segments to divide it in to. It also gives you the option of flipping the orientation
of the cuts. It may have a few small bugs in the code, but hey, I wrote it in a few hours this afternoon.
The program will also work on both three and four sided 3d Faces.
Below are two screen crops showing the orientation flipping. The program will let you keep flipping back and
forth until you decide which way you want to orient the cuts.
Jeff Winship - Computer Graphics Consultant April 27, 2008
AutoCAD Screen Shots showing orientation flipping
How to Download the Program
Right click the following link and choose "Save Target As.." then save it to your hard drive. Remember
where you put it so that you can load it into AutoCAD (instruction above).
If you copy and use the function, please respect my work and the time I've put into it by keeping my
copyright info with the function, and giving me credit where it's appropriate. A link from your site would be
appreciated as well.
If you have any comments or questions regarding Autolisp program, or even find a bug, feel free to e-mail