Revision 12363 branches/v10/libraries/libCq CMS for java.old/src/org/cresques/px/dxf/DxfFeatureMaker.java
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