#pragma once #ifdef _WIN32 #ifdef WIREROUTINGDLL_EXPORTS // VisualStudio DLL 项目模板会将 _EXPORTS 添加到定义预处理器宏。 #define BRANCH_TREE_API __declspec(dllexport) // _WIN32 #else #define BRANCH_TREE_API __declspec(dllimport) #endif #else #define BRANCH_TREE_API #endif #include "BasicEdge.h" #include #include #include #include #include #include #include using namespace std; extern BasicEdge BRANCH_TREE_API basicEdge; struct BRANCH_TREE_API Edge{ vector wirenames; vector d; int to; double dis; void clear(); }; //分支树结构,把各种路径信息处理成分支信息,并输出给CATIA struct BRANCH_TREE_API BranchTree{ ClipSet* pclipSet; //指向卡箍集 double dia; //临时变量 vectoredge[N]; //边 P points[MAXPointNum]; //点 int f[N],sz[N]; //并查集信息 int pre[N],vis[N],st[N]; bool endpoint[N],hashuan; //Bundle bundles[N]; //vector bundlesOfClip[N]; bool record; vectorpathpoints; map nodeid; //给点映射内部编号 int cnt,bfs; //点的总数,以及bfs的次数 //int bundleid,branchPointNum; BranchTree(); //初始化 void init(); void startRecord(); void endRecord(); int getid(P& p); int getrt(int x); void merge(int x, int y); bool check(P &p); void addEdge(int x, int y, vector namelist); bool hasEdge(int x, int y); vector BFS(int u, int v); void newPath(vector& path, vector namelist); //添加一条路径,返回去除环路的路径 Path addPath(Path& path); };