34 for(
int j = 0; j < nsTgt; j++ )
41 for(
int j = 1; j < nsTgt - 1; j++ )
56 bool check_boxes_first )
67 if( check_boxes_first )
78 for(
int j = 0; j < nsTgt; j++ )
83 for(
int j = 0; j < nsSrc; j++ )
92 for(
int j = 0; j < nsSrc; j++ )
101 std::cout <<
" tgt \n";
102 for(
int j = 0; j < nsTgt; j++ )
106 std::cout <<
" src\n";
107 for(
int j = 0; j < nsSrc; j++ )
118 for(
int k = 0; k < 3; k++ )
120 std::cout <<
" markb, markr: " << k <<
" " << markb[k] <<
" " << markr[k] <<
"\n";
128 if( extraPoints >= 1 )
130 for(
int k = 0; k < nsSrc; k++ )
139 markb[( k + nsSrc - 1 ) % nsSrc] =
150 for(
int k = 0; k < 3; k++ )
152 std::cout <<
" markb, markr: " << k <<
" " << markb[k] <<
" " << markr[k] <<
"\n";
160 if( extraPoints >= 1 )
162 for(
int k = 0; k < nsTgt; k++ )
168 markr[( k + nsTgt - 1 ) % nsTgt] =
178 for(
int k = 0; k < 3; k++ )
180 std::cout <<
" markb, markr: " << k <<
" " << markb[k] <<
" " << markr[k] <<
"\n";
194 for(
int k = 1; k < nP - 1; k++ )
217 for(
int n = 0; n < nP; n++ )
218 std::cout <<
" \t" << iP[2 * n] <<
"\t" << iP[2 * n + 1] <<
"\n";
236 for(
int i = 0; i < nP; i++ )
238 double* pp = &iP[2 * i];
246 for( j = 0; j < nsTgt && !found; j++ )
264 for( j = 0; j < nsSrc && !found; j++ )
284 for( j = 0; j < nsTgt; j++ )
286 int j1 = ( j + 1 ) % nsTgt;
291 <<
" " <<
tgtConn[j1] <<
" area : " << area <<
"\n";
300 std::cerr <<
" error in adjacent tgt edge: " <<
mb->
id_from_handle( adjTgtEdges[j] ) <<
"\n";
308 int nbExtraNodesSoFar = expts->size();
309 if( nbExtraNodesSoFar > 0 )
312 mb->
get_coords( &( *expts )[0], nbExtraNodesSoFar, &( coords1[0][0] ) );
314 for(
int k = 0; k < nbExtraNodesSoFar && !found; k++ )
321 foundIds[i] = ( *expts )[k];
323 if( dbg_1 ) std::cout <<
" found node:" << foundIds[i] << std::endl;
338 ( *expts ).push_back( outNode );
339 foundIds[i] = outNode;
342 if( dbg_1 ) std::cout <<
" new node: " << outNode << std::endl;
350 std::cout <<
" tgt polygon: ";
351 for(
int j1 = 0; j1 < nsTgt; j1++ )
355 std::cout <<
" a point pp is not on a tgt polygon " << *pp <<
" " << pp[1] <<
" tgt polygon "
364 std::cout <<
" candidate polygon: nP " << nP <<
"\n";
365 for(
int i1 = 0; i1 < nP; i1++ )
366 std::cout << iP[2 * i1] <<
" " << iP[2 * i1 + 1] <<
" " << foundIds[i1] <<
"\n";
395 std::cout <<
"Count: " <<
counting + 1 <<
"\n";
396 std::cout <<
" polygon " <<
mb->
id_from_handle( polyNew ) <<
" nodes: " << nP <<
" :";
397 for(
int i1 = 0; i1 < nP; i1++ )
400 std::vector< CartVect > posi( nP );
402 for(
int i1 = 0; i1 < nP; i1++ )
403 std::cout << iP[2 * i1] <<
" " << iP[2 * i1 + 1] <<
" " << posi[i1] <<
"\n";
405 std::stringstream fff;
406 fff <<
"file0" <<
counting <<
".vtk";