# gCAD3D

The English Version needs checking !
Can anyone help?

23rd April 2012
Authors:

Franz Reiter | franzr@gCAD3D.org
Thomas Backmeister (mathematics) | t.backmeister @ gmx.at
David Burke (translation) | davidrjburke<at>hotmail.com

Translated with permission of the Copyright holder into English from the file "gCAD3D_de.htm, Ver 0.86" with a lot of help from the Google Translator by David Burke, davidrjburke<at> hotmail.com and sm (ee2718@gmail.com)

(Note well: There is no guarantee as to the accuracy of the translated work either given or implied by the Translator, read at your own risk!
If however you have any helpful suggestions then send them to Franz Reiter.)

This Version ( 0.0.3) translated 18th of October 2004, updated April 2012 sm (ee2718@gmail.com).

> Copyright (C) 1999-2004 CADCAM services Franz Reiter
> http://www.gCAD3D.org
> franz.reiter@cadcam.co.at

### General information

- License

- Function mode

- Attitudes

- First steps

- Still to be done

- Version information

- Support

### Viewer / Graphic functions

- Options shift, increase, turn

- Set Z-level options

- Pre-defined options

- Display menu

- Hide / View

### Input / Output functions

- Open / Save

- Import / Export - DXF

- Import / Export - Iges

- Export NC-ISO

- Print

### Edit Functions

- GO - STEP - END

### CAD functions

- Construction level ConstPln

- Functions CAD

- Functions Man

- Search Move Delete S/M/DEL

- Analyze

- Undo / Redo

### NC-Functions

- Functions NC

- Functions NC Wire cut

- Functions NC-Tech

### MultiModelsupport

- Internal Submodels

- External Submodels

### Program Functions

- Format

- Geometry Definition

- Attributes

- Programming environment

- NC-processing functions

- NC-auxiliary functions

### License

gCAD3D is freeware -
may be used for any purposes free of costs
may be copied and distributed without restrictions
no restrictions for AddOn-Software (Plugins, DLL's)
THERE IS NO WARRANTY FOR THE PROGRAM.
THE ENTIRE RISK IS WITH YOU.

> Copyright (C) 1999-2004 CADCAM Services Franz Reiter
> http://www.gCAD3D.org
> franzr@gCAD3D.org

### Function mode

gCAD3D has

- its own import/export programs,

- an integrated 3D-OpenGL-Viewer,

- a program interpreter for geometry NC commands in 3D,

- its own integrated numerical control processor

- a program interface for user external user programs (Plugins)

The creation of geometrical elements / NC-programs can be done by -

- interactively generated geometrical objects or

- manually generated command texts or by

- DXF Import module or by

- IGES import module or by

- data file created by program or by

- special import processors (user programs)

The programinterpreter provides functions for -

- creation and spatial visualisation of data

- NC-working, direct and programcontrolled

- preparation of data (building contours ..)

- analysis of data

- programmingfunctions

The NC processor provides functions for-

- implementation of all machining-strategies

- combined cycles (eg pocketing - contouring)

- automated generation of parametrised contours (eg keyholes ..)

- macroprograms are user definable (ascii-text)

The numerical control processor is a macro program interpreter; the macro programs are in the listing < base>/wc/*.mac.
Macro programs consist of ASCII texts to:

- Implement any working strategy

- Combined cycles (e.g. Vorschnitte, separation would re-cut)

- Production of parametric outline parts (e.g. slotted hole.)

The data can be exported from the program by -

- DXF export module

- IGES export module

- Standard - ISO - post processor

- specialized export functions (user programs)

- the system format APT3D (ASCII text format)

Inside the program the text data in the editor window i stored and worked on.
The representation is generated exclusively from these text codes.

Analytic curves and surfaces (ellipses, Ruled and Revolved Surfaces) are always analytically worked on separately and NOT converted into Splines/NURBS, they are also stored/exported in this orignal form.

The program interface makes possible -

- The creation and analysis of geometry Objects

- interactive dialogue functions (selections..)

- automatic compiling, link and reload at execution time

Detailed information in addition is in file xa/gCAD3D_prog.txt.

Automation:
gCAD3D can load a model or start a plugin program at startup with the appropriate starting parameters.
See the file gCAD3D_prog.txt, chapter Startup.

### Attitudes

Div. pre-setting (print command, Browser) are read in from file < base>/tmp/xa.rc.

The Font size can be changed in file < base>/xa/xa.rc.

Listings on e.g. with file/open zugegrifen are into the file < base>/xa/dir.lst to register (Format:
"symbolic path name/full path name /").
The interactive function in addition is Standards/Directories (write right?)

The setup file for the Postscript export is < base>/xa/psv.setup.

### First steps

- Load a program (File / Open / sample1.dat, OK).

- END - Button:

The entire program, beginning in the first line, is processed up to the file end.

The geometry gets visualized. By use of the graphical functions (see further down) geometric details can be controlled.

- Scal.All - Button:

causes a reset of the viewscale and the viewcenter to be done.

With option continue to shift, increase, turn.

### Things not right / Or still to be done / Announcements

This is a free version of gCAD3D.
- dimension, still no full Import/Export of dimensions, only partly implemented.
- selecting of texts with fixed size is possible but only at the left lower starting point.
- transformation of 3D-Text: into the XY level are not always set.
- CompositeCurves: Divide only via Modify/Curve >Circ or via Iges export.
- NC: Numerical control working on are not transformed graphically yet into the active reference system.
- NC functions for Submodels (numerical control subroutines) not yet completely implemented follow,

- functions for the production of cut curves of surfaces not yet implemented.
- design derivative 2D - > 3D not yet implemted.

- surface representation by edge curves and ISO lines (no: Triangulation)

-with shadings no islands are possible

- the programming interfaces only partly documented.

### Support

If you like to contribute to further functions or to the documentation then please send an Email to franz.reiter@cadcam.co.at.

### Option shift, increase, turn

Shift

of all geometric objects is done with pushing the shift-key and moving the mouse.
(Keep the shift-key pushed, do not push one of the mousebuttons).

3D-Rotation

of all geometric objects is done with ctrl-drag. Push the ctrl-key and move the mouse.
Moving the mouse horizontally causes a rotation around the Z-axis.
The center of the rotation always is in the the center of the screen.
Moving the mouse vertically causes a tilting around a horizontal line in the center of the screen.

See: Determine the z-level of the turn
Scaling up / down

of all geometric objects is done with the control-key and the shift-key pushed while moving the mouse. Moving the mouse from left to the right causes scaling up.

Scal.All - Button:

Enlargement and representation center are optimized.

Scal.Fix - Button:
Stop a fixed, pre-defined enlargement, according to the value MODSIZ (approximate maximum size of the model). Default value is 300 mm.
Change MODSIZ to 10000 mm:
MODSIZ 10000
CLEAR - Button:
To the deletion of the entire diagram. Can now in the STEP - mode individual objects be represented;

### Set Z-level options

The currently active level for the interactive rotation is indicated by a yellow rectangle.
Change through:

- Selection of a vertex point as the new center (Vertices are polygon points, all curves/circles are represented as polygons. Lines however have only vertex points at endpoints). Or-

- Input of the new z-value into the z-input field (apart from the output fields for the current cursor position, with Return lock) or:

- select the new representation level:
  Push that point, around which now is to be turned, exactly into the screen center.
  Checkbutton ViewZ activate.
  Now option turn; the red point in the screen center becomes a chain of points.
  Now that red point select, which is appropriate for the desired fulcrum next.

The representation level (recognizable by a yellow rectangle) is shifted, the axis of rotation for the interactive rotation is shifted into the defined level.

### pre-defined Options

<> TopView - plan view (Option X-Y)

<>FrontView - side view (Option X-Y)

<>SideView - side view (Option X-Y)

<>AxoView - axis view

<>

### Display - Menu

Names:
Representation of the name texts of the elements; thus e.g. "P20".
Representation of the direction of all working on ways by directional markers.
NC-Text:
Representation of the numerical control auxiliary functions (as text) at the respective positions.
E.g. all INSERT texts, are represented STOP....

### Hide/View

Hide: arbitrary count becomes. Objects faded out.
View: only all momentarily faded out elements are indicated; select elements, which are to be represented again.

### Open / Save

Read or save the active model in a file. The text indicated in the Editor is stored.

### INSERT:

A file can be inserted at the current cursor position.

### Import/export - DXF

List of the supported DXF - object types:

Type | Import | Export
POINT | X | X
VERTEX | X | X
LINE | X | X
CIRCLE | X | X
ARC | X | X
POLYLINE | X | X
3DLINE | X | X
TEXT | X | X
3DFACE | X | -
DIMENSION | - | -
HATCH | - | -
ELLIPSE | X | -

Ellipses and b-Spline-curves are saved as POLYLINE.
Using ("DIM") and with DRAW OFF, dimmed (un-selected) objects are not exported.

### Import / Export - Iges

List of the supported Iges - object types:

Type |  | Import | Export
Point | 116 | X | X
Line | 110 | X | X
Circle | 100 | X | X
Par.Spline | 112 | X | X
B-Spl.Curve | 126 | X | X
B-Spl.Surface | 128 | X |
Polylines | 106 Form 11,12 | X | X
CompositeCurve | 102 | X | X
Text | 212 | X | X
Even one | 108 | X | X
Ellipse | 104 Form 1 | X4 | X
Subfig.Def. | 308 | X | X
Subfig.Ref. | 408 | X | X
RuledSurface | 118 | X | X
Rev. Surface | 120 | X | X
Cylinder surface | 122 | X | 5)
CurveOnSurf | 142 | X | X
TrimmedSurf. | 144 | X | X

X4 but not yet: Hyperbola, parabola (form 2, 3).
5) Saved as Rev.Surf or RuledSurf.

Tested with Catia-v4 and Catia-v5 (V5: Subfigures are dissolved (copied)).
References on external SubModels are not exported yet.
Dimmed ("DIM") and with DRAW OFF faded out objects are not exported.

### File / Export NC-ISO

Export of the numerical control workings to file < base>/tmp/pp.iso.
Further post processors on request.

### Print

Select print output format:

- HP (starting from V.076 vector format)

- PCL5 (GL format) (HP compatible Laser Printer)

- HPGL (HP compatible plotter file)

Paper selection:

A4 or A3 (only for output format PCL5)

Selection function:

- with Viewer (only for output format HP, normal preset is to the Postscriptviewer gv)

- print to file (preset is tmp/print.dat file name/)

- directly to printer (COMMAND preset is "lpr l P<DefaultPrinter >")

No hidden surfaces are printed (in addition a screen save program can be used e.g. ksnapshot).
Function mode:

A buffer file is produced
< base>/tmp/print.tmp; this is then converted into the selected output format.
The printed output can be turned 90 degrees, scaled and be shifted (with offset).

### GO - STEP - END

These Buttons have different effect depending on use.
Refer to those sections that use them for the current description, generalisations follow,

GO

When the GO - Button is pressed the entire program runs from the beginning in the first line, up to the current line.
With the ESCAPE key the program can be interrupted.

STEP

With the STEP - Button the program implements the APT lines individually.
For representing an individual element activate CLEARS, then STEPS; only the current line is represented.

END

With the END - Button the program processes the entire file, beginning in the first line, up to the file end.
With the ESCAPE key the processing can be interrupted.

### Construction level ConstPln

With ConstPln one level can be selected as new construction level. The standard levels and all freely defined levels (PLN = R) are offered for the selection.
All indicated points are referred to the construction level.
With ConstZ the current construction level can be shifted along the current Z-axis.

### Functions CAD

Activate the CAD Checkbox.
Produce from objects:
Select the function. Now all necessary input fields are indicated; the inputs take place via selection, Indicate or with the keyboard. (Indicate: Indicate to a position with the mouse; link mouse button).
Lock keyboard entries with the Tab key.
If all necessary inputs are made, the element is indicated.
All input values can be still changed, the announcement are immediately corrected (the values are handed over with the Tab key).
With the Ok Button or the input key ("Return") or right blanking the object is produced - and in the editor window is printed.
During the input of vectors, variables or modifiers you can select keys from the existing values with the help of the PageUp or PAGE down -.
Modification of objects:
If you select the check box S/M/DEL, then they select the geometrical object.
Or you select a text line; the associated geometrical object is indicated now and it is activated S/M/DEL.
If you now S/M/DEL deselection (or select the associated text line again) the producing CAD function is called and all producing parameters into the input boxes are registered.
As active function "MODIFY" is indicated.
Modification of the parameters (- like function producing).
To Button END (as well as Button ADD) switch into the function "ADD" (rear-add).
Insert from objects:
It activates the line behind to be inserted is (now "modified"), then the Button" in "to press.
As active function "INSERT" is indicated.
Delete from objects:
Complete removing of a text line:

Activate S/M/DEL and the text line which can be deleted; press key "Delete".
Again fetch back with Esc.
Remove all deleted lines with "Alt" + "Esc".

Delete contents of a temporarly used object:

In the normal CAD mode (not S/M/DEL) select check box "CLEAR Obj". Then the objects select. The object is now deleted; it remains however available for all preceding operations.

Checkbox newObj:
Only for the functional module CUT/Translate/Project/Mirror.
Modifies the object (input object No. 1) or provides a new, modified object.

LineEdit box (to the input of outlines/point chains):
Cursor position set; the Tab key represents the diagram up to the cursor position.
Texts can be deleted; Diagram develop again with Tab key.

### Functions Man

Mode manual:
Input of the program codes in the Editor.
The object headers become with CTRL p (point) and/or CTRL l (line), CTRL C (circle) produces (only at the beginning of a new line).
With selection of objects in the diagram window the Objektbezeichnug is registered in the Editor.
The right mouse button implies the CR (Return) key.
The following Edit function can be used: Select with the mouse, CTRL X for cutting out to clipboard, CTRL V for pasting.
The Esc key causes Undo /Redo the last input line.
See program functions
Example:
Enter with the keyboard:
CTRL p (produces the object header "P20 =")
P20 = P(100 100)
After Return the appropriate point is indicated.

### Search Move Delet e S/M/DEL

S = search
M = move
DEL = delete
Mode manual:
Searches of the definition line of an object:
If they select the check box, then they select the geometrical object.
That line, with which the selected object was generated, is pointed out automatically.
The found place in the editor window is indicated by the selection.
Dynamic Objects (numerical control procedure ways) are not found.
Repeated selecting of the same object shows all further occurrences of this object in the text.
The Delete key deletes the line ( see Undo/Redo ).
Searches to a text line of the due geometry Object:
Select the check box, set the text cursor into the text line concerned.
Geometry Object, which belongs to this text line, is indicated.
Modify the current text line:
Select the already active text line; the function S/M/DEL is terminated.
Mode CAD:
Object search, modify or delete:
If they select the check box S/M/DEL, then they select the geometrical object.
Delete:
The Delete key deletes the line ( see Undo/Redo ).
Modify:
After the deselction of S/M/DEL the object parameters will hand over to the input fields.
Twice selected from S/M/DEL terminates the mode modify.
Selection of texts with fixed size is possible but only at the left lower starting point.

### ANALYZE - Function:

Analyze Obj:

Select the geometry and the parameters of the selected object are indicated.

Analyze Dist:

<>The distance/normal distance of 2 objects is indicated.

<>At present only point/point or line or circle (also not Vertex..).

<>

### Undo/Redo

1) with generate a command line an UNDO record created.
2) with the deletion of a line in the S/M mode a UNDO record is created.
Undo and Redo selects the UNDO record (a line in the table on the top right; the highest line of this table corresponds to the object deleted last).
Example:
- S/M/DEL select
- an object select
- key "Delete" deletes the object
- the last entry in the Undo list selected returns the object
- key "Esc" repeats the last Undo/Redo - function.
With Alt Esc (function Modify/APT Clean) all provisionally deleted records (with "_" to begin) are removed.

### Functions NC

These function descriptions are not written at present.
All NC functions are available either in the menu NC-Tech or also as direct COMMANDS.
The current control position is indicated by a red selection line.
In the program execution the current position is always stored in the point P0.
This point can be normally used; Example:
PRI P0
# expressions of the current position
P21[P0 P20 12]
# from the current point toward P20 12 mm away.
FROM
Create - command line for a FROM. Select or indicate one point.
The FROM position is represented as a triangle, the current work position is represented with a cross.
RAPID
Create - command line for a RAPID Move. Select or indicate a single point.

### Functions NC-Wcut

NC-Wcut is not freely available at present and is still in development.

### Functions NC-Tech

TEC
A list of the macro program files. Before the start of a numerical control program (at least) a macro file must be selected. The macro program contained in the selected macro files are indicated in the following in the list Work.
(macro files: < base>/wc/<macname>.mac).
Program
The numerical control program name. In each model several numerical control programs can be defined.
Still if no numerical control program is in the model, then new program name must be defined. At least one macro program file (from list TEC) must have been selected before.
Work
A list of all loaded cycles. If a cycle is selected, then all parameter in own entering fields, necessary for this cycle, are requested.
If an input is not assigned automatically, the cursor must be set before into the appropriate field (example: Cursors into the entering field "radius" set, circle select).
The first cycle should be the FROM starting point.
Contour
A list of the outlines available in the model (S20..). With selection the selected outline name will hand over to an input field "outline name".
OK (or right mouse button or enter key)
the current cycle store.
prev / next
activate the previous/next cycle; it allows the parameters to be changed; Cycle store (overwrite) with OK.
RUN
With RUN the entire numerical control program can be run at any time.
List
a list of all active cycles with all parameters shows.
Ins
Cycle insert (before the current cycle),
Del
the current cycle is deleted.
PP
starts the post processor run. In the first step (also without installed post processors) a numerical control ISO file is produced (file < base>/tmp/pp.iso).
Save/Exit
Save/Terminate the entire program.
First steps - Numerical control Tech (short example):
- from list TEC select "Demo1"
- NewProg select, "prog1" enter, click OK.
- from list Work select "circle",
- in the input field "starting point" enter the coordinates 30.30, then press the Enter key
- from list Work select "circle" ,
- in the input field "starting point" enter the coordinates 60.30, press the Enter key
- press the Run button
- press the Prev Button (retour to cycle 2)
- change the coordinates 60.30 to 80,30 , press Enter, press RUN.
- select shade - check box
- PP (post processor run), terminating (ISO code now in tmp/pp.iso)
- save/exit, click OK; un-check box Man.
Modify from Numerical control Prog "prog1":
- check box NC-Tech,
- from list select Program "prog1" ,
- RUN, prev...

### Program functions

### Format

Definition lines:
A=Area (surface)
B=Body (solvent)
C=Circle (circle)
D=Direction (vector)
L=Line
P=Point
R=Refsys (reference system)
S=Spline (Parametr., b-Spline, polygon, conic sections)
T=Transformation (Translation of Rotation)
V=Variable (numer. value)
- please note that upper or lower case is all the same
- those in the following use Parameter "Position" and can have the following values:

LOX (left) or
HIX (right) or
HIY (above) or
LOY (down)
HIZ (z-above)
LOZ (z-down)
Further also a number can be used (in the CAD mode by the PageUp and PAGE down key one makes available)
Examples:
MOD(1)
MOD(HIY)

- those in the following used Parameter "Place" can have the following values:

OUT (outside) standard, does not have to be indicated
IN (inside)

### Geometry Definitions

Bases 2D - 3D
Texts - dimensioning
Points
Lines
Vector - direction
Transformations
Circles
Curves (ellipse, b-Spline, outline) Axle systems - levels
Surfaces
Solids
Models
Geometry Modifications (Cut(Trim), Transform, Project, Mirror)

Deletion of geometry Objects:
by an empty indication of definition; e.g. deletion of point No. 12:
P12 =

### Bases 2D - 3D

The standard size (default value is 300 mm) is used for calculating tolerances (curve plotting, tolerance of point of identical etc.). Room size change on 10m:
MODSIZ 10000
The current working plane can be defined in the 3D-Relm with the help of a reference system. As soon as this is activated, all 2D-Coordinates defined are now transformed into this level.

The references system receive a number. Reference system No. 0 is the centerline system and can not be defined/or changed.
Each reference system should only be defined once and then not be changed again.
(this would cause errors with the EXPORT).
Example:
# definition axle system Nr.1
R1=Z(100)
# activation axle system Nr.1
G 1
# point (into the active axle system one transfers!)
P1=100 100
# resetting axle system
R0
Definition axle system is identified with the definition level. See axle systems

### Texts

Text note with fixed size, is always horizontal:

N#=Text point of text "text"
Selection of texts with fixed size is possible only at the left lower starting point of the text field.

3D-Text with variable size, direction:

N#=N#=Text point of text Size [ direction ] "text"
Default direction is 0 degrees.
Example:
N10=P5 "text at point P5"
N11=P(100 100) 10 ANG(15) "text Size 10, direction 15 degrees"

TXG point of text SIZE, DIRECTION, TEXT
(these texts are not stored - does not export).
TXA point of text "text"
(these texts are not stored - does not export).
Dimensioning:
NOTE: PROGRAM DOES NOT YET SUPPORT IMPORT/EXPORT OF DIMENSIONING.
N # = DIM Point1 Point2 point of text [ angle Mpfeile Mlinien additional text ]

Point1 - Point of measurement1
Point2 - Point of measurement2
Point of text - left lower starting point measure text
all following Paramter is optional:
Angle - ANG(0) = horizontal, ANG(90) = vertical; no indication: Parallel measure.
Measurement Arrows; 0=none, 1=<, 2 = >, 3 = /, 4=o; Default is 12.
Witness lines; 0=none, 1=Full Line; Default is 11.
Additional text (e.g. "+ - 0,2").
Example:
p1=P(100 100)
p2=P(200 200)
n1=dim P1 p2 150 50 ang(0) "+ - 0.2"
n2=dim P1 p2 250,150 ang(90)
n3=dim P1 p2 100,180

### Points

P1=P(10,20)
2D-Point absolute
P21=P(10,20,30)
3D-Point absolute
P2=P1, d1
Point P1 vector the D1 shift.
P2=P1, D1, distance
Point P1 toward the vector D1 the distance absolute shift.
P11=R1 P10

Transformation of the point P10 into the Reference system g 1 (level g 1).
P11=R1 10 0 - point P11 will be on the x axis of the reference system g 1.

P11=P10 g 1

Projection of the point P10 on the level g 1.

P3=P2, x(10), y(10)
Point relative (in the distance 10.10 of p2)
P5=P4, ANG(90), distance
Polar relative (point of basis, angle, distance)
P3=P1, p2
Point in the center produce.
P3=P1, D(P1, P2), distance

A distance clear away.
Point with certain distance from P1 toward P1 - > P2 reduce.
The direction certainly by the angle of the distance P1 - > P2.

P11=P1, D(L1), distance
A distance away from one point along a line with certain distance clear away.
P2=P1, D(L1), distance, normal distance

A distance away from one point clear away. The distance is cleared away in the direction of the line, the normal distance is cleared away normally to the line. Example:
p1=p1, d(l1), val(100), val(50)
P1 is shifted 100 mm toward l1, then he is shifted 50 mm toward normal to l1

P3=P1, P2, angle

Point turn (center, starting position, angle) example:
P3=P1, p2, ang(180)
P2 is turned 180 degrees around P1.

P1=L1, side
At the beginning of or terminator point of a line (according to side)
P2=P1, l1
Point on line project.
p4=l1, l2
Intersection line line
p6=c1
Circle center point
p7=p1, c1, side
Point normally on circle (on the circle one projects). The standard solution is the closer point.
p5=l1, c1, side
Intersection line circle.
p6=c1, c2, side
Intersection of circle centers ??
P10=S10 side
At the beginning of/terminator point of a curve, according to side.
P11=P1 S10 MOD(1)

Point on curve project. P1-p11 form now a normal one on S10 in the point P11.
MOD(1) = side - first solution.
( Not yet implemented : If P11 comes outside from S10, then the curve with a tangent is extended by the terminator point.)

The point with index 0 is at each time the current position, can thus be used for a work procedure.

### Lines

L1=p1, p(100 100)

Line between 2 points

L1=x(10)

Line vertically with x=10

L2=y(10)

Line horizontal with y=10

L3=p1, ANG(45)

Line by point with fixed angle

L4=P1, d(l1)

Line by point parallel to other line

L4=P1, d(l1), ang(90)

Line by point with angle relative to other line.
ANG(0): parallel to line L1; ANG(90): normally.

L8=L1, distance, side

Line parallel to line with distance.
L8=L1 VAL(10) HIY

L9=L1, l2

Line as center line (if l1, l2 parallel) or as bisector (by the intersection).

L9=L1, l2, ang(90)

Line as bisector, additionally turn.

L1=C1, D(L1), side

LINE tangential at circle, parallel to line.

L1=C1, D(ANG(45)), side

Line tangential at circle with fixed angle

L5=p1, c1, side

Line by point tangential at circle

L5=c1, c2, place, side

Line tangential to 2 circles (place: in out)

L10=R20 R21

Cut line between two levels.

L21=L20 R20

Projection of a line on one level.

L10=P10 S10 MOD(1)

Line tangential by point P10 at curve S10.

L10=P10, s10, ang(0) not yet implemented

Line tangential at curve, turned. Point P10 is projected on the curve, put at this point a tangent to the curve. If a twisting angle is indicated, then the line (around the point of contact) is turned. ANG(90) results in thus a normal one from the point of contact.

L20=L(Start point terminator point)
L21=L(End point)

If the starting point is missing, then the terminator point of the last P(), L() or C() is used - definition.
Points here only with index "P20" or directly "xCoord yCoord [ zCoord ]"
Examples: L(P20 100 0 Z(10)) L(200 10)

### Vector - direction

Vectors use the identification letter D ("Direction").
Vectors are only temporarly represented; Standardized vectors (with length 1) in black, otherwise red. Always in picture center.

As last parameters can with all vector definition "REV" be indicated (vector is operated represented = written undertaking).

As a last but one parameter can be indicated with all vector definition the vector length.

There are the following standard vectors:
DX DY DZ

correspond to the absolute direction

<>DIX DIY DIZ
<>correspond to the relative direction
<>Example:
<>D1=DIX

Definition vector by direction and length.
D=D(dx, dy[, dz ]) [ length ] [ "REV" ]
Example:
D1=DX 100
D2=D(10 0)
D3=D(0.7 0 0.7) 100

D3=ANG(30) 100

Definition 2D-Vector by 2D-Angle and vector length (optional).
The angle defines the direction in the XY level.

D4=ANG(90) ANG(30) 100

Definition vector by angles of rotation, tilting angles and vector length (optional).
The angle of rotation defines the twisting angle in the XY level; to 0 (degrees) corresponds thus to the x-direction, to 90 coresponds thus to the y-direction; 180 is the inverse x-direction.The tilting angle is that angle, which the vector with the XY level includes.

All vectors with same tilting angle (with variable angle of rotation) form thus a cone around the Z-axis. The Z-axis has a tilting angle of 90 degrees (independent of the angle of rotation). In the example (90,30) the x axis 90 (around the Z-axis); the vector corresponds now to the old y axis the vector now in that level, which it includes now with the Z-axis, by 30 degrees is tilted upwards. Vectors with positive tilting angle lie in the positive z-semi-infinite space, vectors with negative tilting angle in the negative z-semi-infinite space.

D5=P1 P2
D5=P1 P2 100

Vector D5 as distance from P1 to P2. (length is optional).

D6=L10 100

Vector toward the line; (length is optional).

Normal vectors:
D=Circle
D=Plane
D=Point Point Point
D=Line Line
D=Line Point
D=Vector Line
D=Vector Point Point

(all additionally with length and "REV" possible).

<>

<><>Example:

<><><>D7=C10 100

# vector toward the Z-axis of circle C10, would be appropriate for 100

D7=R10 REV

# vector in the reverse direction of the Z-axis of level R10.

### Transformations

Applied with modification Transform

Translation:
T=TRA Translation Vector [Vector Length]
T20=DZVAL(100)
# translation toward Z around 100 mm
Rotation:
T=ROT Axis of rotation Angle of rotation
T20=ROT L20 ANG(30)
# definition of a 30-Grad-Rotation around line L20

### Circles

The chord tolerance for the representation of the 3D-Circle define;
MODE DISP_AC 0.5
All 3D-Circle with max 0,5 mm deviation represent. Default value is 0,1 mm.
Parameter direction of rotation:

CW (clockwise, in the clockwise direction) or
CCW (counterclockwise, counter-clockwise direction)
The indication of CCW is not necessary (standard).

The direction of rotation is valid, if the axis of rotation points to the center of the viewer.
C1=p1,25

Center, radius

C21=P1 VAL(25) D1

Complete circles by center, Radius, or vector.
The vector dx, dy, dz defines the axis of rotation.

C2=C1

Circle copy

C2=C1, radius difference

Concentric Circles. Negative radius difference makes the circle smaller.

C3=P1 P2
C3=P1 P2 D(1 0 1)

Center, point at the extent; also with Z-axis.

C1=P1 L1
C1=P1 c1

Center, tangent.

C5=L1, L2, radius, side
C5=L1, c1, radius, side
C5=C1, C2, radius, side

tangential at 2 lines, radius.
L1 = X(10)
L2 = Y(10)
C1=L1 L2 VAL(5) MOD(1)

c1=p1, p2, radius, side

2 points at the extent, radius. Side: on that the center is

c1=p1, l1, radius, side

Point at the extent, tangent, radius.

c1=p1, c1, radius, side

Point at the extent, tangential at circle.

Not yet implemented:
ci=p1, p2, p3, direction of rotation

3 Point circle definition.

ci=p1, c1, side

Center, tangential at circle.

ci=ln1, ln2, ln3

tangential at 3 lines

ci=ln1, ln2, ci

tangential at 2 lines and at 1 circle

---------------------------------------------
Circular arcs (limited circles):
---------------------------------------------
Circ=ARC starting point terminator point center [ Z-axis ] [ direction of rotation ]

Circular arc from starting point terminator point center (center axle, direction of rotation)
Direction of rotation: CW (clockwise direction) or CCW (counter-clockwise direction, standard).
The direction of rotation is valid, if the axis of rotation points to the eye of the viewer.
C20=ARC P1 P2 P3
C31=ARC P(10,0,10) P(0,10,10) P(0,0,10)
C32=ARC P(10,0,0) P(0,0,10) P(0,0,0) D(0,1,0) CW

C(Start point terminator point center [ Z-axis ] [ direction of rotation ])
C(End point center [ Z-axis ] [ direction of rotation ])

Points here only with index "P20" or directly "xCoord yCoord [ Coord ]"
Example: C(25 0 0 25 0 0)
If the starting point is missing, then the terminator point of the last P(), L() or C() is used - definition.

### Curves

Ellipse from center, terminator point centerline, terminator point secondary axis:
S1=ELL P(100 0) P(150 0) P(100 20)
Ellipse from center, vector centerline, vector secondary axis, starting point, terminator point:
S1=ELL P(0 0) D(10 0) D(0 5) P(10 0) P(-10 0)
(the vectors define also the Laenege of the main and secondary axis)
Ellipse from projection of circle on level:
S20 = ELL C20 R20

2D-Polygon from points:
S#=POL2,2D-point1,2D-point2<,2D-point3,.. 2D-pointn >
Example:
P20 = 10,10
S20=POL2, P20, P(10,0) P(20,10) P(30,30)
3D-Polygon from points:
S#=POL, point1, point2<, point3,.. pointn >
Example:
P20=P(10,10)
P21=P(20,20,15)
P22=P(25,20)
S24=POL P20 P21 P22 P(30,12,0) P(30,10,10) P(40,30,10)
Polygon from polygon on level project:
S#=POL polygon Refsys
Example:
S20=POL P(30,0) P(30,10,10) P(40,30,20)
S21=POL S20 R0
3D-Polygon from b-Spline:
S#=POL, b-Spline, tolerance

Polynomial curve from polynomial values:
S#=PSP3, arc1<, arc2,.. arcn >
Polynomial curve with 1-n Arcs.
A Arc consists of 13 numbers; the spacer value and the polynomial values
xa, ya, za, xb, yb, e.g., xc, yc, zc and xd, yd, zd.
xa, ya, za define one point of passage.
Example:
S20=psp3,0,3.84815,0.967105,0,0.577021,0.207039,0,0,0,0,-0.169071,0.140166,0,
1,4.2561,1.31431,0,0.069808,0.627537,0,-0.507212,0.420498,0,0.341924,
-0.327596,0,2,4.16062,2.03475,0,0.081155,0.485747,0,0.518559,-0.562288,0,
-0.183075,0.224101,0,3,4.57726,2.18231,0,0.56905,0.033474,0,-0.030664,
0.110016,0,-0.060996,-0.13481,0,4,5.05465,2.19099,0,0.324734,-0.150924,0,
-0.213651,-0.294414,0,0.071217,0.098138,0,5,5.23695,1.84379,0,0.111083,
-0.445338,0,0,0,0,0.427303,0.588828,0

B-Spline from inspection points/knot vector:
S#=BSP, ptNr, degree, control POINTS, knotvector, starting parameter, final parameter
ptNr = number of inspection points
control POINTS: the inspection points; Amount of = ptNr, 3 values (X/Y/Z).
knotvector: the spacer parameters; Amount of = ptNr + degree + 1.
Example:
S20=BSP, 6, 3, -178, 109, 0, -166, 128, 0, -144, 109, 0, -109, 112, 0, -106, 134, 0, -119, 138,
0,0,0,0,0,0.333333,0.666667,1,1,1,1,0,1
B-Spline from polygon:
The Polygon points are used as reference points.
S#=BSP, S#, degree
Example:
P20=P(78,9)
P21=P(66,28)
P22=P(44,9,25)
P23=P(9,12)
P24=P(6,34)
# Poly < - POINTS
DRAW OFF
S20=POL, p20, p21, p22, p23, p24
# BSpl < - Poly
DRAW ON
S21=BSP, s20, 2

Outline ("Concatenated Curve "- CCV)
S#=CCV of < outline elements >

The outline begins and ends at one point.
Elements: Points, lines, circles, curves.
Following circles and curves the direction of rotation (CW or CCW) can be defined. Automatically normal one at lines and circular arcs is formed.
Example:
C20=P(39,26) VAL(22)
S20=CCV P(7,25) C20 CW P(35,58)

2D-CompositeCurve from 2D-Polygon:
A 2D-CompositeCurve consists of circle/lines
S#=CCV2, 2D-Polygon, tolerance
Example:
P20=P(78,9)
P21=P(66,28)
P22=P(44,9,25)
P23=P(9,12)
P24=P(6,34)
# Poly < - POINTS
DRAW OFF
S20=POL,
& P20, p21, p22, p23, p24
# BSpline < - Poly
DRAW ON
S21=BSP,S20,2
# Poly <- BSpline
DRAW OFF
S22=POL,S21,0.05
# 2DPoly <- Poly
DRAW OFF
S23=POL2,S22,R22,0.05
# 2DCirc/Line <- 2DPoly
DRAW ON
S24=CCV2,S23,0.05

### Axle systems - levels

Pre-defined levels are:
RZ Basis level XY
RY Level XZ
RX Level YZ

R=po vz

Definition of one level by the zero point and a normal vector:
Examples:
R10=P(100 100 100) D(0 0 1)
R11=P154 D(ANG(90) ANG(45))

R=po vz px

Definition of one level by zero point, normal vector of the level and one point on the x axis of the new level:
Example: R11=P(100 100 100) D(0 0 1) P(101 100 100)

R=po vx vc

Definition of one level by the zero point, the x-vector of the level and a further vector in the new level:
Example: R12=P(100 100 100) D(1 0 0) D(0 1 0)

R=po, px, pt

Reference system by three 3D-Points;
po = the zero point,
px = one point on the x axis of the new level,
pt = one point in the level (not in a line with po - px to lie may).
Example: R4=P(100 100 100) P(101,100,100) P(100,101,100)

R = Z(Z_Absolute)

The new level is parallel to the XY level, all axial directions is here alike as with the centerline. The distance on the Z-axis is indicated.
Example: R5=Z(100)

R = X(X_Absolute)

Even one parallel to the y-z-level; the new x axis corresponds the 3D-Y-Achse, the new y axis corresponds the 3D-Z-Achse. The new Z-axis corresponds to the centerline x.

R = Y(Y_Absolute)

Even one parallel to the x-z-level; the new x axis corresponds the 3D-X-Achse, the new y axis corresponds the 3D-Z-Achse. The new Z-axis corresponds to the centerline y.

R12

Activate from Refsys No. 12.

RZ

Corresponds to the centerline = resetting.

### Surfaces - AREA

Planar surfaces; trimmed, plain(no holes in it, not perforated and punched:
A = edge curve [ islands... ]
Edge curve, islands:
a circle, an ellipse, a closed b-Spline or a closed CCV (S=CCV..).

# example: planar surface:
P20=p(-120 -160)
# the edge curve:
S20=CCV P20 P(233 -186) P(223 -95) P(104 -81) P(135 134) P(-122 162) P20
# the planar surface:
A20=S20

# example: Outer edge C29, island C28.
C29=p(-252.2 -580,9 0) VAL(12)
C28=p(-255.9 -606,8 0) VAL(66)
A20 = C28 C29

Ruled Surface from two basic elements (PT/LN/AC/CV)
A#=SRU Object1 Object2
Example:
L20=P(0 -10 20) P(0 10 20)
C20=ARC P(0 -10) P(0 10) P(0 0)
A20=SRU C20 L20
Ruled Surface from basic element and vector:

Example:
L30=P(0 -10 20) P(0 10 20)
D30=D(10 10 60)
A30=SRU L30 D30

Revolved - Surface (Surface of revolution, Turning surface)
A#=SRV axle outline [ starting angle final angle ]
Axle must be a line
outline: Line (cone), circle (torus) or b-Spline.
Example:
L20=P(20 0) P(20 20)
L21=P(50 0) P(40 20)
A20=SRV L20 L21 ANG(270) ANG(0)

B-Spline-surface:
A#=BSP, pt1Nr, pt2Nr, degree1, degree2, control POINTS, knotvector1, knotvector2
pt1Nr = number of inspection points toward 1
pt2Nr = number of inspection points toward 2
degree1 = degrees of the b-spline-curves toward 1
control points: the control points; Amount of = pt1Nr *
pt2Nr, 3 values (X/Y/Z).
knotvector1: the spacer parameters for direction 1; No. = pt1Nr + degree1 + 1

Surface supported, trimmed, punched:
A = FSUB supporting surface edge curve [ islands..(in connection with closed contours, this is a contour inside of a contour) ]

A = FSUB A S // supporting surface (SRU, BSP) trimmed
A = FSUB A S S // supporting surface trimmed and 1 hole
A = FSUB A A S // supporting surface not trimmed, 1 hole

A = FSUB B // cone od. Torus (unlimited, without holes)
A = FSUB B S // trimmed
A = FSUB B S S // trimmed, punched
A = FSUB B B S // ungetrimmt, punched

Supporting surface:
Is always a supporting surface necessary.
can be: A=SRU A=BSP or
Surface on cones (conical): select a solvent body "Conus" (B=CON..).
Surface on torus (annulus): select a solvent body "torus" (B=TOR..).

Edge curve, islands:
a circle, an ellipse, a closed b-Spline or a closed CCV (S=CCV..).
The edge curve must be on the supporting surface.
If the outer contour with the delimitation of the supporting surface is ident, the supporting surface can be indicated also as edge curve.

# Example cone surface:
P20=P(100 0 0)
P21=P(200 0 0)
P22=P20 Y(120)
P23=P21 Y(60)
P24=P20 P22 ANG(135) DX
P25=P21 P23 ANG(135) dx
C20=ARC P23 P25 P21 dx
C21=ARC P22 P24 P20 dx
# of the bases:
B20=CON C21 C20
# the edge curve:
S20=CCV P23 P22 C21 P24 P25 C20 P23
# the cone surface:
A20=FSUB B20 S20
#

Circle-similar surface from 3 - n points.
A#=RCIR, p#, p#, p#<, p # >

Of the first point go all jets out (e.g. cone center).

Example:
P20=P(5, -2)
P21=P(9, -1)
P22=P(8, 3)

A20=RCIR, p20, p21, p22, p(4 3)

Strip surface from 1-n strip.

A#=RSTRIP, ptNr, P#, P#, P#<, P # >
Each strip consists of two series of < ptNr > points.
Min. number of points is 2 * ptNr. For 2 strips (3*ptNr) points are necessary.

Example:
P20=P(2 0)
P21=P(4 0)
P22=P(6 0)
P23=P(8 0)

P30=P(2 0 5)
P31=P(4 1 5)
P32=P(6 1 5)
P33=P(8 0 5)

A21=RSTRIP, 4, P20, p21, p22, p23, P30, p31, p32, p33

Shading/Hatch:
A # = HAS outline distance direction
Direction = shading angle in degrees

Example:
P20=p(-500 500)
S21=CCV P20 P(400 900) P(400 300) P20
A20=HAT S21 VAL(50) VAL(45)

At present still no import/export - function for shadings.
At present still no function for punched shadings.

### Solids - Body:

Conical body (cone):
B#=CON Centerpoint_1 Centerpoint_2 Radius_1 Radius_2
B#=CON Kreis_1 Kreis_2 ???
Example:
B20=CON P(0 0 0) P(100 0 0) VAL(60) VAL(40)
C20=P(0 0 0) VAL(100) DX
C21=P(100 0 0) VAL(40) DX
B20=CON C20 C21

Torus/annulus:

B#=TOR center centerline Radius_MainRing Radius_SurfaceCircle

B#=TOR center centerline Circle_Outside [ Modifier_Outside_Inside ]

The axle of the surface circle is the centerline.
The surface circle is always normally on centerline.
Radius_MainRing is whole at the exterior; is thus always positive.
Modifier_outside_Inside: necessarily for the selection of a variant, with which the Radius_MainRing is smaller than the Radius_SurfaceCircle

Example:
B20=TOR P(0 0 0) DZ VAL(100) VAL(25)
C20=P(100 0 0) VAL(25) DY
B20=TOR P(0 0 0) DZ C20

B#=PRISM obj1 distance
e.g. obj1 = Circ; Height = cylinder height.
B#=PRISM obj1 obj2
obj1/obj2 can be points or circles.
Example:
P20=P(100 110)
P21=P(100 130 30)
P22=P(100 150)
C20=P20 5
C21=P21 10
C22=P22 10
B20=PRISM C20 -5
B21=PRISM C20 C21
B22=PRISM C22 P21

### Models

M#="<modelname > "position [ Z-axis/Refsys [ x axis ] ]

Example external Model:
M22="Data/Niet1.dat "P(100 0)

### Geometry Modification (Cut (Trim), Transform, Project, Mirror)

CAD-Modus: Check box newObj determines whether the element is modified or whether a new element is produced.

CUT

Linear elements (lines, curves) limit, with one or two for cutting elements: obj=CUT obj cutting element (variant) (cutting element (variant))
Example:
L20=P(-60 30 0) P(20 70 0)
C20=P(-14 40 0) VAL(32) DZ
C20=CUT C20 L20 L20
# circle C20 is limited at both ends (trimmed).
Note: At present not for surfaces.

TRANSFORM

Linear elements shift/turn.
obj=TRA obj Transformation
S20=TRA S20 T20
# Curve S20 becomes over transformation T20 shifted

# See Transformation

Note: At present not for surfaces.

PROJECT

Linear elements on one level projected.
obj=PRJ obj Plane
S20=PRJ S20 R20
# Curve S20 is projected on the level R20.

MIRROR

Linear Elements are reflected around one level.
obj=MIR obj Plane
S20=MIR S20 R20
# Curve S20 is reflected around the level R20.
Note: At present not for surfaces.

### Graphic Attributes

DRAW OFF | Representation all following objects out/fade in (ON).
MODE DISP_PT OFF | Representation points switch off;
| Puts back with ON standard is ON.

####

Layer
Colors, line types, line strengths

####

### Layer

There are 256 Layers (0-255), standard is Layer 0.
All Layer with "UNIVERSE" can be addressed with some instructions.

LAY 12 | from now on assign everything to the Layer 12
LAY 0 | assign starting from now again everything the Standardlayer to 0
LAY 12 OFF | Layer 12 fade out (UNIVERSE: all Layer).
LAY UNIVERSE ON | All Layer fade in.
LAY 12 HILI ON | all objects in Layer 12 are the selected coloured
LAY 12 DIM OFF | all objects in Layer 12 dimmed are presented undimmed
LAY 12 NOP ON | all objects in Layer 12 do not make selectable
LAY 12 ADDS characteristics |
| Characteristics (or several the following):
| LAY 8 inputs only of Layer 8
| TYPE PT only points (LN=Lines, CI=Kreise, AC=Kreisboegen)
| COL 2 only color 2 (red)
| LTYP 2 only type of line 2 (strichliert short)
| THICK 2 only line weight 2

Example - all red Obj of Layer 5 to the Layer 12 cause:
LAY 12 ADDS LAY 5 COL 2

### Colors, line types, line strengths

There exists a table for the line attributes.
This table consists of one value each for color, type of line and line thickness.
G21=Colour, type of line, line thickness

Color:

0=none | 1=black | 2=red
3=green | 4=blue | 5=yellow
6=magenta | 7=cyan | 8=white
9=Hi_Light | 10=Dim |
11=Surface blue | 12=Surface red | 13=Surface grey.

Type of line:

0 = continuous line | 1 = dot and dash line
2 = short dashes | 3 = long dashes.

Line thickness:
1=Standard, 2=double thickness, upto max. 15.
Example:

G20=2,0,4 | Red continuous line with thickness 4.
G20 | Activate the attribute table entry 20; everything in the following produced elements will receive these attributes.

The places in the table 0 to 11 are pre-defined:
0 = point; Black, type is not used, thickness 4.
1 = default; Default color, continuous line, thinly.
2 = CUT; Red, fully, thickness = 2.
3 = rapidly, blue, semicolon, thickness 2.
4 = Tool left; Surface blue
5 = Tool right; Surface red;
6 = Tool off; Surface grey.
7 = symbols, black, full, thickness = 2.
8 = active element; Green, full, thickness 3.
9 = selects; Hilite color, full, thickness 4.
10 = shade (dimmed means can not be selected); Color shade, full, thickness 1.
11 = 2. Color treatment top side; Default, full, thickness 2.
HILI

Activate the color "selected".
Corresponds also to the "G9".
Reset with G1 (activate default).

DIM

Activate the color "DIM" (darken).
Corresponds also to the "G10".
Reset with G1 (activate default).
These objects are not exported!

NOP ON

Activates "NOPICK"; the following elements are not selectable.
Reset with NOP OFF.

###

### Multi Model support

###

### Internal Submodels

All internal Submodels are stored in the Model file.
During the treatment Submodels become buffered into < base>/tmp/Mode_<submodelname >.
The Model filename may not contain a path (and no path separator "/"or" \").

Internal Submodels must to be put on with the function Models/Create again and be able with the CAD function ' m-model ' to be then only used.

CAD:

Selection of a Submodels from list (by middle mouse button) or by selection of an already existing Submodels.

### External Submodels

For this Models there must be a Modeldatei. The model file must lie in a listing, which can be addressed via a symbol.
The Modelbezeichnung must contain a symbolic path.
The file access symbols are in file < base>/xa/dir.lst.
Standard listing is base>/dat <; the Zugriffsysmbol for this listing is "DATA".
A model designation would thus e.g. be "Data/Niet1.dat".

External Submodels does not become internally buffered.
CAD:

Selection of a Submodels of a Submodels from list (by middle mouse button) or by selection of an already existing Submodels.

### Programming environment

stat
Status indication; Number of free/occupied elements indicated.
Numbered Variables
Subroutine technology
Programming functions

### Numbered Variables

v1=10 | Direct assignment
v2=v1 + 10 | Expect operators
| Math.Operatoren: + - *
v3=v1+(v2*3) | Precedence bracketing for correct operator priority
v4 = sqrt(9) | Functions; it includes:
| sqrt, sin, cos, tan,
v2=abs(v1) | Absolute value (the sign is always positive)
v2=fix(v1) | Integer - cut which remainder off behind the comma;
| Example: 1.8 reaches 1.0
v2=rnd(v1) | Rounds. Example: 1.3 will 1,0, 1,8 reaches 2,0,
| -1.3 will -1,0, -1,8 reaches -2.0.
V5=P1 P2 | Point distance is away from point
V6=P1 L2 | Normal distance from point to line
V7=L10 | Length of the line 10
V9=C10 | Radius of the circular arc C10
| Further computations require their own line;
| Diameters e.g. calculate:
V10=C1;V10=V10*2 |
v7=x(p1) | the x-coordinate of point
v8=y(p2) | the Y-coordinate of one point
V1=PI*180 | Pre-defined variables: Pi (3.1415)

Number Variables are used indirectly by function VAL(); Example:
C10=P10 VAL(C5)
(the radius of the C5 is taken over).

### Subroutine technology

Subroutines can be used for producing geometry elements and numerical control working on ways.
MAC subroutine name
Beginning general subroutine. In the subroutine can be accessed all variables. General subroutines are dissolved for the Postproz.. Nesting level: to max 10 levels deep.
Subroutine name must consist of at least 2 letters, then numbers can follow.
Geometry Elements are stored into the database, but are not indicated.
END
End general subroutine.
CALL subroutine name
Call general subroutine at the current position.
Note: the subroutine name must be unique also upper/lower case is significant.
CALL "file name"
A subroutine in a file implement. The subroutine is without MAC and ENDS to store. At present cannot be branched out in such subroutines to a further subroutine.
--------------------------------------------------------------------------------------
GEO subroutine name
Beginning geometry subroutine. The first element is the starting line, then the outline, the last element of this subroutine is the driving out line. Along the starting line the correction is developed, diminished along the outline with correction cut (G40, G41 or G42), along the driving out line the correction again.
Subroutine name must consist of at least 2 letters, then numbers can follow.
In the subroutine can be accessed all variables. Nesting level: to max 10 levels deeply. Geometry subroutines are put on for the post processor as subroutines.

Within the geometry subroutines an outline with CON0 becomes - CONEND defines.

END
End to geometry subroutine.

WORK Working_on_type subroutine name [ parameter ]

Call geometry subroutine at the momentary position. The initial position is thus before with "RP.." od. to start "P1".
Outlines can be put down in subroutines (GEO) and called several times with WORK.
Working on types:

CUT UP name [ parameter ]
REV UP name [ parameter ]
SEP_CUT UP name [ parameter ]
SEP_REV UP name [ parameter ]
POCK UP name
CUT_CIR UP name radius starting direction by-pass angle driving out distance [ stop angle ]
POCK_CIR UP name Radius_aussen Radius_Bohrloch center

To pocket cycles see also POCKET instruction.

Parameter:
< angleworth > rotating. Directly indicate the angle.
reflect xmir around the x axis
reflect ymir around the y axis
Example; Macro S20 around X reflected, around 30 degrees turned at the momentary position process. One reflects and one turns, then first the reflection is implemented, then the turn.
work S20 30 XMIR
September _ are separation cuts (it an outline program is produced automatically, which closes an open outline).
The position after the subroutine can be queried over the point P0 and reused so later.
WORK Beabeitungtyp "file name"
Implement subroutine in a file .
The subroutine is without GEO and ENDS to store.
At present subroutines cannot be nested.
Example MAC:
MAC Kreis1
V2=V1*2
PRI "V2 =" V2
P1=V1 V2
END
V1 = 16
CALL Kreis1
V1 = 20
CALL Kreis1
PRI "P1 =" P1
Example GEO:
GEO Up1
PR 50 0
PR 0 50
END
FROM 100,100
T1
WORK CUT UP1
T0
RPR 100 0
T1
WORK CUT UP1

### Programming functions:

# comment |
PRI "text" | PRINT; Text spend (only to test purposes in
PRI "point 1 =",p1 | Message window)
PRI "Var 1 =",v1 | Text and variable
jump label name | Branch out, absolute branch instruction.
:labelname | The branch destination. Note: also reference must.
| Largely/lower case completely ident its.

if value condition value; Instruction
There are the following conditions:

eq | equal,
ne | not equal,
lt | less than,
gt | larger than,
l_e | less than or equal,
g_e | greater than or equal.

Example
v20=10
:Next
pri "Var 20 =", v20
v20=v20+10
if v20 lt 55; jump NEXT

### Numerical control processing functions

The current position can at any time over the point P0 queried
and to be again-used thus later.
T1

Tool change instruction (with tool number);

T0

the tool unload.

FROM FromPoint
Defines the indicated position as starting point of an outline program. This instruction may only be defined once in the main program and once in each Geometry sub program. Example: "FROM 100.100" or" FROM P20 "
RP point
Rapid absolute - instruction for procedure with absolute positioning. Representation: blue up, down red.
RPR x-distance, y-distance
Rapid relative - instruction for procedure relative.
P10
P(100 100)
Instruction for direct procedure over indication of coordinates or one APT point.
PR xAbsolute, yAbsolute
Definition of a relative procedure distance.
A Endpoint Centerpoint < direction of rotation >
Definition circular arc, absolute. The circular arc begins at the current position.
Standard direction of rotation is counter-clockwise direction (CCW)
ACRE Endpoint Centerpoint < direction of rotation >
Circular arc with relative coordinate data. The circular arc begins at the current position, terminator point and center relative to this starting point is defined. beginning at the current position, immediately one processes. Example:
ACRE -10 10 -10 0 CW
ACRE 10,10,0,10
Quarter circle (from 270 to 360 degrees) the counterclockwise.
POCKET edge distance cut distance
Define the parameters for following pocket cycles. See WORK

### Numerical control auxiliary functions

Functions, which are passed on to the post processor:

mch < machine > |
pn < part name > |
stop |
osp | operational stop
osp on/off |
TL RI | Tool right compensation, G42
TL LE | Tool left compensation, G41
TL OFF | Tool offset correction off, G40
zsur1 < z-value > | Defines the distance of the lower workpiece level
| of the Z=0 - level.
zsur2 < z-value > | upper workpiece level
zsur2 | The upper workpiece level is defined to the active level
cool on/off | Coolant on/off
fed < feed value > | Tool Feedrate
"M01" | Misc. Code Stop command
"(stop", x(p0), y(p0),")" |
TEC < Tooldef > | Tooldef or general technology definition
tcpos < point > | Def. point of tool change
twisting |
CLEAR < z-value > | Clearance
deep < z-value > |
cycle off | only off
T0 | Tool unload
T1 | Tool No. 1 load
INL "text" | INSERT LINE "text".
| Also with all INSERTS - versions can be built up text.
IN the "G40" | INSERT on start OF LINE;
| insert at the start of line (the next line).
INE "F12.5" | INSERT on end to OF LINE;
| insert at the line end (the next line).

### Version information

New in Version 0.86/2004-10-10

new funktions:
- Viewer: center for 3D-rotation by selection of a vertex
- CAD: RevolutionSurfaces
- CAD: Function CUT (to trim lines, curves, curves)
- CAD: Function TRANSLATE (move / rotate lines, curves)
- CAD: Function PROJECT (project lines, curves to plane)
- CAD: Function MIRROR (mirror lines, curves about plane)
- CAD: Analysis-functions (decode Object, measure distance, perp.distance)
- Iges-Import: trimmed, perforated RuledSurfaces (144 - 118) and
trimmed, perforated RevolutionSurfaces (144 - 120).
- Iges-Export: B-Spline Surfcaes Ent. 128 and Rev.Surfaces, Ent. 120.
- DXF-Export: Ellipses und B-Spline-curves out as POLYLINEs.
changed:
- Objecttyp "T" now for the definition of geometr. transformations (was ToolDef).
- struct Circ: openingangle ango added.

New in version 0.84/2004-07-08:

new functions:
- limited, punched surfaces with supporting surface (Ruled, b-Spline, conical Toroid).
changed:
- definition of punched planar surfaces

New in version 0.82/2004-04-30:

new functions:
- planar one punched surfaces from CIRC/ellipse/b-Spline/CCV (A = FSUB)
- Iges import and export of planar punched surfaces (Ent. 144, 142, 102)
- automatic increasing of all data fields (realloc)
- automatic loading of models/programs (by starting parameters)

New in version 0.80/2004-02-02:
new functions:
- internal and external Submodels
- construction level freely definably
- new Iges import elements 118,122,144,308,408
- new Iges export elements 118,308,408
- RuledSurface from basic element and vector
changed:
- Startupfile now < base>tmp/Model (was base>tmp/xa.apt <)
- base>/xa/dir.lst file/open only on listings in file <
- definition torus amended
New in version 0.77/2003-11-14:
New platform Ms Windows.

new functions:
- new printer drivers (Postscript(Vektoren), PCL5(via GL), HPGL).
Programming:
- new example post processor (DemoPostProc. *, with SOURCE code).
- struct ellipse changed in struct CurvElli (lake VC98\include\wingdi.h)!!
- struct polygon changed in struct CurvPoly (lake VC98\include\wingdi.h)!!
New in version 0.74/2003-09-15:
- CAD_Interface for planar surfaces, surface on cone, surface on torus (menu surfaces - A)
- CAD interfaces for the objects cone, torus (menu Solids - B)
- representation of trimmed surfaces by integrated triangle dismantling
(Tesselation) for planar surfaces, surfaces on cone, surfaces on torus.
- new selection menu (Popup) with selection count. Objects, if several objects
lie exactly one above the other.
- CAD interfaces for new function shading (menu surfaces - A)
- input windows for div. Tolerance values (Standard/Tolerances)
- definition turning center (ViewZ) improves.
- errors with the Resolv Contours korr.
New in version 0.72/2003-08-04:
- intersections Circ/B Spline, Circ/Ellipse, ellipse/ellipse, Ellipse/B Spline.
- interactive object polygon (in the menu curves - S)
- proj. PT - > polygon, tangent at polygon
- intersections polygon - LINE, Circle, ellipse, b-Spline, polygon.
- circles: With complete circles with z-vector after after z now z-vector always +Z
(by it old outlines from V0.70 powerplant defectively)
New in version 0.70/2003-06-25:
- new function HIDE/VIEW (fade out/fade in from objects)
fundamentally - CAD menu Curves ("S") renews
- outline (Ccv CompositeCurves) again too (in the menu "S" - Curves)
- new CAD menu option Ruled Surface.
- numerical control functions changed; Outlines integrates.
- new interactive numerical control editor (menu Numerical control Tech)
- again Iges import CCV's (type 102)
New in version 0.6.2/2003-04-18:
- module CAD fundamentally renews
- error "produced only 2D-Punkte" corrects
- several new and corrected vector definitions.
- new transformation function for points: P=R P
- new projection function for points: P=P R
- ellipse again
- dimension again (draft)
- again Iges import/export 108 (tarpaulin), 104 (ellipse)

End to documentation gCAD3D