Revision 2211 org.gvsig.vectorediting/trunk/org.gvsig.vectorediting/org.gvsig.vectorediting.lib/org.gvsig.vectorediting.lib.prov/org.gvsig.vectorediting.lib.prov.extendline/src/main/java/org/gvsig/vectorediting/lib/prov/extendline/operation/ArcExtendLineOperation.java
ArcExtendLineOperation.java | ||
---|---|---|
82 | 82 |
|
83 | 83 |
Point center = arcToBeExtend.getCenterPoint(); |
84 | 84 |
double radius = center.distance(arcToBeExtend.getInitPoint()); |
85 |
// double startAngle |
|
86 |
// = ExtendLineOperationUtils.getAngle(center, startIntersectionPoint); |
|
87 |
// double endAngle |
|
88 |
// = ExtendLineOperationUtils.getAngle(center, endIntersectionPoint); |
|
89 | 85 |
double startAngle |
90 | 86 |
= GeometryUtils.calculateAngle(center, startIntersectionPoint); |
91 | 87 |
double endAngle |
... | ... | |
109 | 105 |
|
110 | 106 |
Point startVertex = arcToBeExtend.getInitPoint(); |
111 | 107 |
Point endVertex = arcToBeExtend.getEndPoint(); |
112 |
|
|
108 |
Point midVertex = arcToBeExtend.getMiddlePoint(); |
|
109 |
|
|
113 | 110 |
Point startIntersectionPoint = null; |
114 | 111 |
Point endIntersectionPoint = null; |
115 | 112 |
|
... | ... | |
132 | 129 |
if (endIntersectionPoint == null) { |
133 | 130 |
endIntersectionPoint = arcToBeExtend.getEndPoint(); |
134 | 131 |
} |
135 |
|
|
136 |
Point center = arcToBeExtend.getCenterPoint(); |
|
137 |
double radius = center.distance(arcToBeExtend.getInitPoint()); |
|
138 |
// double startAngle |
|
139 |
// = ExtendLineOperationUtils.getAngle(center, startIntersectionPoint); |
|
140 |
// double endAngle |
|
141 |
// = ExtendLineOperationUtils.getAngle(center, endIntersectionPoint); |
|
142 |
double startAngle |
|
143 |
= GeometryUtils.calculateAngle(center, startIntersectionPoint); |
|
144 |
double endAngle |
|
145 |
= GeometryUtils.calculateAngle(center, endIntersectionPoint); |
|
146 |
|
|
147 |
|
|
148 |
extendedArc.setPointsStartEnd(center, radius, startAngle, endAngle); |
|
132 |
|
|
133 |
extendedArc.setPoints(startIntersectionPoint, midVertex, endIntersectionPoint); |
|
149 | 134 |
return extendedArc; |
150 | 135 |
} |
136 |
|
|
151 | 137 |
} |
Also available in: Unified diff