Revision 10632 trunk/libraries/libDwg/src/com/iver/cit/jdwglib/dwg/objects/DwgArc.java
DwgArc.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 |
|
... | ... | |
167 | 168 |
* @see com.iver.cit.jdwglib.dwg.IDwg2FMap#toFMapGeometry() |
168 | 169 |
*/ |
169 | 170 |
public FShape toFMapGeometry(boolean is3DFile) { |
170 |
double[] c = getCenter(); |
|
171 |
Point2D center = new Point2D.Double(c[0], c[1]); |
|
171 |
double[] center = getCenter(); |
|
172 | 172 |
double radius = getRadius(); |
173 | 173 |
double initAngle = Math.toDegrees(getInitAngle()); |
174 | 174 |
double endAngle = Math.toDegrees(getEndAngle()); |
175 |
Point2D[] arc = GisModelCurveCalculator.calculateGisModelArc(
|
|
175 |
List arc = GisModelCurveCalculator.calculateGisModelArc(
|
|
176 | 176 |
center, radius, initAngle, endAngle); |
177 | 177 |
FPolyline2D arcc; |
178 | 178 |
if (is3DFile) { |
179 |
double[][] arc3D = new double[arc.length][3];
|
|
180 |
for (int j = 0; j < arc.length; j++) {
|
|
181 |
arc3D[j][0] = arc[j].getX();
|
|
182 |
arc3D[j][1] = arc[j].getY();
|
|
183 |
arc3D[j][2] = c[2];
|
|
179 |
List arc3D = new ArrayList();
|
|
180 |
for (int j = 0; j < arc.size(); j++) {
|
|
181 |
double[] point = (double[]) arc.get(j);
|
|
182 |
double[] newP = new double[]{point[0], point[1], center[2]};
|
|
183 |
arc3D.add(newP);
|
|
184 | 184 |
} |
185 | 185 |
arcc = FMapUtil.points3DToFPolyline3D(arc3D); |
186 | 186 |
|
Also available in: Unified diff