SIF Version 1.0
SIF SFF SIF DSG STL SIF Source

SIF SFF

Last Updated 11/23/98

SIF SFF is a pure boundary representation which should be accepted by all manufacturers. SIF SFF is well suited to SFF (Solid Free-Form Fabrication) processes. SFF processes include SLA (Stereo-Lithography) and SLS (Selective Laser Sintering)


Links


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 SIF SFF Formal Grammar

SIF_SFF => ( SIF_SFF int int HEADER_LIST BODY )
HEADER_LIST => empty
| HEADER_LIST ( units VALUE )
| HEADER_LIST ( coord_precision VALUE )
BODY => ( body GLOBAL_GEOMETRY_LIST LUMP_LIST )
LUMP_LIST => empty
| LUMP_LIST LUMP
LUMP => ( lump SHELL LUMP_LIST )
SHELL_LIST => empty
| SHELL_LIST SHELL
SHELL => ( shell GEOMETRY_LIST SUBSHELL_LIST )
SUBSHELL_LIST => empty
| SUBSHELL_LIST SUBSHELL
SUBSHELL => ( subshell GEOMETRY_LIST )
GLOBAL_GEOMETRY_LIST => empty
| GLOBAL_GEOMETRY_LIST SURFACE
| GLOBAL_GEOMETRY_LIST PATH
| GLOBAL_GEOMETRY_LIST VERTEX
GEOMETRY_LIST => empty
| GEOMETRY_LIST SURFACE
| GEOMETRY_LIST SURFACE_INST
| GEOMETRY_LIST T_ARRAY_FORWARD
| GEOMETRY_LIST T_ARRAY_REVERSED
| GEOMETRY_LIST T_ARRAY_CROSSED
| GEOMETRY_LIST T_MESH
| GEOMETRY_LIST T_STRIP_FORWARD
| GEOMETRY_LIST T_STRIP_REVERSED
| GEOMETRY_LIST FACE
| GEOMETRY_LIST FACET
| GEOMETRY_LIST TRIANGLE
| GEOMETRY_LIST PATH
| GEOMETRY_LIST VERTEX
SURFACE => ( surface SURF_ID GEOMETRY_LIST )
SURF_ID => int
SURFACE_INST => ( si SURF_ID TRANSFORM_LIST )
T_ARRAY_FORWARD => ( taf BI_T_ROW_LIST )
T_ARRAY_REVERSED => ( tar BI_T_ROW_LIST )
T_ARRAY_CROSSED => ( tac BI_T_ROW_LIST )
T_MESH => ( tm ( r V_ID ) T_ROW_LIST )
BI_T_ROW_LIST => T_ROW T_ROW_LIST
T_ROW_LIST => T_ROW
| T_ROW_LIST T_ROW
T_ROW => ( r BI_V_ID_LIST )
T_STRIP_FORWARD => ( tsf TRI_V_ID_LIST )
T_STRIP_REVERSED => ( tsr TRI_V_ID_LIST )
FACE => ( face LOOP )
LOOP_LIST => empty
| LOOP_LIST LOOP
LOOP => ( loop LOOP_LIST SEGMENT_LIST )
FACET => ( f TRI_V_ID_LIST )
TRIANGLE => ( t V_ID V_ID V_ID )
PATH => ( path PATH_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 )
TRANSFORM_LIST => empty
| TRANSFORM_LIST ( tv VALUE VALUE VALUE )
| TRANSFORM_LIST ( tx VALUE )
| TRANSFORM_LIST ( ty VALUE )
| TRANSFORM_LIST ( tz VALUE )
| TRANSFORM_LIST ( rv VALUE VALUE VALUE VALUE )
| TRANSFORM_LIST ( rx VALUE )
| TRANSFORM_LIST ( ry VALUE )
| TRANSFORM_LIST ( rz VALUE )
| TRANSFORM_LIST ( sa VALUE )
| TRANSFORM_LIST ( sx VALUE )
| TRANSFORM_LIST ( sy VALUE )
| TRANSFORM_LIST ( sz 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 SIF SFF Semantics

( SIF_SFF 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_SFF file of the corresponding version number. The header_list has some global, default parameter declarations, and the body is the boundary representation of a solid.

( 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 maximum amount by which the designer believes values specfied in the file differ from the ideal. Generally, this will be the roundoff error. The implication is that for any 3D coordinate specified, each of its three values could be off by error, and it would be valid to change each value by as much as error in order to close cracks in the boundary. This quantity can be redefined on more local structures like the lump and that redefinition will shadow the global definition.

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

The desired_accuracy header field is a global error tolerance for manufacturing. It implies that the designer will accept a part whose measurements end up being + or - error from the ideal geometry described 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.

( body geometry_list lump_list )
TYPE:
BODY
PARAMETERS:
GEOMETRY geometry_list in {v, path, surface}
LUMP lump_list
DESCRIPTION:

The body is currently the highest level construct in a SIF file. It is composed of some global geometry declarations which are shared among multiple lumps, and a list of lumps which define the volume of the body.

( lump shell lump_list )
TYPE:
LUMP
PARAMETERS:
SHELL shell
LUMP lump_list
DESCRIPTION:

A lump is a continuous volume of a specified material. The volume of the lump is bounded by one outer shell which may have a number of inner hole shells. Other lumps which are located within these holes can be nested syntactically in the lump_list.

( shell geometry_list subshell_list )
TYPE:
SHELL
PARAMETERS:
GEOMETRY geometry_list
SHELL shell_list
DESCRIPTION:

A shell is a surface of finite area which divides 3D space into exactly two volumes (a pseudo-2-manifold). This surface is made up of geometry such as vertices, faces, and meshes. Opposite facing shells, called holes, can be nested one level deep within a shell description.

( surface surfid geometry_list )
TYPE:
SURFACE
PARAMETERS:
INT surfid
GEOMETRY geometry_list
DESCRIPTION:

A surface is a collection of faces and meshes which can be instanced as a group. This is useful for defining a complicated boundary interface between two lumps.

( si surfid transform_list )
TYPE:
SURFACE
PARAMETERS:
INT surfid
TRANSFORM transform_list
DESCRIPTION:

A surface instance, si, is a placement of a surface with id surfid. The transform list describes a transform to place the object space surface in world coordinates.

taf, tab, tac

( taf
( r vid00 vid01 vid02 ... )
( r vid10 vid11 vid12 ... )
...
)
TYPE:
TRIANGLE ARRAY
PARAMETERS:
INT vid00, vid01, ...
DESCRIPTION:

A triangle array is a connected rectangular mesh of triangles. The advantage of the triangle strip is that it reuses a vertex reference for six triangles which makes the representation more compact.

taf stands for triangle array forward. The ordering of vertices:

( taf
( r 00 01 02 03 )
( r 10 11 12 13 )
( r 20 21 22 23 )
( r 30 31 32 33 )
)

Produces this hatching pattern:

00--01--02--03
| / | / | / |
10--11--12--13
| / | / | / |
20--21--22--23
| / | / | / |
30--31--32--33

tab stands for triangle array backward. The ordering of vertices:

( tab
( r 00 01 02 03 )
( r 10 11 12 13 )
( r 20 21 22 23 )
( r 30 31 32 33 )
)

Produces this hatching pattern:

00--01--02--03
| \ | \ | \ |
10--11--12--13
| \ | \ | \ |
20--21--22--23
| \ | \ | \ |
30--31--32--33

tac stands for triangle array cross hatched. The ordering of vertices:

( tac
( r 00 01 02 03 )
( r 10 11 12 13 )
( r 20 21 22 23 )
( r 30 31 32 33 )
)

Produces this hatching pattern:

00--01--02--03
| \ | / | \ |
10--11--12--13
| / | \ | / |
20--21--22--23
| \ | / | \ |
30--31--32--33
( tm
( r vid0 )
( r vid1 vid2 )
( r vid3 vid4 vid5 )
...
)
TYPE:
TRIANGLE MESH
PARAMETERS:
INT vid0, vid1, ...
DESCRIPTION:

A triangle mesh is a connected triangular mesh of triangles. The advantage of the triangle mesh is that it reuses a vertex reference for six triangles which makes the representation more compact.

The ordering of vertices:

( tm
( r 0 )
( r 1 2 )
( r 3 4 5 )
( r 6 7 8 9 )
)

Produces this hatching pattern:

      0
     / \
    1---2
   / \ / \
  3---4---5
 / \ / \ / \
6---7---8---9
( tf vid0 vid1 vid2 vid_list )
TYPE:
TRIANGLE FAN
PARAMETERS:
INT vid0, vid1, vid2
INT_LIST vid_list
DESCRIPTION:

A triangle fan is a connected strip of triangles which all hinge on a single vertex. The first vertex in the list is used by all of the triangles and the following vertices should then come in counter clockwise order. The advantage of the triangle strip is that it reuses a vertex reference for two triangles which makes the representation more compact.

The ordering of vertices:

( tf 0 1 2 3 4 )

Produces this hatching pattern:

4---3---2
  \ | / |
    0---1
tsf, tsb

( tsf vid0 vid1 vid2 vid_list )
TYPE:
TRIANGLE STRIP
PARAMETERS:
INT vid0, vid1, vid2
INT_LIST vid_list
DESCRIPTION:

A triangle strip is a connected strip of triangles. The advantage of the triangle strip is that it reuses a vertex reference for three triangles which makes the representation more compact.

tsf stands for triangle strip forward. The ordering of vertices:

( tsf 0 1 2 3 4 5 6 )

Produces this hatching pattern:

0---2---4---6
| / | / | /
1---3---5

tsb stands for triangle strip backward. The ordering of vertices:

( tsb 0 1 2 3 4 5 6 )

Produces this hatching pattern:

0---2---4---6
| \ | \ | /
1---3---5
( face ( loop loop_list vid0 vid1 vid2 vid_list ) )
TYPE:
FACE
PARAMETERS:
LOOP_LIST loop_list
INT vid0, vid1, vid2
INT_LIST vid_list
DESCRIPTION:

A face is the most complicated planar area possible. It is composed of nested contour loops with alternating orientation where material is on the left of the path. This allows for concave polygons as well as polygons with holes and polygons within those holes. No self intersection is allowed.

( f vid0 vid1 vid2 vid_list )
TYPE:
FACET
PARAMETERS:
INT vid0, vid1, vid2
INT_LIST vid_list
DESCRIPTION:

A facet is a simple, planar, convex polygon which is a closed list of three or more edge segments.

( t vid0 vid1 vid2 )
TYPE:
TRIANGLE
PARAMETERS:
INT vid0, vid1, vid2
DESCRIPTION:

This is a simple triangle which is a closed list of three edge segments.

( path pathid segment_list )
TYPE:
PATH
PARAMETERS:
INT pathid
SEGMENT segment_list
DESCRIPTION:

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

( inst path pathid transform_list )
TYPE:
PATH
PARAMETERS:
INT pathid
TRANSFORM_LIST transform_list
DESCRIPTION:

A inst path is a segment. It is the transformed instantiation of a predefined path.

... 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.

... ( arc angle x y z ) ...
... ( arc angle ) ...
TYPE:
SEGMENT
PARAMETERS:
VALUE angle
VALUE x = 0
VALUE y = 0
VALUE z = 1
DESCRIPTION:

This is a circular arc segment. The turning angle is in degrees. The triple ( x, y, z ) is the normal to the plane in which the arc is defined. The default normal is the z-axis. An arc segment connects the end point of the previous segment to the next segment with a circular arc with the specified turning angle in the specified plane.

( v id x y z w )
( v id x y z )
( v id x y )
TYPE:
VERTEX
PARAMETERS:
INT id
VALUE x
VALUE y
VALUE z = 0
VALUE w = 1
DESCRIPTION:

This is a vertex named id and located at (x, y, z) with homogeneous weight w

tv, tx, ty, tz

( tv x y z )
( tx x )
( ty y )
( tz z )
TYPE:
TRANSFORM
PARAMETERS:
VALUE x, y, z
DESCRIPTION:

tv is a general translation transformation which moves the coordinate frame by the vector (x, y, z). tx, ty, tz are short hand notations for translations along the respective principle axes: x, y, and z.

rv, rx, ry, rz

( rv x y z theta )
( rx theta )
( ry theta )
( rz theta )
TYPE:
TRANSFORM
PARAMETERS:
VALUE x, y, z
DEGREES VALUE theta
DESCRIPTION:

rv is a general rotation transformation which rotates the coordinate frame by theta degrees about the vector (x, y, z). rx, ry, rz are short hand notations for rotations of theta degrees about the respective principle axes: x, y, and z.

sa, sx, sy, sz

( sa factor )
( sx factor )
( sy factor )
( sz factor )
TYPE:
TRANSFORM
PARAMETERS:
VALUE factor
DESCRIPTION:

sa is a uniform scale transformation in all 3 dimensions by a scale factor. sx, sy, sz are non-uniform scale transformations along the respective principle axes: x, y, and 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 SFF Example Files

Surface Instancing

(* Corner of a Cube *)
(SIF_SFF 0 5
  (units 1)
  (coord_precision (e 1 -3))

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

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

        (si 0)
        (si 0 (rv 0 1 0 90))
      )
    )
  ) 
)

Square Torus using Facets and General Faces

(* Torus *)
(SIF_SFF 0 5
  (units 1)
  (coord_precision (e 1 -3))

  (body
    (lump
      (shell
        (v 0 3 3 1)
        (v 1 3 -3 1)
        (v 2 3 -3 -1)
        (v 3 3 3 -1)
        (v 4 -3 3 1)
        (v 5 -3 -3 1)
        (v 6 -3 -3 -1)
        (v 7 -3 3 -1)
        (v 8 1 1 1)
        (v 9 -1 1 1)
        (v 10 -1 -1 1)
        (v 11 1 -1 1)
        (v 12 1 1 -1)
        (v 13 -1 1 -1)
        (v 14 -1 -1 -1)
        (v 15 1 -1 -1)

        (* Front Face *)
        (f 0 1 2 3) 
        (* Back Face *)
        (f 7 6 5 4) 
        (* Right Face *)
        (f 0 3 7 4) 
        (* Left Face *)
        (f 2 1 5 6) 
        (* Top Face *)
        (face (loop (loop 11 10 9 8) 1 0 4 5))
        (* Bottom Face *)
        (face (loop (loop 12 13 14 15) 3 2 6 7))

        (* The Hole in the Center *)
        (f 8 9 13 12)
        (f 9 10 14 13)
        (f 10 11 15 14)
        (f 11 8 12 15)
      )
    )
  )
)

Square Torus using Triangle Arrays

(* Torus *)
(SIF_SFF 0 5
  (units 1)
  (coord_precision (e 1 -3))

  (body 
    (lump
      (shell
        (v 0 1 1 1)
        (v 1 -1 1 1)
        (v 2 -1 -1 1)
        (v 3 1 -1 1)
        (v 4 1 1 -1)
        (v 5 -1 1 -1)
        (v 6 -1 -1 -1)
        (v 7 1 -1 -1)
        (v 8 3 3 1)
        (v 9 -3 3 1)
        (v 10 -3 -3 1)
        (v 11 3 -3 1)
        (v 12 3 3 -1)
        (v 13 -3 3 -1)
        (v 14 -3 -3 -1)
        (v 15 3 -3 -1)

        (taf 
          (r 0 1 2 3 0)
          (r 8 9 10 11 8)
          (r 12 13 14 15 12)
          (r 4 5 6 7 4)
          (r 0 1 2 3 0)
        )
      )
    )
  )
)



This page is maintained by Jordan Smith
E-mail: jordans@cs.berkeley.edu
Last modified: 1/11/99

This page was designed and tested under Netscape using common HTML constructs. No browsers are blocked from viewing this page. Please send mail to the maintainer of this page if you find any broken links or errors in the page construction.