cd2025 協同產品設計實習

  • Home
    • SMap
    • reveal
    • blog
  • About
    • Summary
      • Tasks
      • Closing
      • Shooter
    • Product
    • Control
    • CPS
    • AI
    • Project
  • Topics
    • Wink
      • Fossil
    • Topic1
      • w1
      • Portable
      • repo
      • SSH
      • list
      • IPv6
    • Topic2
      • Compile
      • Onshape
    • Topic3
      • Fourbar2
      • boomer
    • Topic4
      • ROS2
  • HW
    • HW1
    • HW2
    • HW3
  • Exam
    • Exam1
    • Exam2
    • Exam3
  • Final
    • Webots
    • Rotate
  • Tutorial
    • Fourbar
      • w10
    • Stage1
      • Tutorial1
      • Tutorial2
    • Stage2
      • Tutorial3
      • Distancesensor
      • Tutorial4
      • Tutorial5
    • Stage3
      • Tutorial6
      • Tutorial7
      • Stream
      • Webots Server
    • Solvespace
      • Learn_Solvs
    • Mecanum
    • Pyslvs-UI
    • PICSimLab
    • Fossil SCM
    • Leo Editor
    • uv
    • Old
  • Brython
Webots Server << Previous Next >> Learn_Solvs

Solvespace

Web-based Solvespace: https://cad.apps.dgramop.xyz/ (source and PR)

Python related PR

在 python_2025_lite.7z 加入以下說明的 msys2 與 cmake 後, 可用來編譯 Solvespace v3.1 版原始碼的可攜套件 python_2025_lite_w_msys_cmake_solvespace.7z (Download 1.96GB, After extracted 3.7GB)


Solvespace 採 C++ 編寫, 原始碼位於 https://github.com/solvespace/solvespace, 以下將採用可攜程式系統 python_2025 中的 msys2 (msys64_20240507.7z) 以及 cmake 3.20.1 進行編譯 (若採用目前最新版的 cmake 3.30.2, 必須對 Solvespace v3.1 中的 CMakeLists.txt 進行修改).

舊版的 cmake 3.21.0 可以利用下列連結取得:

https://github.com/Kitware/CMake/releases/download/v3.21.0/cmake-3.21.0-windows-x86_64.zip 

msys64_20240507.7z (下載到 data 目錄下後, 目錄名稱必須改為 msys64) 則必須安裝 mingw32-make:

(安裝以下 make 套件前, 必須先執行 msys64 中的 mingw64.exe)

pacman -S mingw-w64-ucrt-x86_64-make

最新版的 python_2025 可攜程式環境架構位於: https://github.com/mdecycu/pyhton_2025, 各目錄套件可自行根據 https://mde.tw/cad2024/content/Python.html 中的說明下載, 或者自行配置.

機械設計工程師採用可攜程式套件的原因, 是希望能彈性配置 Python 版本, 因為大多數主流 CAD/E/M 套件都非開源軟體, 各版本的 API 相關的動態連結程式庫, 都採用特定的 Python 版本程式碼編譯而成. 例如: Siemens NX12 採用 Python 3.6.5, NX1872 採用 Python 3.7.1, NX1980 採用 Python 3.8.8, NX2312 使用 Python 3.10.12. 假如採用可攜程式套件, 除了可以如虛擬 Python 環境一樣, 將能配合 NXOpen 程式開發, 將所需的 Python 版本與相關模組放在同一目錄, 且能夠在不同的 64 位元 Windows 操作系統中執行.

接著取得 Solvespace v3.1 的原始碼, 可以直接從 https://github.com/solvespace/solvespace/releases 取得, 或以 以 git clone --recurse-submodules https://github.com/solvespace/solvespace.git 之後,

cd solvespace

git checkout v3.1

接下來則必須修改 solvespace\extlib\angle\src\libANGLE\HandleAllocator.cpp 加入標頭檔案:

#include <limits>

接著就可以進行程式碼的編譯與連結:

mkdir build

cd build

cmake .. -G "MinGW Makefiles" -DCMAKE_BUILD_TYPE=Release

mingw32-make

完成編譯後, solvespace.exe 即位於 build\bin 目錄中, 執行時則需要 libwinpthread-1.dll 動態連結程式庫.

進行上述流程編譯的原始碼 solvespace_v3.1_src.7z, 以及編譯完成的 solvespace_v3.1_msys2.7z.


Webots Server << Previous Next >> Learn_Solvs

Copyright © All rights reserved | This template is made with by Colorlib