Revision 197
trunk/libraries/libCq CMS for java.old/src/org/cresques/px/dxf/DxfFeatureMaker.java | ||
---|---|---|
212 | 212 |
Feature feaFondos = lastFeaFondos; |
213 | 213 |
LineString lineString = (LineString)feaBordes.getGeometry(); |
214 | 214 |
Polygon polygon = (Polygon)feaFondos.getGeometry(); |
215 |
if (grp.hasCode(8)) |
|
215 |
if (grp.hasCode(8)) {
|
|
216 | 216 |
feaBordes.setProp("layer", grp.getDataAsString(8)); |
217 | 217 |
feaFondos.setProp("layer", grp.getDataAsString(8)); |
218 |
} |
|
218 | 219 |
x = grp.getDataAsDouble(10); |
219 | 220 |
y = grp.getDataAsDouble(20); |
220 | 221 |
if (grp.hasCode(30)) { |
... | ... | |
242 | 243 |
bulge_aux = grp.getDataAsDouble(42); |
243 | 244 |
} else { bulge_aux = 0.0; } |
244 | 245 |
//int cnt = lineString.pointNr(); |
246 |
System.out.println("addVertex(): lineString.pointNr() = " + lineString.pointNr()); |
|
245 | 247 |
lineString.remove(lineString.pointNr()-1); |
246 | 248 |
lineString.remove(lineString.pointNr()-1); |
249 |
System.out.println("addVertex(): polygon.pointNr() = " + polygon.pointNr()); |
|
247 | 250 |
polygon.remove(polygon.pointNr()-1); |
248 |
//041019: Esta linea provoca un IndexOutOfBoundsException. |
|
249 |
// Estudiar la situaci?n. |
|
250 |
//polygon.remove(polygon.pointNr()-1); |
|
251 |
polygon.remove(polygon.pointNr()-1); |
|
251 | 252 |
Vector arc = createArc(ptAnterior, pt, bulge); |
252 | 253 |
if (bulge>0) { |
253 | 254 |
for (int i=0; i<arc.size(); i++) { |
254 | 255 |
Point2D ptAux = new Point2D.Double(); |
255 | 256 |
ptAux = proj.createPoint(((Point2D)arc.get(i)).getX(), ((Point2D)arc.get(i)).getY()); |
256 | 257 |
lineString.add(ptAux); |
258 |
polygon.add(ptAux); |
|
257 | 259 |
if (lineString.pointNr() == 1) firstPt = ptAux; |
258 | 260 |
} |
259 | 261 |
} else { |
Also available in: Unified diff