ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/cv/arch2rad.c
(Generate patch)

Comparing ray/src/cv/arch2rad.c (file contents):
Revision 1.5 by greg, Thu Feb 14 13:18:30 1991 UTC vs.
Revision 1.7 by greg, Mon Oct 14 09:51:16 1991 UTC

# Line 426 | Line 426 | FILE   *fp;
426                                          /* check for repeats */
427          rept = 0; nrepts = 0;
428          for (i = 0; i < nm; i++) {
429 <                if (ml[i] == sm) {
429 >                if (ml[i] == sm || !strcmp(ml[i], VOIDID)) {
430                          rept |= 1<<i;
431                          nrepts++;
432 +                        continue;
433                  }
434                  for (j = 0; j < i; j++)
435 <                        if (ml[j] == ml[i]) {
435 >                        if (!(rept & 1<<j) && ml[j] == ml[i]) {
436                                  rept |= 1<<j;
437                                  nrepts++;
438                          }
439          }
440                                          /* print antimatter and modlist */
441 <        fprintf(fp, "\nvoid antimatter %s\n", openmod);
441 >        fprintf(fp, "\n%s antimatter %s\n", VOIDID, openmod);
442          fprintf(fp, "%d %s", 1+nm-nrepts, sm);
443          for (i = 0; i < nm; i++)
444                  if (!(rept & 1<<i))
# Line 463 | Line 464 | FILE   *fp;
464                  newp.h[i] = p->h[i];
465          }
466                                          /* spread reference and opposite */
467 <        if (p->x[1] > p->x[0]) {
467 >        if (p->x[2] > p->x[0]) {
468                  newp.x[0] -= 2;
469 <                newp.x[1] += 2;
469 >                newp.x[1] -= 2;
470                  newp.x[2] += 2;
471 <                newp.x[3] -= 2;
472 <        } else if (p->x[0] > p->x[1]) {
471 >                newp.x[3] += 2;
472 >        } else if (p->x[0] > p->x[2]) {
473                  newp.x[0] += 2;
474 <                newp.x[1] -= 2;
474 >                newp.x[1] += 2;
475                  newp.x[2] -= 2;
476 <                newp.x[3] += 2;
476 >                newp.x[3] -= 2;
477          }
478 <        if (p->y[1] > p->y[0]) {
478 >        if (p->y[2] > p->y[0]) {
479                  newp.y[0] -= 2;
480 <                newp.y[1] += 2;
480 >                newp.y[1] -= 2;
481                  newp.y[2] += 2;
482 <                newp.y[3] -= 2;
483 <        } else if (p->y[0] > p->y[1]) {
482 >                newp.y[3] += 2;
483 >        } else if (p->y[0] > p->y[2]) {
484                  newp.y[0] += 2;
485 <                newp.y[1] -= 2;
485 >                newp.y[1] += 2;
486                  newp.y[2] -= 2;
487 <                newp.y[3] += 2;
487 >                newp.y[3] -= 2;
488          }
489                                                  /* put out faces */
490          sprintf(buf, "op%d", ++nopens);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines