Files
envi-code/SourceCode/Code2026/tg_shs/shs_pipewire/DbCanalFitting.h
T

32 lines
1.4 KiB
C++
Raw Normal View History

2026-10-04 00:04:20 +08:00
#ifndef DbCanalFitting
2026-09-28 15:28:50 +08:00
#define DbCanalFitting
/*
2026-10-04 00:04:20 +08:00
* 方沟连接件
2026-09-28 15:28:50 +08:00
*/
class TDbPipeFitting;
class TDbCanalFitting
{
public:
TDbCanalFitting(const TDbPipeFitting *pFitting);
~TDbCanalFitting();
2026-10-04 00:04:20 +08:00
// 方沟与连接件的交点(ptLeft\ptRight为方沟相对于连接件的左右交点,连接件面对方沟方向)
2026-09-28 15:28:50 +08:00
bool IntersectWith(const AcDbObjectId &idLinkedCanal, AcGePoint3d &ptLeft, AcGePoint3d &ptRight) const;
public:
virtual Acad::ErrorStatus ExplodeOrDraw2d(XExplodeDraw &dc) const;
virtual Acad::ErrorStatus ExplodeOrDraw3d(XExplodeDraw &dc) const;
private:
2026-10-04 00:04:20 +08:00
// 方沟彼此求交
2026-09-28 15:28:50 +08:00
bool CanalInersect(std::vector<AcDbObjectId> &vecCanalId, std::vector<std::pair<XPoint, XPoint> > &vecInt) const;
2026-10-04 00:04:20 +08:00
// 根据方沟样式调整交点
2026-09-28 15:28:50 +08:00
void ModifyCanalInts(std::vector<AcDbObjectId> &vecCanalId, std::vector<std::pair<XPoint, XPoint> > &vecInt) const;
2026-10-04 00:04:20 +08:00
// 绘制连接件
2026-09-28 15:28:50 +08:00
void DrawFitting(XExplodeDraw &dc, std::vector<AcDbObjectId> &vecCanalId, std::vector<std::pair<XPoint, XPoint> > &vecOriginInt, std::vector<std::pair<XPoint, XPoint> > &vecModifiedInt) const;
2026-10-04 00:04:20 +08:00
// 绘制方沟间的弧线连接线
2026-09-28 15:28:50 +08:00
void DrawArcLinkCurve(XExplodeDraw &dc, XPoint ptInt, XCurveSegment segLeft, XCurveSegment segRight, XPoint ptLeft, XPoint ptRight, double dWeight, Adesk::UInt16 nColor, double dLinetypeScale) const;
private:
const TDbPipeFitting *m_pPipeFitting;
std::map<AcDbObjectId, std::pair<XPoint, XPoint> > m_mapInt;
};
#endif