#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 &vecCanalId, std::vector > &vecInt) const; // 根据方沟样式调整交点 void ModifyCanalInts(std::vector &vecCanalId, std::vector > &vecInt) const; // 绘制连接件 void DrawFitting(XExplodeDraw &dc, std::vector &vecCanalId, std::vector > &vecOriginInt, std::vector > &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 > m_mapInt; }; #endif