Files
gjm 164968b62e chore
把非utf8-bom编码的cpp/h文件改为 utf8 bom 编码, msvc识别utf8编码时,如果不是bom格式的,会使用当前cp_oem来解码.
2026-10-04 00:04:20 +08:00

79 lines
2.2 KiB
C++

#ifndef _KTAxisCMDGROUP_H__
#define _KTAxisCMDGROUP_H__
#if _MSC_VER > 1000
#pragma once
#endif
typedef struct ADimBs
{
AcGePoint3d ptOn;
AcGePoint3d ptBase;
AcDbObjectId id; //轴号
AcDbObjectId idLn;//尾线
TCHAR szDim[17];//根据需要
}ADIMBS;
class KTAxisCmdGroup
{
public:
KTAxisCmdGroup();
virtual ~KTAxisCmdGroup();
public:
//{{AFX_ARXCMD(KTValveCmdGroup)
int MakeLineAxis();
int LineAxisDim();
int SingleAxisDim();
int AddAxisLabel();
int DelAxisLabel();
//}}AFX_ARXCMD
protected:
BOOL GetPalsFrom2Curve(AcDbObjectIdArray& arId,const AcDbObjectId& idFr,const AcDbObjectId& idTo);
BOOL GetDocScale(double& dPScale);
BOOL OnDimParallelAxisLine(AcDbObjectIdArray& ssSet, ads_name entCurEdge,ads_name entOthEdge);
BOOL OnDimSingleAxisCurve(AcGePoint3d& ptPick, ads_name ent, BOOL bDouble);
BOOL IsLabelCurrent() {return (m_iLabelType == 0 || m_iLabelType == 2);}
BOOL IsLabelAnother() {return (m_iLabelType == 1 || m_iLabelType == 2);}
BOOL IsDimCurrent() {return (m_iDimType == 0 || m_iDimType == 2);}
BOOL IsDimAnother() {return (m_iDimType == 1 || m_iDimType == 2);}
BOOL GetAxisDimBasePoint(AcDbObjectId &id, AcDbObjectId &idLn, AcGePoint3d &ptOn, AcGePoint3d &ptBase);
BOOL IsLineIsAxisLine(AcDbLine *pLn, AcDbVoidPtrArray &arEntPtrs, AcGePoint3d &ptOn, AcGePoint3d &ptBase);
BOOL Get2SideAxisDim(AcArray<ADimBs> &arDb1, AcArray<ADimBs> &arDb2, AcGePoint3d &ptOn, AcGePoint3d &ptBase);
BOOL GetDimLable(AcDbObjectId &id, TCHAR *pszDim);
void SortADimBs(AcArray<ADimBs> &arDb1);
void PairAdimBs(AcArray<ADimBs> &arDb1, AcArray<ADimBs> &arDb2);
BOOL InsertAxisLable(ADimBs &adbs1, AcGeMatrix3d &vtM);
BOOL EraseAxisLable(ADimBs &adbs1);
BOOL NextLableIncrease(AcArray<ADimBs> &arDb1,int nNext, int nAddNo);
protected:
BOOL m_bUpside;
CString m_sStartLabel;
// 标号标注方式,0-当前侧;1-另一侧;2-两边标
int m_iLabelType;
// 尺寸标注方式,0-当前侧;1-另一侧;2-两边标
int m_iDimType;
// 当前标注起始点和终止点
AcGePoint3d m_ptCurStart;
AcGePoint3d m_ptCurEnd;
// 另一边标注起始点和终止点
AcGePoint3d m_ptOthStart;
AcGePoint3d m_ptOthEnd;
// 标号引线方向,单位向量
AcGeVector3d m_vecCur;
AcGeVector3d m_vecOth;
};
#endif //_KTAxisCMDGROUP_H__