Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Version 1.28
toe@home
April 11, 2015
1
CONTENTS 2
Contents
1 Motivation 4
3 Requirements 6
4 Installation 7
4.1 HowTo show the hidden folder C:\ProgramData . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
4.2 Additional files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
4.2.1 Additional machines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
4.2.2 Additional examples files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
4.2.3 Additional Documentation Movies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
5 Settings 11
6 General stuff 12
6.1 Functions to change the view . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
6.2 How to optimize my screen size ? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
9 Loading NC-Files 19
9.1 Loading NC-program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
9.2 Edit the NC-program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
10 STL Object 21
10.1 Loading STL-files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
10.2 Creating STL object with embeddet OpenSCAD . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
10.2.1 First example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
10.2.2 Load and Save script files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
11 Import function 27
11.1 ID data Dialog . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
11.2 Groupbox position and size . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
11.3 Groupbox: Transformation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
11.3.1 Examples Transformation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
11.3.2 Examples Projection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
11.4 Groupbox: process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
11.4.1 Examples Toolcompensation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
11.5 Toolbox Control panel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
12 Measuring device 37
12.1 My proposed solution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
12.2 Measuring . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
12.3 Real probing a workpiece . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
12.4 Virtual scanning of STL objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
14 Slicer 48
14.1 Slicing example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
CONTENTS 3
18 The Machine-Manager 71
18.1 How to add your own machine . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
18.2 How to add the Cad-Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
18.3 Machine Designer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
18.4 Advanced information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76
18.4.1 Dimension data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76
18.4.2 Graphic data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
18.4.3 Layer data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
18.5 My girlfriend ’Milli’ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80
18.5.1 Other machines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81
18.5.2 My old lathe . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82
1 MOTIVATION 4
1 Motivation
I considered to buy a ShapeOko2 machine. In order to see how the machine works, I looked for a simulation
program. I found a lot of good programs, but I did not find any program showing the concrete ShapeOko
machine.
So I started developing this little 3D-simulation program with the pleasant sounding name GrblGru .
In my opinion Mr. Gru from the movie ’Despicable Me’ is the suitable partner for the brilliant software
Grbl . I prefer the pronunciation ’GrabbleGru’.
This guide is intended to tell you a little bit about using my program.
Attention !
Reading this paper is dangerous. Because of my really terrible English it could
damage your eyes.
I strongly recommend to read only one page per day.
2 THE CONCEPT OF GRBLGRU 5
Example.nc
GrblGru
Loading NC-prog
No
Everything looks fine ?
Yes
No
Everything looks fine ?
Yes
ShapeOko2
Milling the
one and only
workpiece
No
Everything looks fine ? Trying it again
Yes
3 Requirements
GrblGru is written in c# and unfortunately only running under Windows. It requires .NET Framework 4,
which is normally part of the operating system.
On the controller side I use an Arduino Uno with Grbl so far, but I also would like to provide this program for
the TinyG .
4 INSTALLATION 7
4 Installation
Start the setup.exe with admin rights. If you don’t have admin rights you get a message. In this case open the
context menu by clicking the right mouse button and select ’start as administrator’
I recommend to use the default application folder because it has the correct write permission, but of course you
can change the folder if you are familiar with the permission rules.
When the setup is finished it could be that you might get a message from the operation system that something
failed because I have no uninstallation program, and windows is looking for that. You can ignore this message.
The application data folder (AppDataPath) depends on your operating system. You couldn’t change it. For
example in windows 7 the folder is C:\ProgramData\GrblGru.
Use Menu - Help - Downloads - GrblGru Manual for downloading the actal Manual.
Then select Menu - Extras - Add file to AppDataPath to copy the pdf to your AppDataPath.
After that you would have access to the Manual from the GrblGru menu.
• STL
• SVG
• DXF
• NC
• CAD
For your convenience GrblGru will recognize the folder, depending on the file extension, when you load a file.
So it could show you always the right folder. It’s not necessary to search every time once more again.
If you start operating with GrblGru , I recommend to do the first steps with files I tried before. For that I
create a zip file with example files, organized as explained above.
Use Menu - Help - Downloads - Examples for downloading
General operation:
https://www.dropbox.com/s/5nfneubr1sqcgkl/MachineSimulation.avi?dl=0
STL-Laser scanning:
https://www.dropbox.com/s/n6o58tgkpagrsdb/LaserScanning.avi?dl=0
5 Settings
In the Menu - Extras - Settings you find the control ’Metric’ to choose metric [mm] or imperal units [in].
The both inputs ExtensionX and ExtensionY allows you to enlarge the dimension of your machine model.
There are also some special inputs and a lot of colors that I describe in the following pages.
If you press the ’Default Settings’ button in the upper left corner, you can select the default values
The groupbox ’4th axis’ is the preparation for position a chuck. This is part of my actual work. I am very
interested to realise the 4th. axis controlled by TinyG. This work is not finished so far.
If your screen doesn’t show all information a left mouse doubleclick on the groupbox name opens/closes the
box. To get 2 or more columns move the right window borderline also with the left mouse to the right side.
6 General stuff
There are 2 modes of working. The simulation-mode and the Grbl -Mode. In simulation-mode you can verify
your NC-program in the office whithout connecting your Grbl -machine. If everything looks fine you can go to
the workshop to produce real chips.
In the configuration box you can choose the machine. Until now I only realised my self-made machine ’Milli’
and the ShapeOko2, but it is posssible to add other machines. (see section ’How to add your own machine’)
By pressing the toolbar button you can switch on/off the quick help screen.
• A double click with the left mouse button on the name of a groupbox opens/closes the box.
For example the box ’configuration’ is not used constantly, so you can close it.
• Move the borderline between the left control panel and the graphic panel to get more space for the controls.
• Machine
Select here your machine
• Port
This is the USB port connecting to your controller. Pressing the little ?-button shows you all available
ports.
• Controller
Select here your Controller TinyG / Grbl or Simulation, if you like to work w/o hardware.
The simulation-mode is much faster and without any risk to destroy something. I recommend always to
check a new program at first in simulation-mode !
• 4th. axis
Switch on/of the little chuck
The normal increment is 1mm. If you press the button together with the SHIFT key the increment is 10mm.
With the CTRL key you get 0.1mm and with the ALT key you get 0.01mm.
GrblGru uses 2 systems. The machine-system and the work-system. With the button ’Set work coordinate
origin’ you set the actual position to local 0,0,0.
If you press the button ’Move to work coordinate origin’ first the Z-axis will move up to 0 and then x and
y move together to 0.
8 GROUPBOXES FROM MAIN WINDOW 18
9 Loading NC-Files
9.1 Loading NC-program
The real data are the CNC-data files. Their location can be anywhere, but it’s recommended to store all datasets
in one folder. GrblGru will remember the path if you load data and opens the same path automatically on
the next loading.
It’s also possible to load the NC-program with drag & drop. Take the file from
explorer by holding the left mouse button and drop it on the GrblGru graphic
window.
To edit the NC-program use the edit button in the top toolbar. Normally GrblGru will open the last
loaded NC-file with notepad. But you also can choose the edit-program in Menu - Extras - Settings.
I prefer Notepad++, because it is very smart and there is the possibility to create your own Syntax-Highlighting.
see http://www.addyourservice.net/notepadppcncsyntax.php
10 STL Object
10.1 Loading STL-files
You can load a workpiece by using Menu - Load STL ..., or load it with drag&drop directly from the explorer.
The center will be positioned on the local reference point. The point with the lowest z-coordinate will touch the
base floor.
In OpenSCAM there is the possibility of exporting the surface as STL-Format. Unfortunately I always receive
an error message when I call this function, which probably is a problem of my operating system. But if your
OpenSCAM works fine you are able to save and load the surface into GrblGru . Together with the NC-prog
you will get a good look over all.
In the settings Menu - Extras - Settings you can adjust the workpiece to
the desired size.
To edit your OpenSCAD script, find the Script editor on the second page of the tab-control. Here you can enter
the OpenSCAD commands. If you are not yet familiar with OpenSCAD, I recommend
http://www.tridimake.com/2014/09/how-to-use-openscad-tricks-and-tips-to.html
It helps me a lot to understand the special commands.
cylinder(h=30, r=25);
and then press the button ’Start openSCAD’. The picture below shows the result.
11 Import function
GrblGru has import functions for following formats:
• DXF (MKCad)
• SVG (Inkscape)
• NC (F-Engrave)
If you call one of them GrblGru will translate the data in an intermediate format (ID). This means that
all geometry will split into smal lines. This method allows to transform the data to curved surfaces, what is
important for engraving.
Note that there is a difference between importing and loading NC-Data. Loading NC sends all commands to
Grbl . G2 / G3 functions are send directly to the controller.
If you import NC-Data G2 / G3 commands are splitted by many g1 commands.
At the moment I prefer SVG and NC data. The problem with DXF are the many different versions. I write the
import function for an old version and I couldn’t guarantee error-free imports for all versions. Please try if your
version is working.
If something does not work with NC or SVG, please inform and give me the
chance to improve the import function.
11 IMPORT FUNCTION 28
This dialog has a key importance for all imports. Open the dialog with the toolbar button .
For example there are a lot of inputs, to influence the position, the size and the orientation. There is also a
process data groupbox with inputs for speed and infeeds. At the end of all GrblGru will create an NC-file.
• Plane transformation
This is important for milling printed circuit boards (PCB). The cooper is very thin. A problem exists
when attempting to create finely etched products with a CNC machine where the work-piece material is
not at the same height uniformly. (AutoLeveller)
Before milling you can measure the exact position of your PCB and GrblGru will transform your drawing
onto this plane.
• Projection to scanpoints This item allows to engrave pieces with curved surface. This requires scanning
the piece first.
• none Choose this item, if you have a normal milling job.
11 IMPORT FUNCTION 31
For example:
If you choose ΣZ = 1mm and ∆Z = 0.3mm GrblGru will generate gcode for 4 runs. The first is 0.3mm, the
second is 0.6, the third is 0.9 and the last one is the rest = 0.1mm.
This is very convenient, because you can use the last infeed for your finishing
Please note that you can use this function also for F-Engrave. Let F-Engrave
generate the Gcode and import it to GrblGru .
Don’t use the SVG-file from F-Engrave. There are no pathes.
11 IMPORT FUNCTION 35
To start the generated NC program use the ’Start’ button of the Main window. I recommend always to check
the program at first in simulation mode. See the settings for that in the picture below.
12 Measuring device
Grbl and also TinyG supports the probing function. In my opinion probing is completely underestimated. It
is suitable for a whole variety of applications. I cannot understand why nobody offer a professional solution for
probing. It is relatively simple to build a measuring device.
You need only a ’normal open’ switch, connecting between GND and the analog input A5. See my DIY mea-
suring device at the picture below. The probe is a normal needle. (stolen from my wife)
You can press the probe about 10mm. After 1mm the switch contact will close and send GND to A5. It is very
important, that you can press the probe more, because Grbl will continue moving a little bit, depending on
the speed, after receiving the probe signal.
Another advantage from the switch solution over the widespread ’no switch solution’ (just putting a touch probe
w/ an alligator clip into the spindle) is that you can scan also non-conductive workpieces.
In the upper (base) position the measuring device don’t disturb the normal milling operation. In active position
it’s not necessary to remove the tool.
12.2 Measuring
First of all I like to explain some definitions.
May be it is not correct, but I call it real probing, if you measure a real workpiece. And I call it virtual
scanning if you measure an STL object.
I recommend starting with virtual scanning because it is much more quicker and easier as probing. You can
do it without your ShapeOko at your ’warm’ chair. :) The functional running in GrblGru is nearly the same.
To start a measuring use the button . In order to decide whether you like to start real probing or just
virtual scanning GrblGru lookes if you have loaded an STL-file. If yes GrblGru will start virtual scanning.
If no GrblGru will start real probing.
12 MEASURING DEVICE 40
After starting, the Z-axis will move down, until the probe touch the workpiece. If every works fine you can see
the Z-position from the touching point. [PRB: x, y, z]
By the way, here you can also see, how much deeper (depends from the speed) the axis moved.
button . The point of measurement will be shown as a black point, and in top of the graphic window the
measuring result will be displayed. (Measurement result = ???)
I recommend starting with virtual scanning because it is much more quicker and easier as probing. You can do
it without your ShapeOko at your ’warm’ chair. :) The functional running in GrblGru is nearly the same.
First of all you can select either real probing or virtual scanning in the groupbox ’Selection’.
The scan dimensions in X- and Y direction will automatically calulated if you load the STL file. But you
can also enter the size you like. With the ’boarder’ value you increase the size.
The resolution box allows you to select how fine your grid is. Choose for the beginning some big values like 5
or 10mm. If your grid is very fine it takes a long time to calculate all points.
In the ’Z-parameter’ box you can choose how many layer you like to generate and the ’Process’ box contents
the feed for the generate gcode.
At the end you can select the Filename from the generated NC-program.
13 SCANNING AND PROBING 44
Because there is no difference between scanning points and probing points I use the easy way and generate my
measuring points from a STL object. It’s only a example, of course it makes no sense to create an STL, if you
have it already.
If you press the Start button GrblGru will start the scanning and show you the window.
If you switch off the toolbar icon you will see the mesuring points.
To see the steps in the generated STL-file i load it into MashLab. These steps are the result from your selected
grid by scanning the measuring points.
Please note that all we have done now is the same if you like to probe a real
piece (with the exception of the actual pick of the measurement points)
14 SLICER 48
14 Slicer
This is a new project I am working on. Select the slicer dialog with the toolbar button .
Because I think it is not perfect yet, I will only explain in which way it should work.
After loading an STL-File you can move the slicer plane with the input ’Z-Position’ in Z-direction up and down.
If you select the clipping switch, GrblGru will clip all things above the slicer plane.
Dont be afraid if you see that the whole machine is clipped. It is only that you can see where exactly the plane
is located. Alternatively you can also activate the ’Show R’ switch. In this case GrblGru will show you a cross
with the given radius R at the plane position.
Loading an STL-file containing a cylinder with different holes. Clipping = off, Show R = on.
After pressing the ’Slice’ button GrblGru will calulate the intersection line between STL and the slicer plane.
This then creates the DXF-drawing, which you can use for further process.
Figure 51: Clipping = off, Show R = on, STL on. Note the thin DXF-lines
Figure 52: Clipping = off, Show R = off, STL off. Only DXF contur
15 CONTROLLER CONNECTION GRBL - / TINYG 51
The Grbl version must be ’0.9g’ or higher. That’s because I fixed the baudrate to 115200. Showing the moving
model makes no fun with lower speed
There are some further conditions for a correct flow control. Please enter the following parameter depends from
your controller.
GrblGru
TinyG
After you change the port or the Controller GrblGru try to get a connection to the controller. In case of
TinyG it takes 5 seconds to get the identification. Grbl is much faster. You should get following message:
ToDo
15 CONTROLLER CONNECTION GRBL - / TINYG 54
Figure 56: Enter $ex in the command line and press Enter
Figure 57: You get the answer from TinyG. In this example the value is 2. This is wrong for GrblGru
15 CONTROLLER CONNECTION GRBL - / TINYG 55
Figure 58: To change the value enter $ex=0 in the command line and press Enter
Figure 59: TinyG responds with the message ex=0. This is the correct value for operation with GrblGru. Close
CoolTerm and try to start GrblGru
15 CONTROLLER CONNECTION GRBL - / TINYG 56
The ’Reset(break)’ button breaks a running program. You can not continue it. This button also clears the
showing toolpath and resets the controller. If something goes wrong, it is always a good idea to press this button.
• Z(Y) = X+
• X = X-
• Q = Y-
• A = Y+
• W = Z+
• S = Z-
If you press the key the movement will start and continue until you release the key. GrblGru will use the speed
’Fman’ from the control panel of the main window. If you press the SHIFT button at the same time the factor
of speed = 10. In combination with the CTRL button it is 0.1.
In order to get more space for both windows, arrange the dimensions moving the borderline with the left mouse
button.
Tip:
If you need some commands very often e.g. the command ’$#’ for showing the working systems by Grbl create
a user button for that. Please see section ’Programmable user buttons’ for details.
16 THINGS, WHICH MAKE LIFE EASIER 59
• Because I have no internet in my workshop, I saved some pdf-files about configuration, connecting and
interfacing Grbl in Menu - Help ...
• For your own use you can find the pdf-file ’MyHelp’ in the menu section ’Help’. The file is located in the
AppDataPath and you can write in here whatever you like and need, when you are working with your
machine.
• To operate with GrblGru sometimes it is nice to have this manual ’on board’. You can find it under
menu section ’Help’ - GrblGru manual
• In Menu - Extras there is an item ’My Macros’. Here you can create your own user buttons on the right
side of the screen. This will be explained further down in a special section.
• On the big main toolbar you find the first button . After closing GrblGru and restarting it, use this
to load your NC-program, which you have used before.
• Also on the big toolbar you find . Here you can take your notes.
• There is a DXF-file, which can be displayed by selecting the switch ’Show layer’ in the control panel. Just
edit this file with a 2D-graphic program to show anything you want.
• The machine position can be changed by using the small up/down buttons at the left side of the input-
control. The normal increment is 1.0 mm. If you press the SHIFT button at the same time the increment
is 10 mm. In combination with the CTRL button it is 0.1 mm and with the ALT button you get 0.01 mm.
16 THINGS, WHICH MAKE LIFE EASIER 60
By selecting the last button ’EditMacro’ the file macro.dat will be loaded into the editor. Here you can generate
your own commands by adding a new button. The button name must be inside the square brackets. For example
a new entry :
[MyNewMacro]
F300 g1 g90 x0 y0 z0
will create a new button on the right side, and if you press this button the machine will move to the position 0,0,0.
Tip: Use short names, because the space in the buttons is very limited.
16 THINGS, WHICH MAKE LIFE EASIER 61
Because it is nesessary to set the local reference position to the actual position, I create the command ’setref’.
• Z(Y) = X+
• X = X-
• Q = Y-
• A = Y+
• W = Z+
• S = Z-
If you press the key the movement will start and continue until you release the key. GrblGru will use the speed
’Fman’ from the control panel of the main window. If you press the SHIFT button at the same time the factor
of speed = 10. In combination with the CTRL button it is 0.1.
17 SPECIAL MODE FOR LATHES 64
Creating the g-code is near the same as in milling mode. Open the dialog with the toolbar button . Only
the groupbox ’Process’ is a little bit different to the milling groupbox.
Here you have the choise to select either the imported intermediate data or the direct data mode.
Dstart is the diameter you start your job. It must be larger then the max. Diameter of the workpiece. DeltaY
is the infeed for one pass and Yoff is only an offset value.
With the 2 checkboxes Rough pass and Finish pass you choose the mode of cutting. The checkbox Create
STL tells GrblGru to create a STL object from your contour.
The NC File is use to save the g-code if you press the button Start calculating Gcode. This file then will be
automatically loaded.
17 SPECIAL MODE FOR LATHES 67
17.2.3 Starting
After you press the button Start calculating Gcode the file then will be automatically loaded. Just start the
simulation mode to see the movements.
18 The Machine-Manager
If you like to change some machine data, for example the workspace size, you can use the Machine-Manager.
After starting the MM with Menu - Extras - Machine-Manager you get a dialog, where you can delete or
add machines, change data or CAD-models.
The ’CAD model’ box allows you to change or add new models with the help of STL-Files. (See details in
section ’How to add the Cad-Model’)
The last box ’machine.dat’ gives you direct access to the machine-file.
Then enter your workspace-dimensions and the origin of the laser and press ’Accept’. If you are not sure about
the data at this time, it is no problem. You can always change it later.
To explain the Cad-model I constructed a very simple machine named ’Dummy’. You can take this as test
object to see for example the result of changing parameters.
After you have created the Cad-Model in base-position you need to save all components in several STL-files.
Save the base, the part which has no movement, in file base.stl, save the x-axis in file x.stl and so on ...
Then start the Machine-Manager, select your new machine and select the path, where your files are located.
Press button ’Load STL-files’.
Close both dialogs of the Machine-Manager and check if you can see your machine in the GrblGru main-
window.
18 THE MACHINE-MANAGER 74
Basicly the MachineDesigner is created to improve parts of the ShapeOko, like dust shoes, measuring units
etc. So, for example. You could design your own dust shoe and add it to the program. After that you can move
all exes, to see if there is some intersection or how much your working space is limited.
The format is a simple ini-file. Every machine has its own section. These section names are used to be shown
in the combo box, where you select the machine.
I prefer a right-hand-coordinate system. This is the reason why z goes into minus direction. The vToolPos
parameter is the origin of the laser. I measure it in the Cad-program. The last value bPortal is necessary to tell
GrblGru whether you have a machine with a gantry or not.
Let’s have a look at the actual machine.dat.
[Milli]
xminus = 0
xplus = 185
yminus = 0
yplus = 140
zminus = -60
zplus = 0
vToolPosx = 192.009
vToolPosy = 139
vToolPosz = 128.799
bPortal = 0
[ShapeOko2]
xminus = 0
xplus = 339
yminus = 0
yplus = 300
zminus = -58
zplus = 0
vToolPosx = 53.6514
vToolPosy = 189.36
vToolPosz = 170.37
bPortal = 1
[Dummy]
xminus = 0
xplus = 90
yminus = 0
yplus = 70
zminus = -16
zplus = 0
vToolPosx = 5
vToolPosy = 6.3
vToolPosz = 26
bPortal = 1
18 THE MACHINE-MANAGER 77
All graphic objects are represented by vertices, triangles and lines. The lines are only used to show the edges.
They are not really necessary.
The syntax is very simple. key = value. The order of keys inside a section is not important.
• vertices
v????=x, y, z
example: v0000=100.000000,-0.000029,0.000029
• triangles
t????=a,b,c
a,b,c = no of vertex
example: t0000=0,1,2
The order of the vertices in a triangle is important. I use the right-hand rule.
• lines
l????=a,b
a,b = no of vertex
example: l0000=0,1
GrblGru also requires the following parameters to get information about the size.
• nv=n
n = count of vertices
example: nv=24
• nt=n
n = count of triangles
example: nt=13
• nl=n
n = count of lines
example: nl=25
See the example section [base] from our Dummy-machine on the next page.
18 THE MACHINE-MANAGER 78
[base]
ColorBody=-65536
KeyFormat=D4
nl=25
nt=13
nv=24
l0000=0,1
l0001=2,0
l0002=1,3
l0003=3,2
l0004=4,5
l0005=6,4
l0006=5,7
l0007=7,6
l0008=8,9
l0009=10,8
l0010=9,11
l0011=11,10
l0012=12,13
l0013=14,12
l0014=13,15
l0015=15,14
l0016=16,17
l0017=18,16
l0018=17,19
l0019=19,18
l0020=20,21
l0021=22,20
l0022=21,23
l0023=23,22
t0000=0,1,2
t0001=1,3,2
t0002=4,5,6
t0003=5,7,6
t0004=8,9,10
t0005=9,11,10
t0006=12,13,14
t0007=13,15,14
t0008=16,17,18
t0009=17,19,18
t0010=20,21,22
t0011=21,23,22
v0000=100.000000,-0.000029,0.000029
v0001=100.000000,-0.000029,-2.000029
v0002=100.000000,75.000030,0.000029
v0003=100.000000,75.000030,-2.000029
v0004=-0.000038,0.000000,-0.000038
v0005=-0.000038,0.000000,-1.999962
v0006=100.000000,0.000000,-0.000038
v0007=100.000000,0.000000,-1.999962
v0008=0.000000,75.000030,-2.000029
v0009=0.000000,-0.000029,-2.000029
v0010=0.000000,75.000030,0.000029
v0011=0.000000,-0.000029,0.000029
v0012=100.000000,0.000000,-2.000000
v0013=-0.000038,0.000000,-2.000000
v0014=100.000000,75.000000,-2.000000
v0015=-0.000038,75.000000,-2.000000
v0016=100.000000,75.000000,-0.000038
v0017=100.000000,75.000000,-1.999962
v0018=-0.000038,75.000000,-0.000038
v0019=-0.000038,75.000000,-1.999962
v0020=100.000000,0.000000,0.000000
v0021=100.000000,75.000000,0.000000
v0022=-0.000038,0.000000,0.000000
v0023=-0.000038,75.000000,0.000000
18 THE MACHINE-MANAGER 79