Revision 10820 trunk/libraries/libDwg/src/com/iver/cit/jdwglib/dwg/objects/DwgSolid.java
DwgSolid.java | ||
---|---|---|
40 | 40 |
import java.util.Map; |
41 | 41 |
|
42 | 42 |
import com.iver.cit.gvsig.fmap.core.FPolyline2D; |
43 |
import com.iver.cit.gvsig.fmap.core.FShape; |
|
43 |
import com.iver.cit.gvsig.fmap.core.IGeometry; |
|
44 |
import com.iver.cit.gvsig.fmap.core.ShapeFactory; |
|
44 | 45 |
import com.iver.cit.jdwglib.dwg.DwgFile; |
45 | 46 |
import com.iver.cit.jdwglib.dwg.DwgObject; |
46 | 47 |
import com.iver.cit.jdwglib.dwg.IDwg2FMap; |
... | ... | |
56 | 57 |
* @author jmorell, azabala |
57 | 58 |
*/ |
58 | 59 |
public class DwgSolid extends DwgObject |
59 |
implements IDwgExtrusionable, IDwg3DTestable, IDwg2FMap, IDwgBlockMember{ |
|
60 |
implements IDwgExtrusionable, |
|
61 |
IDwg3DTestable, IDwg2FMap, IDwgBlockMember{ |
|
62 |
|
|
63 |
|
|
60 | 64 |
public DwgSolid(int index) { |
61 | 65 |
super(index); |
62 |
// TODO Auto-generated constructor stub |
|
63 | 66 |
} |
64 | 67 |
private double thickness; |
65 | 68 |
private double elevation; |
... | ... | |
221 | 224 |
public double getZ() { |
222 | 225 |
return getElevation(); |
223 | 226 |
} |
224 |
public FShape toFMapGeometry(boolean is3DFile) {
|
|
227 |
public IGeometry toFMapGeometry(boolean is3DFile) {
|
|
225 | 228 |
FPolyline2D solid = null; |
226 | 229 |
double[] p1 = getCorner1(); |
227 | 230 |
double[] p2 = getCorner2(); |
... | ... | |
240 | 243 |
pts.add(p33d); |
241 | 244 |
pts.add(p43d); |
242 | 245 |
|
243 |
solid = FMapUtil.points3DToFPolyline3D(pts);
|
|
246 |
solid = FMapUtil.ptsTo3DPolygon(pts);
|
|
244 | 247 |
|
248 |
|
|
245 | 249 |
} else { |
246 | 250 |
pts.add(p1); |
247 | 251 |
pts.add(p2); |
248 | 252 |
pts.add(p3); |
249 | 253 |
pts.add(p4); |
250 |
solid = FMapUtil.points2DToFPolyline2D(pts);
|
|
254 |
solid = FMapUtil.ptsTo2DPolygon(pts);
|
|
251 | 255 |
} |
252 |
return solid;
|
|
256 |
return ShapeFactory.createGeometry(solid);
|
|
253 | 257 |
|
254 | 258 |
} |
255 | 259 |
public String toFMapString(boolean is3DFile) { |
Also available in: Unified diff