184 |
184 |
}
|
185 |
185 |
|
186 |
186 |
if (hasFaces) {
|
187 |
|
System.out.println("Sabe que es un poligono.");
|
188 |
|
System.out.println("POLYLINE: caras=" +faces.size()+", puntos="+ lineString.pointNr());
|
|
187 |
//System.out.println("Sabe que es un poligono.");
|
|
188 |
//System.out.println("POLYLINE: caras=" +faces.size()+", puntos="+ lineString.pointNr());
|
189 |
189 |
LineString ls1 = new LineString();
|
190 |
190 |
Polygon pl1 = new Polygon();
|
191 |
191 |
LineString ls2 = new LineString();
|
... | ... | |
202 |
202 |
i1 = face[i];
|
203 |
203 |
if (i0 > 0) {
|
204 |
204 |
if ((facesIterador%2)!=0) {
|
205 |
|
System.out.println("endSeq(): hasFaces = " + hasFaces);
|
|
205 |
//System.out.println("endSeq(): hasFaces = " + hasFaces);
|
206 |
206 |
ls1.add((Point2D)lineString.get(i0-1));
|
207 |
207 |
pl1.add((Point2D)polygon.get(i0-1));
|
208 |
208 |
//ls1.add((Point2D)lineString.get(Math.abs(i1)-1));
|
... | ... | |
257 |
257 |
}
|
258 |
258 |
|
259 |
259 |
if (hasFaces) {
|
260 |
|
System.out.println("POLYLINE: caras=" +faces.size()+", puntos="+ lineString.pointNr());
|
|
260 |
//System.out.println("POLYLINE: caras=" +faces.size()+", puntos="+ lineString.pointNr());
|
261 |
261 |
LineString ls1 = new LineString();
|
262 |
262 |
LineString ls2 = new LineString();
|
263 |
263 |
LineString ls = new LineString();
|
... | ... | |
339 |
339 |
Point2D point_out = DxfCalXtru.CalculateXtru(point_in, xtru);
|
340 |
340 |
x = point_out.getX();
|
341 |
341 |
y = point_out.getY();
|
342 |
|
System.out.println("addVertex(): vFlags = " + vFlags);
|
|
342 |
//System.out.println("addVertex(): vFlags = " + vFlags);
|
343 |
343 |
if ((vFlags & 0x80) == 0x80 && (vFlags & 0x40) == 0) {
|
344 |
344 |
int [] face = {0,0,0,0};
|
345 |
345 |
face[0] = grp.getDataAsInt(71);
|
... | ... | |
1612 |
1612 |
}
|
1613 |
1613 |
|
1614 |
1614 |
public void testBlocks() {
|
1615 |
|
System.out.println("getBlkList() = " + getBlkList());
|
|
1615 |
//System.out.println("getBlkList() = " + getBlkList());
|
1616 |
1616 |
Vector blkList = getBlkList();
|
1617 |
1617 |
FeatureCollection block = null;
|
1618 |
1618 |
Feature feature = null;
|
1619 |
1619 |
InsPoint insert = null;
|
1620 |
1620 |
Point2D point1 = new Point2D.Double();
|
1621 |
1621 |
Point2D point2 = new Point2D.Double();
|
1622 |
|
System.out.println("blkList = " + blkList);
|
1623 |
|
System.out.println("blkList.size() = " + blkList.size());
|
|
1622 |
//System.out.println("blkList = " + blkList);
|
|
1623 |
//System.out.println("blkList.size() = " + blkList.size());
|
1624 |
1624 |
for (int i=0; i<blkList.size(); i++) {
|
1625 |
|
System.out.println("compruebaBloques(): Bloque " + i +" de " + blkList.size());
|
|
1625 |
//System.out.println("compruebaBloques(): Bloque " + i +" de " + blkList.size());
|
1626 |
1626 |
block = (FeatureCollection) blkList.get(i);
|
1627 |
1627 |
int aux = block.size();
|
1628 |
1628 |
for (int j=0; j<aux; j++) {
|
... | ... | |
1631 |
1631 |
if (feature.getGeometry() instanceof InsPoint) {
|
1632 |
1632 |
insert = (InsPoint)feature.getGeometry();
|
1633 |
1633 |
String nomBlock = insert.getBlockName();
|
1634 |
|
System.out.println("compruebaBloques(): Bloque = " + i + ", elemento = " + j + ", inserta el bloque = " + nomBlock);
|
|
1634 |
//System.out.println("compruebaBloques(): Bloque = " + i + ", elemento = " + j + ", inserta el bloque = " + nomBlock);
|
1635 |
1635 |
//System.out.println("compruebaBloques(): insert.get(0) = " + insert.get(0));
|
1636 |
1636 |
//System.out.println("compruebaBloques(): feature.getProp(rotAngle) = " + insert.getRotAngle());
|
1637 |
1637 |
//System.out.println("compruebaBloques(): insert.getScaleFactor() = " + insert.getScaleFactor());
|
1638 |
1638 |
//if (feature.getProp("blockFound") == "false") {
|
1639 |
1639 |
if (insert.getBlockFound() == false) {
|
1640 |
|
System.out.println("compruebaBloques(): Ahora se ocupa del DxfInsert " + nomBlock);
|
|
1640 |
//System.out.println("compruebaBloques(): Ahora se ocupa del DxfInsert " + nomBlock);
|
1641 |
1641 |
insert.encuentraBloque(nomBlock);
|
1642 |
1642 |
//gestionaInsert(feature);
|
1643 |
1643 |
//block.add(feature);
|
... | ... | |
1689 |
1689 |
|
1690 |
1690 |
if (feature2.getGeometry() instanceof InsPoint){
|
1691 |
1691 |
|
1692 |
|
System.out.println("gestionaInsert(): Encuentra bloques dentro de bloques");
|
|
1692 |
//System.out.println("gestionaInsert(): Encuentra bloques dentro de bloques");
|
1693 |
1693 |
|
1694 |
1694 |
insert2 = (InsPoint)feature2.getGeometry();
|
1695 |
1695 |
point1 = insert2.get(0);
|
... | ... | |
1792 |
1792 |
feature3.setProp("text", feature2.getProp("text"));
|
1793 |
1793 |
feature3.setProp("textHeight", feature2.getProp("textHeight"));
|
1794 |
1794 |
double auxR = Double.parseDouble(feature2.getProp("textRotation"));
|
1795 |
|
System.out.println("auxR = " + auxR);
|
|
1795 |
//System.out.println("auxR = " + auxR);
|
1796 |
1796 |
auxR = auxR + rAngleGra;
|
1797 |
1797 |
feature3.setProp("textRotation", Double.toString(auxR));
|
1798 |
|
System.out.println("gestionaInsert(): feature3.getProp(textRotation) = " + feature3.getProp("textRotation"));
|
|
1798 |
//System.out.println("gestionaInsert(): feature3.getProp(textRotation) = " + feature3.getProp("textRotation"));
|
1799 |
1799 |
pointt.isText = true;
|
1800 |
1800 |
}
|
1801 |
1801 |
feature3.setGeometry(pointt);
|