1.创建盲孔
ClassName* ClassName::AddHoleM(double Diam, double HH, TcrSelection tSel)
{
if (HH <= 0.0)
{
msg_outErr(QStringLiteral("请输入有效孔深度"));
return NULL;
}
if (Diam <= 0.0)
{
msg_outErr(QStringLiteral("请输入有效的孔直径"));
return NULL;
}
TcrModelitem tSrf;
tSrf.Init(tSel);
if (!tSrf.Equal(m_tLocSrf))
{
msg_outErr(QStringLiteral("请在放置面选择开孔位置"));
return NULL;
}
ProPoint3d tPnt;
tSel.GetPickPnt(tPnt,false);
TcrMatrix tRefCsysMtx;
tRefCsysMtx.initObject(m_tCsys);
tRefCsysMtx.getLocationPnt(tPnt, tPnt);
ThkGenTestHole* pHole = new ThkGenTestHole;
if (!pHole->CreateHoleM(m_tLocSrf,m_tRefSrf,m_tCsys,tPnt,Diam,HH))
{
delete pHole;
pHole = NULL;
msg_outErr(QStr