[GRASS-SVN] r35108 - grass/trunk/vector/v.in.dxf
svn_grass at osgeo.org
svn_grass at osgeo.org
Mon Dec 29 20:25:20 EST 2008
Author: hcho
Date: 2008-12-29 20:25:20 -0500 (Mon, 29 Dec 2008)
New Revision: 35108
Modified:
grass/trunk/vector/v.in.dxf/add_3dface.c
grass/trunk/vector/v.in.dxf/add_arc.c
grass/trunk/vector/v.in.dxf/add_circle.c
grass/trunk/vector/v.in.dxf/add_line.c
grass/trunk/vector/v.in.dxf/add_lwpolyline.c
grass/trunk/vector/v.in.dxf/add_point.c
grass/trunk/vector/v.in.dxf/add_polyline.c
grass/trunk/vector/v.in.dxf/add_text.c
grass/trunk/vector/v.in.dxf/dxf_to_vect.c
Log:
Fixed the test that determines if a polyline is 3-d.
Modified: grass/trunk/vector/v.in.dxf/add_3dface.c
===================================================================
--- grass/trunk/vector/v.in.dxf/add_3dface.c 2008-12-29 20:40:01 UTC (rev 35107)
+++ grass/trunk/vector/v.in.dxf/add_3dface.c 2008-12-30 01:25:20 UTC (rev 35108)
@@ -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;
@@ -92,13 +92,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/trunk/vector/v.in.dxf/add_arc.c
===================================================================
--- grass/trunk/vector/v.in.dxf/add_arc.c 2008-12-29 20:40:01 UTC (rev 35107)
+++ grass/trunk/vector/v.in.dxf/add_arc.c 2008-12-30 01:25:20 UTC (rev 35108)
@@ -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/trunk/vector/v.in.dxf/add_circle.c
===================================================================
--- grass/trunk/vector/v.in.dxf/add_circle.c 2008-12-29 20:40:01 UTC (rev 35107)
+++ grass/trunk/vector/v.in.dxf/add_circle.c 2008-12-30 01:25:20 UTC (rev 35108)
@@ -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/trunk/vector/v.in.dxf/add_line.c
===================================================================
--- grass/trunk/vector/v.in.dxf/add_line.c 2008-12-29 20:40:01 UTC (rev 35107)
+++ grass/trunk/vector/v.in.dxf/add_line.c 2008-12-30 01:25:20 UTC (rev 35108)
@@ -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/trunk/vector/v.in.dxf/add_lwpolyline.c
===================================================================
--- grass/trunk/vector/v.in.dxf/add_lwpolyline.c 2008-12-29 20:40:01 UTC (rev 35107)
+++ grass/trunk/vector/v.in.dxf/add_lwpolyline.c 2008-12-30 01:25:20 UTC (rev 35108)
@@ -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;
@@ -57,11 +57,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/trunk/vector/v.in.dxf/add_point.c
===================================================================
--- grass/trunk/vector/v.in.dxf/add_point.c 2008-12-29 20:40:01 UTC (rev 35107)
+++ grass/trunk/vector/v.in.dxf/add_point.c 2008-12-30 01:25:20 UTC (rev 35108)
@@ -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/trunk/vector/v.in.dxf/add_polyline.c
===================================================================
--- grass/trunk/vector/v.in.dxf/add_polyline.c 2008-12-29 20:40:01 UTC (rev 35107)
+++ grass/trunk/vector/v.in.dxf/add_polyline.c 2008-12-30 01:25:20 UTC (rev 35108)
@@ -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) {
if (!flag_list)
G_warning(_("3-d data in dxf file. Polyline_flag: %d"),
@@ -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/trunk/vector/v.in.dxf/add_text.c
===================================================================
--- grass/trunk/vector/v.in.dxf/add_text.c 2008-12-29 20:40:01 UTC (rev 35107)
+++ grass/trunk/vector/v.in.dxf/add_text.c 2008-12-30 01:25:20 UTC (rev 35108)
@@ -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/trunk/vector/v.in.dxf/dxf_to_vect.c
===================================================================
--- grass/trunk/vector/v.in.dxf/dxf_to_vect.c 2008-12-29 20:40:01 UTC (rev 35107)
+++ grass/trunk/vector/v.in.dxf/dxf_to_vect.c 2008-12-30 01:25:20 UTC (rev 35108)
@@ -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