Revision 10632 trunk/libraries/libDwg/src/com/iver/cit/jdwglib/dwg/objects/DwgCircle.java
DwgCircle.java | ||
---|---|---|
35 | 35 |
package com.iver.cit.jdwglib.dwg.objects; |
36 | 36 |
|
37 | 37 |
import java.awt.geom.Point2D; |
38 |
import java.util.ArrayList; |
|
38 | 39 |
import java.util.List; |
39 | 40 |
import java.util.Map; |
40 | 41 |
|
... | ... | |
57 | 58 |
*/ |
58 | 59 |
public class DwgCircle extends DwgObject |
59 | 60 |
implements IDwgExtrusionable, IDwg3DTestable, IDwg2FMap, IDwgBlockMember{ |
60 |
public DwgCircle(int index) { |
|
61 |
super(index); |
|
62 |
// TODO Auto-generated constructor stub |
|
63 |
} |
|
61 |
|
|
64 | 62 |
private double[] center; |
65 | 63 |
private double radius; |
66 | 64 |
private double thickness; |
67 | 65 |
private double[] extrusion; |
68 | 66 |
|
67 |
|
|
68 |
public DwgCircle(int index) { |
|
69 |
super(index); |
|
70 |
} |
|
69 | 71 |
/** |
70 | 72 |
* @return Returns the center. |
71 | 73 |
*/ |
... | ... | |
168 | 170 |
double[] c = getCenter(); |
169 | 171 |
Point2D center = new Point2D.Double(c[0], c[1]); |
170 | 172 |
double radius = getRadius(); |
171 |
Point2D[] arc = GisModelCurveCalculator
|
|
173 |
List arc = GisModelCurveCalculator
|
|
172 | 174 |
.calculateGisModelCircle(center, radius); |
173 | 175 |
if (is3DFile) { |
174 |
double[][] arc3D = new double[arc.length][3];
|
|
175 |
for (int j = 0; j < arc.length; j++) {
|
|
176 |
arc3D[j][0] = arc[j].getX();
|
|
177 |
arc3D[j][1] = arc[j].getY();
|
|
178 |
arc3D[j][2] = c[2];
|
|
176 |
List arc3D = new ArrayList();
|
|
177 |
for (int j = 0; j < arc.size(); j++) {
|
|
178 |
double[] pt2d = (double[]) arc.get(j);
|
|
179 |
double[] pt3d = new double[]{ pt2d[0], pt2d[1], c[2] };
|
|
180 |
arc3D.add(pt3d);
|
|
179 | 181 |
} |
180 | 182 |
arcc = FMapUtil.points3DToFPolyline3D(arc3D); |
181 | 183 |
} else { |
Also available in: Unified diff