如何读取图上圆的信息?
MXCAD手机版|冯美娟|2018-07-20 09:32
-
回答:
代码实现如下:
MrxDbgSelSet ss = new MrxDbgSelSet(); ss.allSelect(); for(int i = 0; i <ss.size();i++) { long lId = ss.at(i); McDbEntity ent = new McDbEntity (lId); // 得到对象的层名. Log.e("LayerName",ent.layerName()); String sName = MxFunction.getTypeName(lId); if(sName.equals("McDbCircle")) { McDbCircle cir = new McDbCircle(ss.at(i)); McGePoint3d cen = cir.getCenter(); double fR = cir.getRadius(); String sT; sT = String.format("cen:%f,%f,r:%f",cen.x,cen.y,fR); Log.e("Circledata",sT); }