This is a frame taken from homepage.dtn.ntl.com/terry.rawkins/acad/solids/index.htm
The frame url is homepage.dtn.ntl.com/terry.rawkins/acad/solids/scripts/sol-fun.html

Towards a Solid Modelling Language.

Please do not forget the point of my system :-
1. Is is part of a family of parts?   2. Will it require editing within the life of the drawing?
If either is true then you will be better off making a script as it is much easier to edit a script than a drawing.

You may know about my leaning towards script files to do the more mundane AutoCAD jobs and the use of what I have called PSS, Parametric Solid Scripts. Well here is my latest version, built as a natural extension to the PSS system.

I have noticed that not many folk have moved towards the PSS system perhaps because of their lack of LISP knowledge and the pain that scripts can be with the sub commands and their required spaces.

What I have done is made a lisp file that contains many short Lisp Functions. This file will help to get rid of the need to know about those damn spaces. Well that is what I had hoped for but because of various things the system has to have some new CAD commands to be used normally in AutoCAD and some new LISP functions to be used within a script file. The lisp functions have to be enclosed in brackets and have parameters separated by spaces, one or more it does not matter.

The File is called sol-fun.lsp and is available to download or you can view it as a text file on-sceen.

The new functions fall into 6 groups:-

  1. Layer Switching
  2. Viewing
  3. UCS Switching
  4. Standard AutoCAD commands
  5. New Autocad commands
  6. AutoCAD Solid commands

1 Layer Switching

When making a single part or component using solids we need two major layers one is where the bulk material is. I have called this POSITIVE the other is where we will draw the items that will be subtracted from the bulk material. I have called this NEGATIVE. Two new commands are now available :-

2 Viewing

3 UCS Switching

These functions enable you to rotate the UCS about the World Origin and Move the UCS to a new location. DOT is short for Draw On The so:-

4 Standard AutoCAD commands

The next 4 commands uses the last object drawn so they must be used immediately after a command that draws something.

5 New AutoCAD commands

6 AutoCAD Solid commands

An example file that draws a simple ash tray is shown below:-

   (load "sol-fun")
   layer-pos
   cylinder 0,0 50 20
   layer-neg
   sphere 0,0,215 200
   cylinder 0,0,12 35 20
   DOT-F
   cylinder 0,24 8 60
   ucs w
   zoom e
   (PAL 0 0 4)
   sub-pn
   iso

The file is ashtray.scr here.

Note the first line that MUST always be there, this loads in the lisp file that has the function definitions within it. This file "sol-fun.lsp" must be located on the path or the same folder as your drawing.

Many of these new commands and functions use the "LAST" option to obtain the object on which to work. This can go very wrong if your script file draws an object off the screen. The "LAST" option finds the last visible object drawn! The use of "ZOOM E" or ISO is encouraged after the major part of the drawing has been successfully drawn.


This page was last updated on Tuesday, October 09, 2001 by :- Terry Rawkins