168 lines
7.1 KiB
C++
168 lines
7.1 KiB
C++
#pragma once
|
|
|
|
#include "AecISOMatrix.h"
|
|
|
|
typedef struct FitSumRec
|
|
{
|
|
TCHAR szDimtext[256];//名称
|
|
TCHAR szSpec[256]; //规格
|
|
TCHAR szMat[256]; //材料
|
|
TCHAR szLevel[33]; //等级
|
|
TCHAR szRem[256]; //描述备注...
|
|
TCHAR szKey[256]; //统计键 KEY ...待定
|
|
int nCount; //数量
|
|
}FITSUMREC;
|
|
|
|
typedef struct PipeHangerRec
|
|
{
|
|
TCHAR szIndex[33];
|
|
TCHAR szName[MAX_PATH];
|
|
TCHAR szSubTxt[MAX_PATH];
|
|
TCHAR szRem[MAX_PATH];
|
|
TCHAR szKey[MAX_PATH];
|
|
int nCount;
|
|
}PIPEHANGERREC;
|
|
|
|
typedef struct IntsctWith
|
|
{
|
|
AcDbPolyline *pPl1;
|
|
AcDbPolyline *pPl2;
|
|
AcGePoint3d ptInt;
|
|
}INTSCTWITH;
|
|
|
|
typedef struct PolyBreaks
|
|
{
|
|
AcDbPolyline *pPoly;
|
|
AcDbVoidPtrArray arNewPolys;
|
|
AcGePoint3dArray arBreaks;
|
|
}POLYBREAKS;
|
|
|
|
class AecDbEwFitting;
|
|
class AecISODrawMake
|
|
{
|
|
public:
|
|
AecISODrawMake();
|
|
AecISODrawMake(int nType,double dAngle,BOOL b45NoIso = FALSE);
|
|
AecISODrawMake(double dAngle);
|
|
~AecISODrawMake();
|
|
|
|
void SetDimscale(double dScale){m_dScale = dScale;}
|
|
double GetDimscale() const { return m_dScale; }
|
|
void SetDimOffset(double dDimoffset){m_dDimoffset = dDimoffset;}
|
|
void SetDimLayerId(AcDbObjectId idlay){m_idDimlay = idlay;}
|
|
void SetTextStyleId(AcDbObjectId idSty){ m_idDimSty = idSty;}
|
|
void SetIsoWasDone(BOOL bWasDone) { m_bWasDone = bWasDone; }
|
|
|
|
void SetTextH(double dTxtH) { m_dTxtH = dTxtH; }
|
|
|
|
void MakeISOPipeline(AcDbObjectIdArray& arPipeIds,double dPlotPipeW,int nPipeDim,int nPipeDim2,int bDNDim,BOOL bDimTxtIso, BOOL bVlvISOV);
|
|
|
|
void MakeISOFitting(AcDbObjectIdArray& arFitingIds,double dPlotPipeW,double dPlotDotD,int nPipeDim,int nFitDim,BOOL bElbowLine,BOOL bWelDot,BOOL bVlvISOV);
|
|
|
|
void MakeISOVal(AcDbObjectIdArray& arValIds,int nVal2D,double dPlotDotD,BOOL bDNDim,BOOL bDimTxtIso, BOOL bVlvISOV);
|
|
|
|
void MakeISOHanger(AcDbObjectIdArray &arHangIds, double dPlotDotD, int nPipeDim,int nFitDim);
|
|
|
|
void MakeISOEquipment(AcDbObjectIdArray& arEquIds,double dPlotDotD);
|
|
|
|
void MakeISOAxis(AcDbObjectIdArray &arAxis);
|
|
|
|
public:
|
|
|
|
void GetISOEntities(AcDbVoidPtrArray& arISOEntPtrs,AcDbExtents& ext);
|
|
void GetMaterialSheet(AcDbVoidPtrArray &arISOEntPtrs, AcDbExtents &ext);
|
|
|
|
int IsEntityInGroup(int nIndex);
|
|
|
|
AcDbPolyline* MakePoly(AcGePoint3d ptSta,AcGePoint3d ptEnd,const AcDbObjectId& idLay,double dPlotPipeW,int nCr = 256,AecDbObjXDataMap* pXDataMap = NULL);
|
|
AcDbLine* MakeLine(AcGePoint3d& ptSta, AcGePoint3d& ptEnd, const AcDbObjectId &idLay);
|
|
void MakeRef(AcDbBlockReference *pRef);
|
|
|
|
void MakeDim(AcGePoint3d ptSta,AcGePoint3d ptEnd,double dLen);
|
|
void MakeDim(AcGePoint3d ptSta, AcGePoint3d ptEnd, AcGePoint3d ptTxt, CString& sDimTxt, bool bDimTxtIso);
|
|
|
|
void MakeDim2(AecDbObjXDataMap* pXDataMap,AcGePoint3d ptSta,AcGePoint3d ptEnd,TCHAR* pszLay,double dPipeWD);
|
|
void MakeHDim2(AecDbObjXDataMap* pXDataMap,AcGePoint3d ptSta,AcGePoint3d ptEnd,TCHAR* pszLay,double dPipeWD);
|
|
void MakeHDim3(AecDbObjXDataMap *pXDataMap, AcGePoint3d ptSta, AcGePoint3d ptEnd, TCHAR *pszLay, double dPipeWD);
|
|
void MakeEDim2(AecDbObjXDataMap *pXDataMap, AcGePoint3d ptSta, AcGePoint3d ptEnd, TCHAR *pszLay, double dPipeWD);
|
|
void MakeEDim3(AecDbObjXDataMap *pXDataMap, AcGePoint3d ptSta, AcGePoint3d ptEnd, TCHAR *pszLay, double dPipeWD);
|
|
|
|
void MakeDim4(AcGePoint3d ptPos, AcGeVector3d vtDir, double dRefEl, const AcDbObjectId &idLay);
|
|
|
|
//DN100标注方法
|
|
void MakeDim3(AecDbObjXDataMap* pXDataMap,AcGePoint3d ptSta,AcGePoint3d ptEnd,TCHAR* pszLay,double dPipeWD,BOOL bTextISO);
|
|
|
|
void MakeElbowISO( AcGePoint3d& ptSta,AcGeVector3d& vtSta,AcGePoint3d& ptMid,
|
|
AcGePoint3d& ptEnd,AcGeVector3d& vtEnd,double dPlotPipeW,
|
|
double dPlotDotD,int nPipeDim,const AcDbObjectId& idLay,BOOL bElbowLine,
|
|
BOOL bWelDot,int nCr = 256,AecDbObjXDataMap* pXDataMap = NULL);
|
|
|
|
void MakeHElbowISO( AcGePoint3d& ptSta,AcGeVector3d& vtSta,AcGePoint3d& ptMid,
|
|
AcGePoint3d& ptEnd,AcGeVector3d& vtEnd,double dPlotPipeW,
|
|
double dPlotDotD,int nPipeDim,const AcDbObjectId& idLay,BOOL bElbowLine,
|
|
BOOL bWelDot,int nCr = 256,AecDbObjXDataMap* pXDataMap = NULL);
|
|
|
|
void MakeReducer(AcGePoint3d ptGe0,AcGePoint3d ptGe1,double dPlotPipeW,double dPlotDotD,int nPipeDim,const AcDbObjectId& idLay,BOOL bWelDot,int nCr = 256,AecDbObjXDataMap* pXDataMap = NULL);
|
|
void MakeHReducer(AcGePoint3d ptGe0,AcGePoint3d ptGe1,double dPlotPipeW,double dPlotDotD,int nPipeDim,const AcDbObjectId& idLay,BOOL bWelDot,int nCr = 256,AecDbObjXDataMap* pXDataMap = NULL);
|
|
|
|
void MakeWDot(AcGePoint3d ptGe,const AcDbObjectId& idLay,double dPlotDotD);
|
|
|
|
void MakeTeeISO( AcGePoint3d ptGe0,AcGePoint3d ptGe1,AcGePoint3d ptGe2,AcGePoint3d ptMid,
|
|
double dPlotPipeW,double dPlotDotD,int nPipeDim,const AcDbObjectId& idLay,BOOL bWelDot,int nCr = 256,AecDbObjXDataMap* pXDataMap = NULL);
|
|
void MakeHTeeISO( AcGePoint3d ptGe0,AcGePoint3d ptGe1,AcGePoint3d ptGe2,AcGePoint3d ptMid,
|
|
double dPlotPipeW,double dPlotDotD,int nPipeDim,const AcDbObjectId& idLay,BOOL bWelDot,int nCr = 256,AecDbObjXDataMap* pXDataMap = NULL);
|
|
|
|
AcDbText* MakeDimText(AcGePoint3d ptSta,AcGePoint3d ptEnd,double dTh,AcDbObjectId& idSty,CString& sText);
|
|
AcDbText *MakeDimText(AcGePoint3d ptSta, AcGePoint3d ptEnd, AcGePoint3d ptMid, AcDbObjectId &idSty, double dH, CString &sText);
|
|
|
|
void MakeCrossISO(AcGePoint3d* pptGe,double dPlotPipeW,double dPlotDotD,int nPipeDim,const AcDbObjectId& idLay,BOOL bWelDot,int nCr = 256,AecDbObjXDataMap* pXDataMap = NULL);
|
|
void MakeHCrossISO(AcGePoint3d* pptGe,double dPlotPipeW,double dPlotDotD,int nPipeDim,const AcDbObjectId& idLay,BOOL bWelDot,int nCr = 256,AecDbObjXDataMap* pXDataMap = NULL);
|
|
|
|
void CovertToISO(AcDbEntity* pEnt,AecDbObjXDataMap* pXDataMap = NULL);
|
|
|
|
void MakeISOFittingFlange(AecDbEwFitting *pFitting, double dPlotPipeW, double dPlotDotD, int nPipeDim, int nFitDim, BOOL bElbowLine, BOOL bWelDot,BOOL bVlvISOV);
|
|
|
|
void GetPtIsoTransform(AcGePoint3d& pt);
|
|
|
|
protected:
|
|
|
|
int AddISOEnt(AcDbEntity* pEnt);
|
|
int AddFitDimtName(CString &sDimtext, CString &sSpec, CString &sFitMat, CString &szRem, CString& sLevel, int nCountAdd = 1);
|
|
void DimIndex(int nIndex, AcGePoint3d &ptPos, AcGeVector3d &vtV, const AcDbObjectId& id);
|
|
void DimIndex(CString &Index, AcGePoint3d &ptPos, AcGeVector3d &vtDir, const AcDbObjectId &id);
|
|
double UnderLineLength(LPCTSTR pszDimup) const;
|
|
bool LookatandBreak();
|
|
void DoPolyBreak(PolyBreaks &plBrks, double dBreak);
|
|
bool GetProjSrcPointAtParam(LPCTSTR sHd1, double dPa1, AcGePoint3d &pt1);
|
|
bool AppendPipeHgr(CMapStringToString &mapNameToRomaIndex, int &nRomIndex, PipeHangerRec & pgr, CString& sIndex);
|
|
|
|
public:
|
|
BOOL m_bWasDone;//外部是否已经变换了ISO
|
|
double m_dISOAngle;
|
|
double m_dArrowL;
|
|
double m_dArrowW;
|
|
double m_dWFact;
|
|
double m_dDimoffset; //标注偏移
|
|
AcDbObjectId m_idDimlay; //标注土层
|
|
AcDbObjectId m_idDimSty; //文字样式
|
|
AecISOMatrix m_xform; //iso矩阵
|
|
AcDbVoidPtrArray m_arISOEntPtrs; //iso实体
|
|
CArray<CPoint,CPoint> m_arGrpIdx; //组范围
|
|
AecDbObjXDataMap m_xInitDataMap;
|
|
CArray<FitSumRec> m_arFitSumRecs;
|
|
CArray< PipeHangerRec> m_arHngrRess;
|
|
AcGePlane m_planeLookDir;
|
|
AcArray< IntsctWith> m_arIntsctWith;
|
|
public:
|
|
BOOL m_bDimTxtIso;
|
|
BOOL m_bDimPipeEl;
|
|
double m_dRefEl;
|
|
BOOL m_nDimIndex;
|
|
BOOL m_bODxtDim;
|
|
BOOL m_bFitFGHide;
|
|
BOOL m_bElStyle;
|
|
double m_dTxtH;
|
|
double m_dScale; //出图比例
|
|
double m_dGastGap;
|
|
};
|