📄 asdkmyclass.h
字号:
// AsdkMyClass.h: interface for the AsdkMyClass class.
//
//////////////////////////////////////////////////////////////////////
#if !defined(AFX_ASDKMYCLASS_H__6032E7EE_3251_4ED4_A137_C9E8BB102DDC__INCLUDED_)
#define AFX_ASDKMYCLASS_H__6032E7EE_3251_4ED4_A137_C9E8BB102DDC__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include "dbmain.h"
#include "acgi.h"
class AsdkMyClass : public AcDbEntity
{
public:
ACRX_DECLARE_MEMBERS(AsdkMyClass);
AsdkMyClass(){}
AsdkMyClass(AcGePoint3d basePt, int floorNum,
double baseLen, double QCJWid, double HCJWid, double Hei);
virtual ~AsdkMyClass(){}
void ExtendedBaseIni();
virtual Acad::ErrorStatus dwgInFields (AcDbDwgFiler *pFiler);
virtual Acad::ErrorStatus dwgOutFields(AcDbDwgFiler *pFiler) const;
virtual Acad::ErrorStatus dxfInFields (AcDbDxfFiler *pFiler);
virtual Acad::ErrorStatus dxfOutFields(AcDbDxfFiler *pFiler) const;
// 必须重载的函数,实现一个自定义实体的基本功能
virtual Adesk::Boolean worldDraw(AcGiWorldDraw *mode);
virtual void viewportDraw(AcGiViewportDraw *mode);
virtual Acad::ErrorStatus getGeomExtents(AcDbExtents & extents);
virtual Acad::ErrorStatus transformBy(const AcGeMatrix3d & xform);
virtual Acad::ErrorStatus getTransformedCopy(const AcGeMatrix3d &xform,
AcDbEntity *&pEnt);
virtual Acad::ErrorStatus getGripPoints(AcGePoint3dArray & gripPoints,
AcDbIntArray &osnapModes,
AcDbIntArray & geomIds) const;
virtual Acad::ErrorStatus moveGripPointsAt(const AcDbIntArray &indices,
const AcGeVector3d &offset);
Acad::ErrorStatus getOsnapPoints(AcDb::OsnapMode osnapMode,
int gsSelectionMark,
const AcGePoint3d &pickPoint,
const AcGePoint3d &lastPoint,
const AcGeMatrix3d &viewXform,
AcGePoint3dArray &snapPoints,
AcDbIntArray &geomIds) const;
public:
double GetBaseHeight(); // 得到基础高度
void SetBaseHeight(double h); // 设置基础高度
double getBaseLenth(); // 得到基础底部宽度
void SetBaseLenth(double l); // 设置基础底部宽度
double GetLeftCJLenth(); // 得到左边襟边宽度
void SetLeftCJLenth(double ll); // 设置左边襟边宽度
double GetRightCJLenth(); // 得到右边襟边宽度
void SetRightCJLenth(double rl); // 设置右边襟边宽度
int GetFloorNum(); // 得到基础层数
void SetFloorNum(int n); // 设置基础层数
AcGePoint3d GetBasePoint(); // 得到基础插入点
void SetBasePoint(const AcGePoint3d& bp); // 设置基础插入点
AcGePoint3d GetLeftTopPoint(); // 得到左上点
AcGePoint3d GetRightTopPoint(); // 得到右上点
AcGePoint3d GetRightBasePoint(); // 得到右下点
private:
// 给定起点,角度,和沿这个角度走的长度,求出指定的另一端点
AcGePoint3d Pt2Pt(const AcGePoint3d& BasePt, double angle, double lenth);
AcGePoint3d m_PtArr1[4], m_PtArr2[4], m_PtArr3[4], m_PtArr4[4];
Adesk::Int16 m_FloorNum; // 扩大基础层数
double m_baseLen; // 扩大基础底部宽度
double m_LeftCJLen; // 左边襟边宽度
double m_RightCJLen; // 右边襟边宽度
double m_BaseHeight; // 每一层高度
AcGePoint3d m_BasePt; // 插入点
};
#endif // !defined(AFX_ASDKMYCLASS_H__6032E7EE_3251_4ED4_A137_C9E8BB102DDC__INCLUDED_)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -