@@ -11,7 +11,6 @@ export interface TableEditable {
1111 railMaterialThickness : number ;
1212 overhang : number ;
1313 material : number ;
14- trackWidth : number ;
1514}
1615
1716export class Table implements TableEditable {
@@ -24,11 +23,10 @@ export class Table implements TableEditable {
2423 railMaterialThickness : number ;
2524 overhang : number ;
2625 material : number ;
27- trackWidth : number ;
2826 units : Units ;
2927 configuration : Configuration ;
3028
31- constructor ( xCut : number , yCut : number , xSparMinGap : number , ySparMinGap : number , clipMinGap : number , thickness : number , railMaterialThickness : number , material : number , overhang : number , trackWidth : number , units : Units , configuration : Configuration ) {
29+ constructor ( xCut : number , yCut : number , xSparMinGap : number , ySparMinGap : number , clipMinGap : number , thickness : number , railMaterialThickness : number , material : number , overhang : number , units : Units , configuration : Configuration ) {
3230 this . xCut = xCut ;
3331 this . yCut = yCut ,
3432 this . xSparMinGap = xSparMinGap ;
@@ -38,7 +36,6 @@ export class Table implements TableEditable {
3836 this . railMaterialThickness = railMaterialThickness ;
3937 this . overhang = overhang ;
4038 this . material = material ;
41- this . trackWidth = trackWidth ;
4239 this . units = units ;
4340 this . configuration = configuration ;
4441 }
@@ -89,25 +86,41 @@ export class Table implements TableEditable {
8986
9087 get holeSize ( ) : number {
9188 return {
92- "mm" : 4 ,
93- "cm" : 0.4 ,
94- "in" : 4 / 25.4 ,
89+ "mm" : 4.5 ,
90+ "cm" : 0.45 ,
91+ "in" : 4.5 / 25.4 ,
9592 } [ this . units ] ;
9693 }
9794
95+ get frontHoleCoordinates ( ) : [ number , number , number ] {
96+ return {
97+ "mm" : [ 7.75 , 8.25 , 21.75 ] ,
98+ "cm" : [ 7.75 / 10 , 8.25 / 10 , 21.75 / 10 ] ,
99+ "in" : [ 7.75 / 25.4 , 8.25 / 25.4 , 21.75 / 25.4 ] ,
100+ } [ this . units ] as [ number , number , number ] ;
101+ }
102+
103+ get backHoleCoordinates ( ) : [ number , number , number , number ] {
104+ return {
105+ "mm" : [ 15 , 15 , 8.25 , 24.25 ] ,
106+ "cm" : [ 15 / 10 , 7.75 / 10 , 8.25 / 10 , 24.25 / 10 ] ,
107+ "in" : [ 15 / 25.4 , 7.75 / 25.4 , 8.25 / 25.4 , 24.25 / 25.4 ] ,
108+ } [ this . units ] as [ number , number , number , number ] ;
109+ }
110+
98111 get clipsFrontSetback ( ) : number {
99112 return {
100- "mm" : 89 ,
101- "cm" : 8.9 ,
102- "in" : 3.50 ,
113+ "mm" : ( 51 + 5 + 10 ) ,
114+ "cm" : ( 51 + 5 + 10 ) / 10 ,
115+ "in" : ( 51 + 5 + 10 ) / 25.4 ,
103116 } [ this . units ] ;
104117 }
105118
106119 get clipsBackSetback ( ) : number {
107120 return {
108- "mm" : 50 ,
109- "cm" : 5 ,
110- "in" : 1.9685 ,
121+ "mm" : 44 + 5 + 10 ,
122+ "cm" : ( 44 + 5 + 10 ) / 10 ,
123+ "in" : ( 44 + 5 + 10 ) / 25.4 ,
111124 } [ this . units ] ;
112125 }
113126
@@ -126,9 +139,9 @@ export class Table implements TableEditable {
126139
127140 get clipOffset ( ) : number {
128141 return {
129- "mm" : 88 ,
130- "cm" : 8.8 ,
131- "in" : 88 / 25.4 ,
142+ "mm" : 67.8 ,
143+ "cm" : 6.78 ,
144+ "in" : 67.8 / 25.4 ,
132145 } [ this . units ] ;
133146 }
134147
@@ -139,6 +152,14 @@ export class Table implements TableEditable {
139152 } [ this . configuration ]
140153 }
141154
155+ get trackWidth ( ) : number {
156+ return {
157+ "mm" : 80 ,
158+ "cm" : 8 ,
159+ "in" : 80 / 25.4 ,
160+ } [ this . units ] ;
161+ }
162+
142163 get inMillimeters ( ) : Table {
143164 const convert = {
144165 "mm" : ( x : number ) => x ,
@@ -156,7 +177,6 @@ export class Table implements TableEditable {
156177 convert ( this . railMaterialThickness ) ,
157178 convert ( this . material ) ,
158179 convert ( this . overhang ) ,
159- convert ( this . trackWidth ) ,
160180 "mm" ,
161181 this . configuration ,
162182 )
@@ -179,7 +199,6 @@ export class Table implements TableEditable {
179199 convert ( this . railMaterialThickness ) ,
180200 convert ( this . material ) ,
181201 convert ( this . overhang ) ,
182- convert ( this . trackWidth ) ,
183202 "cm" ,
184203 this . configuration ,
185204 )
@@ -202,7 +221,6 @@ export class Table implements TableEditable {
202221 convert ( this . railMaterialThickness ) ,
203222 convert ( this . material ) ,
204223 convert ( this . overhang ) ,
205- convert ( this . trackWidth ) ,
206224 "in" ,
207225 this . configuration ,
208226 )
0 commit comments