159 lines
6.0 KiB
C++
159 lines
6.0 KiB
C++
#pragma once
|
|
#include "EarThwormDef.h"
|
|
#include "AecComplexCurveDraw.h"
|
|
|
|
#include "AcGiDraw.h"
|
|
class AecDbObjXDataMap;
|
|
class AecDbEntityBase;
|
|
class ImpHvacCross
|
|
{
|
|
public:
|
|
ImpHvacCross();
|
|
virtual ~ImpHvacCross();
|
|
|
|
Acad::ErrorStatus Draw2d(AcGiDraw &mode) const;
|
|
Acad::ErrorStatus Draw3d(AcGiDraw &mode) const;
|
|
|
|
bool GetInterface(AcArray<AecInterface>& arInfs) const;
|
|
|
|
AecEqui::Position ExplainGripIndex(int nIndex) const;
|
|
Acad::ErrorStatus transformBy(const AcGeMatrix3d& xform);
|
|
|
|
AcGeVector3d normal() const;
|
|
void list() const;
|
|
|
|
AcGePoint3d GetCenterPt() const;
|
|
|
|
void Move3DBuffer(AcDbVoidPtrArray& ar3DBuffer) const;
|
|
bool Has3DBuffer() const;
|
|
|
|
protected:
|
|
|
|
BOOL MakeCurves(AecComplexCurve& cplCurve) const;
|
|
BOOL GetCurvesInSide(AecComplexCurve& compCurve) const;
|
|
|
|
Acad::ErrorStatus getStretchPoints(AcGePoint3dArray& stretchPoints) const;
|
|
Acad::ErrorStatus getGripPoints(AcGePoint3dArray& gripPoints, AcDbIntArray& osnapModes, AcDbIntArray& geomIds) const;
|
|
Acad::ErrorStatus getOsnapPoints(AcDb::OsnapMode osnapMode, INT_PTR gsSelectionMark, const AcGePoint3d& pickPoint, const AcGePoint3d& lastPoint,const AcGeMatrix3d& viewXform, AcGePoint3dArray& snapPoints, AcDbIntArray& geomIds) const;
|
|
|
|
AcDbObjectId layerId() const { return AcDbObjectId::kNull; }
|
|
AcDbObjectId DashLayer() const{ return AcDbObjectId::kNull; }
|
|
AcDbObjectId CenterLayer() const{ return AcDbObjectId::kNull; }
|
|
|
|
// 计算圆口斜接及承插的标准结构长度
|
|
double InsertLength(double dEndWidth, double dBr1Width, double dBr2Width, double dFlange,
|
|
double dAngle, AecHvac::HvacCrossType eType = AecHvac::eInsertCross) const;
|
|
|
|
// 得到边线宽
|
|
double GetEdgeLineWidth() const;
|
|
// 得到中心线宽
|
|
double GetCentLineWidth() const;
|
|
// 得到端线宽
|
|
double GetEndLineWidth() const;
|
|
//得到单线遮挡线宽
|
|
BOOL SetSingleDashWidth(double& dSta,double& dEnd,double& dBr1,double& dBr2) const;
|
|
// 四通是否水平放置
|
|
BOOL IsHorzAlignment() const;
|
|
// 四通是否垂直放置
|
|
BOOL IsVertAlignment() const;
|
|
//主管垂直
|
|
BOOL IsStartVertAlignment() const;
|
|
//支管垂直
|
|
BOOL IsBr1VertAlignment() const;
|
|
// 是否是单线四通
|
|
BOOL IsSingleLine() const;
|
|
BOOL HasBaseLine() const;
|
|
|
|
//返回两侧端面法向,起始侧面向外
|
|
AcGeVector3d GetSectNormal() const;
|
|
|
|
int AbleConnect(AcGeLine3d line1, AcGeLine3d line2, double dTick1, double dThick2) const;
|
|
BOOL IsValidConst() const;
|
|
|
|
//三维模型
|
|
// 特殊
|
|
BOOL DrawSpecial3d(AcGiDraw &mode) const;
|
|
// 普通
|
|
void DrawOrthoCross3d(AcGiDraw &mode) const;
|
|
// 承插
|
|
void DrawInsertCross3d(AcGiDraw &mode) const;
|
|
// 斜接
|
|
void DrawInclineCross3d(AcGiDraw &mode) const;
|
|
// 圆角
|
|
void DrawArcuateCross3d(AcGiDraw &mode) const;
|
|
// 直角
|
|
void DrawLinearCross3d(AcGiDraw &mode) const;
|
|
// 交叉
|
|
void DrawInterCross3d(AcGiDraw &mode) const;
|
|
|
|
//二维曲线
|
|
// 普通
|
|
BOOL MakeOrthoCross2dCurves(AecComplexCurve& cplCurve, int &nType) const;
|
|
// 承插
|
|
BOOL MakeInsertCross2dCurves(AecComplexCurve& cplCurve, int &nType, BOOL bIntub = FALSE) const;
|
|
// 斜接
|
|
BOOL MakeInclineCross2dCurves(AecComplexCurve& cplCurve, int &nType) const;
|
|
// 圆角
|
|
BOOL MakeArcuateCross2dCurves(AecComplexCurve& cplCurve, int &nType, BOOL bIntub = FALSE) const;
|
|
// 直角
|
|
BOOL MakeLinearCross2dCurves(AecComplexCurve& cplCurve, int &nType) const;
|
|
// 交叉
|
|
BOOL MakeInterCross2dCurves(AecComplexCurve& cplCurve, int &nType) const;
|
|
|
|
//辅助函数
|
|
BOOL GetInsertCirPts(AcGePoint3dArray& arPts) const;
|
|
|
|
//bDefault是否是isvaild函数调用
|
|
BOOL GetInclineCirPts(AcGePoint3dArray& arPts, BOOL bDefault = FALSE) const;
|
|
|
|
BOOL GetCrossPts(AcGePoint3dArray& arPts, BOOL bDefault = FALSE, BOOL bIs3D = FALSE) const;
|
|
|
|
BOOL GetCrossPtsCirRedu(AcGePoint3dArray& arPts) const;
|
|
|
|
BOOL GetIntersectCrossPts(AcGePoint3dArray& arPts, BOOL bDefault = FALSE) const;
|
|
BOOL GetArcuateCrossPts(AcGePoint3dArray& arPts, BOOL bDefault = FALSE) const;
|
|
BOOL GetIntersectWith(AcGePoint3d &pt1,AcGePoint3d &pt2,AcGeVector3d &vt1,AcGeVector3d &vt2,AcGePoint3d &ptIntersect) const;
|
|
BOOL GetIntersectWith(AcGePoint3d &pt1,AcGePoint3d &pt2,AcGePoint3d &pt3,AcGePoint3d &pt4,AcGePoint3d &ptIntersect) const;
|
|
BOOL GetCrossPtsVerCir(AcGePoint3dArray& arPts) const;
|
|
|
|
void GetPlusEdgePts(AcGePoint3dArray &arPts, AcGePoint3d &ptStart, AcGeVector3d &vtStart, AcGeVector3d &vtNor, double dSWidth) const;
|
|
void GetArcPoint(AcDbPolyline &polyLine, AcGePoint3dArray &ptArcArr) const;
|
|
|
|
AcGePoint3d GetPlusEdgeStartPt() const;
|
|
AcGePoint3d GetPlusEdgeEndPt() const;
|
|
AcGePoint3d GetPlusEdgeBra1Pt() const;
|
|
AcGePoint3d GetPlusEdgeBra2Pt() const;
|
|
|
|
//得到最终需要的点
|
|
AcGePoint3d GetFinalPt(AcGePoint3d ptStart,AcGePoint3d ptInter1,AcGePoint3d ptInter2,AcGePoint3d ptCor1,
|
|
AcGePoint3d ptCor2,AcGeVector3d vtStart,double dLength) const;
|
|
|
|
AcGePoint3d GetInterFinalPt(AcGePoint3d ptStart,AcGePoint3d ptInter1,AcGePoint3d ptInter2,AcGePoint3d ptCor1,
|
|
AcGePoint3d ptCor2,AcGeVector3d vtStart,double dLength) const;
|
|
|
|
AcGePoint3d GetInterBrPt(AcGePoint3d ptStart,AcGePoint3d ptInter1,AcGePoint3d ptInter2,AcGePoint3d ptCor1,
|
|
AcGePoint3d ptCor2,AcGeVector3d vtStart,double dLength) const;
|
|
|
|
//得到最终需要的点,End端点在直角类型下
|
|
AcGePoint3d GetFinalPtEnd(AcGePoint3d ptStart,AcGePoint3d ptInter1,AcGePoint3d ptInter2,AcGePoint3d ptCor1,
|
|
AcGePoint3d ptCor2,AcGeVector3d vtStart, double dPlusEnd = 50.0) const;
|
|
|
|
// 获取四通上下两面接口所在的8个点
|
|
BOOL GetInterfaceKeyPt(AcGePoint3dArray &ptUpArr, AcGePoint3dArray &ptDownArr) const;
|
|
|
|
BOOL GetInterfaceSizeData(int nIndex, AecInterface& inf) const;
|
|
|
|
BOOL DrawMesh(AcGiDraw &mode,const Adesk::UInt32 rows,const Adesk::UInt32 columns,const AcGePoint3d* pVertexList) const;
|
|
BOOL DrawShell(AcGiDraw &mode,const Adesk::UInt32 nbVertex,const AcGePoint3d* pVertexList,const Adesk::UInt32 faceListSize,const Adesk::Int32* pFaceList) const;
|
|
|
|
public:
|
|
|
|
AecDbObjXDataMap* m_pXDataMap;
|
|
AecDbEntityBase* m_pOwnerEnt;
|
|
AcDbObjectId m_idDashLayer;
|
|
AcDbObjectId m_idCenterLayer;
|
|
AcDbObjectId m_idDoubleLayer;
|
|
AcDbObjectId m_idDoubleLnType;
|
|
mutable AcDbVoidPtrArray m_ar3DDrableBufPtrs_;//临时缓存
|
|
};
|