Go to file
2026-04-14 11:40:20 +08:00
__pycache__ 支持批处理目录 2026-03-12 08:51:46 +08:00
.claude 支持批处理目录 2026-03-12 08:51:46 +08:00
.github/workflows chore: import existing STP2GLB project 2025-10-22 14:36:07 +08:00
.serena chore: import existing STP2GLB project 2025-10-22 14:36:07 +08:00
cmake 支持批处理目录 2026-03-12 08:51:46 +08:00
docs/superpowers docs: add desktop gui implementation plan 2026-04-14 11:38:53 +08:00
files chore: import existing STP2GLB project 2025-10-22 14:36:07 +08:00
recipes chore: import existing STP2GLB project 2025-10-22 14:36:07 +08:00
src 支持批处理目录 2026-03-12 08:51:46 +08:00
tests chore: import existing STP2GLB project 2025-10-22 14:36:07 +08:00
.gitattributes chore: import existing STP2GLB project 2025-10-22 14:36:07 +08:00
.gitignore chore: ignore local worktrees 2026-04-14 11:40:20 +08:00
aa-log.json chore: import existing STP2GLB project 2025-10-22 14:36:07 +08:00
CLAUDE.md chore: import existing STP2GLB project 2025-10-22 14:36:07 +08:00
CMakeLists.txt fix: enable Windows 7 compatibility for static build 2025-11-07 09:59:30 +08:00
CMakePresets.json chore: import existing STP2GLB project 2025-10-22 14:36:07 +08:00
gltfpack.exe 支持批处理目录 2026-03-12 08:51:46 +08:00
main.py 支持批处理目录 2026-03-12 08:51:46 +08:00
output5-log.json 支持批处理目录 2026-03-12 08:51:46 +08:00
output6-log.json 支持批处理目录 2026-03-12 08:51:46 +08:00
pixi.lock 支持批处理目录 2026-03-12 08:51:46 +08:00
pixi.toml 支持批处理目录 2026-03-12 08:51:46 +08:00
README.md 支持批处理目录 2026-03-12 08:51:46 +08:00
STP2GLB.exe 支持批处理目录 2026-03-12 08:51:46 +08:00
test_wrapper.py chore: import existing STP2GLB project 2025-10-22 14:36:07 +08:00
test-log.json chore: import existing STP2GLB project 2025-10-22 14:36:07 +08:00
USAGE.md feat: add HTTP/HTTPS URL input support for STP files 2025-10-11 17:19:35 +08:00

Win11 打包流程(生成适用于 Win7 的静态版)

  1. 进入 VS 2022 开发者命令行 打开“x64 Native Tools Command Prompt for VS 2022”或在 PowerShell 中执行 cmd.exe /k "<VS路径>\vcvars64.bat" 并在新开的 CMD 中操作)。

  2. 安装/更新 Pixi 静态环境依赖

    C:\Users\sladr\.pixi\bin\pixi.exe install -e static
    
  3. 清理旧的构建目录(可选但推荐)

    rmdir /s /q build\win-static
    
  4. 配置静态工程(目标 Win7

    C:\Users\sladr\.pixi\bin\pixi.exe run -e static cmake ^
        -G "Visual Studio 17 2022" -A x64 ^
        -S . -B build\win-static ^
        -DWIN32_WINNT=0x0601 ^
        -DBUILD_STATIC=ON -DBUILD_SHARED_LIBS=OFF ^
        -DCMAKE_BUILD_TYPE=Release
    
  5. 编译 Release 可执行文件

    C:\Users\sladr\.pixi\bin\pixi.exe run -e static cmake --build build\win-static --config Release
    
  6. (可选)安装到 Pixi 环境 bin

    C:\Users\sladr\.pixi\bin\pixi.exe run -e static cmake --install build\win-static --config Release
    
  7. 产物位置 • 未安装build\win-static\Release\STP2GLB.exe • 安装后:.pixi\envs\static\Library\bin\STP2GLB.exe

──────────────────────────────────────────

Win7 打包流程(直接在 Win7 上构建)

前提Win7 SP1 + VS 2019/2022带 MSVC v142/v143安装 Pixi并确保 SDK/工具链支持 VS 构建。
  1. 使用已配置好的 VS 开发者命令行 启动 Win7 上的 “x64 Native Tools Command Prompt”保证 cl.exe 和 cmake 可用。

  2. 安装 Pixi 静态环境依赖

    C:\Users\sladr\.pixi\bin\pixi.exe install -e static
    
  3. 清理旧目录

    rmdir /s /q build\win-static
    
  4. 配置工程(同样指定 Win7

    C:\Users\sladr\.pixi\bin\pixi.exe run -e static cmake ^
        -G "Visual Studio 17 2022" -A x64 ^
        -S . -B build\win-static ^
        -DWIN32_WINNT=0x0601 ^
        -DBUILD_STATIC=ON -DBUILD_SHARED_LIBS=OFF ^
        -DCMAKE_BUILD_TYPE=Release
    
  5. 编译 Release

    C:\Users\sladr\.pixi\bin\pixi.exe run -e static cmake --build build\win-static --config Release
    
  6. (可选)安装

    C:\Users\sladr\.pixi\bin\pixi.exe run -e static cmake --install build\win-static --config Release
    
  7. 产物位置 同 Win11 流程,产物可执行文件位于构建目录或安装后的 Pixi 环境 bin 目录。

──────────────────────────────────────────

注意事项 • 每次变更代码后建议在 Win11 构建并将 STP2GLB.exe 拷贝到 Win7 实机进行实际验证。 • 若在 Win7 上本地构建,需确保 VS 工具链与 Windows SDK 在该机器上完整可用;否则可在 Win11 构建后直接拷贝二进制。

Stp2Glb

Usage

STEP to GLB converter
Usage: STP2GLB.exe [OPTIONS]

Options:
  -h,--help                   Print this help message and exit
  --stp REQUIRED              STEP filepath
  --glb REQUIRED              GLB filepath
  --lin-defl :FLOAT in [0 - 1] [0.1]
                              Linear deflection
  --ang-defl :FLOAT in [0 - 1] [0.5]
                              Angular deflection
  --rel-defl                  Relative deflection
  --debug                     Debug mode. More robust but slower
  --solid-only                Solid only
  --max-geometry-num [0]      Maximum number of geometries to convert
  --filter-names-include      Include Filter name. Command separated list
  --filter-names-file-include Include Filter name file
  --filter-names-exclude      Exclude Filter name. Command separated list
  --filter-names-file-exclude Exclude Filter name file
  --tessellation-timeout [30]
                              Tessellation timeout

Development

Install Pre-requisites

The pre-requisites build requirements are conda packages handled by using pixi.

Note that on windows the MSVC c++ compiler toolchain is used. So a pre-requisite on windows is that you have installed VS or VS build tools from https://visualstudio.microsoft.com/downloads/?q=build+tools

Building

To build the STP2GLB executable using shared dependencies, run the following command:

pixi run build && pixi run install

To build the STP2GLB executable using static dependencies, run the following command:

pixi run -e static build && pixi run -e static install

Local IDE development

You can use the presets in the CMakePresets.json file (which points to the pixi environment). Just make sure you've either installed the pixi environment using pixi install or have run any of the build commands above.

Performance metrics

Todo