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.
 
 
 
郑敬润 44685194da Build pass on MacOS` 9 months ago
data penalty_par_distance 阶梯函数精确控制 10 months ago
include Build pass on MacOS` 9 months ago
lib Build pass on MacOS` 9 months ago
publish add publish folder 9 months ago
src Build pass on MacOS` 9 months ago
.gitignore add Visual Studio DLL build project 9 months ago
CMakeLists.txt Build pass on MacOS` 9 months ago
config.h.in first commit 10 months ago
parameters.txt MacOS 环境迁移 10 months ago
readme.md 面向全平台开发 9 months ago

readme.md

项目结构

.
│  CMakeLists.txt \\CMake构建配置文件
│  config.h.in
│  readme.md
├─data
│  ├─demo
│  │  └─ ...
│  └─Tinyroute_test
│      │  connector.csv \\连接器数据
│      │  result_ALL.txt \\当前数据与参数下应运行出的结果数据
│      ├─clip2
│      │      clips_with_dir.xml  \\空间中卡箍点集数据
│      ├─OBJ
│      │      cangti_correct.obj  \\输入模型
│      └─wirexml \\ 连接器间连接关系
│              1START_END.xml
│              2NEAR_END.xml
│              3NEAR_START.xml
├─include
│      read_xml.h
│
├─lib \\所用运行库
│  │  tinyxml.lib
│  │  WireRouting_DLL.dll
│  │  WireRouting_DLL.lib
│  │
│  └─include \\库相关头文件
│          Astar.h
│          BasicChannel.h
│          BasicEdge.h
|		  ...
│
└─src \\编译目标源文件
        xmlsql.cpp

运行环境配置

  • CMake配置
    • 确认Cmake已安装: Download CMake
    • 添加cmake.exe至环境变量
  • 确认编译器已安装,如VS2022、VS2019等环境

使用CMake构建项目

# 进入项目目录
cd <path_to_project>

# Standard CMake build
# 注意项目所用链接库均为 Debug x64 编译,构建务必使用同规格
cmake -S . -B build -T host=x64 -A x64
cmake --build build --config Debug --target ALL_BUILD -j 14

运行

# 进入可执行文件所在目录
cd <path_to_project>\build\Debug

# 运行
.\WireRouting.exe createTinyroute "..\\..\\data\\Tinyroute_test\\clip2" "..\\..\\data\\Tinyroute_test\\wirexml" "..\\..\\data\\Tinyroute_test\\connector.csv" "..\\..\\data\\Tinyroute_test\\OBJ" output

查看结果

<path_to_project>\build\Debug\output_ALL.txt 目录下查看输出文件

可与 <path_to_project>\data\Tinyroute_test\result_ALL.txt 比较结果