Files
envi-code/SourceCode/Code2026/inc/AecDbEwEquipment.h
T

578 lines
22 KiB
C++
Raw Normal View History

2026-10-04 00:04:20 +08:00
#pragma once
2026-09-28 15:28:50 +08:00
/*----------------------------------------------------------------------------------
2026-10-04 00:04:20 +08:00
//AecDbEwEquipment : 阀门,设备 等通用类
2026-09-28 15:28:50 +08:00
//
2026-10-04 00:04:20 +08:00
//通过 AecDbX3dPart 进行基本体的拼接
2026-09-28 15:28:50 +08:00
//---------------------------------------------------------------------------------*/
#include "AecDbEntityBase.h"
#include "AecDbObjXDataMap.h"
#include "earthwormdef.h"
#include "AecComplexCurveDraw.h"
#include "AecMInterfaces.h"
#include "define_class_xdata_key.h"
#ifdef EARTHWORM_EXPORT
#define DLLIMPEXP __declspec(dllexport)
#else
#define DLLIMPEXP __declspec(dllimport)
#endif
#pragma region new solid
namespace NewSolid
{
template <class T>
static void _writeMem(byte * &p, const T & t)
{
::memcpy(p, &t, sizeof(T));
p += sizeof(T);
}
template <class T>
static T _readMem(byte *&p)
{
T t;
::memcpy(&t, p, sizeof(T));
p += sizeof(T);
return t;
}
template <class T>
static AcDb3dSolid * makeSolid(byte * pData, const int &n)
{
AcDb3dSolid *p(NULL);
T t;
if (t.fromData(pData, n))
p = t.makeSolid();
return p;
}
static void _writeMem(byte *&p, const void *pSrc, const ULONGLONG &n)
{
::memcpy(p, pSrc, n);
p += n;
}
static void _readMem(byte *&p, void *pDst, const ULONGLONG &n)
{
::memcpy(pDst, p, n);
p += n;
}
}
class DLLIMPEXP NewSolidBase
{
public:
static int m_gVersion;
int m_CurrentVersion;
AecEqui::Primitive m_type;
bool m_bSolid;
public:
NewSolidBase(AecEqui::Primitive type, bool bSolid);
virtual AcDb3dSolid* makeSolid() = 0;
virtual AecEqui::Primitive getType() = 0;
virtual void toData(void *&p, int &n) = 0;
virtual bool fromData(byte *p, const int &len) = 0;
virtual int getBufferLen();
static AecEqui::XPrimData* makeXPrimData(NewSolidBase *pBase, int id = 0);
static void copyFrom(NewSolidBase *pDesc, NewSolidBase *pSrc);
protected:
void toData(byte *&p);
bool fromData(byte *&p);
};
class DLLIMPEXP NewNozzle: public NewSolidBase
{
public:
AecEqui::XNozz m_nozz;
AcGePoint3d m_ptOrg;
AcGeVector3d m_vtDir;
public:
NewNozzle(): NewSolidBase(AecEqui::kNozz, true) { ::memset(&m_nozz, 0, sizeof(AecEqui::XNozz)); }
virtual AcDb3dSolid* makeSolid() { return NULL; }
virtual AecEqui::Primitive getType() { return AecEqui::kNozz; }
virtual void toData(void *&p, int &n){}
virtual bool fromData(byte *p, const int &len) { return false; }
};
class DLLIMPEXP NewExtrude: public NewSolidBase
{
public:
2026-10-04 00:04:20 +08:00
CString m_sRegion; // 截面
double m_dH; // 拉伸高度
2026-09-28 15:28:50 +08:00
public:
NewExtrude(): NewSolidBase(AecEqui::kNewExtrude, true) {}
NewExtrude(bool bSolid, AcDbRegion *pReg, const double &h);
virtual AcDb3dSolid* makeSolid();
virtual AecEqui::Primitive getType() { return AecEqui::kNewExtrude; }
virtual void toData(void *&p, int &n);
virtual bool fromData(byte *p, const int &len);
virtual int getBufferLen();
};
class DLLIMPEXP NewRevolve: public NewSolidBase
{
public:
2026-10-04 00:04:20 +08:00
CString m_sRegion; // 截面
AcGePoint3d m_ptOrg; // 旋转轴原点
AcGeVector3d m_vtDir; // 旋转轴方向
double m_dStartAngle; // 旋转起始角
double m_dSweepAngle; // 旋转角度
2026-09-28 15:28:50 +08:00
public:
NewRevolve(): NewSolidBase(AecEqui::kNewRevolve, true){}
NewRevolve(bool bSolid
, AcDbRegion *pReg
, const AcGePoint3d &ptOrg
, const AcGeVector3d &vtAxis
, double dSweepAngle
, double dStartAngle);
virtual AcDb3dSolid* makeSolid();
virtual AecEqui::Primitive getType() { return AecEqui::kNewRevolve; }
virtual void toData(void *&p, int &n);
virtual bool fromData(byte *p, const int &len);
virtual int getBufferLen();
};
class DLLIMPEXP NewLoft: public NewSolidBase
{
public:
CString m_sPath;
std::vector<CString> m_regs;
public:
NewLoft(): NewSolidBase(AecEqui::kNewLoft, true) {}
NewLoft(bool bSolid, const AcArray<AcDbRegion*> &ar, AcDbPolyline *pPoly);
virtual AcDb3dSolid* makeSolid();
virtual AecEqui::Primitive getType() { return AecEqui::kNewLoft; }
virtual void toData(void *&p, int &n);
virtual bool fromData(byte *p, const int &len);
virtual int getBufferLen();
};
class DLLIMPEXP NewSweepR: public NewSolidBase
{
public:
CString m_sRegion;
CString m_sPath;
public:
NewSweepR(): NewSolidBase(AecEqui::kRevitSweep, true){}
NewSweepR(bool bSolid, AcDbRegion *pReg, AcDbPolyline *pPoly);
virtual AcDb3dSolid* makeSolid();
virtual AecEqui::Primitive getType() { return AecEqui::kRevitSweep; }
virtual void toData(void *&p, int &n);
virtual bool fromData(byte *p, const int &len);
virtual int getBufferLen();
};
class DLLIMPEXP NewSweep: public NewSolidBase
{
public:
CString m_sRegion;
CString m_sPath;
public:
NewSweep(): NewSolidBase(AecEqui::kNewSweep, true) {}
NewSweep(bool bSolid, AcDbRegion *pReg, AcDbPolyline *pPoly);
virtual AcDb3dSolid *makeSolid();
virtual AecEqui::Primitive getType() { return AecEqui::kNewSweep; }
virtual void toData(void *&p, int &n);
virtual bool fromData(byte *p, const int &len);
virtual int getBufferLen();
};
class DLLIMPEXP RevitCombination: public NewSolidBase
{
public:
std::vector<NewSolidBase*> m_solids;
public:
RevitCombination();
~RevitCombination();
virtual AcDb3dSolid *makeSolid();
virtual AecEqui::Primitive getType() { return AecEqui::kRevitCombination; }
virtual void toData(void *&p, int &n);
virtual bool fromData(byte *p, const int &len);
virtual int getBufferLen();
2026-10-04 00:04:20 +08:00
// 是否按顺序绘制实体
// 如果是,则按照 m_solids 的顺序来绘制
// 如果否,则先把所有solid合成一个实体,再将所有的void做减
2026-09-28 15:28:50 +08:00
bool m_bOrderDraw;
};
#pragma endregion
class Aec3dFaceplan;
class DLLIMPEXP AecDbEwEquipment : public AecDbEntityBase,
public AecMInterfaces
{
public:
ACRX_DECLARE_MEMBERS(AecDbEwEquipment);
protected:
static Adesk::UInt32 kCurrentVersionNumber;
public:
enum ESection
{
2026-10-04 00:04:20 +08:00
eTopBottom = 0, // 上下
eLeftRight, // 左右
eFrontBack, // 前后
eENWS, // 东北 西南
eESWN, // 东南 西北
2026-09-28 15:28:50 +08:00
eNone
};
public:
AecDbEwEquipment(void);
virtual ~AecDbEwEquipment(void);
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 void subList() const;
virtual Acad::ErrorStatus copyFrom(const AcRxObject* pSrc);
virtual Acad::ErrorStatus subTransformBy(const AcGeMatrix3d& xform);
Acad::ErrorStatus TransformBy(const AcGeMatrix3d xform);
virtual Acad::ErrorStatus subGetGripPoints(AcDbGripDataPtrArray& grips,
const double curViewUnitSize,
const int gripSize,
const AcGeVector3d& curViewDir,
const int bitflags) const;
virtual Acad::ErrorStatus subGetStretchPoints(AcGePoint3dArray& stretchPoints) const;
virtual Acad::ErrorStatus subMoveGripPointsAt(const AcDbVoidPtrArray& appData, const AcGeVector3d& offset, const int bitflags);
virtual Acad::ErrorStatus subMoveStretchPointsAt(const AcDbIntArray& indices,const AcGeVector3d& offset);
virtual void GetGripText(int nPos, CString& sText) const;
virtual Acad::ErrorStatus subGetOsnapPoints(AcDb::OsnapMode osnapMode,
INT_PTR gsSelectionMark,
const AcGePoint3d& pickPoint,
const AcGePoint3d& lastPoint,
const AcGeMatrix3d& viewXform,
AcGePoint3dArray& snapPoints,
AcDbIntArray& geomIds) const;
virtual Acad::ErrorStatus subGetGeomExtents(AcDbExtents& extents) const;
virtual Acad::ErrorStatus subIntersectWith( const AcDbEntity* pEnt,
AcDb::Intersect intType,
AcGePoint3dArray& points,
INT_PTR thisGsMarker,
INT_PTR otherGsMarker) const;
virtual Acad::ErrorStatus subIntersectWith( const AcDbEntity* pEnt,
AcDb::Intersect intType,
const AcGePlane& projPlane,
AcGePoint3dArray& points,
INT_PTR thisGsMarker,
INT_PTR otherGsMarker) const;
virtual Acad::ErrorStatus subErase(Adesk::Boolean erasing);
Acad::ErrorStatus ImpGetGripPoints(AcGePoint3dArray& gripPoints) const;
EPosition ExplainGripIndex(int nIndex) const;
//virtual Acad::ErrorStatus subErase(Adesk::Boolean erasing);
2026-10-04 00:04:20 +08:00
//AEC 派生
2026-09-28 15:28:50 +08:00
virtual Acad::ErrorStatus Draw2d(AcGiDraw &dc) const;
virtual Acad::ErrorStatus Draw3d(AcGiDraw &dc) const;
Acad::ErrorStatus DrawHandFlg(AcGiDraw &dc) const;
virtual int ComparedTo(AecDbEntityBase* pCurOther) const;
2026-10-04 00:04:20 +08:00
//获取二维视图显示的图形
2026-09-28 15:28:50 +08:00
virtual int GetDraw2dables(Adesk::UInt16 nDrawStyle, AcDbVoidPtrArray& arEntPtrs) const;
2026-10-04 00:04:20 +08:00
//获取三维显示图形
2026-09-28 15:28:50 +08:00
virtual int GetDraw3dables(AcDbVoidPtrArray& arEntPtrs,bool bWriteBimInfo = false) const;
2026-10-04 00:04:20 +08:00
//获取唯一性标识
2026-09-28 15:28:50 +08:00
virtual LPCTSTR GetGUID() const;
Acad::ErrorStatus DrawInfArrow(AcGiDraw &dc) const;
virtual void SetActive(bool bActive);
virtual bool IsActive() const;
virtual void NewGUID();
LPCTSTR GetGripCmd(int nType = 0) const;
bool GetAdjustVectorBy2Infs(AcGeVector3d& vtAdjust) const;
2026-10-04 00:04:20 +08:00
//接口重载
2026-09-28 15:28:50 +08:00
virtual bool GetInterface(AcArray<AecInterface>& arInfs) const;
virtual bool GetInterface(int nIndex,AecInterface& inf) const;
virtual int GetInterfaceCount() const;
virtual int GetActiveInf() const;
virtual void SetActiveInf(int nIndex);
virtual void LockInf(int nInf);
virtual bool TransformAssocInf(int nInf,const AcGeMatrix3d& xform);
protected:
void Draw3dSolid(AcGiDraw* pMode, const int iClr = 255) const;
void DrawActiveInfArrow(AecEqui::XPrimData* p3dSolid, AcGiDraw &dc) const;
void DrawActiveXYZArrow(AecEqui::XPrimData* p3dSolid, AcGiDraw &dc) const;
void DrawCylinder(AcGiDraw &dc, AcGePoint3d& ptGeFr, AcGePoint3d& ptGeTo, double dr) const;
void DrawArrow(AcGiDraw &dc, AcGePoint3d& ptGeFr, AcGePoint3d& ptGeTo, double dr) const;
void AddSegmentArcPoints( AcGePoint3dArray& arVerts,
AcGePoint3d& pt,
AcGePoint3d& ptNext,
double dBulge) const;
void GetLayerCirclePoints(AcGePoint3dArray& arPts, AcGePoint3d& pttT, AcDbLine& ln) const;
void GetTransformbyXform(const AecEqui::XPrimData* p3dSolid, AcGeVector3d& vtDir) const;
void GetTransformbyXform(const AecEqui::XPrimData* p3dSolid, AcGePoint3d& ptPos) const;
void GetTransformbyXform(const AecEqui::XPrimData* p3dSolid, AcDbEntity* pEnt) const;
void MakeTriangulateFace(AcGePoint3dArray& arVerts, AcArray<AecEqui::XTriag>& arXTriags) const;
void MakeTriangulateFace(Aec3dFaceplan* pPlan, AcGePoint3dArray& arVerts) const;
void MakeSureElementInFace(AecEqui::AecCurveElement& el, Aec3dFaceplan* pFaceplan) const;
public:
short GetInfFaceCount(const AecEqui::XPrimData* p3dSolid) const;
AcDb3dSolid* Draw3dSolid(AecEqui::XPrimData *p3dSolid
, const AcGePoint3d &ptIns
, const AcGeVector3d &vtDir) const;
2026-10-04 00:04:20 +08:00
//获取体的范围方块
2026-09-28 15:28:50 +08:00
int GetBodyBox(AcDbExtents& ext) const;
virtual const AecDbObjXDataMap* GetSpecialtyData() const;
virtual AecDbObjXDataMap* GetSpecialtyData(AcDb::OpenMode bMode = AcDb::kForWrite);
virtual SHJson::WValue& ToJson(bool bExprotGeo = true) const;
virtual bool ByJson(const SHJson::WValue &v);
virtual bool GetBimInfoTip(CString& sInfoTip) const;
public:
void AddSubPrimObj(AecEqui::XPrimData* p);
void RemoveSubPrimObj(int nIndex);
void RemoveSubPrimObjByID(int nSubID);
void AddTransform(const AcGeMatrix3d& xform);
void AddTransform(const AcGeVector3d& vtMove);
void RemoveLastTransform();
void RemoveAllTransform();
BOOL GetLastTransform(AcGeMatrix3d& xform) const;
typedef AcArray<AcGeMatrix3d> AcGeMatrix3dArray;
BOOL GetAllAddTransforms(AcGeMatrix3dArray& arMatrix) const;
void GetInfFaceInf(const AecEqui::XPrimData* p3dSolid
, AcGeVector3d& vtDir
, AcGePoint3d& ptGe
, int nUserindex = -1) const;
int GetSubPrimObjCount() const;
void SetActiveSubPrimObj(int nindex);
void ActiveInterface(int nInf, BOOL bActive);
AecEqui::XPrimData* GetSubPrimObj(int nIndex) const;
AecEqui::XPrimData* GetSUbPrimObjByID(int nID) const;
void ModifyPrimData(long lID, const AecEqui::XPrimData& data, int nVarIndex, BOOL bReset = FALSE);
2026-10-04 00:04:20 +08:00
BOOL DrawValveForISO(AecComplexCurve& cplCurve, bool bForISO = false,bool bis45 = false);//绘制二维阀门,准备为ISO
2026-09-28 15:28:50 +08:00
BOOL ReadFromFile(LPCTSTR pszEquFile);
BOOL WriteToFile(LPCTSTR pszEquFile);
void SetInsert(const AcGePoint3d& ptGe);
void SetInsert(const AcGePoint3d& ptGe, const AcGeVector3d& vtDir);
void GetInsert(AcGePoint3d& ptGe, AcGeVector3d& vtDir) const;
void SetDashLayer(const AcDbObjectId &id);
void GetDashLayer(AcDbObjectId &id) const;
void SetCenterLayer(const AcDbObjectId &id);
void GetCenterLayer(AcDbObjectId &id) const;
void SetVert(bool bVert);
bool IsVert() const;
AcDbObjectId getSectionID(const ESection &es);
void setSectionID(const ESection &es, AcDbObjectId &id);
virtual bool GetSectionDraw(AcGePlane& plan,const AcGeVector3d& vtTo,AcDbVoidPtrArray& arRegionPtrs) const;
virtual int GetSectionDraw(const AcGePoint3d& ptFr,const AcGePoint3d& ptTo,const AcGeVector3d& vtViewDir,const AcGeVector3d& vtTo, AcDbVoidPtrArray& arRegionPtrs) const;
bool OldGetSectionDraw(AcGePlane &plan, const AcGeVector3d &vtTo, AcDbVoidPtrArray &arRegionPtrs) const;
static void subDMesh2NewSolid(AecEqui::XPrimData *pSubDMesh , CPtrArray &ar);
void subDMesh2NewSolid();
void clearGeoBuffer();
virtual bool GetPositionGrip(int nIndex, AecGripData *&pGrip) const;
2026-10-04 00:04:20 +08:00
// 将实体 p 按照料 设备的插入点、插入方向以及pData内部的转换 进行变换
2026-09-28 15:28:50 +08:00
static void TransformEntity(AcDbEntity *p
, const AcGePoint3d &ptIns
, const AcGeVector3d &vtDir
, const AecEqui::XPrimData *pData
, bool bVert);
2026-10-04 00:04:20 +08:00
// 上一个函数的还原
2026-09-28 15:28:50 +08:00
static void UnTransformEntity(AcDbEntity *p
, const AcGePoint3d &ptIns
, const AcGeVector3d &vtDir
, AecEqui::XPrimData *pData
, bool bVert);
static AecEqui::XPrimData* copyFromXPrimData(AecEqui::XPrimData *pSrc);
bool IsHvacValve() const;
bool IsDrawBlockFor2d() const;
2026-10-04 00:04:20 +08:00
// 得到两个管嘴的距离
2026-09-28 15:28:50 +08:00
double getDistanceByInterface(const int &idx1, const int &idx2);
virtual void PreprocessForHlr(const AcGePoint3d &ptPlnO
, const AcGeVector3d &vtPlnN
, AcArray<AcDbEntity *> &ar) const;
virtual void ProcessHlrResult(const AcArray<AcDbEntity *> &ar
, const std::map<AcDbEntity *, AcArray<AcDbEntity *>> &preAr
, AcArray<AcDbEntity *> &output) const;
virtual bool GetProperties(SimpleProperty::PropertySetByIndex &porpertys) const;
virtual bool SetProperties(SimpleProperty::PropertySetByName &porpertys);
bool GetClosestPointToSUbPrim(DWORD dwSubiD, AcGePoint3d &ptNear,AcGeVector3d &vtNorm) const;
void MakeFlange2d(AecComplexCurve &cplCurve, double dOff, bool bForISO = false, bool bis45 = false) const;
protected:
void Draw2dBlock(AcGiDraw *pMode) const;
void DrawHvacValve(AcGiDraw *pMode) const;
BOOL DrawGateVlv2d(AecComplexCurve& cplCurve, bool bForISO = false, bool bis45 = false) const;
BOOL DrawGlobeVlv2d(AecComplexCurve& cplCurve, bool bForISO = false, bool bis45 = false) const;
BOOL DrawSphereVlv2d(AecComplexCurve& cplCurve, bool bForISO = false,bool bis45 = false) const;
BOOL DrawCheckVlv2d(AecComplexCurve& cplCurve, bool bForISO = false,bool bis45 = false) const;
BOOL DrawButterflyVlv2d(AecComplexCurve& cplCurve, bool bForISO = false,bool bis45 = false) const;
BOOL DrawAngleVlv2d(AecComplexCurve& cplCurve, bool bForISO = false,bool bis45 = false) const;
BOOL DrawSafetyVlv2d(AecComplexCurve& cplCurve, bool bForISO = false,bool bis45 = false) const;
BOOL DrawTeeVlv2d(AecComplexCurve& cplCurve, bool bForISO = false,bool bis45 = false) const;
BOOL DrawCrossVlv2d(AecComplexCurve& cplCurve, bool bForISO = false,bool bis45 = false) const;
BOOL DrawAdjustingVlv2d(AecComplexCurve& cplCurve, bool bForISO = false,bool bis45 = false) const;
BOOL DrawDrainVlv2d(AecComplexCurve& cplCurve, bool bForISO = false,bool bis45 = false) const;
BOOL DrawPlugVlv2d(AecComplexCurve& cplCurve, bool bForISO = false,bool bis45 = false) const;
BOOL DrawDiaphragmVlv2d(AecComplexCurve& cplCurve, bool bForISO = false,bool bis45 = false) const;
BOOL DrawReducingVlv2d(AecComplexCurve& cplCurve, bool bForISO = false,bool bis45 = false) const;
BOOL DrawEleMagVlv2d(AecComplexCurve& cplCurve, bool bForISO = false,bool bis45 = false) const;
BOOL DrawRubberJnt2d(AecComplexCurve& cplCurve, bool bForISO = false,bool bis45 = false) const;
BOOL DrawVentVlv2d(AecComplexCurve& cplCurve, bool bForISO = false,bool bis45 = false) const;
BOOL DrawDrainMudVlv2d(AecComplexCurve& cplCurve, bool bForISO = false,bool bis45 = false) const;
BOOL DrawDrainJYFVlv2d(AecComplexCurve& cplCurve, bool bForISO = false,bool bis45 = false) const;
BOOL DrawGate2d(AecComplexCurve& cplCurve, bool bForISO = false,bool bis45 = false) const;
BOOL DrawPressMeter2d(AecComplexCurve& cplCurve, bool bForISO = false,bool bis45 = false) const;
BOOL DrawTemprMeter2d(AecComplexCurve& cplCurve, bool bForISO = false,bool bis45 = false) const;
BOOL DrawSSJt2d(AecComplexCurve& cplCurve, bool bForISO = false,bool bis45 = false) const;
BOOL DrawCLJt2d(AecComplexCurve& cplCurve, bool bForISO = false,bool bis45 = false) const;
BOOL DrawGDBjc(AecComplexCurve& cplCurve, bool bForISO = false,bool bis45 = false) const;
void DrawInf(AecComplexCurve& cplCurve, AcGePoint3d& ptMid, AecInterface& inf0, AcGeVector3d& vtNorm) const;
void MakeFlange2d(AecInterface& inf0,double nD,double nC,AecComplexCurve& cplCurve,BOOL bForISO, bool bis45) const;
protected:
void PrimPorjectToPlan(AecComplexCurve& cplCurve, AecEqui::XView view, const AcGeVector3d& vtNor, BOOL bMakeCenterLine = FALSE) const;
void PrimBoxPorjectToPlan(AecComplexCurve& cplCurve, AecEqui::XView eview, const AcGeVector3d& vtNor, AecEqui::XPrimData* p3dSolid, Aec3dFaceplan* pPlan, BOOL bMakeCenterLine = FALSE, BOOL bOnlyGetFace = FALSE) const;
void PrimCylnPorjectToPlan(AecComplexCurve& cplCurve, AecEqui::XView eview, const AcGeVector3d& vtNor, AecEqui::XPrimData* p3dSolid, Aec3dFaceplan* pPlan, BOOL bMakeCenterLine = FALSE, BOOL bOnlyGetFace = FALSE) const;
void PrimSpherePorjectToPlan(AecComplexCurve& cplCurve, AecEqui::XView eview, const AcGeVector3d& vtNor, AecEqui::XPrimData* p3dSolid, Aec3dFaceplan* pPlan, BOOL bMakeCenterLine = FALSE, BOOL bOnlyGetFace = FALSE) const;
void PrimDishPorjectToPlan(AecComplexCurve& cplCurve, AecEqui::XView eview, const AcGeVector3d& vtNor, AecEqui::XPrimData* p3dSolid, Aec3dFaceplan* pPlan, BOOL bMakeCenterLine = FALSE, BOOL bOnlyGetFace = FALSE) const;
void PrimConePorjectToPlan(AecComplexCurve& cplCurve, AecEqui::XView eview, const AcGeVector3d& vtNor, AecEqui::XPrimData* p3dSolid, Aec3dFaceplan* pPlan, BOOL bMakeCenterLine = FALSE, BOOL bOnlyGetFace = FALSE, int nFaceIndex = 0) const;
void PrimNozzPorjectToPlan(AecComplexCurve& cplCurve, AecEqui::XView eview, const AcGeVector3d& vtNor, AecEqui::XPrimData* p3dSolid, Aec3dFaceplan* pPlan, BOOL bMakeCenterLine = FALSE, BOOL bOnlyGetFace = FALSE) const;
void PrimPyramidPorjectToPlan(AecComplexCurve& cplCurve, AecEqui::XView eview, const AcGeVector3d& vtNor, AecEqui::XPrimData* p3dSolid, Aec3dFaceplan* pPlan, BOOL bMakeCenterLine = FALSE, BOOL bOnlyGetFace = FALSE, int nFaceIndex = 0) const;
void PrimTydfPorjectToPlan(AecComplexCurve& cplCurve, AecEqui::XView eview, const AcGeVector3d& vtNor, AecEqui::XPrimData* p3dSolid, Aec3dFaceplan* pPlan, BOOL bMakeCenterLine = FALSE, BOOL bOnlyGetFace = FALSE, int nFaceIndex = 0) const;
void PrimCirTorusPorjectToPlan(AecComplexCurve& cplCurve, AecEqui::XView eview, const AcGeVector3d& vtNor, AecEqui::XPrimData* p3dSolid, Aec3dFaceplan* pPlan, BOOL bMakeCenterLine = FALSE, BOOL bOnlyGetFace = FALSE) const;
void PrimRectTorusPorjectToPlan(AecComplexCurve& cplCurve, AecEqui::XView eview, const AcGeVector3d& vtNor, AecEqui::XPrimData* p3dSolid, Aec3dFaceplan* pPlan, BOOL bMakeCenterLine = FALSE, BOOL bOnlyGetFace = FALSE) const;
void PrimExtrudePorjectToPlan(AecComplexCurve& cplCurve, AecEqui::XView eview, const AcGeVector3d& vtNor, AecEqui::XPrimData* p3dSolid, Aec3dFaceplan* pPlan, BOOL bMakeCenterLine = FALSE, BOOL bOnlyGetFace = FALSE) const;
void PrimRevolvePorjectToPlan(AecComplexCurve& cplCurve, AecEqui::XView eview, const AcGeVector3d& vtNor, AecEqui::XPrimData* p3dSolid, Aec3dFaceplan* pPlan, BOOL bMakeCenterLine = FALSE, BOOL bOnlyGetFace = FALSE) const;
BOOL MakeCurves(AecComplexCurve& cplCurve) const;
void SortAecComplexCurves(CPtrArray& arPrimCplPtrs) const;
void CoverBooleanOperZ(CPtrArray& arPrimCplPtrs, CMapPtrToPtr& mapCpl2Plan) const;
void SplitCrvOnIntersect(AecComplexCurve* pCrvDn, AecComplexCurve* pCrvUp) const;
AcDbCurve* CurveElement2DbCurve(AecEqui::AecCurveElement el) const;
void AppendSegment(AecEqui::AecCurveElement& elFrom, AecComplexCurve& cplexDn, AcDbVoidPtrArray& arSegPtrs, double dZ) const;
BOOL GetCurvesInSide(AecComplexCurve& compCurve) const;
Acad::ErrorStatus BoolUnit3DBuffer(double dScale) const;
BOOL NozzhasFlage(int &nType) const;
protected:
2026-10-04 00:04:20 +08:00
//专业数据
2026-09-28 15:28:50 +08:00
Adesk::Int16 m_nInfActive;
CString m_sGUID;
bool m_bActive;
2026-10-04 00:04:20 +08:00
//专业数据
2026-09-28 15:28:50 +08:00
AecDbObjXDataMap m_mapSpecXData;
2026-10-04 00:04:20 +08:00
AcGeVector3d m_vtDir; //方向
AcGePoint3d m_ptInsert; //插入点
CPtrArray m_arSubPrimPtrs; //几何单元
2026-09-28 15:28:50 +08:00
2026-10-04 00:04:20 +08:00
// 两个图层
2026-09-28 15:28:50 +08:00
AcDbSoftPointerId m_idDash;
AcDbSoftPointerId m_idCenter;
2026-10-04 00:04:20 +08:00
bool m_bVert; // 阀专用, 是否是垂直放置
2026-09-28 15:28:50 +08:00
private: // key
2026-10-04 00:04:20 +08:00
// 俯/仰 视
2026-09-28 15:28:50 +08:00
DEF_XDATA_KEY(_TOP_BOTTOM_);
2026-10-04 00:04:20 +08:00
// 左/右 视
2026-09-28 15:28:50 +08:00
DEF_XDATA_KEY(_LEFT_RIGHT_);
2026-10-04 00:04:20 +08:00
// 前/后 视
2026-09-28 15:28:50 +08:00
DEF_XDATA_KEY(_FRONT_BACK_);
2026-10-04 00:04:20 +08:00
// 东北/西南 视
2026-09-28 15:28:50 +08:00
DEF_XDATA_KEY(_EN_WS_);
2026-10-04 00:04:20 +08:00
// 东南/西北 视
2026-09-28 15:28:50 +08:00
DEF_XDATA_KEY(_ES_WN_);
public:
2026-10-04 00:04:20 +08:00
// 同意支持一下用图块作为2D显示
2026-09-28 15:28:50 +08:00
2026-10-04 00:04:20 +08:00
// 俯视图用图块名称 dwg路径:块名称
2026-09-28 15:28:50 +08:00
DEF_XDATA_KEY(_DRAW_2D_BY_BLK_PATH_);
2026-10-04 00:04:20 +08:00
// 俯视图用图块 X 比例
2026-09-28 15:28:50 +08:00
DEF_XDATA_KEY(_DRAW_2D_BY_BLK_LENGTH_);
2026-10-04 00:04:20 +08:00
// 俯视图用图块 Y 比例
2026-09-28 15:28:50 +08:00
DEF_XDATA_KEY(_DRAW_2D_BY_BLK_WIDTH_);
2026-10-04 00:04:20 +08:00
//统一出图比例
2026-09-28 15:28:50 +08:00
DEF_XDATA_KEY(_DRAW_2D_BY_DOCSCALE_);
public:
2026-10-04 00:04:20 +08:00
AecGripData* m_pGripAppData; //夹点
2026-09-28 15:28:50 +08:00
2026-10-04 00:04:20 +08:00
//不序列化
//mutable AcGePoint3dArray m_arMeshPoints; //临时变量,用于计算整体范围
2026-09-28 15:28:50 +08:00
};