Revision 5389 trunk/libraries/libFMap/src/com/iver/cit/gvsig/fmap/edition/writers/dxf/DxfWriter.java

View differences:

DxfWriter.java
90 90
	/**
91 91
	 * Useful to create a layer from scratch Call setFile before using this
92 92
	 * function
93
	 * 
93
	 *
94 94
	 * @param lyrDef
95 95
	 * @throws EditionException
96 96
	 */
......
117 117

  
118 118
public void process(IRowEdited row) throws EditionException {
119 119
		if (row.getStatus() == IRowEdited.STATUS_DELETED) return;
120
		
121
		try 
120

  
121
		try
122 122
		{
123 123
			IFeature feat = (IFeature) row.getLinkedRow();
124 124
	    	IGeometry geom = feat.getGeometry();
......
127 127
	    	// los datos de LAYER, COLOR, ELEVATION, THICKNESS, TEXT
128 128
	    	// HEIGHTTEXT, ROTATIONTEXT y el resto que puedan hacer
129 129
	    	// falta.
130
	    	
131
	    	
130

  
131

  
132 132
	    	// ////////////////
133 133
	        if (geom.getGeometryType()==FShape.POINT) {
134 134
	            createPoint2D(handle, k, geom);
......
145 145
	            k = createPolyline3D(handle, k, geom);
146 146
	        } else if (geom.getGeometryType()==FShape.POLYGON) {
147 147
	            // createPolygon2D(handle, k, geom);
148
	            createLwPolyline2D(handle, k, geom, true);	            
148
	            createLwPolyline2D(handle, k, geom, true);
149 149
	            k++;
150 150
	        } else if (geom.getGeometryType()==(FShape.POLYGON | FShape.Z)) {
151 151
	            dxf3DFile = true;
......
280 280
								plv.add(vxf);
281 281
								plv.add(vyf);
282 282
							}
283
						}	            
283
						}
284 284
					}
285 285
				} */
286 286
	        } else {
......
293 293
			throw new EditionException(e);
294 294
		}
295 295

  
296
		
296

  
297 297
	}	private void createArc2D(FArc2D fArc) throws Exception {
298 298
		Point2D[] pts = new Point2D[3];
299 299
		pts[0] = fArc.getInit();
......
483 483

  
484 484
	/**
485 485
	 * Use this method BEFORE preProcess.
486
	 * 
486
	 *
487 487
	 * @param fieldMapping
488 488
	 *            The fieldMapping to set.
489 489
	 */
......
837 837
			throws Exception {
838 838
		DxfGroupVector polv = null;
839 839
		DxfGroup polylineLayer = new DxfGroup(8, "default");
840
		
840

  
841 841
		DxfGroup handleGroup = new DxfGroup();
842 842
		handleGroup.setCode(5);
843 843
		handleGroup.setData(new Integer(handle + k).toString());
844
		
844

  
845 845
		Vector vpoints = new Vector();
846
		
846

  
847 847
		DxfGroup polylineFlag = new DxfGroup();
848 848
		polylineFlag.setCode(70);
849 849
		if (isPolygon)
850 850
			polylineFlag.setData(new Integer(1)); // cerrada
851 851
		else
852 852
			polylineFlag.setData(new Integer(0)); // abierta
853
		
853

  
854 854
		PathIterator theIterator = geom.getPathIterator(null); // polyLine.getPathIterator(null,
855 855
																// flatness);
856
		
856

  
857 857
		double[] theData = new double[6];
858 858
		while (!theIterator.isDone()) {
859 859
			int theType = theIterator.currentSegment(theData);
......
870 870
						yvertex.setData(new Double(((FPoint2D) vpoints.get(j)).getY()));
871 871
						polv.add(xvertex);
872 872
						polv.add(yvertex);
873
					}					
874
					entityMaker.createLwPolyline(polv);						
873
					}
874
					entityMaker.createLwPolyline(polv);
875 875
				}
876 876
				polv = new DxfGroupVector();
877 877
				polv.add(polylineLayer);
......
885 885
				break;
886 886
			case PathIterator.SEG_QUADTO:
887 887
				break;
888
			case PathIterator.SEG_CUBICTO:				
888
			case PathIterator.SEG_CUBICTO:
889 889
				break;
890 890
			case PathIterator.SEG_CLOSE:
891 891
				polylineFlag.setData(new Integer(1)); // cerrada
892 892
				break;
893
				
893

  
894 894
			}
895 895
			theIterator.next();
896 896
		}
897
		
897

  
898 898
		for (int j = 0; j < vpoints.size(); j++) {
899 899
			DxfGroup xvertex = new DxfGroup();
900 900
			xvertex.setCode(10);
......
1014 1014
	 * Util solo para el entity maker. Yo creo que esto no es necesario pero por
1015 1015
	 * ahora lo necesito para que funcione. TODO: Hablar con Luis para que lo
1016 1016
	 * aclare.
1017
	 * 
1017
	 *
1018 1018
	 * @param proj
1019 1019
	 *            The proj to set.
1020 1020
	 */
......
1022 1022
		this.proj = proj;
1023 1023
	}
1024 1024

  
1025
	public void setFlatness(double flatness) {
1026
		// TODO Auto-generated method stub
1027

  
1028
	}
1029

  
1025 1030
}

Also available in: Unified diff