Sunday, October 17, 2010

Revolve The Polys!

Polylines can be used to create just about any 3D object. The polylines can either be open or closed. In this tip, I'm going to create a 1" wide by 5" in diameter pulley with groove and flanges.
1.       Establish a center point of the pulley. This point is the center rotating point of the pulley.

2.       Offset the center line to establish the center opening of the pulley. I'm going to create a 1/2" diameter opening so I'll offset the center line 1/4"

3.       Establish a center cross section of the pulley.

4.       Offset the center cross section line 1/2" to both sides to establish the width of the pulley.

5.       Offset the rotating center line 2-1/2" to establish the diameter of the pulley.
6.       As for the shape of the pulley, I'm going to leave it to your imagination or specification. This is what I came up with.

7.       The shape of the pulley does not have to be closed polyline but I like for it to be.
8.       Time to revolve the polyline.
There are a few settings for Revolve.
·         ISOLINES = This sets the number of contour lines per surface on objects. I'm going to use the default number.
·         MODE = This controls whether the revolve action creates a solid or a surface.
9.       Type REVOLVE. I'm going to set the MODE to Solid.
10.   Pick the closed polyline pulley shape.
11.   Specify the axis start point. I'm going to use the center rotating point of the pulley.
12.   Click both ends of the centerline.
13.   Specify angle of revolution. I'm going to use 360. This will revolve the closed polyline 360 degrees around the centerline.

We have created a 3D solid pulley.
3D Pulley DWF

Saturday, October 2, 2010

Where Are My XREFs?

Over the years supporting AutoCAD I have been asked, where are my XREFs?  Co-workers have place the references on the current layers and turned off that layer. I wrote a simple lisp routine that will place the reference on a specified called "G-ANNO-REFR" which can be changed to your company standards.
The lisp routine uses the "XA" command (which can be changed to your likings). XA is a default command for XATTACH. Once the lisp routine is set in the CUI startup, it will over ride the default "XA" command. Run the XA command to attach a drawing. Once the drawing is attached, the previous layer will be restored.

Items in red can be changed per user preference.

;SETS LAYER G-ANNO-REFR CURRENT BEFORE
;ATTACHING A DRAWING
;
;
(defun C:xa ()
   (command "layerpmode")
   (command "on")
   (command "-layer")
   (command "m")
   (command "G-ANNO-REFR")
   (command "")
   (initdia) (command "_XATTACH")

   (command "_layerp")
  
   (princ)
)