NOTE! This section is not ready yet. The fileformat of oCADis
can be changed at any time meaning that an old drawing will not be
able to load. I will try to avoid that as much as
possible but cannot promise anything. I will, of course, help
you to translate your old drawings to newer formats. Just drop me
a mail.
oCADis' fileformat is a standard ASCII-file. Since it is saved
in pure ASCII it is quite easy to edit it with a editor (such
as emacs) but be careful. oCADis' code for loading a file is
not very safe and the error-checking is almost none-existing so
please be careful how and what you edit.
Each line starts with a tag telling what kind of object or
what kind of information that line holds. Multiple lines of
data for one and same object is not allowed.
The following tags are valid:
-
V (Viewport)
-
G (Grid)
-
N (Snap)
-
C (Colour)
-
S (Linestyle)
-
T (Textstyle)
-
Q (Dimensionstyle)
-
L (Layer)
-
O (Object)
-
L (Line)
OL,"[name of line]",x1,y1,x2,y2,[colour],[linestyle],[linewidth]
-
R (Ray)
OR,"[name of ray]",x1,y1,x2,y2,[colour],[linestyle],[linewidth]
-
O (Construction line)
OO,"[name of construction line]",x1,y1,x2,y2,[colour],[linestyle],[linewidth]
-
C (Circle)
OC,"[name of circle]",center x,center y,radius,[colour],[linestyle],[linewidth]
-
A (Arc)
OA,"[name of arc]",center x,center y,radius,start angle,end angle,[colour],[linestyle],[linewidth]
-
T (Text)
-
P (Point)
-
E (Ellipse)
-
Z (Ellipical arc)
-
Y (Polyline)
-
S (Spline)
-
D (Dimension)
-
C (Center)
-
R (Radius)
-
D (Diameter)
-
H (Linear, Horizontell)
-
V (Linear, Vertical)
-
A (Linear, Aligned)
-
L (Leader)
The parser should simple ignore tags it doesn't recognize.
|
"[something]" |
This represents a string surrounded by ". E.g. "Line 1", "Default layer" |
x1 |
This is an example of a double variable name, e.g. 3.1453.
|
x1% |
This is an example of a integer variable name (note the %-character). |
[colour] |
This tag is used to describe to colour of the object. A letter B means that the object should have the same colour as the layer. Otherwise letter U should follow with 3 floats representing R,G and B. For example U,0.5,0,0. |
[linestyle] |
This tag represents the object's linestyle. A letter B indicates that the linestyle of the layer should be used. Otherwise a U followed by a string pointing to the linestyle to be used. For example: U,"dotdotdash". |
[linewidth] |
The parameter linewidth sets the linewidth of the object. A B means that the linewidth of the layer should be used. Otherwise a U followed by a double indicates the linewidth. For example: U,0.5123. |
Type: |
Object |
Short: |
OL |
Formal: |
OL,"[name of line]",x1,y1,x2,y2,[colour],[linestyle],[linewidth] |
Sample: |
OL,"line 1",100.0,12.5,220.4,12.2,B,B,B |
Description: |
Represents a line from startpoint x1,y1 to endpoint x2,y2. |
Type: |
Object |
Short: |
OC |
Formal: |
OC,"[name of circle]",x,y,r,[colour],[linestyle],[linewidth] |
Sample: |
OC,"circle 1",100.0,100.0,50.0,B,B,B |
Description: |
Represents a circle with centerpoint x,y and radius r. |
Type: |
Object |
Short: |
OA |
Formal: |
OA,"[name of arc]",x,y,r,start,end,[colour],[linestyle],[linewidth] |
Sample: |
OA,"arc 1",100.0,100.0,50.0,0,90,B,B,B |
Description: |
Represents an arc with centerpoint x,y and radius r. The arc starts at angle start and stops at angle end. |
|