165 lines
6.2 KiB
C++
165 lines
6.2 KiB
C++
#ifndef _TEImpCabletry_H__
|
|
#define _TEImpCabletry_H__
|
|
|
|
#if _MSC_VER > 1000
|
|
#pragma once
|
|
#endif
|
|
|
|
#ifndef _TDBIMPPIPEBASE_H__
|
|
#include "TDbImpPipeBase.h"
|
|
#endif
|
|
|
|
#include <vector>
|
|
|
|
class TDbPipeBase;
|
|
class TEImpCabletry : public TDbImpPipeBase
|
|
{
|
|
public:
|
|
TEImpCabletry();
|
|
TEImpCabletry(TDbPipeBase* pOwner);
|
|
virtual ~TEImpCabletry();
|
|
|
|
// 接口更改通知
|
|
virtual BOOL NotifyInterfaceToModify(const TInterfaceModifyMsg& iModiMsg,TInterfaceModifyMsgs& iModiMsgs);
|
|
|
|
virtual TDb::Position ExplainGripIndex(int nIndex) const;
|
|
|
|
virtual void UpdateNormal(const AcGePoint3d& ptOld,const AcGePoint3d& ptNew);
|
|
|
|
virtual void GetTips(CMapStringToString& mapLable2Tip) const;
|
|
|
|
public:
|
|
//{{AFX_ARX_METHODS(TDbPipeBase)
|
|
virtual Acad::ErrorStatus ExplodeOrDraw2d(XExplodeDraw &mode) const;
|
|
virtual Acad::ErrorStatus ExplodeOrDraw3d(XExplodeDraw &mode) const;
|
|
virtual Acad::ErrorStatus transformBy(const AcGeMatrix3d& xform);
|
|
virtual Acad::ErrorStatus moveGripPointsAt(const AcDbIntArray& indices,
|
|
const AcGeVector3d& offset);
|
|
virtual Acad::ErrorStatus getGripPoints(AcGePoint3dArray& gripPoints,
|
|
AcDbIntArray& osnapModes,
|
|
AcDbIntArray& geomIds) const;
|
|
virtual Acad::ErrorStatus getOsnapPoints(AcDb::OsnapMode osnapMode,
|
|
INT_PTR gsSelectionMark,
|
|
const AcGePoint3d& pickPoint,
|
|
const AcGePoint3d& lastPoint,
|
|
const AcGeMatrix3d& viewXform,
|
|
AcGePoint3dArray& snapPoints,
|
|
AcDbIntArray& geomIds) const;
|
|
virtual Acad::ErrorStatus getClassID(CLSID* pClsid) const;
|
|
virtual Acad::ErrorStatus intersectWith(const AcDbEntity* pEnt,
|
|
AcDb::Intersect intType,
|
|
const AcGePlane& projPlane,
|
|
AcGePoint3dArray& points,
|
|
INT_PTR thisGsMarker = 0,
|
|
INT_PTR otherGsMarker = 0) const;
|
|
virtual Acad::ErrorStatus intersectWith(const AcDbEntity* pEnt,
|
|
AcDb::Intersect intType,
|
|
AcGePoint3dArray& points,
|
|
INT_PTR thisGsMarker = 0,
|
|
INT_PTR otherGsMarker = 0) const;
|
|
virtual void list() const;
|
|
virtual CString GetXml() const;
|
|
virtual CString GetXml(const AcGeMatrix3d& mat) const;
|
|
|
|
// add by 2011.02.21 剖切功能 注意 GetSection内不应将std::vector<TObjSectionRecord>参数清空
|
|
virtual bool GetSection(const AcDbFace &face, const AcGeVector3d &vtPlaneSecDir,
|
|
std::vector<TObjSectionRecord> §ionRecord, AcDbVoidPtrArray& arFillPtrs) const;
|
|
|
|
// 剖切用,返回Z坐标最高、最低点
|
|
virtual Acad::ErrorStatus GetExtents(TADSGePoint3d &ptLow, TADSGePoint3d &ptUp) const;
|
|
//}}AFX_ARX_METHODS
|
|
|
|
public:
|
|
|
|
virtual BOOL MakeCurves(TComplexCurve& cplCurve) const;
|
|
|
|
virtual BOOL GetCurvesInSide(TComplexCurve& compCurve) const;
|
|
|
|
virtual AcDbPolyline* MakePolyCurve() const;
|
|
|
|
virtual BOOL MakePolyCurveFaces(AcDbVoidPtrArray& arFaces);
|
|
|
|
virtual BOOL NoneConectLineIfNeed(TComplexCurve& cplCurve) const;
|
|
|
|
//获取三维的壳对象
|
|
virtual int GetXBaseShell(TXShell& xShell);
|
|
|
|
//获取体的范围方块
|
|
virtual int GetBodyBox(AcDbExtents& ext);
|
|
|
|
//获取弧形桥架在指定点上的隔板方向
|
|
void GetClapDirByPt(const AcGePoint3d& pt,AcGeVector3d& vtDir);
|
|
|
|
//add by axc 2013.6.28 封装剖切面辐射电缆显示函数
|
|
void GetCirCenter(std::vector<double> &vecRadius,std::vector<AcGePoint3d> &vecCenter,double &dCableWidth) const;
|
|
//add by axc 2013.7.15 增加敷设电缆拟合函数
|
|
void TEImpCabletry::FittingCircle(std::vector<AcGePoint3d> &vecpt3d/*拟合圆的点*/,double &dRadius
|
|
,AcGePoint3d &ptCenter/*投影点圆心 */) const;
|
|
|
|
private:
|
|
|
|
BOOL OnTransformMsgNotify(const TInterfaceModifyMsg& iModiMsg,TInterfaceModifyMsgs& iModiMsgs);
|
|
|
|
BOOL OnMoveGripPointMsgNotify(const TInterfaceModifyMsg& iModiMsg,TInterfaceModifyMsgs& iModiMsgs);
|
|
|
|
BOOL MakeSeglineCurEls(AcGePoint3d& ptGe3,AcGePoint3d& ptGe2,AcGeVector3d& vtLine,TComplexCurve& cplCurve) const;
|
|
|
|
BOOL MakeArcSegLineCurEls(AcGeCircArc3d& arcMid,const double& dWidth,TComplexCurve& cplCurve) const;
|
|
|
|
BOOL GetIndexOfPointIsOn(TComplexCurve& cplCurv,const AcGePoint3d& ptOn,int& nIndex) const;
|
|
|
|
CString GetCurrentTypeName() const;
|
|
|
|
// 判断实体是否为桥架
|
|
BOOL MakesureIsPipe(const AcDbObjectId& id) const;
|
|
// 首尾标高不同添加线段
|
|
void AddArrowLinesWhenDifEl(TComplexCurve& compCurve) const;
|
|
// 绘制电缆沟
|
|
BOOL MakeCurvesOfCableGouge(TComplexCurve& cplCurve) const;
|
|
// 单边
|
|
BOOL MakeCurvesOfCableGougeSide(TComplexCurve& cplCurve) const;
|
|
// 双边对立
|
|
BOOL MakeCurvesOfCableGougeOrder(TComplexCurve& cplCurve) const;
|
|
// 双边交错
|
|
BOOL MakeCurvesOfCableGougeInter(TComplexCurve& cplCurve) const;
|
|
// tsj Add2009.7.14
|
|
// 获取垂足点
|
|
BOOL GetVerticalFootPoint(const AcGePoint3d& pickPoint,const AcGePoint3d& lastPoint,AcGePoint3d& ptVerFoot) const;
|
|
// 获取最近点
|
|
BOOL GetNearestPoint(const AcGePoint3d& pickPoint,AcGePoint3d& ptNear) const;
|
|
// 获取中心线
|
|
BOOL GetCableMidLine(TComplexCurve& compCurve) const;
|
|
|
|
// 盘式桥架
|
|
Acad::ErrorStatus ExplodeOrDraw3dOfP(XExplodeDraw &mode) const;
|
|
|
|
// 槽式桥架
|
|
Acad::ErrorStatus ExplodeOrDraw3dOfC(XExplodeDraw &mode) const;
|
|
//槽式弧形桥架
|
|
Acad::ErrorStatus ExplodeOrDrawArc3dOfC(XExplodeDraw &mode) const;
|
|
|
|
// 梯式桥架
|
|
Acad::ErrorStatus ExplodeOrDraw3dOfT(XExplodeDraw &mode) const;
|
|
//梯式弧形桥架 lsd 2013-11-1
|
|
Acad::ErrorStatus ExplodeOrDrawArc3dOfT(XExplodeDraw &mode) const;
|
|
//梯式弧形桥架段
|
|
Acad::ErrorStatus DrawArcSectT(XExplodeDraw &mode,const AcGePoint3d& ptS,const AcGePoint3d& ptE,const AcGePoint3d& ptCenter,const AcGeVector3d& vtNor,double dW,double dH,BOOL bCover) const;
|
|
//绘制长方体
|
|
void DrawCube(XExplodeDraw &mode,const AcGeVector3d &vtDir, const std::vector<AcGePoint3d> &pVerList, double dThick) const;
|
|
Acad::ErrorStatus DrawArcSect(XExplodeDraw &mode,const AcGePoint3d& ptS,const AcGePoint3d& ptE,const AcGePoint3d& ptCenter,
|
|
const AcGeVector3d& vtNor,double dW,double dH,BOOL bCover = FALSE) const;
|
|
|
|
void ModyfyClapVector(const AcGeVector3d& vtOld,const AcGeVector3d& vtNew);
|
|
|
|
//弧形桥架
|
|
BOOL GetArcCurvesInSide(TComplexCurve& compCurve) const;
|
|
BOOL MakeArcCurves(TComplexCurve& compCurve) const;
|
|
|
|
|
|
//add by bsl 增加移动方向控制,如果 2端控件 主方向不平行,则返回false
|
|
BOOL GetMoveDirect(AcGeVector3d& vtDir);
|
|
|
|
};
|
|
|
|
#endif //_TEImpCabletry_H__
|