188 ScdVertexSeq* vseq[3];
189 ScdElementSeq* eseq[3];
199 EntitySequenceManager* seq_mgr =
gMB->sequence_manager();
203 vseq[0] = vseq[1] = vseq[2] = NULL;
207 seq_mgr->create_scd_sequence( vseq0_minmax[0], vseq0_minmax[1],
MBVERTEX, 1, vstart[0], dum_seq );
208 if( NULL != dum_seq ) vseq[0] =
dynamic_cast< ScdVertexSeq*
>( dum_seq );
209 assert( MB_FAILURE != result && vstart[0] != 0 && dum_seq != NULL && vseq[0] != NULL );
212 result = seq_mgr->create_scd_sequence( vseq1_minmax[0], vseq1_minmax[1],
MBVERTEX, 1, vstart[1], dum_seq );
213 if( NULL != dum_seq ) vseq[1] =
dynamic_cast< ScdVertexSeq*
>( dum_seq );
214 assert( MB_FAILURE != result && vstart[1] != 0 && dum_seq != NULL && vseq[1] != NULL );
217 result = seq_mgr->create_scd_sequence( vseq2_minmax[0], vseq2_minmax[1],
MBVERTEX, 1, vstart[2], dum_seq );
218 if( NULL != dum_seq ) vseq[2] =
dynamic_cast< ScdVertexSeq*
>( dum_seq );
219 assert( MB_FAILURE != result && vstart[2] != 0 && dum_seq != NULL && vseq[2] != NULL );
230 eseq[0] = eseq[1] = eseq[2] = NULL;
233 result = seq_mgr->create_scd_sequence( eseq0_minmax[0], eseq0_minmax[1],
MBHEX, 1, estart[0], dum_seq );
234 if( NULL != dum_seq ) eseq[0] =
dynamic_cast< ScdElementSeq*
>( dum_seq );
235 assert( MB_FAILURE != result && estart[0] != 0 && dum_seq != NULL && eseq[0] != NULL );
238 result = eseq[0]->add_vsequence( vseq[0],
241 vseq0_minmax[0], vseq0_minmax[0], vseq0_minmax[0], vseq0_minmax[0],
242 vseq0_minmax[0], vseq0_minmax[0] );
246 std::cout <<
"Couldn't add first vsequence to first element sequence in tri-composite 3d eseq." << std::endl;
251 result = seq_mgr->create_scd_sequence( eseq1_minmax[0], eseq1_minmax[1],
MBHEX, 1, estart[1], dum_seq );
252 if( NULL != dum_seq ) eseq[1] =
dynamic_cast< ScdElementSeq*
>( dum_seq );
253 assert( MB_FAILURE != result && estart[1] != 0 && dum_seq != NULL && eseq[1] != NULL );
256 result = eseq[1]->add_vsequence( vseq[0],
258 vseq0_minmax[0], eseq0_minmax[0],
260 vseq0_minmax[0] + HomCoord::unitv[0], eseq0_minmax[0] + HomCoord::unitv[1],
262 vseq0_minmax[0], eseq0_minmax[0],
264 true, eseq[1]->min_params(),
265 HomCoord( eseq[1]->min_params().i(), eseq[1]->max_params().j(),
266 eseq[1]->max_params().k() ) );
269 std::cout <<
"Couldn't add shared vsequence to second element sequence in tri-composite 3d eseq." << std::endl;
275 eseq[1]->add_vsequence( vseq[1],
277 vseq1_minmax[0], eseq1_minmax[0] + HomCoord::unitv[0],
279 vseq1_minmax[0] + HomCoord::unitv[1],
280 eseq1_minmax[0] + HomCoord::unitv[0] + HomCoord::unitv[1],
282 vseq1_minmax[0] + HomCoord::unitv[0], eseq[1]->min_params() + HomCoord::unitv[0] * 2 );
285 std::cout <<
"Couldn't add second vseq to second element sequence in tri-composite 3d eseq." << std::endl;
290 result = seq_mgr->create_scd_sequence( eseq2_minmax[0], eseq2_minmax[1],
MBHEX, 1, estart[2], dum_seq );
291 if( NULL != dum_seq ) eseq[2] =
dynamic_cast< ScdElementSeq*
>( dum_seq );
292 assert( MB_FAILURE != result && estart[2] != 0 && dum_seq != NULL && eseq[2] != NULL );
295 result = eseq[2]->add_vsequence(
298 vseq1_minmax[0], eseq[2]->min_params() + HomCoord::unitv[1],
300 vseq1_minmax[0] + HomCoord::unitv[0], eseq[2]->min_params() + HomCoord::unitv[1] * 2,
302 vseq1_minmax[0], eseq[2]->min_params() + HomCoord::unitv[1],
304 true, eseq[2]->min_params() + HomCoord::unitv[1],
305 HomCoord( eseq[2]->min_params().i(), eseq[2]->max_params().j(), eseq[2]->max_params().k() ) );
308 std::cout <<
"Couldn't add shared vsequence to third element sequence in tri-composite 3d eseq." << std::endl;
313 result = eseq[2]->add_vsequence( vseq[0],
315 vseq1_minmax[0], eseq2_minmax[0],
317 vseq1_minmax[0] + HomCoord::unitv[1], eseq2_minmax[0] + HomCoord::unitv[0],
319 vseq1_minmax[0], eseq2_minmax[0],
321 true, eseq2_minmax[0],
322 HomCoord( eseq2_minmax[1].i(), eseq2_minmax[0].j(), eseq2_minmax[1].k() ) );
325 std::cout <<
"Couldn't add left shared vsequence to third element sequence in "
326 "tri-composite 3d eseq."
332 result = eseq[2]->add_vsequence( vseq[2],
334 vseq2_minmax[0], eseq[2]->min_params() + HomCoord::unitv[0] + HomCoord::unitv[1],
336 vseq2_minmax[0] + HomCoord::unitv[0],
337 eseq[2]->min_params() + HomCoord::unitv[0] * 2 + HomCoord::unitv[1],
339 vseq2_minmax[0] + HomCoord::unitv[1],
340 eseq[2]->min_params() + HomCoord::unitv[0] + HomCoord::unitv[1] * 2 );
343 std::cout <<
"Couldn't add third vseq to third element sequence in tri-composite 3d eseq." << std::endl;