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

Comparing src/gen/genbox.c (file contents):
Revision 2.12 by greg, Fri Apr 9 18:52:57 2021 UTC vs.
Revision 2.15 by greg, Sat Jun 7 05:09:45 2025 UTC

# Line 10 | Line 10 | static const char      RCSid[] = "$Id$";
10   #include  "rtio.h"
11   #include  "rtmath.h"
12   #include  "objutil.h"
13 < #include  <stdlib.h>
13 > #include  "paths.h"
14  
15
16 char    *progname;
17
15   int     verbose = 0;
16  
17   char  let[]="0123456789._ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
# Line 274 | Line 271 | sphere(int v0)                                 /* generate a rounded corner */
271   int
272   main(int argc, char *argv[])
273   {
274 +        int  smooth = 0;
275          int  nsegs = 1;
276          int  objout = 0;
277          int  i;
278  
281        progname = argv[0];
282
279          if (argc < 6)
280                  goto userr;
281  
# Line 301 | Line 297 | main(int argc, char *argv[])
297                  case 'i':                       /* invert surface normals */
298                          rev = 1;
299                          break;
300 +                case 's':                       /* normal smoothing? */
301 +                        smooth = 1;
302 +                        break;
303                  case 'r':                       /* rounded edges/corners */
304                          rounde = 1;
305                          /* fall through */
# Line 397 | Line 396 | main(int argc, char *argv[])
396                  side(6, 4, 5, 7);
397          }
398          if (obj != NULL) {                      /* need to write output? */
399 +                if (!smooth)
400 +                        removeNormals(obj, 0, 0);
401                  if (objout) {
402                          if (rounde)             /* joins corners to edges */
403                                  coalesceVertices(obj, 2.*FTINY);
# Line 410 | Line 411 | main(int argc, char *argv[])
411   userr:
412          fprintf(stderr, "Usage: %s ", argv[0]);
413          fprintf(stderr, "material name xsize ysize zsize ");
414 <        fprintf(stderr, "[-i] [-b bevel | -r round [-n nsegs]] [-o]\n");
414 >        fprintf(stderr, "[-i] [-b bevel | -r round [-n nsegs][-s]] [-o]\n");
415          return(1);
416   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines