[GRASS-SVN] r44629 - grass/trunk/vector/v.extrude

svn_grass at osgeo.org svn_grass at osgeo.org
Sun Dec 19 14:30:30 EST 2010


Author: martinl
Date: 2010-12-19 11:30:30 -0800 (Sun, 19 Dec 2010)
New Revision: 44629

Modified:
   grass/trunk/vector/v.extrude/main.c
Log:
v.extrude: cosmetics, process area separately


Modified: grass/trunk/vector/v.extrude/main.c
===================================================================
--- grass/trunk/vector/v.extrude/main.c	2010-12-19 00:46:20 UTC (rev 44628)
+++ grass/trunk/vector/v.extrude/main.c	2010-12-19 19:30:30 UTC (rev 44629)
@@ -12,7 +12,7 @@
  * PURPOSE:    "Extrudes" flat polygons and lines to 3D with defined height
  *              Useful for creating buildings for displaying with NVIZ
  *
- * COPYRIGHT:  (C) 2005-2009 by the GRASS Development Team
+ * COPYRIGHT:  (C) 2005-2010 by the GRASS Development Team
  *
  *             This program is free software under the GNU General
  *             Public License (>=v2). Read the file COPYING that comes
@@ -131,9 +131,12 @@
 
     trace = (t_flag->answer) ? 1 : 0;
     area = (only_type & GV_AREA) ? 1 : 0;
-    if (area && (only_type & GV_BOUNDARY)) {
-	/* do not wrire wall twice -> disable boundary type */
-	only_type &= ~GV_BOUNDARY;
+    if (area) {
+	if (only_type & GV_BOUNDARY) {
+	    /* do not wrire wall twice -> disable boundary type */
+	    only_type &= ~GV_BOUNDARY;
+	}
+	only_type &= ~GV_AREA;
     }
 
     centroid = 0;
@@ -489,6 +492,7 @@
 	    nlines++;
 
 	    if (type == GV_AREA) {
+		/* roof */
 		Vect_append_point(Points_roof, Points->x[k], Points->y[k],
 				  Points->z[k] + objheight + voffset_curr);
 	    }



More information about the grass-commit mailing list