SIF DSG is a dialect which supports Destructive Solid Geometry processes, like CyberCut.
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 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 ) |
(* 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)) ) )
(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) ) )