+ // get (optional) extra node file name (in case there is matching
+ // .poly file.
+ strcpy(exfile, file);
+ strcat(exfile, ".ex");
+
+ // load extra nodes if they exist
+ excount = 0;
+ if ( (fd = fopen(exfile, "r")) != NULL ) {
+ fscanf(fd, "%d %d %d %d", &excount, &junk1, &junk2, &junk3);
+
+ if ( excount > MAX_EX_NODES - 1 ) {
+ printf("Error, too many 'extra' nodes, increase array size\n");
+ exit(-1);
+ } else {
+ printf(" Expecting %d 'extra' nodes\n", excount);
+ }
+
+ for ( i = 1; i <= excount; i++ ) {
+ fscanf(fd, "%d %lf %lf %lf\n", &junk1,
+ &exnodes[i][0], &exnodes[i][1], &exnodes[i][2]);
+ printf("(extra) %d %.2f %.2f %.2f\n",
+ i, exnodes[i][0], exnodes[i][1], exnodes[i][2]);
+ }
+ }
+ fclose(fd);
+