78 lines
1.5 KiB
C++
78 lines
1.5 KiB
C++
//-------------------------------------------------------------------------------------------------------+
|
|
// Copyright (C), 1998-2007, Beijing Tangent Software Co. Ltd.
|
|
// = FileName : TPGeCurveMesh 类
|
|
// = Version : ver2.0
|
|
// = Author : wlw
|
|
// = CreateDate : 2002-09-09
|
|
// = Description: TPGeCurveMesh 声明 拓扑网络
|
|
// = Maintainers:
|
|
//
|
|
//-------------------------------------------------------------------------------------------------------+
|
|
|
|
#ifndef _TPGECURVEMESH_H_
|
|
#define _TPGECURVEMESH_H_
|
|
|
|
#ifndef _TPDLIST_H_
|
|
#include "TPDList.h"
|
|
#endif
|
|
|
|
#ifndef _TGMESH_H_
|
|
#include "TGMesh.h"
|
|
#endif
|
|
|
|
#ifndef _TGMESHNODE_H_
|
|
#include "TGMeshNode.h"
|
|
#endif
|
|
|
|
class GEOAPI TPGeCurveMesh
|
|
{
|
|
|
|
friend class TPGeCurveMesh;
|
|
|
|
public:
|
|
|
|
//要求输入曲线是完全打断的,但允许有重线
|
|
TPGeCurveMesh(const TGObjectList &buf,bool bOnlyClose = true);
|
|
|
|
virtual ~TPGeCurveMesh();
|
|
|
|
void AppendCurve(const TPGeCurve2D* pCurve);
|
|
|
|
//去开放边
|
|
void RemoveOpenEdge();
|
|
|
|
void FindAllMesh();
|
|
|
|
//按原曲线方向搜索边界路径
|
|
void FindAllSDMesh();
|
|
|
|
void CreateRegion(TGObjectList& lstRegion,TGObjectList& lstHole);
|
|
|
|
//根据连接关系分解为独立的子网
|
|
void Explode(TPDList<TPGeCurveMesh> &lstChildMesh);
|
|
|
|
bool operator > (const TPGeCurveMesh&) const;
|
|
|
|
bool operator < (const TPGeCurveMesh&) const;
|
|
|
|
public:
|
|
|
|
//结果
|
|
TPDList< TGMesh > m_allMesh;
|
|
|
|
protected:
|
|
|
|
TPGeCurveMesh();
|
|
|
|
TGMeshNode* FindOrAddNode(const TGPoint&pt);
|
|
|
|
protected:
|
|
|
|
//所有节点
|
|
TPDListEx<TGMeshNode> m_allNode;
|
|
|
|
//所有边
|
|
TPDList<TGMeshEdge> m_allEdge;
|
|
};
|
|
|
|
#endif |