*** Under Development and Liable to Change ***

2D SIF

Last Updated 08/25/97

2D SIF is a dialect which supports 2D CNC milling and laser cutting. It is also useful for representing slices of a 3D solid to be manufactured by SFF processes.


Contents


The SIF Lexical Conventions

SIF is an ASCII file format which is similar lexically to C code. SIF does not have a preprocessor, and it does not have any macro text facilities.

The 2D SIF Formal Grammar

SIF_2D => ( SIF_2D int int HEADER_LIST BODY )
HEADER_LIST => empty
| HEADER_LIST ( units VALUE )
| HEADER_LIST ( coord_precision VALUE )
| HEADER_LIST ( stock_depth VALUE )
BODY => ( body GEOMETRY_LIST )
GEOMETRY_LIST => empty
| GEOMETRY_LIST LOOP
| GEOMETRY_LIST SEGMENT_GROUP
| GEOMETRY_LIST VERTEX
LOOP_LIST => empty
| LOOP_LIST LOOP
LOOP => ( loop SEGMENT_LIST LOOP_LIST )
SEGMENT_GROUP => ( segment SEG_ID SEGMENT_LIST V_ID )
SEG_ID => int
SEGMENT_LIST => SEGMENT
| SEGMENT_LIST SEGMENT
SEGMENT => V_ID
| V_ID ( bezier V_ID_LIST )
| V_ID ( arc VALUE )
TRI_V_ID_LIST => V_ID V_ID V_ID V_ID_LIST
BI_V_ID_LIST => V_ID V_ID V_ID_LIST
V_ID_LIST => empty
| V_ID_LIST V_ID
VERTEX => ( v V_ID VALUE VALUE VALUE )
V_ID => int
VALUE => int
| EXP
EXP => ( e int int )

The 2D SIF Semantics

( SIF_2D major_version minor_version header_list body )
TYPE:
FILE
PARAMETERS:
INT major_version, minor_version
HEADER header_list
BODY body
DESCRIPTION:

This is a SIF_2D file of the corresponding version number. The header_list has some global, default parameter declarations, and the body is the description of loops on the XY-plane which should be cut into a stock of a uniform depth.

( units meters_per_unit )
TYPE:
HEADER
PARAMETERS:
VALUE meters_per_unit
DESCRIPTION:

The units header field describes the scaling factor which takes a unit in the file and turns it into real world meters. For example, (units (e 1 -2)) means that a value of 1 in the file is equal to 1cm == 0.01m.

( coord_precision error )
TYPE:
HEADER
PARAMETERS:
VALUE error
DESCRIPTION:

The coord_precision header field is the global error bound for absolute error measurements throughout the file. This means that any measurement given in the file can end up being + or - error when it is actually manufactured. This quantity can be redefined on more local structures like the lump and that redefinition will shadow the global definition.

( stock_depth depth )
TYPE:
HEADER
PARAMETERS:
VALUE error
DESCRIPTION:

The stock_depth header field tells the manufacture what depth stock to cut the pattern out of.

( body geometry_list )
TYPE:
BODY
PARAMETERS:
GEOMETRY geometry_list
DESCRIPTION:

The body is currently the highest level construct in a 2D SIF file. It is composed of the description of loops which will be cut out of a uniform thickness stock.

( loop segment_list )
TYPE:
LOOP
PARAMETERS:
SEGMENT_LIST segment_list
DESCRIPTION:
A loop is a closed, non-intersecting, planar contour which is
a composed of path segments.
( segment segid segment_list )
TYPE:
SEGMENT_GROUP
PARAMETERS:
INT segid
SEGMENT segment_list
DESCRIPTION:

A segment is a connected collection of segment pieces (edges and curves) which can be instanced as a group. This is useful for defining a complicated boundary interface between two faces or patches.

... vid ...
TYPE:
SEGMENT
PARAMETERS:
INT vid
DESCRIPTION:

This is a simple edge segment. Each vid is a vertex identifier, and there is an implicit vertex at the end of each segment which comes from the next segment.

... vid ( bezier vid_list ) ...
TYPE:
SEGMENT
PARAMETERS:
INT vid
INT_LIST vid_list
DESCRIPTION:

This is a Bezier spline segment of order lengthof(vid_list) + 2. Each vid is a vertex identifier, and there is an implicit vertex at the end of each segment which comes from the next segment.

( v id x y z )
TYPE:
VERTEX
PARAMETERS:
INT id
VALUE x
VALUE y
VALUE z
DESCRIPTION:

This is a vertex named id and located at (x, y, z)

TYPE:
VALUE
DESCRIPTION:

INT or EXP

( e value exponent )
TYPE:
EXP
PARAMETERS:
INT value
INT exponent
DESCRIPTION:

Floating point precision independent numerical format. The meaning of which = value * (10 ^ exponent).

int
TYPE:
INT
PARAMETERS:
INT int
DESCRIPTION:

The integer value int


Some SIF_2D Example Files

Square Torus

(* Torus *)
(SIF_2D 0 5
  (units 1)
  (coord_precision (e 1 -3))
  (stock_depth 2)

  (body 
    (v 0 3 3 0)
    (v 1 -3 3 0)
    (v 2 -3 -3 0)
    (v 3 3 -3 0)
    (v 4 1 1 0)
    (v 5 1 -1 0)
    (v 6 -1 -1 0)
    (v 7 -1 1 0)

    (face (loop 0 1 2 3 (loop 4 5 6 7)) 
  )
)