233 lines
8.2 KiB
C++
233 lines
8.2 KiB
C++
// 暖通弯头实现类
|
|
//
|
|
// 弯头示意图:
|
|
// 水平放置: 垂直放置:
|
|
// ┏━━━━━━━━━━━┓ ┏━━━━━┓
|
|
// ┃ ┃ ┃ ④ ┃
|
|
// ┃ ┃ ┃ ┃
|
|
// ④①━━━━━━━━③ ┃ ┃ ① ┃
|
|
// ┃ ┃ ┃ ┃ ┃
|
|
// ┃ ┃ ┃ ┃ ③ ┃
|
|
// ┗━━━━━┓ ┃ ┃ ┣━━━━━┫
|
|
// ┃ ┃ ┃ ┃ ┃
|
|
// ┃ ┃ ┃ ┃ ┃
|
|
// ┃ ┃ ┃ ┃ ┃
|
|
// ┃ ┃ ┃ ┃ ┃
|
|
// ┗━━②━━┛ ┗━━②━━┛
|
|
// ⑤ ⑤
|
|
//
|
|
// 夹点说明:
|
|
// ①: 弯头左端移动点
|
|
// ②: 弯头下端移动点
|
|
// ③: 中心命令激活点
|
|
// ④: 左端命令激活点
|
|
// ⑤: 下端命令激活点
|
|
|
|
|
|
#ifndef __IMPHVACELBOW_H__
|
|
#define __IMPHVACELBOW_H__
|
|
|
|
#if _MSC_VER > 1000
|
|
#pragma once
|
|
#endif
|
|
|
|
#include "AecComplexCurveDraw.h"
|
|
#include "AcGiDraw.h"
|
|
class AecDbObjXDataMap;
|
|
class AecDbEntityBase;
|
|
class ImpHvacElbow
|
|
{
|
|
public:
|
|
ImpHvacElbow();
|
|
virtual ~ImpHvacElbow();
|
|
|
|
public:
|
|
Acad::ErrorStatus Draw2d(AcGiDraw &dc) const;
|
|
Acad::ErrorStatus Draw3d(AcGiDraw &dc) const;
|
|
|
|
bool GetInterface(AcArray<AecInterface>& arInfs) const;
|
|
|
|
Acad::ErrorStatus transformBy(const AcGeMatrix3d& xform);
|
|
AecEqui::Position ExplainGripIndex(int nIndex) const;
|
|
|
|
AcGeVector3d normal() const;
|
|
void list() const;
|
|
|
|
void Move3DBuffer(AcDbVoidPtrArray& ar3DBuffer) const;
|
|
bool Has3DBuffer() const;
|
|
|
|
protected:
|
|
|
|
BOOL MakeCurves(AecComplexCurve& cplCurve) const;
|
|
BOOL GetCurvesInSide(AecComplexCurve& compCurve) const;
|
|
|
|
AcDbObjectId layerId() const;
|
|
AcDbObjectId DashLayer() const;
|
|
AcDbObjectId CenterLayer() const;
|
|
|
|
// 得到边线宽
|
|
double GetEdgeLineWidth() const;
|
|
// 得到中心线宽
|
|
double GetCentLineWidth() const;
|
|
// 得到端线宽
|
|
double GetEndLineWidth() const;
|
|
|
|
// 弯头是否水平放置
|
|
BOOL IsHorzAlignment() const;
|
|
// 弯头是否垂直放置
|
|
BOOL IsVertAlignment() const;
|
|
// 弯头是否倾斜放置
|
|
BOOL IsInclineAlignment() const;
|
|
|
|
// 是否是单线弯头
|
|
BOOL IsSingleLine() const;
|
|
BOOL HasBaseLine() const;
|
|
|
|
BOOL IsArcuate() const;
|
|
|
|
// 内外圆弧
|
|
//三维绘制函数
|
|
void DrawAllArcuate3d(AcGiDraw &mode) const;
|
|
|
|
// 构建二维图形
|
|
BOOL MakeAllArcuate2DCurves(AecComplexCurve& cplCurve,int &nType) const;
|
|
// 内外圆弧消声
|
|
//三维绘制函数
|
|
void DrawAllArcWrap3d(AcGiDraw &mode) const;
|
|
|
|
// 构建二维图形
|
|
BOOL MakeAllArcWrap2DCurves(AecComplexCurve& cplCurve,int &nType) const;
|
|
|
|
// 消声弯头
|
|
//三维绘制函数
|
|
void DrawAllArcInWrap3d(AcGiDraw &mode) const;
|
|
|
|
// 构建二维图形
|
|
BOOL MakeAllArcInWrap2DCurves(AecComplexCurve& cplCurve,int &nType) const;
|
|
// 分段拟合
|
|
//三维绘制函数
|
|
void DrawSegmental3d(AcGiDraw &mode) const;
|
|
// 构建二维图形
|
|
BOOL MakeSegmental2DCurves(AecComplexCurve& cplCurve,int &nType) const;
|
|
// 构建分段拟合倾斜二维图形
|
|
BOOL MakeSegmental2DInc(AecComplexCurve& cplCurve,int &nType) const;
|
|
// 内斜线
|
|
//三维绘制函数
|
|
void DrawIncline3d(AcGiDraw &mode) const;
|
|
|
|
// 构建二维图形
|
|
BOOL MakeIncline2DCurves(AecComplexCurve& cplCurve,int &nType) const;
|
|
|
|
// 内斜线消声
|
|
//三维绘制函数
|
|
void DrawInclineWrap3d(AcGiDraw &mode) const;
|
|
|
|
// 构建二维图形
|
|
BOOL MakeInclineWrap2DCurves(AecComplexCurve& cplCurve,int &nType) const;
|
|
|
|
// 内斜线隔板消声
|
|
//三维绘制函数
|
|
void DrawInclineBoard3d(AcGiDraw &mode) const;
|
|
|
|
// 构建二维图形
|
|
BOOL MakeInclineBoard2DCurves(AecComplexCurve& cplCurve,int &nType) const;
|
|
|
|
// 内斜线导流
|
|
//三维绘制函数
|
|
void DrawInclineLead3d(AcGiDraw &mode) const;
|
|
|
|
// 构建二维图形
|
|
BOOL MakeInclineLead2DCurves(AecComplexCurve& cplCurve,int &nType) const;
|
|
|
|
// 内弧线
|
|
//三维绘制函数
|
|
void DrawArcuate3d(AcGiDraw &mode) const;
|
|
|
|
// 构建二维图形
|
|
BOOL MakeArcuate2DCurves(AecComplexCurve& cplCurve,int &nType) const;
|
|
|
|
// 内弧线消声
|
|
//三维绘制函数
|
|
void DrawArcuateWrap3d(AcGiDraw &mode) const;
|
|
|
|
// 构建二维图形
|
|
BOOL MakeArcuateWrap2DCurves(AecComplexCurve& cplCurve,int &nType) const;
|
|
|
|
// 内弧线隔板消声
|
|
//三维绘制函数
|
|
void DrawArcuateBoard3d(AcGiDraw &mode) const;
|
|
|
|
// 构建二维图形
|
|
BOOL MakeArcuateBoard2DCurves(AecComplexCurve& cplCurve,int &nType) const;
|
|
|
|
// 内弧线筛板消声
|
|
//三维绘制函数
|
|
void DrawArcuateSieve3d(AcGiDraw &mode) const;
|
|
|
|
// 构建二维图形
|
|
BOOL MakeArcuateSieve2DCurves(AecComplexCurve& cplCurve,int &nType) const;
|
|
|
|
// 内弧线导流
|
|
//三维绘制函数
|
|
void DrawArcuateLead3d(AcGiDraw &mode) const;
|
|
|
|
// 构建二维图形
|
|
BOOL MakeArcuateLead2DCurves(AecComplexCurve& cplCurve,int &nType) const;
|
|
|
|
// 内外直角
|
|
//三维绘制函数
|
|
void DrawAllOrtho3d(AcGiDraw &mode) const;
|
|
|
|
// 构建二维图形
|
|
BOOL MakeAllOrtho2DCurves(AecComplexCurve& cplCurve,int &nType) const;
|
|
|
|
// 内外直角消声
|
|
//三维绘制函数
|
|
void DrawOrthoWrap3d(AcGiDraw &mode) const;
|
|
|
|
// 构建二维图形
|
|
BOOL MakeOrthoWrap2DCurves(AecComplexCurve& cplCurve,int &nType) const;
|
|
|
|
// 内外直角导流
|
|
void DrawOrthoLead3d(AcGiDraw &mode) const;
|
|
|
|
// 构建二维图形
|
|
BOOL MakeOrthoLead2DCurves(AecComplexCurve& cplCurve,int &nType) const;
|
|
|
|
//三维模型
|
|
void DrawAllArcuate3dRec(AcGiDraw &mode) const;
|
|
void DrawAllArcuate3dCir(AcGiDraw &mode) const;
|
|
|
|
BOOL GetIntersectWith(AcGePoint3d &pt1,AcGePoint3d &pt2,AcGeVector3d &vt1,AcGeVector3d &vt2,AcGePoint3d &ptIntersect) const;
|
|
BOOL GetPtOnArc(AcGePoint3d &ptStart,AcGePoint3d &ptCorner,AcGePoint3d &ptEnd,double &dPlusEdge) const;
|
|
BOOL GetPtOnArcExt(AcGePoint3d &ptStartArc, const AcGePoint3d &ptCorStart, AcGePoint3d &ptEndArc, const AcGePoint3d &ptCorEnd, AcGePoint3d &ptOnArcOut, double &dPlusEdge) const;
|
|
|
|
BOOL GetPrjPts(AcGePoint3dArray &arPtsU, AcGePoint3dArray &arPtsD) const;
|
|
BOOL DrawAllArcuate2DInc(AecComplexCurve& cplCurve,int &nType) const;
|
|
BOOL GetAllArcuateCplCurveInc(AecComplexCurve& cplCurve,int &nType,AcGePoint3d& ptStart, AcGePoint3d& ptCorner,AcGePoint3d& ptEnd,double& dPlusEdge,double& dDiameterS,double& dDiameterE,int& nWrapType) const;
|
|
BOOL DrawAllArcuate2DHor(AecComplexCurve& cplCurve,int &nType) const;
|
|
BOOL DrawAllArcuate2DVer(AecComplexCurve& cplCurve,int &nType) const;
|
|
BOOL GetAllArcuateCplCurveHor(AecComplexCurve& cplCurve,int &nType,AcGePoint3d& ptStart, AcGePoint3d& ptCorner,AcGePoint3d& ptEnd,double& dPlusEdge,double& dDiameterS,double& dDiameterE,int& nWrapType) const;
|
|
BOOL GetAllArcuateCplCurveVerRec(AecComplexCurve& cplCurve,int &nType,AcGePoint3d& ptStart, AcGePoint3d& ptCorner,AcGePoint3d& ptEnd,double& dPlusEdge,double& dDiameterS,double& dDiameterE,double& dThick, double& dEndThick) const;
|
|
BOOL GetAllArcuateCplCurveVerRecForOffset(AecComplexCurve& cplCurve, int &nType) const;
|
|
BOOL GetAllArcuateCplCurveVerCir(AecComplexCurve& cplCurve,int &nType,AcGePoint3d& ptStart, AcGePoint3d& ptCorner,AcGePoint3d& ptEnd,double& dPlusEdge,double& dDiameterS,double& dDiameterE) const;
|
|
BOOL GetInclineCplCurveHor(AecComplexCurve& cplCurve,int &nType,AcGePoint3d& ptStart, AcGePoint3d& ptCorner,AcGePoint3d& ptEnd,double& dPlusEdge,double& dDiameterS,double& dDiameterE) const;
|
|
BOOL GetPtsSegmentalHor(AcGePoint3dArray& pts) const;
|
|
BOOL GetArcuateCplCurveHor(AecComplexCurve& cplCurve,int &nType,AcGePoint3d& ptStart, AcGePoint3d& ptCorner,AcGePoint3d& ptEnd,double& dPlusEdge,double& dDiameterS,double& dDiameterE) const;
|
|
BOOL GetAllOrthoCplCurveHor(AecComplexCurve& cplCurve,int &nType,AcGePoint3d& ptStart, AcGePoint3d& ptCorner,AcGePoint3d& ptEnd,double& dPlusEdge,double& dDiameterS,double& dDiameterE) const;
|
|
|
|
BOOL DrawMesh(AcGiDraw &mode,const Adesk::UInt32 rows,const Adesk::UInt32 columns,const AcGePoint3d* pVertexList) const;
|
|
|
|
public:
|
|
AecDbObjXDataMap* m_pXDataMap;
|
|
AecDbEntityBase* m_pOwnerEnt;
|
|
AcDbObjectId m_idDashLayer;
|
|
AcDbObjectId m_idCenterLayer;
|
|
AcDbObjectId m_idDoubleLayer;
|
|
AcDbObjectId m_idDoubleLnType;
|
|
|
|
mutable AcDbVoidPtrArray m_ar3DDrableBufPtrs_;//临时缓存
|
|
};
|
|
|
|
#endif
|