32 lines
1.4 KiB
C++
32 lines
1.4 KiB
C++
#ifndef DbCanalFitting
|
|
#define DbCanalFitting
|
|
|
|
/*
|
|
* 方沟连接件
|
|
*/
|
|
class TDbPipeFitting;
|
|
class TDbCanalFitting
|
|
{
|
|
public:
|
|
TDbCanalFitting(const TDbPipeFitting *pFitting);
|
|
~TDbCanalFitting();
|
|
// 方沟与连接件的交点(ptLeft\ptRight为方沟相对于连接件的左右交点,连接件面对方沟方向)
|
|
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:
|
|
// 方沟彼此求交
|
|
bool CanalInersect(std::vector<AcDbObjectId> &vecCanalId, std::vector<std::pair<XPoint, XPoint> > &vecInt) const;
|
|
// 根据方沟样式调整交点
|
|
void ModifyCanalInts(std::vector<AcDbObjectId> &vecCanalId, std::vector<std::pair<XPoint, XPoint> > &vecInt) const;
|
|
// 绘制连接件
|
|
void DrawFitting(XExplodeDraw &dc, std::vector<AcDbObjectId> &vecCanalId, std::vector<std::pair<XPoint, XPoint> > &vecOriginInt, std::vector<std::pair<XPoint, XPoint> > &vecModifiedInt) const;
|
|
// 绘制方沟间的弧线连接线
|
|
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 |