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 "AecDbXXXDoghouse.h"
|
||||
#include "AecDbX3dPart.h"
|
||||
#include "MFCDbDwgFiler.h"
|
||||
@@ -43,8 +43,8 @@ AecDbXXXDoghouse::AecDbXXXDoghouse(void)
|
||||
m_pSolidDraw = NULL;
|
||||
m_nActivePart = -1;
|
||||
|
||||
m_vtMove.set(0,0,0); //整体移动
|
||||
m_xformR.setToIdentity(); //整体旋转变换,非XYZ轴旋转
|
||||
m_vtMove.set(0,0,0); //整体移动
|
||||
m_xformR.setToIdentity(); //整体旋转变换,非XYZ轴旋转
|
||||
m_pGripAppData = new AecGripData[2048];//
|
||||
}
|
||||
|
||||
@@ -346,7 +346,7 @@ void AecDbXXXDoghouse::AddMove(const AcGeVector3d& vtMove,LPCTSTR pszID)
|
||||
assertWriteEnabled();
|
||||
|
||||
AecDbX3dPart* pGroup = NULL;
|
||||
if (pszID == NULL)//整体移动
|
||||
if (pszID == NULL)//整体移动
|
||||
{
|
||||
for(int i = 0;i < m_arX3DPartPtrs.length();i++)
|
||||
{
|
||||
@@ -377,7 +377,7 @@ void AecDbXXXDoghouse::AddMove(const AcGeVector3d& vtMove,LPCTSTR pszID)
|
||||
void AecDbXXXDoghouse::AddMove(const AcGeMatrix3d& xMirror,LPCTSTR pszID)
|
||||
{
|
||||
AecDbX3dPart* pGroup = NULL;
|
||||
if (pszID == NULL)//整体移动
|
||||
if (pszID == NULL)//整体移动
|
||||
{
|
||||
for(int i = 0;i < m_arX3DPartPtrs.length();i++)
|
||||
{
|
||||
@@ -522,7 +522,7 @@ int AecDbXXXDoghouse::GetSectionDraw(const AcGePoint3d& ptFr,const AcGePoint3d&
|
||||
|
||||
AcGeVector3d vtLook = vtViewDir;
|
||||
|
||||
//提取8个点
|
||||
//提取8个点
|
||||
AcGePoint3d ptGeT[8];
|
||||
AcGePoint3dArray arBoxPts;
|
||||
|
||||
@@ -565,14 +565,14 @@ int AecDbXXXDoghouse::GetSectionDraw(const AcGePoint3d& ptFr,const AcGePoint3d&
|
||||
AcGePoint3d ptOnMin;
|
||||
ptOnMin = planNear.closestPointTo(ptGe[0]);
|
||||
|
||||
//调整到Near面
|
||||
//调整到Near面
|
||||
AcGeVector3d vtM = ptOnMin - ptGe[0];
|
||||
for (int k = 0;k < 5;k++)
|
||||
{
|
||||
ptGe[k] += vtM;
|
||||
}
|
||||
|
||||
//Near-->Far 拉伸路径
|
||||
//Near-->Far 拉伸路径
|
||||
AcDbLine lnPath;
|
||||
lnPath.setStartPoint(ptGe[0]);
|
||||
ptE = ptGe[0] + vtN2F;
|
||||
@@ -594,7 +594,7 @@ int AecDbXXXDoghouse::GetSectionDraw(const AcGePoint3d& ptFr,const AcGePoint3d&
|
||||
|
||||
struct resbuf rb;
|
||||
acedGetVar(_T("useri3"),&rb);
|
||||
if (rb.resval.rint == 1358)//特定情况下
|
||||
if (rb.resval.rint == 1358)//特定情况下
|
||||
{
|
||||
//TEST
|
||||
pSolidCln->setColorIndex(kRed);
|
||||
@@ -641,7 +641,7 @@ int AecDbXXXDoghouse::GetSectionDraw(const AcGePoint3d& ptFr,const AcGePoint3d&
|
||||
plan2.set( ptFr,vtTo);
|
||||
|
||||
AcDb3dSolid* pNegHalfSolid = NULL;
|
||||
es = pSolidClone->getSlice(plan2,false,pNegHalfSolid);//获取法向的结果
|
||||
es = pSolidClone->getSlice(plan2,false,pNegHalfSolid);//获取法向的结果
|
||||
if (es == Acad::eOk)
|
||||
{
|
||||
AcGeMatrix3d xMove;
|
||||
@@ -746,8 +746,8 @@ AcDb3dSolid* AecDbXXXDoghouse::CreateDraw3dSolid() const
|
||||
AcDbVoidPtrArray arSolidPtrForVerDraw;
|
||||
|
||||
CString sName;
|
||||
AcArray<const AecDbX3dPart*> arKCGroups;//开窗
|
||||
AcArray<const AecDbX3dPart*> arSliceGrps;//剖切
|
||||
AcArray<const AecDbX3dPart*> arKCGroups;//开窗
|
||||
AcArray<const AecDbX3dPart*> arSliceGrps;//剖切
|
||||
|
||||
Acad::ErrorStatus es;
|
||||
AecDbX3dPart* pPart = NULL;
|
||||
@@ -758,13 +758,13 @@ AcDb3dSolid* AecDbXXXDoghouse::CreateDraw3dSolid() const
|
||||
continue;
|
||||
|
||||
pPart->GetName(sName);
|
||||
if (sName.CompareNoCase(_T("开窗")) == 0)
|
||||
if (sName.CompareNoCase(_T("开窗")) == 0)
|
||||
{
|
||||
arKCGroups.append(pPart);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (sName.CompareNoCase(_T("剖切")) == 0)
|
||||
if (sName.CompareNoCase(_T("剖切")) == 0)
|
||||
{
|
||||
arSliceGrps.append(pPart);
|
||||
continue;
|
||||
@@ -803,7 +803,7 @@ AcDb3dSolid* AecDbXXXDoghouse::CreateDraw3dSolid() const
|
||||
}
|
||||
}
|
||||
|
||||
//然后减
|
||||
//然后减
|
||||
AcDbVoidPtrArray arSolidPtrs;
|
||||
if (pSolidAll != NULL)
|
||||
{
|
||||
@@ -869,7 +869,7 @@ AcDb3dSolid* AecDbXXXDoghouse::CreateDraw3dSolid() const
|
||||
|
||||
if (pSolidAll != NULL)
|
||||
{
|
||||
//开窗
|
||||
//开窗
|
||||
for (int i = 0;i < arKCGroups.length();i++)
|
||||
{
|
||||
pPart = (AecDbX3dPart*)arKCGroups.at(i);
|
||||
@@ -891,7 +891,7 @@ AcDb3dSolid* AecDbXXXDoghouse::CreateDraw3dSolid() const
|
||||
}
|
||||
}
|
||||
|
||||
//剖切
|
||||
//剖切
|
||||
int nPartRetain = 0;
|
||||
for (int i = 0;i < arSliceGrps.length();i++)
|
||||
{
|
||||
@@ -925,13 +925,13 @@ AcDb3dSolid* AecDbXXXDoghouse::CreateDraw3dSolid() const
|
||||
pSolidAll->transformBy(xformM);
|
||||
pSolidAll->transformBy(m_xformR);
|
||||
|
||||
//俯视图
|
||||
//俯视图
|
||||
for (int j = 0;j < arSolidPtrForVerDraw.length();j++)
|
||||
{
|
||||
pSolid = (AcDb3dSolid*)arSolidPtrForVerDraw.at(j);
|
||||
if (pSolid != NULL)
|
||||
{
|
||||
//新的纵断如下必须注释掉
|
||||
//新的纵断如下必须注释掉
|
||||
MakeVerSection2d(pSolid,1);
|
||||
pSolid->transformBy(xformM);
|
||||
pSolid->transformBy(m_xformR);
|
||||
@@ -993,12 +993,12 @@ Adesk::Boolean AecDbXXXDoghouse::GetDraw3d(AcDbVoidPtrArray& arEntPtrs,bool bWri
|
||||
continue;
|
||||
|
||||
pPart->GetName(sName);
|
||||
if (sName.CompareNoCase(_T("开窗")) == 0)
|
||||
if (sName.CompareNoCase(_T("开窗")) == 0)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
if (sName.CompareNoCase(_T("剖切")) == 0)
|
||||
if (sName.CompareNoCase(_T("剖切")) == 0)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
@@ -1012,8 +1012,8 @@ Adesk::Boolean AecDbXXXDoghouse::GetDraw3d(AcDbVoidPtrArray& arEntPtrs,bool bWri
|
||||
|
||||
if (pSolid != NULL)
|
||||
{
|
||||
//房子
|
||||
if (sName.Find(_T("房子")) != -1)//房子
|
||||
//房子
|
||||
if (sName.Find(_T("房子")) != -1)//房子
|
||||
{
|
||||
if (pSolidAll == NULL)
|
||||
{
|
||||
@@ -1054,7 +1054,7 @@ Adesk::Boolean AecDbXXXDoghouse::GetDraw3d(AcDbVoidPtrArray& arEntPtrs,bool bWri
|
||||
|
||||
if (pSolidAll != NULL)
|
||||
{
|
||||
//然后减
|
||||
//然后减
|
||||
AcDbVoidPtrArray arSolidPtrs;
|
||||
for (int i = 0;i < m_arX3DPartPtrs.length();i++)
|
||||
{
|
||||
@@ -1116,7 +1116,7 @@ Adesk::Boolean AecDbXXXDoghouse::GetDraw3d(AcDbVoidPtrArray& arEntPtrs,bool bWri
|
||||
|
||||
Acad::ErrorStatus AecDbXXXDoghouse::Draw2d(AcGiDraw &dc) const
|
||||
{
|
||||
if ( !GetEWormId().isValid() )//如果是造族
|
||||
if ( !GetEWormId().isValid() )//如果是造族
|
||||
{
|
||||
Draw3d(dc);
|
||||
}
|
||||
@@ -1184,13 +1184,13 @@ Acad::ErrorStatus AecDbXXXDoghouse::Draw3d(AcGiDraw &dc) const
|
||||
if (m_pSolidDraw == NULL)
|
||||
return Acad::eOk;
|
||||
|
||||
//管线系统屏蔽掉
|
||||
//管线系统屏蔽掉
|
||||
if (dc.IsDragging())
|
||||
{
|
||||
//return Acad::eOk;
|
||||
}
|
||||
|
||||
//图层
|
||||
//图层
|
||||
AcDbObjectId idLay = dc.GetLayerId();
|
||||
dc.SetLayer(layerId());
|
||||
//dc.SetSelectionMarker(1);
|
||||
@@ -1278,7 +1278,7 @@ void AecDbXXXDoghouse::Transformby(const AcGeVector3d &vtDir)
|
||||
void AecDbXXXDoghouse::Transformby(const AcGeVector3d& vt,const AcGeVector3d &vtDir)
|
||||
{
|
||||
assertWriteEnabled();
|
||||
//vt.z为标高
|
||||
//vt.z为标高
|
||||
AcGeVector3d vtMove(m_vtMove.x + vt.x,m_vtMove.y+vt.y,m_vtMove.z + vt.z);
|
||||
AcGePoint3d pt(vtMove.x,vtMove.y,vtMove.z);
|
||||
|
||||
@@ -1337,7 +1337,7 @@ Acad::ErrorStatus AecDbXXXDoghouse::subGetOsnapPoints( AcDb::OsnapMode osnap
|
||||
|
||||
if (arPts1.isEmpty())
|
||||
{
|
||||
//通过边界分析
|
||||
//通过边界分析
|
||||
AcDbIntArray osnapModes;
|
||||
AcDbIntArray geomIds;
|
||||
m_pSolidDraw->getGripPoints(arPts1,osnapModes,geomIds);
|
||||
@@ -1380,7 +1380,7 @@ Acad::ErrorStatus AecDbXXXDoghouse::subGetGripPoints( AcDbGripDataPtrArray& grip
|
||||
{
|
||||
assertReadEnabled();
|
||||
|
||||
if (GetEWormId().isValid())//如果是插在主管廊上
|
||||
if (GetEWormId().isValid())//如果是插在主管廊上
|
||||
{
|
||||
return Acad::eOk;
|
||||
}
|
||||
@@ -1398,12 +1398,12 @@ Acad::ErrorStatus AecDbXXXDoghouse::subGetGripPoints( AcDbGripDataPtrArray& grip
|
||||
continue;
|
||||
|
||||
pGroup->GetName(sName);
|
||||
if (sName.CompareNoCase(_T("开窗")) == 0)
|
||||
if (sName.CompareNoCase(_T("开窗")) == 0)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
if (sName.CompareNoCase(_T("剖切")) == 0)
|
||||
if (sName.CompareNoCase(_T("剖切")) == 0)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
@@ -1411,7 +1411,7 @@ Acad::ErrorStatus AecDbXXXDoghouse::subGetGripPoints( AcDbGripDataPtrArray& grip
|
||||
ptOrg = pGroup->GetOrgPoint();
|
||||
pGroup->Transformby(ptOrg);
|
||||
|
||||
//定位用
|
||||
//定位用
|
||||
memset(&m_pGripAppData[2 * i],NULL,sizeof(AecGripData));
|
||||
m_pGripAppData[2 * i].nIndex = 0;
|
||||
m_pGripAppData[2 * i].ePos = eFlag;
|
||||
@@ -1425,12 +1425,12 @@ Acad::ErrorStatus AecDbXXXDoghouse::subGetGripPoints( AcDbGripDataPtrArray& grip
|
||||
pGripData->setWorldDraw(AecGripCback::WorldDrawfunc);
|
||||
pGripData->setToolTipFunc(AecGripCback::GripToolTipFunc);
|
||||
|
||||
sTip.Format(_T("点击定位造族组件<%s>记录"),sName);
|
||||
sTip.Format(_T("点击定位造族组件<%s>记录"),sName);
|
||||
_tcscpy(m_pGripAppData[2 * i].szTip,sTip);
|
||||
_tcscpy(m_pGripAppData[2 * i].szID,pGroup->GetGUID());
|
||||
grips.append(pGripData);
|
||||
|
||||
//修改用
|
||||
//修改用
|
||||
ptOrg.x += dCmd;
|
||||
memset(&m_pGripAppData[2 * i + 1],NULL,sizeof(AecGripData));
|
||||
m_pGripAppData[2 * i + 1].nIndex = 0;
|
||||
@@ -1445,7 +1445,7 @@ Acad::ErrorStatus AecDbXXXDoghouse::subGetGripPoints( AcDbGripDataPtrArray& grip
|
||||
pGripData->setWorldDraw(AecGripCback::WorldDrawfunc);
|
||||
pGripData->setToolTipFunc(AecGripCback::GripToolTipFunc);
|
||||
|
||||
sTip.Format(_T("点击修改造族组件<%s>记录"),sName);
|
||||
sTip.Format(_T("点击修改造族组件<%s>记录"),sName);
|
||||
_tcscpy(m_pGripAppData[2 * i + 1].szTip,sTip);
|
||||
_tcscpy(m_pGripAppData[2 * i + 1].szID,pGroup->GetGUID());
|
||||
grips.append(pGripData);
|
||||
@@ -1487,7 +1487,7 @@ Acad::ErrorStatus AecDbXXXDoghouse::subMoveGripPointsAt(const AcDbVoidPtrArray&
|
||||
|
||||
if ( _tcscmp(pAppData->szID,pGroup->GetGUID()) == 0 )
|
||||
{
|
||||
if (pAppData->ePos == eFlag)//定位
|
||||
if (pAppData->ePos == eFlag)//定位
|
||||
{
|
||||
acedPostCommand(_T("\x03"));
|
||||
|
||||
@@ -1619,7 +1619,7 @@ Acad::ErrorStatus AecDbXXXDoghouse::mergedwgInFields (AcDbDwgFiler* pFiler)
|
||||
return (Acad::eMakeMeProxy) ;
|
||||
|
||||
pFiler->readInt32(&m_nActivePart);
|
||||
m_nActivePart = -1;//不需要序列化
|
||||
m_nActivePart = -1;//不需要序列化
|
||||
|
||||
pFiler->readVector3d(&m_vtMove);
|
||||
for (int i = 0;i < 4;i++)
|
||||
@@ -1688,7 +1688,7 @@ Acad::ErrorStatus AecDbXXXDoghouse::dwgInFields (AcDbDwgFiler* pFiler)
|
||||
return (Acad::eMakeMeProxy) ;
|
||||
|
||||
pFiler->readInt32(&m_nActivePart);
|
||||
m_nActivePart = -1;//不需要序列化
|
||||
m_nActivePart = -1;//不需要序列化
|
||||
|
||||
pFiler->readVector3d(&m_vtMove);
|
||||
for (int i = 0;i < 4;i++)
|
||||
@@ -1788,7 +1788,7 @@ void AecDbXXXDoghouse::MakeVerSection2d(AcDb3dSolid* pSolid,int nSectionDrawStyl
|
||||
{
|
||||
assertReadEnabled();
|
||||
|
||||
//通风口符号
|
||||
//通风口符号
|
||||
AcGePoint3d ptPos(0,0,0);
|
||||
AcGeVector2d vtDir = AcGeVector2d::kXAxis;
|
||||
AcGePoint2d ptSize;
|
||||
@@ -1797,7 +1797,7 @@ void AecDbXXXDoghouse::MakeVerSection2d(AcDb3dSolid* pSolid,int nSectionDrawStyl
|
||||
AcGeVector3d prinAxes[3];
|
||||
AcDbExtents extents;
|
||||
|
||||
if ( nSectionDrawStyle == 1)//纵断 1
|
||||
if ( nSectionDrawStyle == 1)//纵断 1
|
||||
{
|
||||
AcGeVector3d vtDir3d(vtDir.x,vtDir.y,0.0);
|
||||
AcGeVector3d vtDir3dv = vtDir3d;
|
||||
@@ -1818,7 +1818,7 @@ void AecDbXXXDoghouse::MakeVerSection2d(AcDb3dSolid* pSolid,int nSectionDrawStyl
|
||||
|
||||
if (pRegion != NULL)
|
||||
{
|
||||
//投影到中心面
|
||||
//投影到中心面
|
||||
AcGePlane planV;
|
||||
planV.set(ptPos,vtDir3dv);
|
||||
|
||||
@@ -1828,15 +1828,15 @@ void AecDbXXXDoghouse::MakeVerSection2d(AcDb3dSolid* pSolid,int nSectionDrawStyl
|
||||
xformM.setToTranslation(vtMove);
|
||||
pRegion->transformBy(xformM);
|
||||
|
||||
//移动到最外边
|
||||
//移动到最外边
|
||||
pRegion->transformBy(xformV);
|
||||
|
||||
//翻转
|
||||
//翻转
|
||||
AcGeMatrix3d xformR;
|
||||
xformR.setToRotation(-PI / 2.0,vtDir3d,ptPos);
|
||||
pRegion->transformBy(xformR);
|
||||
|
||||
//倾斜放置的房子
|
||||
//倾斜放置的房子
|
||||
AcGeVector3d vtDirX = AcGeVector3d::kXAxis;
|
||||
vtDirX.transformBy(m_xformR);
|
||||
AcGeVector3d vtDirXY = vtDirX.orthoProject(AcGeVector3d::kZAxis);
|
||||
@@ -1936,7 +1936,7 @@ void AecDbXXXDoghouse::MakeHorSection2d(AcDb3dSolid* pSolid) const
|
||||
DELETE_PTR(pRegion);
|
||||
}
|
||||
|
||||
//一下旧代码
|
||||
//一下旧代码
|
||||
return;
|
||||
AcDbVoidPtrArray arRegPtrs;
|
||||
pSolid->explode(arRegPtrs);
|
||||
@@ -1955,7 +1955,7 @@ void AecDbXXXDoghouse::MakeHorSection2d(AcDb3dSolid* pSolid) const
|
||||
pReg->getNormal(vtNorm);
|
||||
if (vtNorm.isParallelTo(AcGeVector3d::kZAxis))
|
||||
{
|
||||
//投影到XY 面
|
||||
//投影到XY 面
|
||||
AcGePlane plan;
|
||||
pReg->getPlane(plan);
|
||||
|
||||
|
||||
Reference in new issue
Block a user