38 for(
int i = 1; i < nsTgt; i++ )
40 middle = 1. / nsTgt * middle;
43 for(
int j = 0; j < nsTgt; j++ )
48 if( rc != 0 )
return 1;
51 for(
int j = 1; j < nsTgt - 1; j++ )
70 bool check_boxes_first )
85 for(
int i = 0; i < nsSrc; i++ )
87 int nexti = ( i + 1 ) % nsSrc;
95 if( check_boxes_first )
107 for(
int j = 0; j < nsTgt; j++ )
112 for(
int j = 0; j < nsSrc; j++ )
120 for(
int j = 0; j < nsSrc; j++ )
127 std::cout <<
"gnomonic plane: " <<
plane <<
"\n";
128 std::cout <<
" tgt src\n";
129 for(
int j = 0; j < nsTgt; j++ )
133 for(
int j = 0; j < nsSrc; j++ )
145 if( extraPoints >= 1 )
147 for(
int k = 0; k < nsSrc; k++ )
156 markb[( k + nsSrc - 1 ) % nsSrc] =
171 if( extraPoints >= 1 )
173 for(
int k = 0; k < nsTgt; k++ )
179 markr[( k + nsTgt - 1 ) % nsTgt] =
196 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];
247 for( j = 0; j < nsTgt && !found; j++ )
265 for( j = 0; j < nsSrc && !found; j++ )
285 for( j = 0; j < nsTgt; j++ )
287 int j1 = ( j + 1 ) % nsTgt;
292 <<
" " <<
tgtConn[j1] <<
" area : " << area <<
"\n";
302 std::cerr <<
" error in adjacent tgt edge: " <<
mb->
id_from_handle( adjTgtEdges[j] ) <<
"\n";
310 int nbExtraNodesSoFar = expts->size();
311 if( nbExtraNodesSoFar > 0 )
314 mb->
get_coords( &( *expts )[0], nbExtraNodesSoFar, &( coords1[0][0] ) );
316 for(
int k = 0; k < nbExtraNodesSoFar && !found; k++ )
323 foundIds[i] = ( *expts )[k];
325 if( dbg_1 ) std::cout <<
" found node:" << foundIds[i] << std::endl;
339 ( *expts ).push_back( outNode );
340 foundIds[i] = outNode;
343 if( dbg_1 ) std::cout <<
" new node: " << outNode << std::endl;
351 std::cout <<
" tgt quad: ";
352 for(
int j1 = 0; j1 < nsTgt; j1++ )
356 std::cout <<
" a point pp is not on a tgt quad " << *pp <<
" " << pp[1] <<
" tgt quad "
365 std::cout <<
" candidate polygon: nP" << nP <<
" plane: " <<
plane <<
"\n";
366 for(
int i1 = 0; i1 < nP; i1++ )
367 std::cout << iP[2 * i1] <<
" " << iP[2 * i1 + 1] <<
" " << foundIds[i1] <<
"\n";
396 std::cout <<
"Counting: " <<
counting <<
"\n";
397 std::cout <<
" polygon " <<
mb->
id_from_handle( polyNew ) <<
" nodes: " << nP <<
" :";
398 for(
int i1 = 0; i1 < nP; i1++ )
400 std::cout <<
" plane: " <<
plane <<
"\n";
401 std::vector< CartVect > posi( nP );
403 for(
int i1 = 0; i1 < nP; i1++ )
404 std::cout << foundIds[i1] <<
" " << posi[i1] <<
"\n";
406 std::stringstream fff;
407 fff <<
"file0" <<
counting <<
".vtk";