Class 1
For this class we'll be using the B-rep modeller ACIS's Test Harness. This is a program that allows you to type commands; these are interpreted, and the appropriate ACIS procedure(s) are called. To run the harness copy-and-paste the following into a blue shell window (highlight with left mouse button = copy; middle button = paste):
/home/sgserver/manuf/ensab/ACIS/run_acis
You will get a black graphics window, and also the prompt
acis>
in your original window. You can now make models by telling it what to do. (To get out, incidentally, type quit.)
If you click here you will get the ACIS documentation. Select `Getting started with ACIS' from the main screen, then `Using the Test Harness' from the left, then `Subtract cylinder from block'.
At the acis> prompt you can type ? to get a (long) list of
commands. Each command will prompt you if you get it wrong.
For example:
acis>cylinderFinally having got it right, we get a picture of the cylinder c2 in the graphics window.
Error in command:
cylinder
^
Valid options at this point:
Text string [Name for new solid body]
acis>cylinder c2
Error in command:
cylinder c2
^
Valid options at this point:
Exactly 3 of
"height" number [Height of cylinder along its axis]
and exactly 1 of
"radius" number [Radius of base circle]
and exactly 2 [Make elliptical base] of
"major" number [Major radius of ellipse]
and "minor" number [Minor radius of ellipse]
and up to 1 of
"top" number [Major radius of top]
acis>cylinder c2 height 60 radius 30
acis>draw
Experiment!
See what you can build.
Class 2
For this class we'll be running a C++ program that calls parts of ACIS to build things. In a lot of what follows you can copy-and-paste from this web page to save typing. (Highlight with left mouse button = copy; middle button = paste.) Also, when you are typing a file or directory name, you just have to type the first few letters and press <TAB>; if the letters you've typed are enought to identify the file uniquely, the rest will be filled in for you.
To start with, unfortunately, we have to set up our log-in environment so that ACIS can find out things it needs to know. To do this, type:
cd
jot .bash_profile
(jot is the editor). Cut the following and paste it near the top of the file (say after the definitions of your aliases):
A3DT=/home/sgserver/manuf/ensab/ACIS
ARCH=sgi_so
A3DT_MAJOR=7
A3DT_MINOR=0
LD_LIBRARY_PATH=/home/sgserver/manuf/ensab/ACIS/lib/sgi_so
export A3DT
export ARCH
export A3DT_MAJOR
export A3DT_MINOR
export LD_LIBRARY_PATH
Save the file, then (sigh) log out and log in again. Now every time you log in, the environment variables A3DT etc will be properly defined.
Next you need to make a directory to work in, and move into it:
mkdir Acis_experiments
cd Acis_experiments
Now copy the archive of all the files you need and unpack it:
cp /home/sgserver/manuf/ensab/ACIS/fygm_acis.tar .
tar -xvf fygm_acis.tar
If you type the ls -al command you should now have something like the following:
total 8
drwx------ 5 ensab manuf
512 Dec 3 15:05 .
drwxr-xr-x 60 ensab manuf
1024 Dec 3 15:05 ..
-rw------- 1 ensab manuf
568 Dec 3 14:25 Makefile
drwx------ 2 ensab manuf
512 Dec 3 15:05 bin
-rw------- 1 ensab manuf
63915 Dec 3 15:03 fygm_acis.tar
drwx------ 2 ensab manuf
512 Dec 3 15:05 obj
drwx------ 2 ensab manuf
512 Dec 3 15:02 src
The bin and obj directories will hold executable programs and compiled objects respectively. The src directory has one file in: block.cxx. Use jot to take a look at it. It is a C++ program that calls ACIS functions to build a block with a round end like this:
If you type the command make, the instructions in the Makefile will be executed, creating a program in bin called block from block.cxx. You can now run the program by typing bin/block. It should create a file called block.sat (check with ls -al). You can now look at what you've created by using the retrieve command in run_acis, as used last time:
acis> retrieve block.sat as b1
acis> draw
Now what you've got to do is this: ammend the program block.cxx using jot to get it to make a long thin block with six cylindrical holes in, symmetrically and uniformly distributed down its centreline.
To find out about the ACIS functions you are calling, cut-and-paste their names from the jot window on block.cxx to the search window at the top of the ACIS documentation, and click on index. For this work you are going to need the function api_subtract(...).
© Adrian Bowyer 1996, 2001