Revision 10632 trunk/libraries/libDwg/src/com/iver/cit/jdwglib/dwg/readers/objreaders/v15/DwgLwPolylineReader15.java

View differences:

DwgLwPolylineReader15.java
5 5
package com.iver.cit.jdwglib.dwg.readers.objreaders.v15;
6 6

  
7 7
import java.awt.geom.Point2D;
8
import java.util.ArrayList;
8 9
import java.util.List;
9 10

  
10 11
import com.iver.cit.jdwglib.dwg.CorruptedDwgEntityException;
......
120 121
		    	//Plantear en la lista de PythonCAD
121 122
		    	if(numberOfPoints > 10000)
122 123
		    		throw new CorruptedDwgEntityException("LwPolyline corrupta");
123
		    	Point2D[] vertices = new Point2D[numberOfPoints];
124
		    	List vertices = new ArrayList();
124 125
		  	    val = DwgUtil.getRawDouble(data, bitPos);
125 126
		  	    bitPos = ((Integer) val.get(0)).intValue();
126 127
		  		double x0 = ((Double) val.get(1)).doubleValue();
......
128 129
		  		val = DwgUtil.getRawDouble(data, bitPos);
129 130
		  		bitPos = ((Integer) val.get(0)).intValue();
130 131
		  		double y0 = ((Double) val.get(1)).doubleValue();
131
		  		vertices[0] = new Point2D.Double(x0, y0);
132
		  	   
133 132
		  		
133
		  		vertices.add(new double[]{x0, y0});
134
		  		
135
		  		
134 136
		  		/*
135 137
		  		 * TODO azabala 
136 138
		  		 * Algunos metodos de DwgUtil lanzan excepciones inexperadas
......
158 160
		  			val = DwgUtil.getDefaultDouble(data, bitPos, y0);
159 161
		  			bitPos = ((Integer) val.get(0)).intValue();
160 162
		  			double y = ((Double) val.get(1)).doubleValue();
161
		  			vertices[i] = new Point2D.Double(x, y);
162 163
		  			
164
		  			vertices.add(new double[]{x, y});
165
		  			
163 166
		  			x0 = x;//se proporcionan como valores por defecto las coordenadas del pto anterior
164 167
		  			y0 = y;
165 168
		  		}

Also available in: Unified diff