chore
把非utf8-bom编码的cpp/h文件改为 utf8 bom 编码, msvc识别utf8编码时,如果不是bom格式的,会使用当前cp_oem来解码.
This commit is contained in:
1 parent
2b0c2055ff
commit
164968b62e
6171 files changed
+191244
-191243
No files matched your search
@@ -1,4 +1,4 @@
|
||||
#include "stdafx.h"
|
||||
#include "stdafx.h"
|
||||
#include "DwgCompareDbMgr.h"
|
||||
#include <dbidmap.h>
|
||||
|
||||
@@ -40,18 +40,18 @@ BOOL CDwgCompareDbInfo::LoadFile( const CString sName, const CString sPath )
|
||||
#else
|
||||
Acad::ErrorStatus es = m_pDb->readDwgFile(sFile1, _SH_DENYNO, false);
|
||||
#endif
|
||||
// modify by cq 2017-01-05 支持CAD2017
|
||||
// modify by cq 2017-01-05 支持CAD2017
|
||||
if (es != Acad::eOk)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
//设置插入基点为原点
|
||||
//设置插入基点为原点
|
||||
es = m_pDb->setInsbase(AcGePoint3d::kOrigin);
|
||||
//es = m_pDb->updateExt(false);
|
||||
|
||||
m_sPath = sPath;
|
||||
m_sName = sName;
|
||||
//获取所有图层名
|
||||
//获取所有图层名
|
||||
InitLayerInfo();
|
||||
|
||||
return TRUE;
|
||||
@@ -63,7 +63,7 @@ BOOL CDwgCompareDbInfo::LoadFile( const CString sName, const CString sPath, XPol
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
//遍历模型空间,删除不在entPoly内的实体
|
||||
//遍历模型空间,删除不在entPoly内的实体
|
||||
AcDbBlockTable * pBlockTab = NULL;
|
||||
Acad::ErrorStatus es = m_pDb->getBlockTable(pBlockTab, AcDb::kForRead);
|
||||
if (es==Acad::eOk && pBlockTab!=NULL)
|
||||
@@ -92,7 +92,7 @@ BOOL CDwgCompareDbInfo::LoadFile( const CString sName, const CString sPath, XPol
|
||||
XPoint ptMin = bExtent.minPoint();
|
||||
ptMax.z = 0;
|
||||
ptMin.z = 0;
|
||||
//只保留和poly有交集的实体
|
||||
//只保留和poly有交集的实体
|
||||
if((ptMax&poly)==PR_INSIDE || (ptMin&poly)==PR_INSIDE)
|
||||
{
|
||||
pEnt->close();
|
||||
@@ -122,14 +122,14 @@ BOOL CDwgCompareDbInfo::LoadDb( CString& csFilePath, AcDbDatabase*& pDb, const A
|
||||
if (es != Acad::eOk)
|
||||
{
|
||||
CString csError;
|
||||
csError.Format(_T("\n文件加载失败:%s"), csFilePath);
|
||||
csError.Format(_T("\n文件加载失败:%s"), csFilePath);
|
||||
acutPrintf(csError);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
m_sPath = csFilePath;
|
||||
m_sName = m_sPath.Right(m_sPath.GetLength() - m_sPath.ReverseFind(_T('\\')) -1);
|
||||
//获取所有图层名
|
||||
//获取所有图层名
|
||||
InitLayerInfo();
|
||||
//m_pDb->updateExt(false);
|
||||
return TRUE;
|
||||
@@ -199,7 +199,7 @@ int CDwgCompareDbInfo::InitEntCount()
|
||||
{
|
||||
return m_iEntCount;
|
||||
}
|
||||
//遍历模型空间,统计实体个数
|
||||
//遍历模型空间,统计实体个数
|
||||
AcDbBlockTable * pBlockTab = NULL;
|
||||
Acad::ErrorStatus es = m_pDb->getBlockTable(pBlockTab, AcDb::kForRead);
|
||||
if (es==Acad::eOk && pBlockTab!=NULL)
|
||||
@@ -215,12 +215,12 @@ int CDwgCompareDbInfo::InitEntCount()
|
||||
pRec->close();
|
||||
}
|
||||
|
||||
std::map<AcDbObjectId, int> mapEntCountInBlock; //块内实体个数
|
||||
std::map<AcDbObjectId, int> mapEntCountInBlock; //块内实体个数
|
||||
|
||||
for(pIterator->start(); !pIterator->done(); pIterator->step())
|
||||
{
|
||||
m_iEntCount++;
|
||||
//块参照统计块内实体数
|
||||
//块参照统计块内实体数
|
||||
AcDbEntity *pEnt = NULL;
|
||||
es = pIterator->getEntity(pEnt, AcDb::kForRead);
|
||||
if (es!=Acad::eOk || pEnt==NULL)
|
||||
@@ -258,12 +258,12 @@ int CDwgCompareDbInfo::GetEntCountInBlock( AcDbObjectId& idBlock, std::map<AcDbO
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
//已经计算过的块
|
||||
//已经计算过的块
|
||||
if (mapBlock[idBlock] > 0)
|
||||
{
|
||||
return mapBlock[idBlock];
|
||||
}
|
||||
//未计算过的,遍历
|
||||
//未计算过的,遍历
|
||||
AcDbBlockTableRecord * pRec = NULL;
|
||||
Acad::ErrorStatus es = acdbOpenObject(pRec, idBlock, AcDb::kForRead);
|
||||
if (es!=Acad::eOk || pRec==NULL)
|
||||
@@ -327,13 +327,13 @@ void CDwgCompareDbMgr::Init()
|
||||
void CDwgCompareDbMgr::GetCmpLayer( std::vector<CString>& vtLayer ) const
|
||||
{
|
||||
vtLayer.clear();
|
||||
//无特殊条件都比对
|
||||
//无特殊条件都比对
|
||||
if (m_bCmpClosedLayer && m_bCmpFrozenLayer && m_bCmpLockedlayer)
|
||||
{
|
||||
vtLayer = m_vtLayerCmp;
|
||||
return;
|
||||
}
|
||||
//有不比对的条件,vtLayer中删除相应的图层
|
||||
//有不比对的条件,vtLayer中删除相应的图层
|
||||
AcDbLayerTable * pLayerTab = NULL;
|
||||
Acad::ErrorStatus es = m_pDb->getLayerTable(pLayerTab, AcDb::kForRead);
|
||||
if (es!=Acad::eOk || pLayerTab==NULL)
|
||||
|
||||
Reference in new issue
Block a user