Revision 84 trunk/libraries/libCq CMS for java.old/src/org/cresques/px/dxf/DxfEntityMaker.java
DxfEntityMaker.java | ||
---|---|---|
568 | 568 |
if (grp.hasCode(210)) |
569 | 569 |
xtruX = grp.getDataAsDouble(210); |
570 | 570 |
if (grp.hasCode(220)) |
571 |
xtruY = grp.getDataAsInt(220);
|
|
571 |
xtruY = grp.getDataAsDouble(220);
|
|
572 | 572 |
if (grp.hasCode(230)) |
573 |
xtruZ = grp.getDataAsInt(230);
|
|
573 |
xtruZ = grp.getDataAsDouble(230);
|
|
574 | 574 |
Point3D point_in1 = new Point3D(pts[0].getX(), pts[0].getY(), z1); |
575 | 575 |
Point3D point_in2 = new Point3D(pts[1].getX(), pts[1].getY(), z2); |
576 | 576 |
Point3D point_in3 = new Point3D(pts[2].getX(), pts[2].getY(), z3); |
... | ... | |
591 | 591 |
//entity.dxfColor = 0; |
592 | 592 |
} |
593 | 593 |
if (addingToBlock == false) { |
594 |
System.out.println("createLine(): A?adimos una linea a la lista de entidades"); |
|
594 |
//System.out.println("createLine(): A?adimos una linea a la lista de entidades");
|
|
595 | 595 |
entities.add(entity); |
596 | 596 |
} else { |
597 |
System.out.println("createLine(): A?adimos una linea al bloque " + iterator); |
|
597 |
//System.out.println("createLine(): A?adimos una linea al bloque " + iterator);
|
|
598 | 598 |
blk.add(entity); |
599 | 599 |
} |
600 | 600 |
} |
... | ... | |
604 | 604 |
|
605 | 605 |
Point2D basePoint = new Point2D.Double(); |
606 | 606 |
String blockName = ""; |
607 |
System.out.println("createBlock(): Creamos nuevo bloque, el bloque " + iterator); |
|
607 |
//System.out.println("createBlock(): Creamos nuevo bloque, el bloque " + iterator);
|
|
608 | 608 |
|
609 | 609 |
addingToBlock = true; |
610 |
System.out.println("createBlock(): A?adimos el bloque " + iterator + " a la lista de bloques"); |
|
610 |
//System.out.println("createBlock(): A?adimos el bloque " + iterator + " a la lista de bloques");
|
|
611 | 611 |
blkList.add(iterator, blk); |
612 | 612 |
|
613 |
System.out.println("createBlock(): Rellenamos la informacion del bloque " + iterator); |
|
613 |
//System.out.println("createBlock(): Rellenamos la informacion del bloque " + iterator);
|
|
614 | 614 |
if (grp.hasCode(1)) { |
615 | 615 |
blockName = grp.getDataAsString(1); |
616 | 616 |
blk.setBlkName(blockName); |
... | ... | |
661 | 661 |
dxfLine = (DxfLine)dxfEntity; |
662 | 662 |
point1 = dxfLine.getPts()[0]; |
663 | 663 |
point2 = dxfLine.getPts()[1]; |
664 |
System.out.println("compruebaBloques(): Bloque = " + i + ", elemento = " + j + ", vertice1 = " + point1 + ", vertice2 = " + point2); |
|
664 |
//System.out.println("compruebaBloques(): Bloque = " + i + ", elemento = " + j + ", vertice1 = " + point1 + ", vertice2 = " + point2);
|
|
665 | 665 |
} else if (dxfEntity instanceof DxfInsert){ |
666 | 666 |
dxfInsert = (DxfInsert)dxfEntity; |
667 | 667 |
String nomBlock = dxfInsert.getBlockName(); |
668 |
System.out.println("compruebaBloques(): Bloque = " + i + ", elemento = " + j + ", inserta el bloque = " + nomBlock); |
|
669 |
System.out.println("compruebaBloques(): dxfInsert.pt = " + dxfInsert.getPt()); |
|
670 |
System.out.println("compruebaBloques(): dxfInsert.rotAngle = " + dxfInsert.getRotAngle()); |
|
671 |
System.out.println("compruebaBloques(): dxfInsert.scaleFactor = " + dxfInsert.getScaleFactor()); |
|
668 |
//System.out.println("compruebaBloques(): Bloque = " + i + ", elemento = " + j + ", inserta el bloque = " + nomBlock);
|
|
669 |
//System.out.println("compruebaBloques(): dxfInsert.pt = " + dxfInsert.getPt());
|
|
670 |
//System.out.println("compruebaBloques(): dxfInsert.rotAngle = " + dxfInsert.getRotAngle());
|
|
671 |
//System.out.println("compruebaBloques(): dxfInsert.scaleFactor = " + dxfInsert.getScaleFactor());
|
|
672 | 672 |
|
673 | 673 |
if (dxfInsert.getBlockFound() == false) { |
674 |
System.out.println("compruebaBloques(): Ahora se ocupa del DxfInsert " + nomBlock); |
|
674 |
//System.out.println("compruebaBloques(): Ahora se ocupa del DxfInsert " + nomBlock);
|
|
675 | 675 |
boolean aux_bool = dxfInsert.encuentraBloque(nomBlock); |
676 | 676 |
gestionaInsert(dxfInsert, dxfInsert.getDxfLayer()); |
677 | 677 |
dxfBlock.add(dxfInsert); |
... | ... | |
711 | 711 |
DxfText dxfText = null; |
712 | 712 |
DxfSolid dxfSolid = null; |
713 | 713 |
for (int i=0; i<entity.block.blkElements.size(); i++) { |
714 |
System.out.println("gestionaInserts: entity.block.blkElements.size() = " + entity.block.blkElements.size()); |
|
714 |
//System.out.println("gestionaInserts: entity.block.blkElements.size() = " + entity.block.blkElements.size());
|
|
715 | 715 |
dxfEntity = (DxfEntity)entity.block.blkElements.get(i); |
716 | 716 |
|
717 | 717 |
Point2D point1 = new Point2D.Double(); |
... | ... | |
721 | 721 |
if (dxfEntity instanceof DxfLine) { |
722 | 722 |
dxfLine = (DxfLine)dxfEntity; |
723 | 723 |
point1 = dxfLine.getPts()[0]; |
724 |
System.out.println("entity.pt.getX() = " + entity.pt.getX()); |
|
725 |
System.out.println("point1.getX() = " + point1.getX()); |
|
726 |
System.out.println("entity.rotAngle = " + entity.rotAngle); |
|
724 |
//System.out.println("entity.pt.getX() = " + entity.pt.getX());
|
|
725 |
//System.out.println("point1.getX() = " + point1.getX());
|
|
726 |
//System.out.println("entity.rotAngle = " + entity.rotAngle);
|
|
727 | 727 |
//point11.setLocation(entity.pt.getX() - entity.block.bPoint.getX() + ((point1.getX()*Math.cos((entity.rotAngle*Math.PI)/180) + point1.getY()*(-1)*Math.sin((entity.rotAngle*Math.PI)/180)) * entity.scaleFactor.getX()), entity.pt.getY() - entity.block.bPoint.getY() + ((point1.getX()*Math.sin((entity.rotAngle*Math.PI)/180) + point1.getY()*Math.cos((entity.rotAngle*Math.PI)/180)) * entity.scaleFactor.getY())); |
728 | 728 |
point11.setLocation(entity.pt.getX() - (entity.block.bPoint.getX() * entity.getScaleFactor().getX()) + ((point1.getX()*Math.cos((entity.rotAngle*Math.PI)/180) + point1.getY()*(-1)*Math.sin((entity.rotAngle*Math.PI)/180)) * entity.scaleFactor.getX()), entity.pt.getY() - (entity.block.bPoint.getY() * entity.getScaleFactor().getY()) + ((point1.getX()*Math.sin((entity.rotAngle*Math.PI)/180) + point1.getY()*Math.cos((entity.rotAngle*Math.PI)/180)) * entity.scaleFactor.getY())); |
729 | 729 |
//point11.setLocation(entity.pt.getX() + ((point1.getX()*Math.cos((entity.rotAngle*Math.PI)/180) + point1.getY()*(-1)*Math.sin((entity.rotAngle*Math.PI)/180)) * entity.scaleFactor.getX()), entity.pt.getY() + ((point1.getX()*Math.sin((entity.rotAngle*Math.PI)/180) + point1.getY()*Math.cos((entity.rotAngle*Math.PI)/180)) * entity.scaleFactor.getY())); |
Also available in: Unified diff