[GRASS-SVN] r35115 - grass/branches/develbranch_6/vector/v.in.dxf

svn_grass at osgeo.org svn_grass at osgeo.org
Tue Dec 30 05:30:54 EST 2008


Author: neteler
Date: 2008-12-30 05:30:53 -0500 (Tue, 30 Dec 2008)
New Revision: 35115

Modified:
   grass/branches/develbranch_6/vector/v.in.dxf/add_3dface.c
   grass/branches/develbranch_6/vector/v.in.dxf/add_arc.c
   grass/branches/develbranch_6/vector/v.in.dxf/add_circle.c
   grass/branches/develbranch_6/vector/v.in.dxf/add_line.c
   grass/branches/develbranch_6/vector/v.in.dxf/add_lwpolyline.c
   grass/branches/develbranch_6/vector/v.in.dxf/add_point.c
   grass/branches/develbranch_6/vector/v.in.dxf/add_polyline.c
   grass/branches/develbranch_6/vector/v.in.dxf/add_text.c
   grass/branches/develbranch_6/vector/v.in.dxf/dxf_to_vect.c
Log:
hcho: Fixed the test that determines if a polyline is 3-d (merge from trunk, r35108)

Modified: grass/branches/develbranch_6/vector/v.in.dxf/add_3dface.c
===================================================================
--- grass/branches/develbranch_6/vector/v.in.dxf/add_3dface.c	2008-12-30 09:49:57 UTC (rev 35114)
+++ grass/branches/develbranch_6/vector/v.in.dxf/add_3dface.c	2008-12-30 10:30:53 UTC (rev 35115)
@@ -15,7 +15,7 @@
 
     strcpy(layer, UNIDENTIFIED_LAYER);
 
-    /* read in lines and processes information until a 0 is read in */
+    /* read in lines and process information until a 0 is read in */
     while ((code = dxf_get_code(dxf)) != 0) {
 	if (code == -2)
 	    return -1;
@@ -93,13 +93,12 @@
 	case 70:		/* 3dface flag */
 	    dface_flag = atoi(dxf_buf);
 	    /* TODO: what does 'invisible' mean here? */
-
 	    /*******************************************************************
-                  Bit        Meaning
-                    1        First edge is invisible
-                    2        Second edge is invisible
-                    4        Third edge is invisible
-                    8        Fourth edge is invisible
+	     Invisible edge flags (optional; default = 0):
+	     1 = First edge is invisible
+	     2 = Second edge is invisible
+	     4 = Third edge is invisible
+	     8 = Fourth edge is invisible
 	     ******************************************************************/
 	    break;
 	}

Modified: grass/branches/develbranch_6/vector/v.in.dxf/add_arc.c
===================================================================
--- grass/branches/develbranch_6/vector/v.in.dxf/add_arc.c	2008-12-30 09:49:57 UTC (rev 35114)
+++ grass/branches/develbranch_6/vector/v.in.dxf/add_arc.c	2008-12-30 10:30:53 UTC (rev 35115)
@@ -22,7 +22,7 @@
 
     strcpy(layer, UNIDENTIFIED_LAYER);
 
-    /* read in lines and processes information until a 0 is read in */
+    /* read in lines and process information until a 0 is read in */
     while ((code = dxf_get_code(dxf)) != 0) {
 	if (code == -2)
 	    return -1;

Modified: grass/branches/develbranch_6/vector/v.in.dxf/add_circle.c
===================================================================
--- grass/branches/develbranch_6/vector/v.in.dxf/add_circle.c	2008-12-30 09:49:57 UTC (rev 35114)
+++ grass/branches/develbranch_6/vector/v.in.dxf/add_circle.c	2008-12-30 10:30:53 UTC (rev 35115)
@@ -18,7 +18,7 @@
 
     strcpy(layer, UNIDENTIFIED_LAYER);
 
-    /* read in lines and processes information until a 0 is read in */
+    /* read in lines and process information until a 0 is read in */
     while ((code = dxf_get_code(dxf)) != 0) {
 	if (code == -2)
 	    return -1;

Modified: grass/branches/develbranch_6/vector/v.in.dxf/add_line.c
===================================================================
--- grass/branches/develbranch_6/vector/v.in.dxf/add_line.c	2008-12-30 09:49:57 UTC (rev 35114)
+++ grass/branches/develbranch_6/vector/v.in.dxf/add_line.c	2008-12-30 10:30:53 UTC (rev 35115)
@@ -14,7 +14,7 @@
 
     strcpy(layer, UNIDENTIFIED_LAYER);
 
-    /* read in lines and processes information until a 0 is read in */
+    /* read in lines and process information until a 0 is read in */
     while ((code = dxf_get_code(dxf)) != 0) {
 	if (code == -2)
 	    return -1;

Modified: grass/branches/develbranch_6/vector/v.in.dxf/add_lwpolyline.c
===================================================================
--- grass/branches/develbranch_6/vector/v.in.dxf/add_lwpolyline.c	2008-12-30 09:49:57 UTC (rev 35114)
+++ grass/branches/develbranch_6/vector/v.in.dxf/add_lwpolyline.c	2008-12-30 10:30:53 UTC (rev 35115)
@@ -19,7 +19,7 @@
     strcpy(layer, UNIDENTIFIED_LAYER);
 
     zpnts[0] = 0.0;
-    /* read in lines and processes information until a 0 is read in */
+    /* read in lines and process information until a 0 is read in */
     while ((code = dxf_get_code(dxf)) != 0) {
 	if (code == -2)
 	    return -1;
@@ -58,11 +58,9 @@
 	    bulge = atof(dxf_buf);
 	    break;
 	case 70:		/* polyline flag */
-
 	    /*******************************************************************
-	         Bit         Meaning
-	           1         closed
-	         128         plinegen
+	     Polyline flag (bit-coded); default is 0:
+	     1 = Closed; 128 = Plinegen
 	     ******************************************************************/
 	    polyline_flag = atoi(dxf_buf);
 	    break;

Modified: grass/branches/develbranch_6/vector/v.in.dxf/add_point.c
===================================================================
--- grass/branches/develbranch_6/vector/v.in.dxf/add_point.c	2008-12-30 09:49:57 UTC (rev 35114)
+++ grass/branches/develbranch_6/vector/v.in.dxf/add_point.c	2008-12-30 10:30:53 UTC (rev 35115)
@@ -13,7 +13,7 @@
     strcpy(layer, UNIDENTIFIED_LAYER);
 
     zpnts[0] = 0.0;
-    /* read in lines and processes information until a 0 is read in */
+    /* read in lines and process information until a 0 is read in */
     while ((code = dxf_get_code(dxf)) != 0) {
 	if (code == -2)
 	    return -1;

Modified: grass/branches/develbranch_6/vector/v.in.dxf/add_polyline.c
===================================================================
--- grass/branches/develbranch_6/vector/v.in.dxf/add_polyline.c	2008-12-30 09:49:57 UTC (rev 35114)
+++ grass/branches/develbranch_6/vector/v.in.dxf/add_polyline.c	2008-12-30 10:30:53 UTC (rev 35115)
@@ -33,7 +33,7 @@
 
     strcpy(layer, UNIDENTIFIED_LAYER);
 
-    /* read in lines and processes information until a 0 is read in */
+    /* read in lines and process information until a 0 is read in */
     while ((code = dxf_get_code(dxf)) != 0) {
 	if (code == -2)
 	    return -1;
@@ -49,30 +49,22 @@
 	    break;
 	case 70:		/* polyline flag */
 	    polyline_flag = atoi(dxf_buf);
-
 	    /*******************************************************************
-                  Bit        Meaning
-                    1        This is a closed Polyline (or a polygon
-                             mesh closed in the M direction)
-                    2        Curve-fit vertices have been added
-                    4        Spline-fit vertices have been added
-                    8        This is a 3D Polyline
-                   16        This is a 3D polygon mesh.  Group 75 indi-
-                             cates the smooth surface type, as follows:
-
-                               0 = no smooth surface fitted
-                               5 = quadratic B-spline surface
-                               6 = cubic B-spline surface
-                               8 = Bezier surface
-
-                   32        The polygon mesh is closed in the N direc-
-                             tion
-                   64        The polyline is a polyface mesh
+	     Polyline flag (bit-coded); default is 0:
+	     1 = This is a closed polyline (or a polygon mesh closed in
+	         the M direction).
+	     2 = Curve-fit vertices have been added.
+	     4 = Spline-fit vertices have been added.
+	     8 = This is a 3D polyline.
+	     16 = This is a 3D polygon mesh.
+	     32 = The polygon mesh is closed in the N direction.
+	     64 = The polyline is a polyface mesh.
+	     128 = The linetype pattern is generated continuously around
+	           the vertices of this polyline.
 	     ******************************************************************/
 	    /* NOTE: code only exists for flag = 1 (closed polyline) or 0 */
 	    G_debug(1, "polyline_flag: %d", polyline_flag);
-	    if (polyline_flag & 8 || polyline_flag & 16 || polyline_flag & 17
-		|| polyline_flag & 32)
+	    if (polyline_flag & (8 | 16 | 32))
 		if (warn_flag70) {
 		    G_warning(_("3-d data in dxf file. Polyline_flag: %d"),
 			      polyline_flag);
@@ -143,20 +135,18 @@
 		    break;
 		case 70:	/* vertex flag */
 		    vertex_flag = atoi(dxf_buf);
-
 	    /*******************************************************************
-                 Bit         Meaning
-                   1         Extra vertex created by curve fitting
-                   2         Curve fit tangent defined for this vertex.
-                             A curve fit tangent direction of 0 may be
-                             omitted from the DXF output, but is signif-
-                             icant if this bit is set.
-                   4         Unused (never set in DXF files)
-                   8         Spline vertex created by spline fitting
-                  16         Spline frame control point
-                  32         3D Polyline vertex
-                  64         3D polygon mesh vertex
-                 128         Polyface mesh vertex
+	     Vertex flags:
+	     1 = Extra vertex created by curve-fitting
+	     2 = Curve-fit tangent defined for this vertex. A curve-fit tangent
+		 direction of 0 may be omitted from DXF output but is
+		 significant if this bit is set.
+	     4 = Not used
+	     8 = Spline vertex created by spline-fitting
+	     16 = Spline frame control point
+	     32 = 3D polyline vertex
+	     64 = 3D polygon mesh
+	     128 = Polyface mesh vertex
 	     ******************************************************************/
 		    if (vertex_flag == 16) {
 			/* spline frame control point: don't draw it! */

Modified: grass/branches/develbranch_6/vector/v.in.dxf/add_text.c
===================================================================
--- grass/branches/develbranch_6/vector/v.in.dxf/add_text.c	2008-12-30 09:49:57 UTC (rev 35114)
+++ grass/branches/develbranch_6/vector/v.in.dxf/add_text.c	2008-12-30 10:30:53 UTC (rev 35115)
@@ -17,7 +17,7 @@
     strcpy(layer, UNIDENTIFIED_LAYER);
 
     zpnts[0] = 0.0;
-    /* read in lines and processes information until a 0 is read in */
+    /* read in lines and process information until a 0 is read in */
     while ((code = dxf_get_code(dxf)) != 0) {
 	if (code == -2)
 	    return -1;

Modified: grass/branches/develbranch_6/vector/v.in.dxf/dxf_to_vect.c
===================================================================
--- grass/branches/develbranch_6/vector/v.in.dxf/dxf_to_vect.c	2008-12-30 09:49:57 UTC (rev 35114)
+++ grass/branches/develbranch_6/vector/v.in.dxf/dxf_to_vect.c	2008-12-30 10:30:53 UTC (rev 35115)
@@ -29,7 +29,7 @@
 		continue;
 
 	    if (strcmp(dxf_buf, "$EXTMAX") == 0) {
-		/* read in lines and processes information until a 9
+		/* read in lines and process information until a 9
 		 * or a 0 is read in */
 		while ((code = dxf_get_code(dxf)) != 9 && code != 0) {
 		    if (code == -2)	/* EOF */
@@ -54,7 +54,7 @@
 		}
 	    }
 	    else if (strcmp(dxf_buf, "$EXTMIN") == 0) {
-		/* read in lines and processes information until a 9
+		/* read in lines and process information until a 9
 		 * or a 0 is read in */
 		while ((code = dxf_get_code(dxf)) != 9 && code != 0) {
 		    if (code == -2)	/* EOF */



More information about the grass-commit mailing list