Revision 5908 trunk/extensions/extCAD/src/com/iver/cit/gvsig/gui/cad/tools/ExploitCADTool.java
ExploitCADTool.java | ||
---|---|---|
194 | 194 |
GeneralPathX newGp1 = new GeneralPathX(); |
195 | 195 |
DefaultFeature df = (DefaultFeature) dre.getLinkedRow() |
196 | 196 |
.cloneRow(); |
197 |
|
|
197 |
// Point2D firstPoint=null; |
|
198 |
// Point2D lastPoint=null; |
|
198 | 199 |
PathIterator theIterator = df.getGeometry().getPathIterator(null); |
199 | 200 |
double[] theData = new double[6]; |
200 | 201 |
int theType; |
... | ... | |
206 | 207 |
case PathIterator.SEG_MOVETO: |
207 | 208 |
numParts++; |
208 | 209 |
newGp1 = new GeneralPathX(); |
210 |
// firstPoint=new Point2D.Double(theData[0], theData[1]); |
|
209 | 211 |
newGp1.moveTo(theData[0], theData[1]); |
212 |
// lastPoint=new Point2D.Double(theData[0], theData[1]); |
|
210 | 213 |
break; |
211 | 214 |
|
212 | 215 |
case PathIterator.SEG_LINETO: |
... | ... | |
221 | 224 |
IRowEdited.STATUS_ADDED, indexLine)); |
222 | 225 |
newGp1 = new GeneralPathX(); |
223 | 226 |
newGp1.moveTo(theData[0], theData[1]); |
227 |
// lastPoint=new Point2D.Double(theData[0], theData[1]); |
|
224 | 228 |
break; |
225 | 229 |
|
226 | 230 |
case PathIterator.SEG_QUADTO: |
... | ... | |
237 | 241 |
IRowEdited.STATUS_ADDED, indexQuad)); |
238 | 242 |
newGp1 = new GeneralPathX(); |
239 | 243 |
newGp1.moveTo(theData[0], theData[1]); |
244 |
// lastPoint=new Point2D.Double(theData[0], theData[1]); |
|
240 | 245 |
break; |
241 | 246 |
case PathIterator.SEG_CUBICTO: |
242 | 247 |
newGp1.curveTo(theData[0], theData[1], theData[2], |
... | ... | |
251 | 256 |
IRowEdited.STATUS_ADDED, indexCurve)); |
252 | 257 |
newGp1 = new GeneralPathX(); |
253 | 258 |
newGp1.moveTo(theData[0], theData[1]); |
259 |
// lastPoint=new Point2D.Double(theData[0], theData[1]); |
|
254 | 260 |
break; |
255 | 261 |
case PathIterator.SEG_CLOSE: |
256 |
System.out.println(""); |
|
262 |
// if (firstPoint!=null) { |
|
263 |
// newGp1=new GeneralPathX(); |
|
264 |
// newGp1.moveTo(firstPoint.getX(),firstPoint.getY()); |
|
265 |
// newGp1.lineTo(lastPoint.getX(),lastPoint.getY()); |
|
266 |
// IGeometry geomClose = ShapeFactory |
|
267 |
// .createPolyline2D(newGp1); |
|
268 |
// DefaultFeature dfClose = (DefaultFeature) df.cloneRow(); |
|
269 |
// dfClose.setGeometry(geomClose); |
|
270 |
// int indexClose = addGeometry(geomClose, dfClose |
|
271 |
// .getAttributes()); |
|
272 |
// selectedRowAux.add(new DefaultRowEdited(dfClose, |
|
273 |
// IRowEdited.STATUS_ADDED, indexClose)); |
|
274 |
// newGp1 = new GeneralPathX(); |
|
275 |
// newGp1.moveTo(theData[0], theData[1]); |
|
276 |
// } |
|
257 | 277 |
// if (isFirstPart) |
258 | 278 |
// newGp1.closePath(); |
259 | 279 |
// else |
Also available in: Unified diff