You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

60 lines
1.2 KiB

#pragma once
#ifdef _WIN32
#ifdef WIREROUTINGDLL_EXPORTS // VisualStudio DLL 项目模板会将 <PROJECTNAME>_EXPORTS 添加到定义预处理器宏。
#define PATH_API __declspec(dllexport) // _WIN32
#else
#define PATH_API __declspec(dllimport)
#endif
#else
#define PATH_API
#endif
#include "BranchPoint.h"
#include<cmath>
#include<vector>
#include<queue>
#include<map>
#include<iostream>
#include<fstream>
#include<sstream>
#include<algorithm>
#include<cassert>
using namespace std;
extern ClipSet PATH_API clipSet;
extern BranchPointSet PATH_API branchPointSet;
extern P PATH_API dirP(P &A);
//简单的路径信息,路径规划的直接结果
struct PATH_API Path{
vector<string> wirelist; //路径中的线缆名
vector<P> points; //路径上的点,包括卡箍和分支点
vector<int> inOut; //卡箍方向是正向为0,反向为1,分支点为-1
double dia; //路径直径
Path();
//返回path中点的数量
int size();
//把路径中经过的卡箍和分支点都标记成使用过的状态
void markPoint();
//固定所有经过的分支点
void fixBranchPoint();
//检查路径合法性
void illegalCheck();
//将路径中的点翻转成正常反向,并生成inOut数组
void processDir();
//在路径确定后,处理一些能在pass层面处理的信息
void postProcess();
//翻转整条路径
void reverse();
};