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

SIF DSG

Last Updated 08/25/97

SIF DSG is a dialect which supports Destructive Solid Geometry processes, like CyberCut.


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

SIF_DSG => ( SIF_DSG int int HEADER_LIST STOCK ORIENTATION_LIST )
HEADER_LIST => empty
| HEADER_LIST ( units VALUE )
| HEADER_LIST ( coord_precision VALUE )
| HEADER_LIST ( corner_radius VALUE )
STOCK => SIF_SFF body description
ORIENTATION_LIST => empty
| ORIENTATION_LIST REF_PLANE
REF_PLANE => ( refplane XFORM_LIST FEATURE_LIST )
XFORM_LIST => empty
| XFORM_LIST ( translate VALUE VALUE VALUE )
| XFORM_LIST ( rotate VALUE VALUE VALUE VALUE )
FEATURE_LIST => empty
| FEATURE_LIST VERTEX
| FEATURE_LIST HOLE
| FEATURE_LIST POCKET
HOLE => ( hole VALUE VALUE V_ID FEATURE_LIST )
POCKET => ( pocket VALUE VALUE ISLAND_LIST LOOP FEATURE_LIST)
ISLAND_LIST => empty
| ISLAND_LIST ISLAND
ISLAND => ( island LOOP FEATURE_LIST)
LOOP => ( loop SEGMENT_LIST )
SEGMENT_LIST => SEGMENT
| SEGMENT_LIST SEGMENT
SEGMENT => V_ID
| V_ID ( arc VALUE )
| V_ID ( bezier 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 DSG Semantics

( SIF_DSG major_version minor_version header_list stock refplane_list )
TYPE:
FILE
PARAMETERS:
INT major_version, minor_version
HEADER header_list
BODY stock
REFPLANE refplane_list
DESCRIPTION:

This is a SIF_DSG file of the corresponding version number. The header_list has some global, default parameter declarations, and the stock is the boundary representation of a solid which the DSG features will be cut out of. The stock is represented as a SIF_SFF body. The refplanes specify a 2D reference coordinate system which is associated with fixturing the part in a certain way. Each refplane contains 2.5D DSG features such as holes and pockets which are specified in the local coordinate system of the refplane.

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

( corner_radius radius_max )
TYPE:
HEADER
PARAMETERS:
VALUE max_radius
DESCRIPTION:

The corner_radius header field is the global error bound for the amount of rounding which is allowable for internal corners of a pocket. This rounding is due to the fact manufacturers do not have tools to make infinitely sharp corners.

( refplane transform_list feature_list )
TYPE:
REFPLANE
PARAMETERS:
TRANSFORM transform_list
FEATURE feature_list
DESCRIPTION:

A refplane sets up a 2D reference plane to define 2.5D DSG operations on. The transform_list is a list of rigid transforms which transform the XY-plane to an arbitrary location in 3-space outside of the stock (usually a face of the stock). Then points used to define features can be measured from this plane's origin. The feature_list includes holes and pockets with islands all defined in this local coordinate system.

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

A translate is a 4D homogeneous translation matrix. There are short hand notations for translation along the principle axes.

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

A rotate is a 4D homogeneous rotation matrix around an arbitrary axis ( x, y, z ) by an angle theta, which is measured in degrees. There are short hand notations for rotations around the principle axes.

( hole depth radius vid feature_list )
TYPE:
FEATURE
PARAMETERS:
VALUE depth, radius
INT vid
FEATURE_LIST feature_list
DESCRIPTION:
A hole is a feature which can be made by a cylindrical drill. The hole has a
depth and a radius and is located with its center at the coordinates of vid
on the reference plane. The feature_list field is for nested subfeatures which
lie within the contour circle of the hole.
( pocket depth max_radius island_list loop feature_list )
TYPE:
FEATURE
PARAMETERS:
VALUE depth, max_radius
LOOP loop
ISLAND_LIST island_list
FEATURE_LIST feature_list
DESCRIPTION:
A pocket is a feature which is composed of empty space of a uniform depth
bordered on the outside by a contour loop and on inside by islands. The
max_radius field gives a bound on how much machinists can round sharp
corners. The feature_list field is for nested subfeatures which lie
within the contour loop of the pocket.
( island loop feature_list )
TYPE:
ISLAND
PARAMETERS:
INT vid0, vid1, vid2
INT_LIST vid_list
FEATURE_LIST feature_list
DESCRIPTION:
An island is a inner border of a pocket which tells machinists which portions
of material not to mill when creating a pocket feature. An island must lie
within its enclosing pocket. The feature_list field is for nested
subfeatures which lie within the contour loop of the pocket.
( 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.
... 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 ( arc angle ) ...
TYPE:
SEGMENT
PARAMETERS:
INT vid
VALUE angle
DESCRIPTION:
This is a circular arc segment. The arc connects the starting and ending
vertices with a circular arc of angle degrees. The angle should be
in the range <-360, 360>. A positive angle is CCW while a negative angle
is CW.
... 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 DSG Sample Files

The Square Torus

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

  (* This is the Stock description *)
  (* Cube *)
  (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)

        (* 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 *)
        (f 1 0 4 5) 
        (* Bottom Face *)
        (f 3 2 6 7) 
      )
    )
  )

  (* The Reference plane begins as the XY plane in space and its orientation and 
   * origin are transformed to a reference point on a face where features can then
   * be defined in that local coordinate system.
   * In this example the local origin will be in the middle of the face. 
   *)

  (* Top Face Features *)
  (refplane 
    (translate 0 0 1)

    (v 0 1 1 0)
    (v 1 -1 1 0)
    (v 2 -1 -1 0)
    (v 3 1 -1 0)

    (pocket (e 15 -1) (e 1 -3) (loop 0 1 2 3))
  )

  (* Top Face Features *)
  (refplane 
    (rotate 1 0 0 180)
    (translate 0 0 -1)

    (v 0 1 1 0)
    (v 1 -1 1 0)
    (v 2 -1 -1 0)
    (v 3 1 -1 0)

    (pocket (e 15 -1) (e 1 -3) (loop 0 1 2 3))
  )
)

Arcs and Nesting

(SIF_DSG 0 5
  (units 1)
  (coord_precision (e 1 -3))
  (corner_radius (e 1 -3))

  (* This is the Stock description *)
  (* Cube *)
  (body 
    (lump
      (shell
        (v 0 10 10 10)
        (v 1 10 -10 10)
        (v 2 10 -10 -10)
        (v 3 10 10 -10)
        (v 4 -10 10 10)
        (v 5 -10 -10 10)
        (v 6 -10 -10 -10)
        (v 7 -10 10 -10)

        (* 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 *)
        (f 1 0 4 5) 
        (* Bottom Face *)
        (f 3 2 6 7) 
      )
    )
  )

  (* The Reference plane begins as the XY plane in space and its orientation and 
   * origin are transformed to a reference point on a face where features can then
   * be defined in that local coordinate system.
   * In this example the local origin will be in the middle of the face. 
   *)

  (* Top Face Features *)
  (refplane 
    (translate 0 0 10)

    (v 8 -8 8 0)

    (v 9 9 8 0)
    (v 10 7 8 0)

    (v 11 0 0 0)

    (v 12 -9 -2 0)
    (v 13 -9 -9 0)
    (v 14 9 -9 0)
    (v 15 9 -2 0)

    (v 16 -8 -3 0)
    (v 17 -8 -8 0)
    (v 18 -2 -8 0)
    (v 19 -2 -3 0)

    (v 20 -7 -4 0)
    (v 21 -7 -7 0)
    (v 22 -3 -7 0)
    (v 23 -3 -4 0)

    (v 24 8 -8 0)
    (v 25 8 -3 0)
    (v 26 2 -3 0)
    (v 27 2 -8 0)

    (v 28 0 -4 0)

    (hole 1 1 8)
    (* This is a circular pocket and is how a circular loop must be defined *)
    (pocket 1 (e 1 -1) (loop 9 (arc 180) 10 (arc 180)))
    (hole 1 1 11)
    (pocket 1 (e 1 -1)
      (island (loop 16 17 18 19)
        (pocket 2 (e 1 -1) (loop 20 21 22 23)) 
      ) 

      (loop 12 13 14 15)

      (pocket 2 (e 1 -1) (loop 24 25 26 27))
      (hole 20 1 28)
    )
  )

  (* Bottom Face Features *)
  (refplane 
    (rotate 1 0 0 180)
    (translate 0 0 -10)

    (v 29 0 0 0)

    (hole 1 1 29)
  )

  (* Right Face Features *)
  (refplane 
    (rotate 1 0 0 -90)
    (translate 0 10 0)

    (v 30 0 0 0)

    (hole 1 1 30)
  )
)