Specifications

43
very physiological. You may be wondering how you can add cool bones and other geometries that will
impress your colleagues and look good in your presentations. You may want to put your model into an
environment such as a room, a treadmill, or a bicycle to illustrate the purpose of the model.
However, there may be other reasons than mere aesthetics why it can be advantageous to work with real
geometries. When attaching muscles, for instance, a real bone geometry gives you an instant visual
feedback on where the muscle is located in the organism as illustrated by the two pictures above.
Adding geometric models such as bones is fortunately very simple. All you need is a file with a 3-D graphical
representation of the bone or other component you may wish to add. The format of the file must be STL
ascii. STL is a very simple graphical file format that basically contains triangles. Virtually any CAD system
you can think of can save geometry on STL format, so if you have your geometry described on IGES, STEP,
DXF or any other usual type, just run it through your favorite CAD system and convert it to STL. STL comes
in two varieties: ascii and binary. AnyBody needs an ascii file, so please make sure to choose that option if
you create your own STL files in a CAD system.
The bone models you see on the pictures above are a bit elaborate for a short tutorial, so we shall start with
something a little simpler. What we want to do now is to add a dumbbell geometry to the arm model we
have just created. You can find a file to use here
. Right-click the link, choose "save as", and put the file in
the directory where you have placed the arm model.
The dumbbell should be added to the forearm, so the first thing to do it to add a reference to the STL file we
just saved to the definition of the forearm:
AnyDrawSeg DrwSeg = {};
AnyDrawSTL DrwSTL = {
FileName = "dumbbell.stl";
};
}; // ForeArm
Try reloading the model again. You will probably see nothing but grey the Model view. A closer investigation
of the problem would reveal that the entire arm model is actually situated inside the dumbbell handle. This
is because the STL file was created in millimeters, where the arm model is in meters. Rather than going
back to whatever CAD system was used and scale the dumbbell model down 1000 times, we can add the
scale definition to AnyScript in the following way:
AnyDrawSTL DrwSTL = {
FileName = "dumbbell.stl";