版本:SIS6.2
this.map = host.Map;
int itmCnt = 0;
double sx = 0d, sy = 0d, sz = 0d;
double tx = 0d, ty = 0d, tz = 0d;
map.CreateListFromSelection("SELECT_LIST");
itmCnt = map.GetListSize("SELECT_LIST");
//アイテムループ
for (int i = 0; i < itmCnt; i++)
{
map.OpenList("SELECT_LIST", i);
int itemID = map.GetInt(Constants.SIS_OT_CURITEM, 0, "_id&");
// 頂点数を取得
int vCnt = map.GetGeomNumPt(0);
//自分の頂点を掴まないようフィルタを作成
map.CreatePropertyFilter("ITEM_ID_FILTER", "_id& <> " + itemID.ToString());
//map.CreatePropertyFilter("CHECK_FILTER", "CheckItem& = 1");
//map.CombineFilter("OUTPUT_FILTER", "ITEM_ID_FILTER", "CHECK_FILTER", Constants.SIS_BOOLEAN_AND);
//頂点ループ
for (int j = 0; j < vCnt; j++)
{
string pos = map.GetGeomPt(0, j);
map.SplitPos(ref sx, ref sy, ref sz, pos);
string posT1 = map.Snap2D(sx, sy, 0.2d, 0, "V", "ITEM_ID_FILTER", "");
//string posT1 = map.Snap2D(sx, sy, 0.5d, 0, "V", "OUTPUT_FILTER", "");
map.OpenList("SELECT_LIST", i);
if (posT1 != "")
{
//頂点の移動
map.SplitPos(ref tx, ref ty, ref tz, posT1);
map.SetGeomPt(0, j, tx, ty, tz);
}
}
map.CloseItem();
Console.WriteLine(i.ToString() + "/" + itmCnt.ToString());
}
MessageBox.Show("完了");
posted on 2015-01-29 09:18
Ying-er 阅读(223)
评论(0) 编辑 收藏 所属分类:
SIS 、
.Net