ARX TIN网入口函数
来源:百度文库 编辑:神马文学网 时间:2024/04/30 23:16:45
static void arxDelaunaytin(void)
{
// Add your code for command arxDelaunay.tin here
CADOConn *con=new CADOConn();
CString server=L"钱家营矿";
con->OnInitADOConn(server);
ACHAR aMine[20];
int rt;
book: rt=acedGetString(0,L"煤层",aMine);
if (rt==RTNONE)
{
goto book;
}
CString strMine=aMine;
CString strSql=L"SELECT ZBX,ZBY,DBBG FROM MCZH where DBBG<0 and MCDM='"+strMine+L"' and zbx is not null and zby is not null and dbbg is not null and ID not in(select a.ID from MCZH as a,MCZH as b where a.ID<>b.ID and a.ZBX=b.ZBX and a.ZBY=b.ZBY)";
_bstr_t bStrql=strSql;
//con->ExecuteSQL(bStrql,server);
_RecordsetPtr recordset=con->GetRecordSet(bStrql,server);
CDelaunayTIN *pDelaunay=new CDelaunayTIN();
pDelaunay->CreateTIN(recordset);
pDelaunay->DeleteRepeatTri();
pDelaunay->FillEdgeInfo();
pDelaunay->OptimizeDelaunayTIN();
// for (int i=1;pDelaunay->EdgeArray[i].flag==true;i++)
// {
// if ((int)pDelaunay->EdgeArray[i].triNo.size()>=3)
// {
// CString str;
// str.Format(L"%d",(int)pDelaunay->EdgeArray[i].triNo.size());
// AfxMessageBox(str);
// }
// }
// pDelaunay->FillEdgeInfo();
// for (int i=1;i<=pDelaunay->HowMany;i++)
// {
// AcGePoint3dArray ptArray;
// ptArray=CCreateEnts::TriangleTo3Point(pDelaunay,i);
// CCreateEnts::CreateLine(ptArray[0],ptArray[1]);
// CCreateEnts::CreateLine(ptArray[0],ptArray[2]);
// CCreateEnts::CreateLine(ptArray[2],ptArray[1]);
// }
for (int i=1;pDelaunay->EdgeArray[i].flag==true;i++)
{
AcGePoint3dArray ptArray;
ptArray=CCreateEnts::LineTo2Point(pDelaunay,i);
CCreateEnts::CreateLine(ptArray[0],ptArray[1]);
}
acedCommand(RTSTR,L"zoom",RTSTR,L"E",RTNONE);
}
{
// Add your code for command arxDelaunay.tin here
CADOConn *con=new CADOConn();
CString server=L"钱家营矿";
con->OnInitADOConn(server);
ACHAR aMine[20];
int rt;
book: rt=acedGetString(0,L"煤层",aMine);
if (rt==RTNONE)
{
goto book;
}
CString strMine=aMine;
CString strSql=L"SELECT ZBX,ZBY,DBBG FROM MCZH where DBBG<0 and MCDM='"+strMine+L"' and zbx is not null and zby is not null and dbbg is not null and ID not in(select a.ID from MCZH as a,MCZH as b where a.ID<>b.ID and a.ZBX=b.ZBX and a.ZBY=b.ZBY)";
_bstr_t bStrql=strSql;
//con->ExecuteSQL(bStrql,server);
_RecordsetPtr recordset=con->GetRecordSet(bStrql,server);
CDelaunayTIN *pDelaunay=new CDelaunayTIN();
pDelaunay->CreateTIN(recordset);
pDelaunay->DeleteRepeatTri();
pDelaunay->FillEdgeInfo();
pDelaunay->OptimizeDelaunayTIN();
// for (int i=1;pDelaunay->EdgeArray[i].flag==true;i++)
// {
// if ((int)pDelaunay->EdgeArray[i].triNo.size()>=3)
// {
// CString str;
// str.Format(L"%d",(int)pDelaunay->EdgeArray[i].triNo.size());
// AfxMessageBox(str);
// }
// }
// pDelaunay->FillEdgeInfo();
// for (int i=1;i<=pDelaunay->HowMany;i++)
// {
// AcGePoint3dArray ptArray;
// ptArray=CCreateEnts::TriangleTo3Point(pDelaunay,i);
// CCreateEnts::CreateLine(ptArray[0],ptArray[1]);
// CCreateEnts::CreateLine(ptArray[0],ptArray[2]);
// CCreateEnts::CreateLine(ptArray[2],ptArray[1]);
// }
for (int i=1;pDelaunay->EdgeArray[i].flag==true;i++)
{
AcGePoint3dArray ptArray;
ptArray=CCreateEnts::LineTo2Point(pDelaunay,i);
CCreateEnts::CreateLine(ptArray[0],ptArray[1]);
}
acedCommand(RTSTR,L"zoom",RTSTR,L"E",RTNONE);
}
ARX TIN网入口函数
arx & c++ 常用函数代码
arx & c++ 常用函数代
TIN数据结构
arx删除实体
TIN三角网格画法
请问mtk平台sms,mms,wap,call等模块发送的入口函数 - 52RD研发论坛
凡客和CPS模式 - 派网-电子商务入口
出口,入口!
搜索引擎入口
ARX面试 - gyssoft的专栏 - CSDNBlog
“入口”的革命
“入口”的革命
Google的秘密入口
google 的另一个入口
google的秘密入口
google的秘密入口
几个国外图书馆入口
可爱的下水道入口
免费推广网站入口
2007数据库入口
google的秘密入口
人类文明的入口
期刊免费入口