Revision 12363

View differences:

branches/v10/libraries/libCq CMS for java.old/src/org/cresques/io/DxfGroupVector.java
52 52

  
53 53
        return false;
54 54
    }
55
    
55

  
56 56
    /**
57 57
     * Devuelve la informaci?n contenida en un DxfGroup.
58 58
     * @param code, la parte concreta del DxfGroup a la que queremos acceder
......
71 71

  
72 72
        return null;
73 73
    }
74
    
74

  
75 75
    /**
76 76
     * Obtiene la informaci?n contenida en un DxfGroup en forma de String
77 77
     * @param code
......
80 80
    public String getDataAsString(int code) {
81 81
        return (String) getData(code);
82 82
    }
83
    
83

  
84 84
    /**
85 85
     * Obtiene la informaci?n contenida en un DxfGroup en forma de double
86 86
     * @param code
......
91 91

  
92 92
        if (f == null) {
93 93
            System.err.println(this);
94
            return 0;
94 95
        }
95 96

  
96 97
        return f.doubleValue();
97 98
    }
98
    
99

  
99 100
    /**
100 101
     * Obtiene la informaci?n contenida en un DxfGroup en forma de integer
101 102
     * @param code
......
110 111

  
111 112
        return i.intValue();
112 113
    }
113
    
114

  
114 115
    /**
115 116
     * Permite obtener el contenido de un DxfGroup en forma de String
116 117
     */
branches/v10/libraries/libCq CMS for java.old/src/org/cresques/px/dxf/DxfFeatureMaker.java
81 81
    private boolean constantPolylineElevation;
82 82
    private double lastVertexElevation;
83 83
    private boolean dxf3DFile;
84
    
84

  
85 85
    /**
86 86
     * Constructor de DxfFeatureMaker.
87 87
     * @param proj, proyecci?n cartogr?fica en la que se encontrar?n las entidades
......
156 156
        feaFondos.setProp("dxfEntity", "Polyline");
157 157

  
158 158
        if (grp.hasCode(8)) {
159
            //feature.setProp("layer", grp.getDataAsString(8));         
159
            //feature.setProp("layer", grp.getDataAsString(8));
160 160
            feaBordes.setProp("layer", grp.getDataAsString(8));
161 161
            feaFondos.setProp("layer", grp.getDataAsString(8));
162 162
        }
......
574 574
        hasFaces = false;
575 575
        facesIterador = 1;
576 576
    }
577
    
577

  
578 578
    /**
579 579
     * Establece un valor constante para la elevaci?n de una polil?nea.
580 580
     * @param feaBordes, la polil?nea.
......
590 590
            feaBordes.setProp("elevation", string);
591 591
        }
592 592
    }
593
    
593

  
594 594
    /**
595 595
     * Establece un valor constante para la elevaci?n de un pol?gono.
596 596
     * @param feaBordes, borde del pol?gono.
......
756 756

  
757 757
            x = grp.getDataAsDouble(10);
758 758
            y = grp.getDataAsDouble(20);
759
            z = grp.getDataAsDouble(30);
759
            if (grp.hasCode(30)){
760
            	z = grp.getDataAsDouble(30);
761
            }
760 762

  
761 763
            Point3D point_in = new Point3D(x, y, z);
762 764
            Point3D xtru = new Point3D(xtruX, xtruY, xtruZ);
......
1099 1101
        }
1100 1102

  
1101 1103
        if (isDoubleFeatured) {
1102
            //geometria.add(proj.createPoint(firstX, firstY));          
1104
            //geometria.add(proj.createPoint(firstX, firstY));
1103 1105
            Point3D ptAux3D = new Point3D(proj.createPoint(firstX, firstY).getX(),
1104 1106
                                          proj.createPoint(firstX, firstY).getY(),
1105 1107
                                          elev);
......
1728 1730
        if (grp.hasCode(30)) {
1729 1731
            z = grp.getDataAsDouble(30);
1730 1732
        }
1731
        
1732 1733

  
1734

  
1733 1735
        /*if (grp.hasCode(30)) {
1734 1736
            z = grp.getDataAsDouble(30);
1735 1737
            Double doub = new Double(z);
......
2918 2920
        	System.err.println("BLOQUE NO ENCONTRADO !!!" + insert.getBlockName() + " " + insert.toString());
2919 2921
        	return;
2920 2922
        }
2921
        	
2923

  
2922 2924
        bPointX = Double.parseDouble(insert.getBlock().getProp("basePointX"));
2923 2925
        bPointY = Double.parseDouble(insert.getBlock().getProp("basePointY"));
2924 2926
        bPointZ = Double.parseDouble(insert.getBlock().getProp("basePointZ"));
......
3521 3523
        if (grp.hasCode(30)) {
3522 3524
            cz = grp.getDataAsDouble(30);
3523 3525
        }
3524
     
3525
        // end_point_major_axis  (RELATIVE to the center)      
3526

  
3527
        // end_point_major_axis  (RELATIVE to the center)
3526 3528
        x_end_point_major_axis = grp.getDataAsDouble(11);
3527 3529
        y_end_point_major_axis = grp.getDataAsDouble(21);
3528 3530
        if (grp.hasCode(31)) {
......
3537 3539
        // Point2D end_major = proj.createPoint(x_end_point_major_axis, y_end_point_major_axis);
3538 3540
        // double r_major_axis_2D = c.distance(end_major)/2.0;
3539 3541
        double r_major_axis_2D = Math.sqrt(x_end_point_major_axis*
3540
        		x_end_point_major_axis + 
3542
        		x_end_point_major_axis +
3541 3543
        		y_end_point_major_axis * y_end_point_major_axis);
3542 3544
        double r_minor_axis_2D = r_major_axis_2D * ratio_minor_to_major_axis;
3543 3545
        double rotation_angle = Math.atan2(y_end_point_major_axis , x_end_point_major_axis);
......
3569 3571
            dxf3DFile = true;
3570 3572
        }
3571 3573

  
3572
        
3574

  
3573 3575
        Point3D center = new Point3D(c.getX(), c.getY(), cz);
3574 3576
        Point3D[] pts = new Point3D[360];
3575 3577
        int angulo = 0;

Also available in: Unified diff