62 lines
1.6 KiB
C++
62 lines
1.6 KiB
C++
#include "stdafx.h"
|
|
#include "DbTrenchFitting.h"
|
|
|
|
#include <DbPolyMesh.h>
|
|
|
|
//#include "dbobject.h"
|
|
#include "DbPipeFitting.h"
|
|
#include "DbPipe.h"
|
|
#include "DbPsConfig.h"
|
|
#include "DbFlangeFitting.h"
|
|
#include "PipeTools.h"
|
|
|
|
ACRX_DXF_DEFINE_MEMBERS(ATSTrenchFitting, ATSPipTeFitting, AcDb::kDHL_CURRENT,
|
|
AcDb::kMReleaseCurrent, 1, ATS_TRENCHFITTING,
|
|
"ATS_TRENCHFITTING图形无法解析, 请下载上华软件|网址: www.shanghuasoft.com");
|
|
IMPLEMENT_TENTBASE(TDbTrenchFitting);
|
|
|
|
const Adesk::UInt8 TDbTrenchFitting::g_nVersion = 1;
|
|
|
|
|
|
void InitDbTrenchFitting(BOOL bTrue)
|
|
{
|
|
if(bTrue) {
|
|
TDbTrenchFitting::rxInit();
|
|
TDbTrenchFitting::InitMatchProtocol(TRUE);
|
|
} else {
|
|
TDbTrenchFitting::InitMatchProtocol(FALSE);
|
|
deleteAcRxClass(TDbTrenchFitting::desc());
|
|
}
|
|
}
|
|
|
|
TDbTrenchFitting::TDbTrenchFitting()
|
|
{
|
|
m_visibility=TPipeSys::kInvisible;
|
|
}
|
|
|
|
Acad::ErrorStatus TDbTrenchFitting::ExplodeOrDraw2d(XExplodeDraw &dc) const
|
|
{
|
|
// cet 2016.10.17 add 图层关闭时,实体不显示,不进行绘制(打印时,也不会绘制)
|
|
AcDbLayerTableRecordPointer player(this->layerId(), AcDb::kForRead);
|
|
if (player.openStatus() == Acad::eOk && player->isOff())
|
|
{
|
|
return Acad::eOk;
|
|
}
|
|
Acad::ErrorStatus es=Acad::eOk;
|
|
|
|
if (m_visibility != TPipeSys::kInvisible)
|
|
return TDbPipeFitting::ExplodeOrDraw2d(dc);
|
|
|
|
return es;
|
|
}
|
|
|
|
Acad::ErrorStatus TDbTrenchFitting::ExplodeOrDraw3d(XExplodeDraw &dc) const
|
|
{
|
|
int num = GetInterfaceNum();
|
|
if(num != 2)
|
|
return Draw3dOther(dc);
|
|
else
|
|
return Draw3dElbow(dc);
|
|
|
|
return Acad::eOk;
|
|
} |