Files
envi-code/SourceCode/Code2026/tg_shs/shs_pipebase/TEImpCabOffset.h
T
2026-09-28 15:28:50 +08:00

168 lines
5.6 KiB
C++

#ifndef _TEIMPCABOFFSET_H__
#define _TEIMPCABOFFSET_H__
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include "TImpSpecFitting.h"
class TEImpCabOffset : public TImpSpecFitting
{
public:
TEImpCabOffset();
virtual ~TEImpCabOffset();
public:
// 接口描述对象
virtual BOOL GetInterface(int nIndex,TInterface& pipeInterface) const;
virtual BOOL GetInterface(const AcGePoint3d& ptCon,TInterface& pipeInterface) const;
virtual BOOL HasInterface(const AcGePoint3d& ptCon,const AcGeVector3d& vtDir);
virtual int GetInterfaceCount() const;
// 建立接口关联关系
virtual BOOL SetInterfaceRelation(const AcGePoint3d& ptConnect,const AcDbObjectId& idConnect);
// 移除接口关联关系
virtual BOOL RemoveInterfaceRelation(const AcGePoint3d& ptConnect,const AcDbObjectId& idConnect);
// 接口更改通知
virtual BOOL NotifyInterfaceToModify(const TInterfaceModifyMsg& iModiMsg,TInterfaceModifyMsgs& iModiMsgs);
virtual TDb::Position ExplainGripIndex(int nIndex) const;
virtual void GetKindName(CString& sName);
public:
virtual BOOL GetCurvesInSide(TComplexCurve& compCurve) const;
virtual BOOL MakePolyCurveFaces(AcDbVoidPtrArray& arFaces);
//连接线根据需要去掉
virtual BOOL NoneConectLineIfNeed(TComplexCurve& cplCurve) const;
virtual BOOL MakeCurves(TComplexCurve& cplCurve) const;
virtual AcDbPolyline* MakePolyCurve() const;
virtual void GetTips(CMapStringToString& mapLable2Tip) const;
//获取三维的壳对象
virtual int GetXBaseShell(TXShell& xShell);
//获取体的范围方块
virtual int GetBodyBox(AcDbExtents& ext);
//左偏乙字弯
int MakeHorLeftOffsetShell(TXShell& xShell) const;
//右偏乙字弯
int MakeHorRightOffsetShell(TXShell& xShell) const;
//垂直乙字弯
int MakeVerOffsetShell(TXShell& xShell) const;
int GetBodyBoxHorLeftOffsetShell(AcDbExtents& ext);
int GetBodyBoxHorRightOffsetShell(AcDbExtents& ext);
int GetBodyBoxVerOffsetShell(AcDbExtents& ext);
void AppendAcDbExtents(std::vector<AcGePoint3d>& vctpt,AcDbExtents& ext);
// add by 2011.02.21 剖切功能 注意 GetSection内不应将std::vector<TObjSectionRecord>参数清空
virtual bool GetSection(const AcDbFace &face, const AcGeVector3d &vtPlaneSecDir,
std::vector<TObjSectionRecord> &sectionRecord, AcDbVoidPtrArray& arFillPtrs) const;
// 剖切用,返回Z坐标最高、最低点
virtual Acad::ErrorStatus GetExtents(TADSGePoint3d &ptLow, TADSGePoint3d &ptUp) const;
public:
//{{AFX_ARX_METHODS(TEImpCabElbow)
virtual Acad::ErrorStatus ExplodeOrDraw2d(XExplodeDraw &mode) const;
virtual Acad::ErrorStatus ExplodeOrDraw3d(XExplodeDraw &mode) const;
virtual Acad::ErrorStatus transformBy(const AcGeMatrix3d& xform);
virtual Acad::ErrorStatus moveStretchPointsAt(const AcDbIntArray& indices,
const AcGeVector3d& offset);
virtual Acad::ErrorStatus moveGripPointsAt(const AcDbIntArray& indices,
const AcGeVector3d& offset);
virtual Acad::ErrorStatus getStretchPoints(AcGePoint3dArray& stretchPoints) const;
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 void list() const;
virtual CString GetXml() const;
virtual CString GetXml(const AcGeMatrix3d& mat) const;
virtual Acad::ErrorStatus getClassID(CLSID* pClsid) const;
//}}AFX_ARX_METHODS
private:
//左偏乙字弯
BOOL MakeHorLeftOffsetCurves(TComplexCurve& cplCurve) const;
//右偏乙字弯
BOOL MakeHorRightOffsetCurves(TComplexCurve& cplCurve) const;
//垂直乙字弯
BOOL MakeVerOffsetCurves(TComplexCurve& cplCurve) const;
//生成完整的CURVE
BOOL MakeBaseCurves(TComplexCurve& cplCurve) const;
BOOL OnMoveGripPointMsgNotify(const TInterfaceModifyMsg& iModiMsg,TInterfaceModifyMsgs& iModiMsgs);
BOOL OnTransformByMsgNotify(const TInterfaceModifyMsg& iModiMsg,TInterfaceModifyMsgs& iModiMsgs);
BOOL OnSizeMsgNotify(const TInterfaceModifyMsg& iModiMsg,TInterfaceModifyMsgs& iModiMsgs);
CString GetCurrentTypeName() const;
//获取中心线
BOOL GetOffsetMidLine(TComplexCurve& compCurve) const;
// 获取垂足点
BOOL GetVerticalFootPoint(const AcGePoint3d& pickPoint,const AcGePoint3d& lastPoint,AcGePoint3d& ptVerFoot) const;
// 获取最近点
BOOL GetNearestPoint(const AcGePoint3d& pickPoint,
AcGePoint3d& ptNear) const;
//创建面
AcDbFace* CreateAcDbFace(const AcGePoint3d& pt1,
const AcGePoint3d& pt2,
const AcGePoint3d& pt3,
const AcGePoint3d& pt4);
Acad::ErrorStatus ExplodeOrHorLeftDraw3d(XExplodeDraw &mode) const;
Acad::ErrorStatus ExplodeOrHorRightDraw3d(XExplodeDraw &mode) const;
Acad::ErrorStatus ExplodeOrVerDraw3d(XExplodeDraw &mode) const;
// 判断实体是否为桥架
BOOL MakesureIsPipe(const AcDbObjectId& id) const;
BOOL GetIndexOfPointIsOn(TComplexCurve& cplCurv,const AcGePoint3d& ptOn,int& nIndex) const;
AcDbFace* CreateAcDbFace(const AcGePoint3d& pt1,
const AcGePoint3d& pt2,
const AcGePoint3d& pt3,
const AcGePoint3d& pt4) const;
Acad::ErrorStatus ExplodeOrDraw3dOfC(XExplodeDraw &mode) const;
Acad::ErrorStatus ExplodeOrDraw3dOfP(XExplodeDraw &mode) const;
Acad::ErrorStatus ExplodeOrDraw3dOfT(XExplodeDraw &mode) const;
Acad::ErrorStatus ExplodeOrHorLeftDraw3dOfT(XExplodeDraw &mode) const;
Acad::ErrorStatus ExplodeOrHorRightDraw3dOfT(XExplodeDraw &mode) const;
Acad::ErrorStatus ExplodeOrVerDraw3dOfT(XExplodeDraw &mode) const;
void DrawCube(XExplodeDraw &mode,const AcGeVector3d &vtDir, const AcGePoint3dArray &ptArr, double dThick) const;
};
#endif // !defined(AFX_TEIMPCABOFFSET_H__ADEDE82D_77B4_4792_BC86_BB7887E42797__INCLUDED_)