/ configs / sim / schema-simple.sql
schema-simple.sql
 1  
 2  BEGIN TRANSACTION;
 3  
 4  DROP TABLE IF EXISTS "tools";
 5  CREATE TABLE "tools" (
 6      toolno	INTEGER PRIMARY KEY,
 7      pocket	INTEGER,
 8      diameter 	REAL DEFAULT (0.0),
 9      backangle   REAL DEFAULT (0.0),
10      frontangle  REAL DEFAULT (0.0),
11      orientation INTEGER DEFAULT (0.0),
12      comment	 TEXT DEFAULT (NULL),
13      x_offset REAL DEFAULT (0.0),
14      y_offset REAL DEFAULT (0.0),
15      z_offset REAL DEFAULT (0.0),
16      a_offset REAL DEFAULT (0.0),
17      b_offset REAL DEFAULT (0.0),
18      c_offset REAL DEFAULT (0.0),
19      u_offset REAL DEFAULT (0.0),
20      v_offset REAL DEFAULT (0.0),
21      w_offset REAL DEFAULT (0.0)
22  );
23  
24  
25  
26  INSERT INTO "tools" VALUES (1,2,4.0, 0.0,0.0,0.0,"tool1",1.2,0.0,3.7,0.0,0.0,0.0,0.0,0.0,0.0);
27  INSERT INTO "tools" VALUES (2,1,2.0, 0.0,0.0,0.0,"tool2",0.2,0.0,1.2,0.0,0.0,0.0,0.0,0.0,0.0);
28  INSERT INTO "tools" VALUES (3,7,3.3, 0.0,0.0,0.0,"tool3",3.2,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0);
29  INSERT INTO "tools" VALUES (4,3,1.2, 0.0,0.0,0.0,"tool4",0.0,0.0,5.9,0.0,0.0,0.0,0.0,0.0,0.0);
30  INSERT INTO "tools" VALUES (5,5,6.2, 0.0,0.0,0.0,"tool5",0.0,0.0,1.1,0.0,0.0,0.0,0.0,0.0,0.0);
31  INSERT INTO "tools" VALUES (6,9,1.9, 0.0,0.0,0.0,"tool6",0.0,0.0,3.4,0.0,0.0,0.0,0.0,0.0,0.0);
32  INSERT INTO "tools" VALUES (7,8,0.3, 0.0,0.0,0.0,"tool7",0.0,0.0,1.7,0.0,0.0,0.0,0.0,0.0,0.0);
33  INSERT INTO "tools" VALUES (8,11,2.50, 0.0,0.0,0.0,"tool8",0.0,0.0,2.7,0.0,0.0,0.0,0.0,0.0,0.0);
34  INSERT INTO "tools" VALUES (9,24,1.1, 0.0,0.0,0.0,"tool9",0.0,0.0,4.9,0.0,0.0,0.0,0.0,0.0,0.0);
35  
36  DROP TABLE IF EXISTS "state";
37  CREATE TABLE "state" (
38      tool_in_spindle	INTEGER,
39      pocket_prepped	INTEGER
40  
41  );
42  
43  INSERT INTO "state" VALUES (6,9);
44  
45  
46  
47  COMMIT;