@@ -177,6 +177,80 @@ namespace utilities
177
177
if ( midpointVertexID == 7 && isFromVertex ) { return 3 ; }
178
178
if ( midpointVertexID == 7 && !isFromVertex ) { return 0 ; }
179
179
break ;
180
+ case mir::Shape::Tetrahedron:
181
+ if ( midpointVertexID == 4 && isFromVertex ) { return 0 ; }
182
+ if ( midpointVertexID == 4 && !isFromVertex ) { return 1 ; }
183
+ if ( midpointVertexID == 5 && isFromVertex ) { return 0 ; }
184
+ if ( midpointVertexID == 5 && !isFromVertex ) { return 2 ; }
185
+ if ( midpointVertexID == 6 && isFromVertex ) { return 0 ; }
186
+ if ( midpointVertexID == 6 && !isFromVertex ) { return 3 ; }
187
+ if ( midpointVertexID == 7 && isFromVertex ) { return 1 ; }
188
+ if ( midpointVertexID == 7 && !isFromVertex ) { return 2 ; }
189
+ if ( midpointVertexID == 8 && isFromVertex ) { return 2 ; }
190
+ if ( midpointVertexID == 8 && !isFromVertex ) { return 3 ; }
191
+ if ( midpointVertexID == 9 && isFromVertex ) { return 3 ; }
192
+ if ( midpointVertexID == 9 && !isFromVertex ) { return 1 ; }
193
+ case mir::Shape::Pyramid:
194
+ if ( midpointVertexID == 5 && isFromVertex ) { return 0 ; }
195
+ if ( midpointVertexID == 5 && !isFromVertex ) { return 1 ; }
196
+ if ( midpointVertexID == 6 && isFromVertex ) { return 0 ; }
197
+ if ( midpointVertexID == 6 && !isFromVertex ) { return 2 ; }
198
+ if ( midpointVertexID == 7 && isFromVertex ) { return 0 ; }
199
+ if ( midpointVertexID == 7 && !isFromVertex ) { return 3 ; }
200
+ if ( midpointVertexID == 8 && isFromVertex ) { return 0 ; }
201
+ if ( midpointVertexID == 8 && !isFromVertex ) { return 4 ; }
202
+ if ( midpointVertexID == 9 && isFromVertex ) { return 1 ; }
203
+ if ( midpointVertexID == 9 && !isFromVertex ) { return 2 ; }
204
+ if ( midpointVertexID == 10 && isFromVertex ) { return 2 ; }
205
+ if ( midpointVertexID == 10 && !isFromVertex ) { return 3 ; }
206
+ if ( midpointVertexID == 11 && isFromVertex ) { return 3 ; }
207
+ if ( midpointVertexID == 11 && !isFromVertex ) { return 4 ; }
208
+ if ( midpointVertexID == 12 && isFromVertex ) { return 4 ; }
209
+ if ( midpointVertexID == 12 && !isFromVertex ) { return 1 ; }
210
+ case mir::Shape::Triangular_Prism:
211
+ if ( midpointVertexID == 6 && isFromVertex ) { return 0 ; }
212
+ if ( midpointVertexID == 6 && !isFromVertex ) { return 1 ; }
213
+ if ( midpointVertexID == 7 && isFromVertex ) { return 1 ; }
214
+ if ( midpointVertexID == 7 && !isFromVertex ) { return 2 ; }
215
+ if ( midpointVertexID == 8 && isFromVertex ) { return 2 ; }
216
+ if ( midpointVertexID == 8 && !isFromVertex ) { return 0 ; }
217
+ if ( midpointVertexID == 9 && isFromVertex ) { return 0 ; }
218
+ if ( midpointVertexID == 9 && !isFromVertex ) { return 3 ; }
219
+ if ( midpointVertexID == 10 && isFromVertex ) { return 1 ; }
220
+ if ( midpointVertexID == 10 && !isFromVertex ) { return 4 ; }
221
+ if ( midpointVertexID == 11 && isFromVertex ) { return 2 ; }
222
+ if ( midpointVertexID == 11 && !isFromVertex ) { return 5 ; }
223
+ if ( midpointVertexID == 12 && isFromVertex ) { return 3 ; }
224
+ if ( midpointVertexID == 12 && !isFromVertex ) { return 4 ; }
225
+ if ( midpointVertexID == 13 && isFromVertex ) { return 4 ; }
226
+ if ( midpointVertexID == 13 && !isFromVertex ) { return 5 ; }
227
+ if ( midpointVertexID == 14 && isFromVertex ) { return 5 ; }
228
+ if ( midpointVertexID == 14 && !isFromVertex ) { return 3 ; }
229
+ case mir::Shape::Hexahedron:
230
+ if ( midpointVertexID == 8 && isFromVertex ) { return 0 ; }
231
+ if ( midpointVertexID == 8 && !isFromVertex ) { return 1 ; }
232
+ if ( midpointVertexID == 9 && isFromVertex ) { return 1 ; }
233
+ if ( midpointVertexID == 9 && !isFromVertex ) { return 2 ; }
234
+ if ( midpointVertexID == 10 && isFromVertex ) { return 2 ; }
235
+ if ( midpointVertexID == 10 && !isFromVertex ) { return 3 ; }
236
+ if ( midpointVertexID == 11 && isFromVertex ) { return 3 ; }
237
+ if ( midpointVertexID == 11 && !isFromVertex ) { return 0 ; }
238
+ if ( midpointVertexID == 12 && isFromVertex ) { return 0 ; }
239
+ if ( midpointVertexID == 12 && !isFromVertex ) { return 4 ; }
240
+ if ( midpointVertexID == 13 && isFromVertex ) { return 1 ; }
241
+ if ( midpointVertexID == 13 && !isFromVertex ) { return 5 ; }
242
+ if ( midpointVertexID == 14 && isFromVertex ) { return 2 ; }
243
+ if ( midpointVertexID == 14 && !isFromVertex ) { return 6 ; }
244
+ if ( midpointVertexID == 15 && isFromVertex ) { return 3 ; }
245
+ if ( midpointVertexID == 15 && !isFromVertex ) { return 7 ; }
246
+ if ( midpointVertexID == 16 && isFromVertex ) { return 4 ; }
247
+ if ( midpointVertexID == 16 && !isFromVertex ) { return 5 ; }
248
+ if ( midpointVertexID == 17 && isFromVertex ) { return 5 ; }
249
+ if ( midpointVertexID == 17 && !isFromVertex ) { return 6 ; }
250
+ if ( midpointVertexID == 18 && isFromVertex ) { return 6 ; }
251
+ if ( midpointVertexID == 18 && !isFromVertex ) { return 7 ; }
252
+ if ( midpointVertexID == 19 && isFromVertex ) { return 7 ; }
253
+ if ( midpointVertexID == 19 && !isFromVertex ) { return 4 ; }
180
254
default :
181
255
printf (" Edge endpoint case not implemented.\n " );
182
256
return -1 ;
0 commit comments