Compare commits
219 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 256fc7eff3 | |||
| ccc98966e6 | |||
| b0127687c2 | |||
| 8637434db9 | |||
| 199b4c81d1 | |||
| 34b70663d1 | |||
| 1bcf27e1aa | |||
| 8c8a418c95 | |||
| 7317eb3035 | |||
| 1dea8f3ca9 | |||
| 19c54a8a66 | |||
| e6b82ca9e1 | |||
| 7d6bcbc03a | |||
| 8588a85fa1 | |||
| faa260f0ce | |||
| 42299aefca | |||
| 3f5f828c25 | |||
| 18dd3f83ed | |||
| 2255548c52 | |||
| 48226c3346 | |||
| 552309b38e | |||
| b78dd00d31 | |||
| 872d98d7df | |||
| 8502c09b45 | |||
| 34f8982b81 | |||
| 5921f4cd03 | |||
| c78d633d07 | |||
| a8bf9a5f41 | |||
| e23a81e0c4 | |||
| 010d37deda | |||
| 5391e21d4e | |||
| e94e1d9260 | |||
| 1331b1f4b7 | |||
| ba50b8ce79 | |||
| 878f0b8c9c | |||
| eebef0613b | |||
| 2aee1066ef | |||
| 5929a5de39 | |||
| 315585ca87 | |||
| 54b689fc23 | |||
| 0207f7716a | |||
| 7637a991a9 | |||
| ca9489c740 | |||
| aa6f2943a9 | |||
| deb68996f3 | |||
| 32a69b227f | |||
| d9177606f5 | |||
| 71ba4d58fa | |||
| c4a9c75bcc | |||
| b9bd1ca9db | |||
| a2f3edbbf9 | |||
| 912e9a1429 | |||
| dee64c7c5d | |||
| 3fffb79426 | |||
| 0667e59d01 | |||
| a42141ea13 | |||
| ffec2d3055 | |||
| 865652822a | |||
| 7406f274fb | |||
| 71a2315a5c | |||
| 0fcdecc934 | |||
| edfe5f4958 | |||
| 77269ee53b | |||
| 1f42e804d7 | |||
| 25a3bd1239 | |||
| 666600b589 | |||
| 37b5ac7b1c | |||
| 144fa63a8b | |||
| 94b30af836 | |||
| f34b73e46d | |||
| 1c18001290 | |||
| 2a9d56ea7e | |||
| fc48d88bca | |||
| fe51a4d2de | |||
| a1aa127617 | |||
| 23b77b096f | |||
| a2576785e7 | |||
| 1c684b2c25 | |||
| 0eda35d19f | |||
| 55e942ba94 | |||
| 216a30ac57 | |||
| c2ba10d4e4 | |||
| b05242c27a | |||
| 299e7d3f0c | |||
| f5415a2511 | |||
| 7670663f4a | |||
| e8db8a52b4 | |||
| 48004949de | |||
| 9bd72d7bb3 | |||
| 0ff7f0f5ff | |||
| 2462f72ebf | |||
| f1e86b9304 | |||
| 9faedf7618 | |||
| b68dfbaf6d | |||
| 7e08681df4 | |||
| ef4d3714b3 | |||
| fabaf130ec | |||
| 317def083a | |||
| 59341f7570 | |||
| 365fca1abb | |||
| fa88a6e74e | |||
| 0ce373c072 | |||
| 9afc9bb4d3 | |||
| 7aeb9ebfcf | |||
| 6ea40c3e63 | |||
| 3c6140dc26 | |||
| c0363e14da | |||
| d9561a8574 | |||
| 1c04b7cc96 | |||
| 66d406b06f | |||
| 0c9891be4b | |||
| e960b745f9 | |||
| 3aa55e5e91 | |||
| c75fe83a4e | |||
| b8b02f5f46 | |||
| 9040a14d7b | |||
| 0dff5334d1 | |||
| db1f37a98a | |||
| c4e292bd66 | |||
| 9dd074ff6d | |||
| 8de5d74502 | |||
| 5c23509370 | |||
| 78d954d086 | |||
| 526ee2c9c4 | |||
| 95dfb2ede8 | |||
| cfb02b88be | |||
| a28fb062b9 | |||
| c7a1792309 | |||
| 0141331dbd | |||
| 6c8f9b28a0 | |||
| e18e786f76 | |||
| 5613501758 | |||
| 4505c28cb6 | |||
| e605d73d3f | |||
| aff5cdf016 | |||
| 25f929c572 | |||
| fafff3a08b | |||
| 149b64e8ef | |||
| 48dca901e6 | |||
| 11136b282f | |||
| 5d4587cfb3 | |||
| 3209329eb4 | |||
| 2718d4589b | |||
| b11d4211e4 | |||
| 0e3d2a208f | |||
| 5f2ac5479b | |||
| 12dc5829d7 | |||
| b638dba12c | |||
| 2a26b3d01b | |||
| 9ad1aee683 | |||
| cff1b1921c | |||
| 79655aabf6 | |||
| 67b10dd24e | |||
| 630f7bcd29 | |||
| 537ad0fd7a | |||
| 6d35b82899 | |||
| 4dca99183d | |||
| 4ee2c5d9db | |||
| 245b62b8fa | |||
| 7dca20f979 | |||
| 1e55e402ae | |||
| e557658def | |||
| 695f0cfe32 | |||
| 7b29489d3d | |||
| 485f239d6d | |||
| ab3d0c319c | |||
| 9e4419a19c | |||
| b0c4aeee9e | |||
| 5a16f625b7 | |||
| d9e8fe0d7d | |||
| d1707fdf10 | |||
| aaf2b6ed10 | |||
| 4edb2e328c | |||
| 4f9e833512 | |||
| 82d1210f81 | |||
| 9a4b9c5277 | |||
| 9423cb9250 | |||
| cb49d64bbe | |||
| 8f9c76a95d | |||
| 1b1927bed7 | |||
| b027cfbf2e | |||
| 9ea63ce943 | |||
| b5ee6ef952 | |||
| 2ea219412b | |||
| 92bbe88322 | |||
| a1929d704a | |||
| 992c234e2c | |||
| 8aa75c09d1 | |||
| f7f3119d43 | |||
| f0ef15df98 | |||
| a7f1699e0d | |||
| f7f85143bb | |||
| 366fe0b74e | |||
| b10f001c3a | |||
| 1372cdb506 | |||
| 88fae786a5 | |||
| 865997597a | |||
| dc6d5e1e9f | |||
| d88524b4f7 | |||
| b6ff2a67c6 | |||
| a15134d79b | |||
| 80ec1e00b9 | |||
| f1c740af0e | |||
| ff9b93de0d | |||
| 9c944183d0 | |||
| cd92e568d5 | |||
| 807d523660 | |||
| 08fef7405c | |||
| c1f45b0c96 | |||
| a512314442 | |||
| 2fcc5317fe | |||
| 78a2a9c002 | |||
| 076623ef73 | |||
| bbd366b5a7 | |||
| 1ef5bd3fc3 | |||
| 83646753e0 | |||
| bdcf40a17c | |||
| 24e5b181b5 | |||
| d548f81525 |
@@ -0,0 +1,18 @@
|
||||
{
|
||||
"__comment": "Taken from vscode-cpptools's Extension/package.json gcc rule",
|
||||
"problemMatcher": [
|
||||
{
|
||||
"owner": "gcc-problem-matcher",
|
||||
"pattern": [
|
||||
{
|
||||
"regexp": "^(.*):(\\d+):(\\d+):\\s+(?:fatal\\s+)?(warning|error):\\s+(.*)$",
|
||||
"file": 1,
|
||||
"line": 2,
|
||||
"column": 3,
|
||||
"severity": 4,
|
||||
"message": 5
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
{
|
||||
"__comment": "Taken from vscode's vs/workbench/contrib/tasks/common/problemMatcher.ts msCompile rule",
|
||||
"problemMatcher": [
|
||||
{
|
||||
"owner": "msvc-problem-matcher",
|
||||
"pattern": [
|
||||
{
|
||||
"regexp": "^(?:\\s+\\d+\\>)?([^\\s].*)\\((\\d+),?(\\d+)?(?:,\\d+,\\d+)?\\)\\s*:\\s+(error|warning|info)\\s+(\\w{1,2}\\d+)\\s*:\\s*(.*)$",
|
||||
"file": 1,
|
||||
"line": 2,
|
||||
"column": 3,
|
||||
"severity": 4,
|
||||
"code": 5,
|
||||
"message": 6
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -39,35 +39,29 @@ jobs:
|
||||
with:
|
||||
artifactBasename: Prepare-${{ github.run_id }}
|
||||
|
||||
Pixi:
|
||||
needs: [Prepare]
|
||||
uses: ./.github/workflows/sub_buildPixi.yml
|
||||
with:
|
||||
artifactBasename: Pixi-${{ github.run_id }}
|
||||
|
||||
MacOS_13_Conda_Apple:
|
||||
needs: [Prepare]
|
||||
uses: ./.github/workflows/sub_buildMacOSCondaApple.yml
|
||||
with:
|
||||
artifactBasename: MacOS_13_Conda_Apple-${{ github.run_id }}
|
||||
|
||||
# MacOS_13_Conda_Intel:
|
||||
# needs: [Prepare]
|
||||
# uses: ./.github/workflows/sub_buildMacOSCondaIntel.yml
|
||||
# with:
|
||||
# artifactBasename: MacOS_13_Conda_Intel-${{ github.run_id }}
|
||||
|
||||
Ubuntu_20-04:
|
||||
needs: [Prepare]
|
||||
uses: ./.github/workflows/sub_buildUbuntu2004.yml
|
||||
with:
|
||||
artifactBasename: Ubuntu_20-04-${{ github.run_id }}
|
||||
|
||||
Ubuntu_22-04_Conda:
|
||||
Ubuntu_24-04_Conda:
|
||||
needs: [Prepare]
|
||||
uses: ./.github/workflows/sub_buildUbuntu2204Conda.yml
|
||||
uses: ./.github/workflows/sub_buildUbuntu2404Conda.yml
|
||||
with:
|
||||
artifactBasename: Ubuntu_22-04_Conda-${{ github.run_id }}
|
||||
|
||||
Ubuntu_22-04_Conda_Qt6:
|
||||
needs: [Prepare]
|
||||
uses: ./.github/workflows/sub_buildUbuntu2204CondaQt6.yml
|
||||
with:
|
||||
artifactBasename: Ubuntu_22-04_Conda-Qt6-${{ github.run_id }}
|
||||
artifactBasename: Ubuntu_24-04_Conda-${{ github.run_id }}
|
||||
|
||||
Windows:
|
||||
needs: [Prepare]
|
||||
@@ -75,13 +69,6 @@ jobs:
|
||||
with:
|
||||
artifactBasename: Windows-${{ github.run_id }}
|
||||
|
||||
## Disable until the following issue is resolved: https://github.com/mamba-org/mamba/issues/3292
|
||||
# Windows_Conda:
|
||||
# needs: [Prepare]
|
||||
# uses: ./.github/workflows/sub_buildWindowsConda.yml
|
||||
# with:
|
||||
# artifactBasename: Windows_Conda-${{ github.run_id }}
|
||||
|
||||
Lint:
|
||||
needs: [Prepare]
|
||||
uses: ./.github/workflows/sub_lint.yml
|
||||
@@ -94,12 +81,11 @@ jobs:
|
||||
WrapUp:
|
||||
needs: [
|
||||
Prepare,
|
||||
Pixi,
|
||||
MacOS_13_Conda_Apple,
|
||||
# MacOS_13_Conda_Intel,
|
||||
Ubuntu_20-04,
|
||||
Ubuntu_22-04_Conda,
|
||||
Ubuntu_24-04_Conda,
|
||||
Windows,
|
||||
# Windows_Conda,
|
||||
Lint
|
||||
]
|
||||
if: always()
|
||||
|
||||
@@ -40,6 +40,13 @@ inputs:
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- name: C++ Assembly tests
|
||||
id: assembly
|
||||
uses: ./.github/workflows/actions/runCPPTests/runSingleTest
|
||||
with:
|
||||
testCommand: ${{ inputs.builddir }}/tests/Assembly_tests_run --gtest_output=json:${{ inputs.reportdir }}assembly_gtest_results.json
|
||||
testLogFile: ${{ inputs.reportdir }}assembly_gtest_test_log.txt
|
||||
testName: Assembly
|
||||
- name: C++ core tests
|
||||
id: core
|
||||
uses: ./.github/workflows/actions/runCPPTests/runSingleTest
|
||||
@@ -54,6 +61,13 @@ runs:
|
||||
testCommand: ${{ inputs.builddir }}/tests/Material_tests_run --gtest_output=json:${{ inputs.reportdir }}material_gtest_results.json
|
||||
testLogFile: ${{ inputs.reportdir }}material_gtest_test_log.txt
|
||||
testName: Material
|
||||
- name: C++ Measure tests
|
||||
id: measure
|
||||
uses: ./.github/workflows/actions/runCPPTests/runSingleTest
|
||||
with:
|
||||
testCommand: ${{ inputs.builddir }}/tests/Material_tests_run --gtest_output=json:${{ inputs.reportdir }}measure_gtest_results.json
|
||||
testLogFile: ${{ inputs.reportdir }}measure_gtest_test_log.txt
|
||||
testName: Measure
|
||||
- name: C++ Mesh tests
|
||||
id: mesh
|
||||
uses: ./.github/workflows/actions/runCPPTests/runSingleTest
|
||||
@@ -61,6 +75,13 @@ runs:
|
||||
testCommand: ${{ inputs.builddir }}/tests/Mesh_tests_run --gtest_output=json:${{ inputs.reportdir }}mesh_gtest_results.json
|
||||
testLogFile: ${{ inputs.reportdir }}mesh_gtest_test_log.txt
|
||||
testName: Mesh
|
||||
- name: C++ MeshPart tests
|
||||
id: meshpart
|
||||
uses: ./.github/workflows/actions/runCPPTests/runSingleTest
|
||||
with:
|
||||
testCommand: ${{ inputs.builddir }}/tests/Mesh_tests_run --gtest_output=json:${{ inputs.reportdir }}meshpart_gtest_results.json
|
||||
testLogFile: ${{ inputs.reportdir }}meshpart_gtest_test_log.txt
|
||||
testName: MeshPart
|
||||
- name: C++ Part tests
|
||||
id: part
|
||||
uses: ./.github/workflows/actions/runCPPTests/runSingleTest
|
||||
@@ -89,6 +110,13 @@ runs:
|
||||
testCommand: ${{ inputs.builddir }}/tests/Sketcher_tests_run --gtest_output=json:${{ inputs.reportdir }}sketcher_gtest_results.json
|
||||
testLogFile: ${{ inputs.reportdir }}sketcher_gtest_test_log.txt
|
||||
testName: Sketcher
|
||||
- name: C++ Spreadsheet tests
|
||||
id: spreadsheet
|
||||
uses: ./.github/workflows/actions/runCPPTests/runSingleTest
|
||||
with:
|
||||
testCommand: ${{ inputs.builddir }}/tests/Sketcher_tests_run --gtest_output=json:${{ inputs.reportdir }}spreadsheet_gtest_results.json
|
||||
testLogFile: ${{ inputs.reportdir }}spreadsheet_gtest_test_log.txt
|
||||
testName: Spreadsheet
|
||||
- name: Compose summary report based on test results
|
||||
if: always()
|
||||
shell: bash -l {0}
|
||||
|
||||
@@ -81,6 +81,7 @@ jobs:
|
||||
channels: conda-forge
|
||||
channel-priority: true
|
||||
miniforge-version: latest
|
||||
conda-remove-defaults: "true"
|
||||
- name: Install FreeCAD dependencies
|
||||
env:
|
||||
CONDA_VERBOSITY: 2
|
||||
|
||||
@@ -1,171 +0,0 @@
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
# ***************************************************************************
|
||||
# * *
|
||||
# * Copyright (c) 2023 0penBrain. *
|
||||
# * *
|
||||
# * This file is part of FreeCAD. *
|
||||
# * *
|
||||
# * FreeCAD is free software: you can redistribute it and/or modify it *
|
||||
# * under the terms of the GNU Lesser General Public License as *
|
||||
# * published by the Free Software Foundation, either version 2.1 of the *
|
||||
# * License, or (at your option) any later version. *
|
||||
# * *
|
||||
# * FreeCAD is distributed in the hope that it will be useful, but *
|
||||
# * WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
# * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
|
||||
# * Lesser General Public License for more details. *
|
||||
# * *
|
||||
# * You should have received a copy of the GNU Lesser General Public *
|
||||
# * License along with FreeCAD. If not, see *
|
||||
# * <https://www.gnu.org/licenses/>. *
|
||||
# * *
|
||||
# ***************************************************************************
|
||||
|
||||
# This is a build and test workflow for CI of FreeCAD.
|
||||
# This workflow aims at building and testing FreeCAD on a Conda environment on macOS.
|
||||
|
||||
name: Build macOS 13 (Intel)
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
artifactBasename:
|
||||
type: string
|
||||
required: true
|
||||
testOnBuildDir:
|
||||
default: false
|
||||
type: boolean
|
||||
required: false
|
||||
allowedToFail:
|
||||
default: false
|
||||
type: boolean
|
||||
required: false
|
||||
outputs:
|
||||
reportFile:
|
||||
value: ${{ jobs.Build.outputs.reportFile }}
|
||||
|
||||
jobs:
|
||||
Build:
|
||||
runs-on: macos-13
|
||||
continue-on-error: ${{ inputs.allowedToFail }}
|
||||
env:
|
||||
CCACHE_DIR: ${{ github.workspace }}/ccache
|
||||
CCACHE_CONFIGPATH: ${{ github.workspace }}/ccache/config
|
||||
CCACHE_MAXSIZE: 1G
|
||||
CCACHE_COMPILERCHECK: "%compiler% -dumpfullversion -dumpversion" # default:mtime
|
||||
CCACHE_COMPRESS: true
|
||||
CCACHE_COMPRESSLEVEL: 1
|
||||
CC: x86_64-apple-darwin13.4.0-clang
|
||||
CXX: x86_64-apple-darwin13.4.0-clang++
|
||||
builddir: ${{ github.workspace }}/build/release/
|
||||
logdir: /tmp/logs/
|
||||
reportdir: /tmp/report/
|
||||
reportfilename: ${{ inputs.artifactBasename }}-report.md
|
||||
defaults:
|
||||
run:
|
||||
shell: bash -l {0}
|
||||
outputs:
|
||||
reportFile: ${{ steps.Init.outputs.reportFile }}
|
||||
|
||||
steps:
|
||||
- name: Checking out source code
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: true
|
||||
- name: Setup Miniconda
|
||||
env:
|
||||
CONDA_VERBOSITY: 2
|
||||
uses: conda-incubator/setup-miniconda@v3
|
||||
with:
|
||||
activate-environment: .conda/freecad
|
||||
environment-file: conda/conda-env.yaml
|
||||
channels: conda-forge
|
||||
channel-priority: true
|
||||
miniforge-version: latest
|
||||
- name: Install FreeCAD dependencies
|
||||
env:
|
||||
CONDA_VERBOSITY: 2
|
||||
run: |
|
||||
./conda/setup-environment.sh
|
||||
- name: Set Environment Variables
|
||||
run: |
|
||||
echo "CC=$CC" >> "$GITHUB_ENV"
|
||||
echo "CXX=$CXX" >> "$GITHUB_ENV"
|
||||
- name: Make needed directories, files and initializations
|
||||
id: Init
|
||||
run: |
|
||||
mkdir -p ${{ env.CCACHE_DIR }}
|
||||
mkdir -p ${{ env.CCACHE_CONFIGPATH }}
|
||||
mkdir -p ${{ env.builddir }}
|
||||
mkdir -p ${{ env.logdir }}
|
||||
mkdir -p ${{ env.reportdir }}
|
||||
echo "reportFile=${{ env.reportfilename }}" >> $GITHUB_OUTPUT
|
||||
- name: Generate cache key
|
||||
id: genCacheKey
|
||||
uses: ./.github/workflows/actions/macos/generateCacheKey
|
||||
with:
|
||||
compiler: ${{ env.CXX }}
|
||||
- name: Restore Compiler Cache
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
save-always: true
|
||||
path: ${{ env.CCACHE_DIR }}
|
||||
key: FC-${{ steps.genCacheKey.outputs.cacheKey }}-${{ github.ref }}-${{ github.run_id }}
|
||||
restore-keys: |
|
||||
FC-${{ steps.genCacheKey.outputs.cacheKey }}-${{ github.ref }}-
|
||||
FC-${{ steps.genCacheKey.outputs.cacheKey }}-
|
||||
- name: Print CCache statistics before build, reset stats and print config
|
||||
run: |
|
||||
ccache -s
|
||||
ccache -z
|
||||
ccache -p
|
||||
- name: CMake Configure
|
||||
run: |
|
||||
mamba run --live-stream -p .conda/freecad cmake --preset conda-macos-release -DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/.conda/freecad/opt/freecad
|
||||
- name: CMake Build
|
||||
run: |
|
||||
mamba run --live-stream -p .conda/freecad cmake --build build/release
|
||||
- name: Print ccache statistics after Build
|
||||
run: |
|
||||
ccache -s
|
||||
- name: FreeCAD CLI tests on build dir
|
||||
if: inputs.testOnBuildDir
|
||||
timeout-minutes: 10
|
||||
uses: ./.github/workflows/actions/runPythonTests
|
||||
with:
|
||||
testDescription: "CLI tests on build dir"
|
||||
testCommand: ${{ env.builddir }}/bin/FreeCADCmd -t 0
|
||||
logFile: ${{ env.logdir }}TestCLIBuild.log
|
||||
reportFile: ${{env.reportdir}}${{ env.reportfilename }}
|
||||
- name: C++ tests
|
||||
timeout-minutes: 1
|
||||
uses: ./.github/workflows/actions/runCPPTests/runAllTests
|
||||
with:
|
||||
reportdir: ${{ env.reportdir }}
|
||||
builddir: ${{ env.builddir }}
|
||||
reportFile: ${{ env.reportdir }}${{ env.reportfilename }}
|
||||
- name: CMake Install
|
||||
run: |
|
||||
mamba run --live-stream -p .conda/freecad cmake --install build/release
|
||||
- name: FreeCAD CLI tests on install
|
||||
timeout-minutes: 10
|
||||
uses: ./.github/workflows/actions/runPythonTests
|
||||
with:
|
||||
testDescription: "CLI tests on install"
|
||||
testCommand: ${{ github.workspace }}/.conda/freecad/opt/freecad/bin/FreeCADCmd -t 0
|
||||
logFile: ${{ env.logdir }}TestCLIInstall.log
|
||||
reportFile: ${{env.reportdir}}${{ env.reportfilename }}
|
||||
- name: Upload logs
|
||||
if: always()
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ${{ inputs.artifactBasename }}-Logs
|
||||
path: |
|
||||
${{ env.logdir }}
|
||||
/var/crash/*FreeCAD*
|
||||
- name: Upload report
|
||||
if: always()
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ${{ env.reportfilename }}
|
||||
path: |
|
||||
${{env.reportdir}}${{ env.reportfilename }}
|
||||
@@ -0,0 +1,218 @@
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
# ***************************************************************************
|
||||
# * *
|
||||
# * Copyright (c) 2024 0penBrain, Lorenz Lechner and Jacob Oursland. *
|
||||
# * *
|
||||
# * This file is part of FreeCAD. *
|
||||
# * *
|
||||
# * FreeCAD is free software: you can redistribute it and/or modify it *
|
||||
# * under the terms of the GNU Lesser General Public License as *
|
||||
# * published by the Free Software Foundation, either version 2.1 of the *
|
||||
# * License, or (at your option) any later version. *
|
||||
# * *
|
||||
# * FreeCAD is distributed in the hope that it will be useful, but *
|
||||
# * WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
# * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
|
||||
# * Lesser General Public License for more details. *
|
||||
# * *
|
||||
# * You should have received a copy of the GNU Lesser General Public *
|
||||
# * License along with FreeCAD. If not, see *
|
||||
# * <https://www.gnu.org/licenses/>. *
|
||||
# * *
|
||||
# ***************************************************************************
|
||||
|
||||
# This is a build and test workflow for CI of FreeCAD.
|
||||
# This workflow aims at building and testing FreeCAD on a Conda environment on macOS.
|
||||
|
||||
name: Pixi Builds
|
||||
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
artifactBasename:
|
||||
type: string
|
||||
required: true
|
||||
testOnBuildDir:
|
||||
default: false
|
||||
type: boolean
|
||||
required: false
|
||||
allowedToFail:
|
||||
default: false
|
||||
type: boolean
|
||||
required: false
|
||||
outputs:
|
||||
reportFile:
|
||||
value: ${{ jobs.Build.outputs.reportFile }}
|
||||
|
||||
jobs:
|
||||
build_with_pixi:
|
||||
runs-on: ${{ matrix.os }}
|
||||
continue-on-error: ${{ inputs.allowedToFail }}
|
||||
env:
|
||||
CCACHE_DIR: ${{ github.workspace }}/ccache
|
||||
CCACHE_CONFIGPATH: ${{ github.workspace }}/ccache/config
|
||||
CCACHE_MAXSIZE: 1G
|
||||
CCACHE_COMPRESS: true
|
||||
CCACHE_COMPRESSLEVEL: 5
|
||||
builddir: ${{ github.workspace }}/build/
|
||||
cacheKey: pixi-${{ matrix.os }}
|
||||
logdir: ${{ github.workspace }}/logs/
|
||||
reportdir: ${{ github.workspace }}/report/
|
||||
reportfilename: ${{ inputs.artifactBasename }}-${{ matrix.os }}-report.md
|
||||
outputs:
|
||||
reportFile: ${{ steps.Init.outputs.reportFile }}
|
||||
|
||||
strategy:
|
||||
max-parallel: 6
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [windows-latest, ubuntu-latest, macos-latest]
|
||||
|
||||
steps:
|
||||
- name: Set Platform Environment Variables
|
||||
shell: bash -l {0}
|
||||
env:
|
||||
OPERATING_SYSTEM: ${{ runner.os }}
|
||||
run: |
|
||||
if [[ $OPERATING_SYSTEM == 'Windows' ]]; then
|
||||
echo 'CCACHE_COMPILERCHECK=%compiler%' >> "$GITHUB_ENV"
|
||||
else
|
||||
echo 'CCACHE_COMPILERCHECK=%compiler% -dumpfullversion -dumpversion' >> "$GITHUB_ENV"
|
||||
fi
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Add GCC Problem Matcher
|
||||
if: runner.os == 'Linux'
|
||||
run: |
|
||||
echo "::add-matcher::${{ runner.workspace }}/FreeCAD/.github/problemMatcher/gcc.json"
|
||||
|
||||
- name: Add Clang Problem Matcher
|
||||
if: runner.os == 'macOS'
|
||||
run: |
|
||||
echo "::add-matcher::${{ runner.workspace }}/FreeCAD/.github/problemMatcher/clang.json"
|
||||
|
||||
- name: Add MSVC++ Problem Matcher
|
||||
if: runner.os == 'Windows'
|
||||
run: |
|
||||
echo "::add-matcher::${{ runner.workspace }}/FreeCAD/.github/problemMatcher/msvc.json"
|
||||
|
||||
- name: Make needed directories, files and initializations
|
||||
id: Init
|
||||
run: |
|
||||
mkdir -p ${{ env.builddir }}
|
||||
mkdir -p ${{ env.logdir }}
|
||||
mkdir -p ${{ env.reportdir }}
|
||||
echo "reportFile=${{ env.reportfilename }}" >> $GITHUB_OUTPUT
|
||||
|
||||
- uses: prefix-dev/setup-pixi@v0.8.2
|
||||
with:
|
||||
pixi-version: v0.41.3
|
||||
cache: false
|
||||
|
||||
- name: Restore Compiler Cache
|
||||
uses: actions/cache/restore@v4
|
||||
with:
|
||||
path: ${{ env.CCACHE_DIR }}
|
||||
key: FC-${{ env.cacheKey }}-${{ github.ref }}-${{ github.run_id }}
|
||||
restore-keys: |
|
||||
FC-${{ env.cacheKey }}-${{ github.ref }}-
|
||||
FC-${{ env.cacheKey }}-
|
||||
|
||||
- name: Print CCache statistics before build, reset stats and print config
|
||||
run: |
|
||||
pixi run ccache -s
|
||||
pixi run ccache -z
|
||||
pixi run ccache -p
|
||||
|
||||
- name: CMake Configure
|
||||
run: |
|
||||
pixi run configure-release
|
||||
|
||||
- name: CMake Build
|
||||
run: |
|
||||
pixi run build
|
||||
|
||||
- name: Print ccache statistics after Build
|
||||
run: |
|
||||
pixi run ccache -s
|
||||
|
||||
- name: FreeCAD CLI tests on build dir
|
||||
if: inputs.testOnBuildDir
|
||||
timeout-minutes: 10
|
||||
uses: ./.github/workflows/actions/runPythonTests
|
||||
with:
|
||||
testDescription: "CLI tests on build dir"
|
||||
testCommand: pixi run ${{ env.builddir }}/bin/FreeCADCmd -t 0
|
||||
logFile: ${{ env.logdir }}TestCLIBuild.log
|
||||
reportFile: ${{env.reportdir}}${{ env.reportfilename }}
|
||||
|
||||
- name: FreeCAD GUI tests on build dir
|
||||
if: runner.os == 'Linux' && inputs.testOnBuildDir
|
||||
timeout-minutes: 15
|
||||
uses: ./.github/workflows/actions/runPythonTests
|
||||
with:
|
||||
testDescription: "GUI tests on build dir"
|
||||
testCommand: pixi run xvfb-run ${{ env.builddir }}/bin/FreeCAD -t 0
|
||||
logFile: ${{ env.logdir }}TestGUIBuild.log
|
||||
reportFile: ${{env.reportdir}}${{ env.reportfilename }}
|
||||
|
||||
- name: C++ tests
|
||||
timeout-minutes: 10
|
||||
if: runner.os != 'Windows'
|
||||
uses: ./.github/workflows/actions/runCPPTests/runAllTests
|
||||
with:
|
||||
reportdir: ${{ env.reportdir }}
|
||||
builddir: ${{ env.builddir }}
|
||||
reportFile: ${{ env.reportdir }}${{ env.reportfilename }}
|
||||
|
||||
- name: CMake Install
|
||||
run: |
|
||||
pixi run install
|
||||
|
||||
- name: FreeCAD CLI tests on install
|
||||
if: runner.os != 'Windows'
|
||||
timeout-minutes: 10
|
||||
uses: ./.github/workflows/actions/runPythonTests
|
||||
with:
|
||||
testDescription: "CLI tests on install"
|
||||
testCommand: pixi run FreeCADCmd -t 0
|
||||
logFile: ${{ env.logdir }}TestCLIInstall.log
|
||||
reportFile: ${{env.reportdir}}${{ env.reportfilename }}
|
||||
|
||||
- name: FreeCAD GUI tests on install
|
||||
# if: runner.os == 'Linux'
|
||||
# currently broken on Qt6 builds
|
||||
if: false
|
||||
timeout-minutes: 15
|
||||
uses: ./.github/workflows/actions/runPythonTests
|
||||
with:
|
||||
testDescription: "GUI tests on install"
|
||||
testCommand: pixi run xvfb-run FreeCAD -t 0
|
||||
logFile: ${{ env.logdir }}TestGUIInstall.log
|
||||
reportFile: ${{env.reportdir}}${{ env.reportfilename }}
|
||||
|
||||
- name: Save Compiler Cache
|
||||
if: always()
|
||||
uses: actions/cache/save@v4
|
||||
with:
|
||||
path: ${{ env.CCACHE_DIR }}
|
||||
key: FC-${{ env.cacheKey }}-${{ github.ref }}-${{ github.run_id }}
|
||||
|
||||
- name: Upload logs
|
||||
if: always()
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ${{ inputs.artifactBasename }}-${{ matrix.os }}-Logs
|
||||
path: |
|
||||
${{ env.logdir }}
|
||||
/var/crash/*FreeCAD*
|
||||
|
||||
- name: Upload report
|
||||
if: always()
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ${{ env.reportfilename }}
|
||||
path: |
|
||||
${{env.reportdir}}${{ env.reportfilename }}
|
||||
@@ -47,11 +47,16 @@ on:
|
||||
jobs:
|
||||
|
||||
Build:
|
||||
runs-on: ubuntu-20.04
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: ubuntu:20.04
|
||||
continue-on-error: ${{ inputs.allowedToFail }}
|
||||
env:
|
||||
CCACHE_DIR: ${{ github.workspace }}/ccache
|
||||
CCACHE_CONFIGPATH: ${{ github.workspace }}/ccache/config
|
||||
LC_ALL: en_US.utf8
|
||||
DEBIAN_FRONTEND: noninteractive
|
||||
# set in a step to workaround https://github.com/actions/runner/issues/2058
|
||||
#CCACHE_DIR: ${{ github.workspace }}/ccache
|
||||
#CCACHE_CONFIGPATH: ${{ github.workspace }}/ccache/config
|
||||
CCACHE_MAXSIZE: 1G
|
||||
CCACHE_COMPILERCHECK: "%compiler% -dumpfullversion -dumpversion" # default:mtime
|
||||
CCACHE_COMPRESS: true
|
||||
@@ -60,7 +65,8 @@ jobs:
|
||||
CXX: /usr/bin/g++
|
||||
#CC: /usr/bin/clang
|
||||
#CXX: /usr/bin/clang++
|
||||
builddir: ${{ github.workspace }}/build/release/
|
||||
# set in a step to workaround https://github.com/actions/runner/issues/2058
|
||||
#builddir: ${{ github.workspace }}/build/release/
|
||||
logdir: /tmp/logs/
|
||||
reportdir: /tmp/report/
|
||||
reportfilename: ${{ inputs.artifactBasename }}-report.md
|
||||
@@ -71,6 +77,15 @@ jobs:
|
||||
reportFile: ${{ steps.Init.outputs.reportFile }}
|
||||
|
||||
steps:
|
||||
- name: Install basic packages
|
||||
run: |
|
||||
apt-get update -qq
|
||||
apt-get install -y --no-install-recommends --reinstall language-pack-en sudo git ca-certificates build-essential cmake
|
||||
- name: set env variables
|
||||
run: |
|
||||
echo "CCACHE_DIR=$GITHUB_WORKSPACE/ccache" >> "$GITHUB_ENV"
|
||||
echo "CCACHE_CONFIGPATH=$GITHUB_WORKSPACE/ccache/config" >> "$GITHUB_ENV"
|
||||
echo "builddir=$GITHUB_WORKSPACE/build/release/" >> "$GITHUB_ENV"
|
||||
- name: Checking out source code
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
@@ -133,6 +148,7 @@ jobs:
|
||||
python3-pyside2.qtnetwork \
|
||||
python3-pyside2.qtsvg \
|
||||
python3-pyside2.qtwidgets \
|
||||
python3-yaml \
|
||||
qtbase5-dev \
|
||||
qttools5-dev \
|
||||
shiboken2 \
|
||||
@@ -170,7 +186,7 @@ jobs:
|
||||
- name: CMake Configure
|
||||
uses: ./.github/workflows/actions/linux/configure
|
||||
with:
|
||||
extraParameters: -G Ninja --preset release
|
||||
extraParameters: -G Ninja -D CMAKE_BUILD_TYPE=Release
|
||||
builddir: ${{ env.builddir }}
|
||||
logFile: ${{ env.logdir }}Cmake.log
|
||||
errorFile: ${{ env.logdir }}CmakeErrors.log
|
||||
|
||||
@@ -1,211 +0,0 @@
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
# ***************************************************************************
|
||||
# * *
|
||||
# * Copyright (c) 2023 0penBrain. *
|
||||
# * *
|
||||
# * This file is part of FreeCAD. *
|
||||
# * *
|
||||
# * FreeCAD is free software: you can redistribute it and/or modify it *
|
||||
# * under the terms of the GNU Lesser General Public License as *
|
||||
# * published by the Free Software Foundation, either version 2.1 of the *
|
||||
# * License, or (at your option) any later version. *
|
||||
# * *
|
||||
# * FreeCAD is distributed in the hope that it will be useful, but *
|
||||
# * WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
# * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
|
||||
# * Lesser General Public License for more details. *
|
||||
# * *
|
||||
# * You should have received a copy of the GNU Lesser General Public *
|
||||
# * License along with FreeCAD. If not, see *
|
||||
# * <https://www.gnu.org/licenses/>. *
|
||||
# * *
|
||||
# ***************************************************************************
|
||||
|
||||
# This is a build and test workflow for CI of FreeCAD.
|
||||
# This workflow aims at building and testing FreeCAD on a Conda environment on Linux.
|
||||
|
||||
name: Build Ubuntu 22.04 (Conda)
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
artifactBasename:
|
||||
type: string
|
||||
required: true
|
||||
testOnBuildDir:
|
||||
default: false
|
||||
type: boolean
|
||||
required: false
|
||||
allowedToFail:
|
||||
default: false
|
||||
type: boolean
|
||||
required: false
|
||||
outputs:
|
||||
reportFile:
|
||||
value: ${{ jobs.Build.outputs.reportFile }}
|
||||
|
||||
jobs:
|
||||
Build:
|
||||
runs-on: ubuntu-22.04
|
||||
continue-on-error: ${{ inputs.allowedToFail }}
|
||||
env:
|
||||
CCACHE_DIR: ${{ github.workspace }}/ccache
|
||||
CCACHE_CONFIGPATH: ${{ github.workspace }}/ccache/config
|
||||
CCACHE_MAXSIZE: 1G
|
||||
CCACHE_COMPILERCHECK: "%compiler% -dumpfullversion -dumpversion" # default:mtime
|
||||
CCACHE_COMPRESS: true
|
||||
CCACHE_COMPRESSLEVEL: 1
|
||||
builddir: ${{ github.workspace }}/build/release/
|
||||
logdir: /tmp/logs/
|
||||
reportdir: /tmp/report/
|
||||
reportfilename: ${{ inputs.artifactBasename }}-report.md
|
||||
defaults:
|
||||
run:
|
||||
shell: bash -l {0}
|
||||
outputs:
|
||||
reportFile: ${{ steps.Init.outputs.reportFile }}
|
||||
|
||||
steps:
|
||||
- name: Checking out source code
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: true
|
||||
- name: Setup Miniconda
|
||||
env:
|
||||
CONDA_VERBOSITY: 2
|
||||
uses: conda-incubator/setup-miniconda@v3
|
||||
with:
|
||||
activate-environment: .conda/freecad
|
||||
environment-file: conda/conda-env-qt6.yaml
|
||||
channels: conda-forge
|
||||
channel-priority: true
|
||||
miniforge-version: latest
|
||||
- name: Install FreeCAD dependencies
|
||||
env:
|
||||
CONDA_VERBOSITY: 2
|
||||
run: |
|
||||
sudo apt-get update -qq
|
||||
sudo apt-get install -y --no-install-recommends \
|
||||
libegl1 \
|
||||
libgl1 \
|
||||
libglx0 \
|
||||
libopengl0
|
||||
./conda/setup-environment-qt6.sh
|
||||
- name: Set Environment Variables
|
||||
run: |
|
||||
echo "CC=$CC" >> "$GITHUB_ENV"
|
||||
echo "CXX=$CXX" >> "$GITHUB_ENV"
|
||||
- name: Make needed directories, files and initializations
|
||||
id: Init
|
||||
run: |
|
||||
mkdir -p ${{ env.CCACHE_DIR }}
|
||||
mkdir -p ${{ env.CCACHE_CONFIGPATH }}
|
||||
mkdir -p ${{ env.builddir }}
|
||||
mkdir -p ${{ env.logdir }}
|
||||
mkdir -p ${{ env.reportdir }}
|
||||
echo "reportFile=${{ env.reportfilename }}" >> $GITHUB_OUTPUT
|
||||
- name: Generate cache key
|
||||
id: genCacheKey
|
||||
uses: ./.github/workflows/actions/linux/generateCacheKey
|
||||
with:
|
||||
compiler: ${{ env.CXX }}
|
||||
qt_major_version: 6
|
||||
- name: Restore Compiler Cache
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
save-always: true
|
||||
path: ${{ env.CCACHE_DIR }}
|
||||
key: FC-${{ steps.genCacheKey.outputs.cacheKey }}-${{ github.ref }}-${{ github.run_id }}
|
||||
restore-keys: |
|
||||
FC-${{ steps.genCacheKey.outputs.cacheKey }}-${{ github.ref }}-
|
||||
FC-${{ steps.genCacheKey.outputs.cacheKey }}-
|
||||
- name: Print CCache statistics before build, reset stats and print config
|
||||
run: |
|
||||
ccache -s
|
||||
ccache -z
|
||||
ccache -p
|
||||
- name: CMake Configure
|
||||
uses: ./.github/workflows/actions/linux/configure
|
||||
with:
|
||||
extraParameters: >
|
||||
--preset conda-linux-release
|
||||
-DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/.conda/freecad/opt/freecad
|
||||
-DQT_HOST_PATH=${{ github.workspace }}/.conda/freecad/
|
||||
-DFREECAD_QT_VERSION=6
|
||||
-DBUILD_REVERSEENGINEERING=OFF
|
||||
builddir: ${{ env.builddir }}
|
||||
logFile: ${{ env.logdir }}Cmake.log
|
||||
errorFile: ${{ env.logdir }}CmakeErrors.log
|
||||
reportFile: ${{env.reportdir}}${{ env.reportfilename }}
|
||||
- name: CMake Build
|
||||
uses: ./.github/workflows/actions/linux/build
|
||||
with:
|
||||
builddir: ${{ env.builddir }}
|
||||
logFile: ${{ env.logdir }}Build.log
|
||||
errorFile: ${{ env.logdir }}BuildErrors.log
|
||||
reportFile: ${{env.reportdir}}${{ env.reportfilename }}
|
||||
- name: Print ccache statistics after Build
|
||||
run: |
|
||||
ccache -s
|
||||
- name: FreeCAD CLI tests on build dir
|
||||
if: inputs.testOnBuildDir
|
||||
timeout-minutes: 10
|
||||
uses: ./.github/workflows/actions/runPythonTests
|
||||
with:
|
||||
testDescription: "CLI tests on build dir"
|
||||
testCommand: ${{ env.builddir }}/bin/FreeCADCmd -t 0
|
||||
logFile: ${{ env.logdir }}TestCLIBuild.log
|
||||
reportFile: ${{env.reportdir}}${{ env.reportfilename }}
|
||||
- name: FreeCAD GUI tests on build dir
|
||||
if: inputs.testOnBuildDir
|
||||
timeout-minutes: 15
|
||||
uses: ./.github/workflows/actions/runPythonTests
|
||||
with:
|
||||
testDescription: "GUI tests on build dir"
|
||||
testCommand: xvfb-run ${{ env.builddir }}/bin/FreeCAD -t 0
|
||||
logFile: ${{ env.logdir }}TestGUIBuild.log
|
||||
reportFile: ${{env.reportdir}}${{ env.reportfilename }}
|
||||
- name: C++ tests
|
||||
timeout-minutes: 1
|
||||
uses: ./.github/workflows/actions/runCPPTests/runAllTests
|
||||
with:
|
||||
reportdir: ${{ env.reportdir }}
|
||||
builddir: ${{ env.builddir }}
|
||||
reportFile: ${{ env.reportdir }}${{ env.reportfilename }}
|
||||
- name: CMake Install
|
||||
uses: ./.github/workflows/actions/linux/install
|
||||
with:
|
||||
builddir: ${{ env.builddir }}
|
||||
logFile: ${{ env.logdir }}Install.log
|
||||
errorFile: ${{ env.logdir }}InstallErrors.log
|
||||
reportFile: ${{env.reportdir}}${{ env.reportfilename }}
|
||||
- name: FreeCAD CLI tests on install
|
||||
timeout-minutes: 10
|
||||
uses: ./.github/workflows/actions/runPythonTests
|
||||
with:
|
||||
testDescription: "CLI tests on install"
|
||||
testCommand: ${{ github.workspace }}/.conda/freecad/opt/freecad/bin/FreeCADCmd -t 0
|
||||
logFile: ${{ env.logdir }}TestCLIInstall.log
|
||||
reportFile: ${{env.reportdir}}${{ env.reportfilename }}
|
||||
- name: FreeCAD GUI tests on install
|
||||
timeout-minutes: 15
|
||||
uses: ./.github/workflows/actions/runPythonTests
|
||||
with:
|
||||
testDescription: "GUI tests on install"
|
||||
testCommand: xvfb-run ${{ github.workspace }}/.conda/freecad/opt/freecad/bin/FreeCAD -t 0
|
||||
logFile: ${{ env.logdir }}TestGUIInstall.log
|
||||
reportFile: ${{env.reportdir}}${{ env.reportfilename }}
|
||||
- name: Upload logs
|
||||
if: always()
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ${{ inputs.artifactBasename }}-Logs
|
||||
path: |
|
||||
${{ env.logdir }}
|
||||
/var/crash/*FreeCAD*
|
||||
- name: Upload report
|
||||
if: always()
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ${{ env.reportfilename }}
|
||||
path: |
|
||||
${{env.reportdir}}${{ env.reportfilename }}
|
||||
+3
-2
@@ -24,7 +24,7 @@
|
||||
# This is a build and test workflow for CI of FreeCAD.
|
||||
# This workflow aims at building and testing FreeCAD on a Conda environment on Linux.
|
||||
|
||||
name: Build Ubuntu 22.04 (Conda)
|
||||
name: Build Ubuntu 24.04 (Conda)
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
@@ -45,7 +45,7 @@ on:
|
||||
|
||||
jobs:
|
||||
Build:
|
||||
runs-on: ubuntu-22.04
|
||||
runs-on: ubuntu-24.04
|
||||
continue-on-error: ${{ inputs.allowedToFail }}
|
||||
env:
|
||||
CCACHE_DIR: ${{ github.workspace }}/ccache
|
||||
@@ -79,6 +79,7 @@ jobs:
|
||||
channels: conda-forge
|
||||
channel-priority: true
|
||||
miniforge-version: latest
|
||||
conda-remove-defaults: "true"
|
||||
- name: Install FreeCAD dependencies
|
||||
env:
|
||||
CONDA_VERBOSITY: 2
|
||||
@@ -1,133 +0,0 @@
|
||||
# ***************************************************************************
|
||||
# * Copyright (c) 2023 0penBrain *
|
||||
# * *
|
||||
# * This program is free software; you can redistribute it and/or modify *
|
||||
# * it under the terms of the GNU Lesser General Public License (LGPL) *
|
||||
# * as published by the Free Software Foundation; either version 2 of *
|
||||
# * the License, or (at your option) any later version. *
|
||||
# * for detail see the LICENCE text file. *
|
||||
# * *
|
||||
# * This program is distributed in the hope that it will be useful, *
|
||||
# * but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
# * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
# * GNU Library General Public License for more details. *
|
||||
# * *
|
||||
# * You should have received a copy of the GNU Library General Public *
|
||||
# * License along with this program; if not, write to the Free Software *
|
||||
# * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 *
|
||||
# * USA *
|
||||
# * *
|
||||
# ***************************************************************************
|
||||
|
||||
# This is a build and test workflow for CI of FreeCAD.
|
||||
# This workflow aims at building and testing FreeCAD using a Conda environment on Windows with MSVC.
|
||||
|
||||
name: Build Windows (Conda)
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
artifactBasename:
|
||||
type: string
|
||||
required: true
|
||||
allowedToFail:
|
||||
default: false
|
||||
type: boolean
|
||||
required: false
|
||||
outputs:
|
||||
reportFile:
|
||||
value: ${{ jobs.Build.outputs.reportFile }}
|
||||
|
||||
jobs:
|
||||
Build:
|
||||
runs-on: windows-latest
|
||||
continue-on-error: ${{ inputs.allowedToFail }}
|
||||
env:
|
||||
CCACHE_DIR: C:/FC/cache/
|
||||
CCACHE_COMPILERCHECK: "%compiler%" # default:mtime
|
||||
CCACHE_MAXSIZE: 1G
|
||||
CCACHE_COMPRESS: true
|
||||
CCACHE_COMPRESSLEVEL: 1
|
||||
CCACHE_NOHASHDIR: true
|
||||
CCACHE_DIRECT: true
|
||||
#CCACHE_SLOPPINESS: "pch_defines,time_macros" # Can't get PCH to work on Windows
|
||||
CCACHE_LOGFILE: C:/logs/ccache.log
|
||||
## Have to use C:\ because not enough space on workspace drive
|
||||
builddir: C:/FC/build/
|
||||
logdir: C:/logs/
|
||||
reportdir: C:/report/
|
||||
reportfilename: ${{ inputs.artifactBasename }}-report.md
|
||||
outputs:
|
||||
reportFile: ${{ steps.Init.outputs.reportFile }}
|
||||
|
||||
steps:
|
||||
- name: Checking out source code
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: true
|
||||
- name: Setup Miniconda
|
||||
env:
|
||||
CONDA_VERBOSITY: 2
|
||||
uses: conda-incubator/setup-miniconda@v3
|
||||
with:
|
||||
activate-environment: .conda/freecad
|
||||
environment-file: conda/conda-env.yaml
|
||||
channels: conda-forge
|
||||
channel-priority: true
|
||||
miniforge-version: latest
|
||||
- name: Install FreeCAD dependencies
|
||||
env:
|
||||
CONDA_VERBOSITY: 2
|
||||
run: |
|
||||
conda config --add envs_dirs $PWD/.conda
|
||||
mamba-devenv --no-prune -f conda/environment.devenv.yml
|
||||
- name: Make needed directories, files and initializations
|
||||
id: Init
|
||||
run: |
|
||||
mkdir ${{ env.CCACHE_DIR }}
|
||||
mkdir ${{ env.builddir }}
|
||||
mkdir ${{ env.logdir }}
|
||||
mkdir ${{ env.reportdir }}
|
||||
echo "reportFile=${{ env.reportfilename }}" >> $GITHUB_OUTPUT
|
||||
- name: Restore compiler cache
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
save-always: true
|
||||
path: ${{ env.CCACHE_DIR }}
|
||||
key: FC-Windows-Conda-${{ github.ref }}-${{ github.run_id }}
|
||||
restore-keys: |
|
||||
FC-Windows-Conda-${{ github.ref }}-
|
||||
FC-Windows-Conda-
|
||||
- name: Print Ccache statistics before build, reset stats and print config
|
||||
run: |
|
||||
ccache -s
|
||||
ccache -z
|
||||
ccache -p
|
||||
- name: Configuring CMake
|
||||
shell: cmd /C CALL {0}
|
||||
run: >
|
||||
conda\cmake.cmd --preset conda-windows-release -DFREECAD_USE_PCH:BOOL=OFF -DFREECAD_RELEASE_PDB:BOOL=OFF -DFREECAD_USE_CCACHE:BOOL=ON
|
||||
- name: Compiling sources
|
||||
shell: cmd /C CALL {0}
|
||||
run: >
|
||||
conda\cmake.cmd --build build\release
|
||||
- name: Print Ccache statistics after build
|
||||
run: |
|
||||
ccache -s
|
||||
- name: CMake Install
|
||||
shell: cmd /C CALL {0}
|
||||
run: |
|
||||
conda\cmake.cmd --install build\release
|
||||
- name: C++ unit tests
|
||||
timeout-minutes: 1
|
||||
run: |
|
||||
. build\release\tests\Tests_run --gtest_output=json:${{ env.reportdir }}gtest_results.json # 2>&1 | tee -filepath ${{ env.logdir }}/unitTests.log
|
||||
- name: FreeCAD CLI tests
|
||||
run: |
|
||||
. build\release\bin\FreeCADCmd -t 0 # 2>&1 | tee -filepath ${{ env.logdir }}/integrationTests.log
|
||||
- name: Upload logs
|
||||
if: always()
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ${{ inputs.artifactBasename }}-Logs
|
||||
path: |
|
||||
${{ env.logdir }}
|
||||
@@ -380,7 +380,7 @@ jobs:
|
||||
blackFails=0
|
||||
pip install --break-system-packages black
|
||||
set +e
|
||||
black --check ${{ inputs.changedPythonFiles }} &> ${{ env.logdir }}black.log
|
||||
black --line-length 100 --check ${{ inputs.changedPythonFiles }} &> ${{ env.logdir }}black.log
|
||||
exitCode=$?
|
||||
set -e
|
||||
# If black has run successfully, write the Log to the console with the Problem Matchers
|
||||
|
||||
@@ -61,3 +61,6 @@ src/Tools/freecad.zip
|
||||
tsupdate_stderr.log
|
||||
tsupdate_stdout.log
|
||||
files_to_translate.txt
|
||||
# pixi environments
|
||||
.pixi
|
||||
*.egg-info
|
||||
|
||||
+5
-3
@@ -21,7 +21,9 @@ option(FREECAD_USE_CCACHE "Auto detect and use ccache during compilation" ON)
|
||||
if(FREECAD_USE_CCACHE)
|
||||
find_program(CCACHE_PROGRAM ccache) #This check should occur before project()
|
||||
if(CCACHE_PROGRAM)
|
||||
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE "${CCACHE_PROGRAM}")
|
||||
message(STATUS "Using ccache found at: " ${CCACHE_PROGRAM})
|
||||
set(CMAKE_C_COMPILER_LAUNCHER "${CCACHE_PROGRAM}")
|
||||
set(CMAKE_CXX_COMPILER_LAUNCHER "${CCACHE_PROGRAM}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
@@ -29,8 +31,8 @@ project(FreeCAD)
|
||||
|
||||
set(PACKAGE_VERSION_MAJOR "1")
|
||||
set(PACKAGE_VERSION_MINOR "0")
|
||||
set(PACKAGE_VERSION_PATCH "0") # number of patch release (e.g. "4" for the 0.18.4 release)
|
||||
set(PACKAGE_VERSION_SUFFIX "RC3") # either "dev" for development snapshot or "" (empty string)
|
||||
set(PACKAGE_VERSION_PATCH "2") # number of patch release (e.g. "4" for the 0.18.4 release)
|
||||
set(PACKAGE_VERSION_SUFFIX "") # either "dev" for development snapshot or "" (empty string)
|
||||
set(PACKAGE_BUILD_VERSION "0") # used when the same FreeCAD version will be re-released (for example using an updated LibPack)
|
||||
|
||||
set(PACKAGE_VERSION "${PACKAGE_VERSION_MAJOR}.${PACKAGE_VERSION_MINOR}.${PACKAGE_VERSION_PATCH}")
|
||||
|
||||
+29
-31
@@ -51,14 +51,6 @@
|
||||
"hidden": true,
|
||||
"generator": "Ninja",
|
||||
"cacheVariables": {
|
||||
"Boost_NO_BOOST_CMAKE": {
|
||||
"type": "BOOL",
|
||||
"value": "ON"
|
||||
},
|
||||
"BUILD_DYNAMIC_LINK_PYTHON": {
|
||||
"type": "BOOL",
|
||||
"value": "ON"
|
||||
},
|
||||
"BUILD_FEM_NETGEN": {
|
||||
"type": "BOOL",
|
||||
"value": "ON"
|
||||
@@ -99,9 +91,9 @@
|
||||
"type": "BOOL",
|
||||
"value": "ON"
|
||||
},
|
||||
"USE_BOOST_PYTHON": {
|
||||
"type": "BOOL",
|
||||
"value": "OFF"
|
||||
"QT_HOST_PATH": {
|
||||
"type": "PATH",
|
||||
"value": "$env{CONDA_PREFIX}"
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -117,27 +109,27 @@
|
||||
"cacheVariables": {
|
||||
"CMAKE_INCLUDE_PATH": {
|
||||
"type": "FILEPATH",
|
||||
"value": "${sourceDir}/.conda/freecad/include"
|
||||
"value": "$env{CONDA_PREFIX}/include"
|
||||
},
|
||||
"CMAKE_INSTALL_LIBDIR": {
|
||||
"type": "FILEPATH",
|
||||
"value": "${sourceDir}/.conda/freecad/lib"
|
||||
"value": "$env{CONDA_PREFIX}/lib"
|
||||
},
|
||||
"CMAKE_INSTALL_PREFIX": {
|
||||
"type": "FILEPATH",
|
||||
"value": "${sourceDir}/.conda/freecad"
|
||||
"value": "$env{CONDA_PREFIX}"
|
||||
},
|
||||
"CMAKE_LIBRARY_PATH":{
|
||||
"type": "FILEPATH",
|
||||
"value": "${sourceDir}/.conda/freecad/lib"
|
||||
"value": "$env{CONDA_PREFIX}/lib"
|
||||
},
|
||||
"CMAKE_PREFIX_PATH": {
|
||||
"type": "FILEPATH",
|
||||
"value": "${sourceDir}/.conda/freecad"
|
||||
"value": "$env{CONDA_PREFIX}"
|
||||
},
|
||||
"OCC_INCLUDE_DIR": {
|
||||
"type": "FILEPATH",
|
||||
"value": "${sourceDir}/.conda/freecad/include/opencascade"
|
||||
"value": "$env{CONDA_PREFIX}/include/opencascade"
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -157,27 +149,27 @@
|
||||
},
|
||||
"CMAKE_INCLUDE_PATH": {
|
||||
"type": "FILEPATH",
|
||||
"value": "${sourceDir}/.conda/freecad/include"
|
||||
"value": "$env{CONDA_PREFIX}/include"
|
||||
},
|
||||
"CMAKE_INSTALL_LIBDIR": {
|
||||
"type": "FILEPATH",
|
||||
"value": "${sourceDir}/.conda/freecad/lib"
|
||||
"value": "$env{CONDA_PREFIX}/lib"
|
||||
},
|
||||
"CMAKE_INSTALL_PREFIX": {
|
||||
"type": "FILEPATH",
|
||||
"value": "${sourceDir}/.conda/freecad"
|
||||
"value": "$env{CONDA_PREFIX}"
|
||||
},
|
||||
"CMAKE_LIBRARY_PATH":{
|
||||
"type": "FILEPATH",
|
||||
"value": "${sourceDir}/.conda/freecad/lib"
|
||||
"value": "$env{CONDA_PREFIX}/lib"
|
||||
},
|
||||
"CMAKE_PREFIX_PATH": {
|
||||
"type": "FILEPATH",
|
||||
"value": "${sourceDir}/.conda/freecad"
|
||||
"value": "$env{CONDA_PREFIX}"
|
||||
},
|
||||
"OCC_INCLUDE_DIR": {
|
||||
"type": "FILEPATH",
|
||||
"value": "${sourceDir}/.conda/freecad/include/opencascade"
|
||||
"value": "$env{CONDA_PREFIX}/include/opencascade"
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -193,27 +185,27 @@
|
||||
"cacheVariables": {
|
||||
"CMAKE_INCLUDE_PATH": {
|
||||
"type": "FILEPATH",
|
||||
"value": "${sourceDir}/.conda/freecad/Library/include"
|
||||
"value": "$env{CONDA_PREFIX}/Library/include"
|
||||
},
|
||||
"CMAKE_INSTALL_LIBDIR": {
|
||||
"type": "FILEPATH",
|
||||
"value": "${sourceDir}/.conda/freecad/Library/lib"
|
||||
"value": "$env{CONDA_PREFIX}/Library/lib"
|
||||
},
|
||||
"CMAKE_INSTALL_PREFIX": {
|
||||
"type": "FILEPATH",
|
||||
"value": "${sourceDir}/.conda/freecad/Library"
|
||||
"value": "$env{CONDA_PREFIX}/Library"
|
||||
},
|
||||
"CMAKE_LIBRARY_PATH":{
|
||||
"type": "FILEPATH",
|
||||
"value": "${sourceDir}/.conda/freecad/Library/lib"
|
||||
"value": "$env{CONDA_PREFIX}/Library/lib"
|
||||
},
|
||||
"CMAKE_PREFIX_PATH": {
|
||||
"type": "FILEPATH",
|
||||
"value": "${sourceDir}/.conda/freecad/Library"
|
||||
"value": "$env{CONDA_PREFIX}/Library"
|
||||
},
|
||||
"OCC_INCLUDE_DIR": {
|
||||
"type": "FILEPATH",
|
||||
"value": "${sourceDir}/.conda/freecad/Library/include/opencascade"
|
||||
"value": "$env{CONDA_PREFIX}/Library/include/opencascade"
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -295,7 +287,13 @@
|
||||
"inherits": [
|
||||
"conda-release",
|
||||
"conda-windows"
|
||||
]
|
||||
],
|
||||
"cacheVariables": {
|
||||
"FREECAD_RELEASE_PDB": {
|
||||
"type": "BOOL",
|
||||
"value": "OFF"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -140,6 +140,9 @@ if(OCC_FOUND)
|
||||
TKHLR
|
||||
TKFeat
|
||||
)
|
||||
if (OCC_VERSION_STRING VERSION_GREATER_EQUAL 7.9.0)
|
||||
list(APPEND OCC_LIBRARIES TKExpress)
|
||||
endif ()
|
||||
set(OCC_OCAF_LIBRARIES
|
||||
TKBin
|
||||
TKBinL
|
||||
|
||||
@@ -15,7 +15,9 @@ macro(CopyLibpackDirectories)
|
||||
if(FREECAD_LIBPACK_VERSION VERSION_GREATER_EQUAL "3.0.0")
|
||||
file(COPY ${FREECAD_LIBPACK_DIR}/plugins/tls DESTINATION ${CMAKE_BINARY_DIR}/bin)
|
||||
endif()
|
||||
file(COPY ${FREECAD_LIBPACK_DIR}/resources DESTINATION ${CMAKE_BINARY_DIR})
|
||||
if(FREECAD_LIBPACK_VERSION VERSION_GREATER_EQUAL "3.0.0" AND FREECAD_LIBPACK_VERSION VERSION_LESS "3.1.0")
|
||||
file(COPY ${FREECAD_LIBPACK_DIR}/resources DESTINATION ${CMAKE_BINARY_DIR})
|
||||
endif()
|
||||
message(STATUS "... end copying.\n=======================================\n")
|
||||
endif()
|
||||
|
||||
@@ -40,7 +42,9 @@ macro(CopyLibpackDirectories)
|
||||
file(COPY ${FREECAD_LIBPACK_DIR}/plugins/imageformats DESTINATION ${CMAKE_BINARY_DIR}/bin)
|
||||
file(COPY ${FREECAD_LIBPACK_DIR}/plugins/platforms DESTINATION ${CMAKE_BINARY_DIR}/bin)
|
||||
file(COPY ${FREECAD_LIBPACK_DIR}/plugins/styles DESTINATION ${CMAKE_BINARY_DIR}/bin)
|
||||
file(COPY ${FREECAD_LIBPACK_DIR}/resources DESTINATION ${CMAKE_BINARY_DIR})
|
||||
if(FREECAD_LIBPACK_VERSION VERSION_LESS "3.1.0")
|
||||
file(COPY ${FREECAD_LIBPACK_DIR}/resources DESTINATION ${CMAKE_BINARY_DIR})
|
||||
endif()
|
||||
file(WRITE ${CMAKE_BINARY_DIR}/bin/qt.conf "[Paths]\nPrefix=..\n")
|
||||
endif()
|
||||
endif()
|
||||
@@ -59,7 +63,9 @@ macro(CopyLibpackDirectories)
|
||||
if(FREECAD_LIBPACK_VERSION VERSION_GREATER_EQUAL "3.0.0")
|
||||
install(DIRECTORY ${FREECAD_LIBPACK_DIR}/plugins/tls DESTINATION ${CMAKE_INSTALL_PREFIX}/bin)
|
||||
endif()
|
||||
install(DIRECTORY ${FREECAD_LIBPACK_DIR}/resources DESTINATION ${CMAKE_INSTALL_PREFIX})
|
||||
if(FREECAD_LIBPACK_VERSION VERSION_LESS "3.1.0")
|
||||
install(DIRECTORY ${FREECAD_LIBPACK_DIR}/resources DESTINATION ${CMAKE_INSTALL_PREFIX})
|
||||
endif()
|
||||
install(DIRECTORY ${FREECAD_LIBPACK_DIR}/bin DESTINATION ${CMAKE_INSTALL_PREFIX})
|
||||
install(DIRECTORY ${FREECAD_LIBPACK_DIR}/lib DESTINATION ${CMAKE_INSTALL_PREFIX} FILES_MATCHING PATTERN "*.dll")
|
||||
if(FREECAD_LIBPACK_VERSION VERSION_GREATER_EQUAL "3.0.0")
|
||||
|
||||
@@ -142,37 +142,41 @@ macro(InitializeFreeCADBuildOptions)
|
||||
option(BUILD_CLOUD "Build the FreeCAD cloud module" OFF)
|
||||
option(ENABLE_DEVELOPER_TESTS "Build the FreeCAD unit tests suit" ON)
|
||||
|
||||
if(MSVC)
|
||||
if(MSVC OR APPLE)
|
||||
set(FREECAD_3DCONNEXION_SUPPORT "NavLib" CACHE STRING "Select version of the 3Dconnexion device integration")
|
||||
set_property(CACHE FREECAD_3DCONNEXION_SUPPORT PROPERTY STRINGS "NavLib" "Raw input")
|
||||
else(MSVC)
|
||||
set(FREECAD_3DCONNEXION_SUPPORT "Raw input")
|
||||
endif(MSVC)
|
||||
set_property(CACHE FREECAD_3DCONNEXION_SUPPORT PROPERTY STRINGS "None" "NavLib" "Legacy" "Both")
|
||||
else(MSVC OR APPLE)
|
||||
option(FREECAD_USE_3DCONNEXION_LEGACY "Enable support for 3Dconnexion devices." ON)
|
||||
endif(MSVC OR APPLE)
|
||||
|
||||
if(FREECAD_3DCONNEXION_SUPPORT STREQUAL "NavLib")
|
||||
set(FREECAD_USE_3DCONNEXION_NAVLIB ON)
|
||||
elseif(FREECAD_3DCONNEXION_SUPPORT STREQUAL "Both")
|
||||
set(FREECAD_USE_3DCONNEXION_NAVLIB ON)
|
||||
set(FREECAD_USE_3DCONNEXION_LEGACY ON)
|
||||
elseif(FREECAD_3DCONNEXION_SUPPORT STREQUAL "Legacy")
|
||||
set(FREECAD_USE_3DCONNEXION_LEGACY ON)
|
||||
elseif(FREECAD_3DCONNEXION_SUPPORT STREQUAL "None")
|
||||
set(FREECAD_USE_3DCONNEXION_NAVLIB OFF)
|
||||
set(FREECAD_USE_3DCONNEXION_LEGACY OFF)
|
||||
endif()
|
||||
|
||||
if(APPLE AND FREECAD_USE_3DCONNEXION_LEGACY)
|
||||
find_library(3DCONNEXIONCLIENT_FRAMEWORK 3DconnexionClient)
|
||||
if(NOT (IS_DIRECTORY ${3DCONNEXIONCLIENT_FRAMEWORK}))
|
||||
set(FREECAD_USE_3DCONNEXION_LEGACY OFF)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(MSVC)
|
||||
option(BUILD_FEM_NETGEN "Build the FreeCAD FEM module with the NETGEN mesher" ON)
|
||||
option(FREECAD_USE_PCL "Build the features that use PCL libs" OFF) # 3/5/2021 current LibPack uses non-C++17 FLANN
|
||||
option(FREECAD_USE_3DCONNEXION "Use the 3D connexion SDK to support 3d mouse." ON)
|
||||
elseif(APPLE)
|
||||
find_library(3DCONNEXIONCLIENT_FRAMEWORK 3DconnexionClient)
|
||||
if(IS_DIRECTORY ${3DCONNEXIONCLIENT_FRAMEWORK})
|
||||
option(FREECAD_USE_3DCONNEXION "Use the 3D connexion SDK to support 3d mouse." ON)
|
||||
else(IS_DIRECTORY ${3DCONNEXIONCLIENT_FRAMEWORK})
|
||||
option(FREECAD_USE_3DCONNEXION "Use the 3D connexion SDK to support 3d mouse." OFF)
|
||||
endif(IS_DIRECTORY ${3DCONNEXIONCLIENT_FRAMEWORK})
|
||||
else(MSVC)
|
||||
set(FREECAD_USE_3DCONNEXION OFF )
|
||||
endif(MSVC)
|
||||
if(NOT MSVC)
|
||||
option(BUILD_FEM_NETGEN "Build the FreeCAD FEM module with the NETGEN mesher" OFF)
|
||||
option(FREECAD_USE_PCL "Build the features that use PCL libs" OFF)
|
||||
endif(NOT MSVC)
|
||||
|
||||
if(FREECAD_3DCONNEXION_SUPPORT STREQUAL "NavLib" AND FREECAD_USE_3DCONNEXION)
|
||||
set(FREECAD_USE_3DCONNEXION_NAVLIB ON)
|
||||
set(FREECAD_USE_3DCONNEXION OFF)
|
||||
endif()
|
||||
|
||||
# if this is set override some options
|
||||
if (FREECAD_BUILD_DEBIAN)
|
||||
set(FREECAD_USE_EXTERNAL_ZIPIOS ON )
|
||||
|
||||
@@ -192,11 +192,13 @@ macro(PrintFinalReport)
|
||||
simple(OpenGLU_Incl [${OPENGL_INCLUDE_DIR}])
|
||||
simple(Coin3D "${COIN3D_VERSION} [${COIN3D_LIBRARIES}] [${COIN3D_INCLUDE_DIRS}]")
|
||||
simple(pivy ${PIVY_VERSION})
|
||||
if (WIN32)
|
||||
if (FREECAD_USE_3DCONNEXION)
|
||||
simple(3Dconnexion "Building 3Dconnexion support with original code")
|
||||
if(WIN32 OR APPLE)
|
||||
if(FREECAD_USE_3DCONNEXION_LEGACY AND FREECAD_USE_3DCONNEXION_NAVLIB)
|
||||
simple(3Dconnexion "Building with 3Dconnexion legacy and NavLib support")
|
||||
elseif(FREECAD_USE_3DCONNEXION_LEGACY)
|
||||
simple(3Dconnexion "Building with 3Dconnexion legacy support")
|
||||
elseif(FREECAD_USE_3DCONNEXION_NAVLIB)
|
||||
simple(3Dconnexion "Building 3Dconnexion support with NavLib")
|
||||
simple(3Dconnexion "Building with 3Dconnexion NavLib support")
|
||||
else()
|
||||
simple(3Dconnexion "Not building 3Dconnexion device support")
|
||||
endif()
|
||||
|
||||
@@ -15,6 +15,12 @@ set(SWIG_EXECUTABLE ${FREECAD_LIBPACK_DIR}/bin/swig.exe CACHE FILEPATH "Swig" FO
|
||||
find_package(Qt6 REQUIRED PATHS ${FREECAD_LIBPACK_DIR}/lib/cmake NO_DEFAULT_PATH)
|
||||
message(STATUS "Found LibPack 3 Qt ${Qt6_VERSION}")
|
||||
|
||||
if(FREECAD_LIBPACK_VERSION VERSION_GREATER_EQUAL "3.1.0")
|
||||
find_package(pybind11 REQUIRED PATHS ${FREECAD_LIBPACK_DIR}/share/cmake/pybind11 NO_DEFAULT_PATH)
|
||||
message(STATUS "Found LibPack 3 pybind11 ${pybind11_VERSION}")
|
||||
set(FREECAD_USE_PYBIND11 ON)
|
||||
endif()
|
||||
|
||||
find_package(XercesC REQUIRED PATHS ${FREECAD_LIBPACK_DIR}/cmake NO_DEFAULT_PATH)
|
||||
message(STATUS "Found LibPack 3 XercesC ${XercesC_VERSION}")
|
||||
|
||||
|
||||
@@ -3,64 +3,67 @@ channels:
|
||||
- conda-forge
|
||||
dependencies:
|
||||
- conda-forge/noarch::conda-libmamba-solver==24.7.0
|
||||
- libspnav # [linux]
|
||||
- kernel-headers_linux-64 # [linux and x86_64]
|
||||
- libdrm-cos6-x86_64 # [linux and x86_64]
|
||||
- libselinux-cos6-x86_64 # [linux and x86_64]
|
||||
- libsepol-cos6-x86_64 # [linux and x86_64]
|
||||
- libx11-common-cos6-x86_64 # [linux and x86_64]
|
||||
- libx11-cos6-x86_64 # [linux and x86_64]
|
||||
- libxau-cos6-x86_64 # [linux and x86_64]
|
||||
- libxcb-cos6-x86_64 # [linux and x86_64]
|
||||
- libxdamage-cos6-x86_64 # [linux and x86_64]
|
||||
- libxext-cos6-x86_64 # [linux and x86_64]
|
||||
- libxfixes-cos6-x86_64 # [linux and x86_64]
|
||||
- libxi-cos6-x86_64 # [linux and x86_64]
|
||||
- libxi-devel-cos6-x86_64 # [linux and x86_64]
|
||||
- libxxf86vm-cos6-x86_64 # [linux and x86_64]
|
||||
- mesa-dri-drivers-cos6-x86_64 # [linux and x86_64]
|
||||
- mesa-dri1-drivers-cos6-x86_64 # [linux and x86_64]
|
||||
- mesa-libegl-cos6-x86_64 # [linux and x86_64]
|
||||
- mesa-libegl-devel-cos6-x86_64 # [linux and x86_64]
|
||||
- mesa-libgl-cos6-x86_64 # [linux and x86_64]
|
||||
- mesa-libgl-devel-cos6-x86_64 # [linux and x86_64]
|
||||
- pixman-cos6-x86_64 # [linux and x86_64]
|
||||
- sysroot_linux-64 # [linux and x86_64]
|
||||
- xorg-x11-server-common-cos6-x86_64 # [linux and x86_64]
|
||||
- xorg-x11-server-xvfb-cos6-x86_64 # [linux and x86_64]
|
||||
- kernel-headers_linux-aarch64 # [linux and aarch64]
|
||||
- libdrm-cos7-aarch64 # [linux and aarch64]
|
||||
- libglvnd-cos7-aarch64 # [linux and aarch64]
|
||||
- libglvnd-glx-cos7-aarch64 # [linux and aarch64]
|
||||
- libselinux-cos7-aarch64 # [linux and aarch64]
|
||||
- libsepol-cos7-aarch64 # [linux and aarch64]
|
||||
- libx11-common-cos7-aarch64 # [linux and aarch64]
|
||||
- libx11-cos7-aarch64 # [linux and aarch64]
|
||||
- libxau-cos7-aarch64 # [linux and aarch64]
|
||||
- libxcb-cos7-aarch64 # [linux and aarch64]
|
||||
- libxdamage-cos7-aarch64 # [linux and aarch64]
|
||||
- libxext-cos7-aarch64 # [linux and aarch64]
|
||||
- libxfixes-cos7-aarch64 # [linux and aarch64]
|
||||
- libxi-cos7-aarch64 # [linux and aarch64]
|
||||
- libxi-devel-cos7-aarch64 # [linux and aarch64]
|
||||
- libxxf86vm-cos7-aarch64 # [linux and aarch64]
|
||||
- mesa-dri-drivers-cos7-aarch64 # [linux and aarch64]
|
||||
- mesa-khr-devel-cos7-aarch64 # [linux and aarch64]
|
||||
- mesa-libegl-cos7-aarch64 # [linux and aarch64]
|
||||
- mesa-libegl-devel-cos7-aarch64 # [linux and aarch64]
|
||||
- mesa-libgbm-cos7-aarch64 # [linux and aarch64]
|
||||
- mesa-libgl-cos7-aarch64 # [linux and aarch64]
|
||||
- mesa-libgl-devel-cos7-aarch64 # [linux and aarch64]
|
||||
- mesa-libglapi-cos7-aarch64 # [linux and aarch64]
|
||||
- pixman-cos7-aarch64 # [linux and aarch64]
|
||||
- sysroot_linux-aarch64 # [linux and aarch64]
|
||||
- xorg-x11-server-common-cos7-aarch64 # [linux and aarch64]
|
||||
- xorg-x11-server-xvfb-cos7-aarch64 # [linux and aarch64]
|
||||
- sed # [unix]
|
||||
- libspnav # [linux]
|
||||
- kernel-headers_linux-64 # [linux and x86_64]
|
||||
- libdrm-conda-x86_64 # [linux and x86_64]
|
||||
- libselinux-conda-x86_64 # [linux and x86_64]
|
||||
- libsepol-conda-x86_64 # [linux and x86_64]
|
||||
- libx11-common-conda-x86_64 # [linux and x86_64]
|
||||
- libx11-conda-x86_64 # [linux and x86_64]
|
||||
- libxau-conda-x86_64 # [linux and x86_64]
|
||||
- libxcb-conda-x86_64 # [linux and x86_64]
|
||||
- libxdamage-conda-x86_64 # [linux and x86_64]
|
||||
- libxext-conda-x86_64 # [linux and x86_64]
|
||||
- libxfixes-conda-x86_64 # [linux and x86_64]
|
||||
- libxi-conda-x86_64 # [linux and x86_64]
|
||||
- libxi-devel-conda-x86_64 # [linux and x86_64]
|
||||
- libxxf86vm-conda-x86_64 # [linux and x86_64]
|
||||
- mesa-dri-drivers-conda-x86_64 # [linux and x86_64]
|
||||
- mesa-libegl-conda-x86_64 # [linux and x86_64]
|
||||
- mesa-libegl-devel-conda-x86_64 # [linux and x86_64]
|
||||
- mesa-libgl-conda-x86_64 # [linux and x86_64]
|
||||
- mesa-libgl-devel-conda-x86_64 # [linux and x86_64]
|
||||
- pixman-conda-x86_64 # [linux and x86_64]
|
||||
- sysroot_linux-64 # [linux and x86_64]
|
||||
- xorg-x11-server-common-conda-x86_64 # [linux and x86_64]
|
||||
- xorg-x11-server-xvfb-conda-x86_64 # [linux and x86_64]
|
||||
- kernel-headers_linux-aarch64 # [linux and aarch64]
|
||||
- libdrm-conda-aarch64 # [linux and aarch64]
|
||||
- libglvnd-conda-aarch64 # [linux and aarch64]
|
||||
- libglvnd-glx-conda-aarch64 # [linux and aarch64]
|
||||
- libselinux-conda-aarch64 # [linux and aarch64]
|
||||
- libsepol-conda-aarch64 # [linux and aarch64]
|
||||
- libx11-common-conda-aarch64 # [linux and aarch64]
|
||||
- libx11-conda-aarch64 # [linux and aarch64]
|
||||
- libxau-conda-aarch64 # [linux and aarch64]
|
||||
- libxcb-conda-aarch64 # [linux and aarch64]
|
||||
- libxdamage-conda-aarch64 # [linux and aarch64]
|
||||
- libxext-conda-aarch64 # [linux and aarch64]
|
||||
- libxfixes-conda-aarch64 # [linux and aarch64]
|
||||
- libxi-conda-aarch64 # [linux and aarch64]
|
||||
- libxi-devel-conda-aarch64 # [linux and aarch64]
|
||||
- libxxf86vm-conda-aarch64 # [linux and aarch64]
|
||||
- mesa-dri-drivers-conda-aarch64 # [linux and aarch64]
|
||||
- mesa-khr-devel-conda-aarch64 # [linux and aarch64]
|
||||
- mesa-libegl-conda-aarch64 # [linux and aarch64]
|
||||
- mesa-libegl-devel-conda-aarch64 # [linux and aarch64]
|
||||
- mesa-libgbm-conda-aarch64 # [linux and aarch64]
|
||||
- mesa-libgl-conda-aarch64 # [linux and aarch64]
|
||||
- mesa-libgl-devel-conda-aarch64 # [linux and aarch64]
|
||||
- mesa-libglapi-conda-aarch64 # [linux and aarch64]
|
||||
- pixman-conda-aarch64 # [linux and aarch64]
|
||||
- sysroot_linux-aarch64 # [linux and aarch64]
|
||||
- xorg-x11-server-common-conda-aarch64 # [linux and aarch64]
|
||||
- xorg-x11-server-xvfb-conda-aarch64 # [linux and aarch64]
|
||||
- sed # [unix]
|
||||
- ccache
|
||||
- cmake
|
||||
- coin3d
|
||||
- compilers
|
||||
- gcc==13.3.* # [linux]
|
||||
- gxx==13.3.* # [linux]
|
||||
- clang==18.1.* # [osx]
|
||||
- clangxx==18.1.* # [osx]
|
||||
- conda
|
||||
- conda-devenv
|
||||
- debugpy
|
||||
@@ -97,4 +100,4 @@ dependencies:
|
||||
- xerces-c
|
||||
- yaml-cpp
|
||||
- zlib
|
||||
- zstd==1.5.6
|
||||
- zstd
|
||||
|
||||
Binary file not shown.
+53
-39
@@ -7,18 +7,18 @@
|
||||
|
||||
# Maintainers: keep this list of plugins up to date
|
||||
# List plugins in %%{_libdir}/%{name}/lib, less '.so' and 'Gui.so', here
|
||||
%global plugins Fem FreeCAD PathApp Import Inspection Mesh MeshPart Part Points ReverseEngineering Robot Sketcher Start Web PartDesignGui _PartDesign Path PathGui Spreadsheet SpreadsheetGui area DraftUtils DraftUtils libDriver libDriverDAT libDriverSTL libDriverUNV libE57Format libMEFISTO2 libSMDS libSMESH libSMESHDS libStdMeshers Measure TechDraw TechDrawGui libarea-native Surface SurfaceGui AssemblyGui flatmesh QtUnitGui PathSimulator MatGui Material
|
||||
|
||||
%global plugins AssemblyApp AssemblyGui CAMSimulator DraftUtils Fem FreeCAD Import Inspection MatGui Materials Measure Mesh MeshPart Part PartDesignGui Path PathApp PathSimulator Points QtUnitGui ReverseEngineering Robot Sketcher Spreadsheet Start Surface TechDraw Web _PartDesign area flatmesh libDriver libDriverDAT libDriverSTL libDriverUNV libE57Format libMEFISTO2 libOndselSolver libSMDS libSMESH libSMESHDS libStdMeshers libarea-native
|
||||
|
||||
# Some configuration options for other environments
|
||||
# rpmbuild --with=bundled_zipios: use bundled version of zipios++
|
||||
%global bundled_zipios %{?_with_bundled_zipios: 1} %{?!_with_bundled_zipios: 1}
|
||||
# rpmbuild --without=bundled_pycxx: don't use bundled version of pycxx
|
||||
# rpmbuild --with=pcl_enabled: build with pcl support
|
||||
%global pcl_enabled %{?_with_pcl_enabled: 1} %{?!_with_pcl_enabled: 0}
|
||||
# rpmbuild --without=bundled_pycxx: use bundled version of pycxx
|
||||
%global bundled_pycxx %{?_without_bundled_pycxx: 0} %{?!_without_bundled_pycxx: 1}
|
||||
# rpmbuild --without=bundled_zipios: use bundled version of zipios++
|
||||
%global bundled_zipios %{?_without_bundled_zipios: 0} %{?!_without_bundled_zipios: 1}
|
||||
# rpmbuild --without=bundled_smesh: don't use bundled version of Salome's Mesh
|
||||
%global bundled_smesh %{?_without_bundled_smesh: 0} %{?!_without_bundled_smesh: 1}
|
||||
|
||||
|
||||
# Prevent RPM from doing its magical 'build' directory for now
|
||||
%global __cmake_in_source_build 0
|
||||
|
||||
@@ -33,15 +33,17 @@
|
||||
|
||||
Name: %{name}
|
||||
Epoch: 1
|
||||
Version: 0.22
|
||||
Release: pre_{{{git_commit_no}}}%{?dist}
|
||||
Version: 1.0.2
|
||||
Release: {{{git_commit_no}}}%{?dist}
|
||||
Summary: A general purpose 3D CAD modeler
|
||||
Group: Applications/Engineering
|
||||
|
||||
License: LGPLv2+
|
||||
URL: https://www.freecad.org/
|
||||
Source0: https://github.com/%{github_name}/FreeCAD/archive/%{branch}.tar.gz
|
||||
|
||||
Source0: {{{ git_repo_pack }}}
|
||||
#add all submodule as source
|
||||
Source1: {{{ git_pack path=$GIT_ROOT/src/3rdParty/OndselSolver/ dir_name="OndselSolver" }}}
|
||||
Source2: {{{ git_pack path=$GIT_ROOT/src/3rdParty/GSL/ dir_name="GSL" }}}
|
||||
|
||||
# Utilities
|
||||
BuildRequires: cmake gcc-c++ gettext
|
||||
@@ -63,21 +65,19 @@ BuildRequires: python3-devel
|
||||
BuildRequires: python3-matplotlib
|
||||
BuildRequires: python3-pivy
|
||||
BuildRequires: boost-devel
|
||||
BuildRequires: boost-python3-devel
|
||||
BuildRequires: eigen3-devel
|
||||
# Qt5 dependencies
|
||||
\BuildRequires: qt5-qtsvg-devel
|
||||
BuildRequires: qt5-qttools-static
|
||||
BuildRequires: qt6-qtsvg-devel
|
||||
BuildRequires: qt6-qttools-static
|
||||
|
||||
BuildRequires: fmt-devel
|
||||
|
||||
|
||||
BuildRequires: xerces-c
|
||||
BuildRequires: xerces-c-devel
|
||||
BuildRequires: libspnav-devel
|
||||
BuildRequires: python3-shiboken2-devel
|
||||
BuildRequires: python3-pyside2-devel
|
||||
BuildRequires: pyside2-tools
|
||||
|
||||
BuildRequires: python3-shiboken6-devel
|
||||
BuildRequires: python3-pyside6-devel
|
||||
BuildRequires: pyside6-tools
|
||||
%if ! %{bundled_smesh}
|
||||
BuildRequires: smesh-devel
|
||||
%endif
|
||||
@@ -90,13 +90,16 @@ BuildRequires: zipios++-devel
|
||||
%if ! %{bundled_pycxx}
|
||||
BuildRequires: python3-pycxx-devel
|
||||
%endif
|
||||
BuildRequires: python3-pybind11
|
||||
BuildRequires: libicu-devel
|
||||
BuildRequires: vtk-devel
|
||||
BuildRequires: openmpi-devel
|
||||
BuildRequires: med-devel
|
||||
BuildRequires: libkdtree++-devel
|
||||
|
||||
%if %{pcl_enabled}
|
||||
BuildRequires: pcl-devel
|
||||
%endif
|
||||
BuildRequires: python3
|
||||
BuildRequires: libglvnd-devel
|
||||
BuildRequires: yaml-cpp-devel
|
||||
@@ -111,7 +114,8 @@ BuildRequires: libappstream-glib
|
||||
# here.
|
||||
Requires: %{name}-data = %{epoch}:%{version}-%{release}
|
||||
# Obsolete old doc package since it's required for functionality.
|
||||
Obsoletes: %{name}-doc < 0.13-5
|
||||
Obsoletes: %{name}-doc < 0.22-1
|
||||
|
||||
Requires: hicolor-icon-theme
|
||||
|
||||
Requires: fmt
|
||||
@@ -119,8 +123,9 @@ Requires: fmt
|
||||
Requires: python3-pivy
|
||||
Requires: python3-matplotlib
|
||||
Requires: python3-collada
|
||||
Requires: python3-pyside2
|
||||
Requires: qt5-assistant
|
||||
Requires: python3-pyside6
|
||||
Requires: qt6-assistant
|
||||
|
||||
|
||||
%if %{bundled_smesh}
|
||||
Provides: bundled(smesh) = %{bundled_smesh_version}
|
||||
@@ -163,7 +168,13 @@ Data files for FreeCAD
|
||||
|
||||
|
||||
%prep
|
||||
%autosetup -p1 -n FreeCAD-%{branch}
|
||||
rm -rf %{github_name}
|
||||
# extract submodule archive and move in correct path
|
||||
%setup -T -a 1 -c -q -D -n %{github_name}/src/3rdParty/ #OndselSolver
|
||||
%setup -T -a 2 -c -q -D -n %{github_name}/src/3rdParty/ #GSL
|
||||
|
||||
%setup -T -b 0 -q -D -n %{github_name}
|
||||
|
||||
# Remove bundled pycxx if we're not using it
|
||||
%if ! %{bundled_pycxx}
|
||||
rm -rf src/CXX
|
||||
@@ -184,11 +195,7 @@ rm -rf build && mkdir build && cd build
|
||||
CXXFLAGS='-Wno-error=cast-function-type'; export CXXFLAGS
|
||||
LDFLAGS='-Wl,--as-needed -Wl,--no-undefined'; export LDFLAGS
|
||||
|
||||
%if 0%{?fedora} > 27
|
||||
%define MEDFILE_INCLUDE_DIRS %{_includedir}/med/
|
||||
%else
|
||||
%define MEDFILE_INCLUDE_DIRS %{_includedir}/
|
||||
%endif
|
||||
|
||||
%cmake \
|
||||
-DCMAKE_INSTALL_PREFIX=%{_libdir}/%{name} \
|
||||
@@ -197,19 +204,24 @@ LDFLAGS='-Wl,--as-needed -Wl,--no-undefined'; export LDFLAGS
|
||||
-DCMAKE_INSTALL_INCLUDEDIR=%{_includedir} \
|
||||
-DRESOURCEDIR=%{_datadir}/%{name} \
|
||||
-DFREECAD_USE_EXTERNAL_PIVY=TRUE \
|
||||
-DFREECAD_USE_PCL=TRUE \
|
||||
-DBUILD_QT5=ON \
|
||||
-DSHIBOKEN_INCLUDE_DIR=%{_includedir}/shiboken2 \
|
||||
-DSHIBOKEN_LIBRARY=-lshiboken2.%{py_suffix} \
|
||||
-DFREECAD_USE_EXTERNAL_FMT=TRUE \
|
||||
-DFREECAD_QT_VERSION:STRING=6 \
|
||||
-DSHIBOKEN_INCLUDE_DIR=%{_includedir}/shiboken6 \
|
||||
-DSHIBOKEN_LIBRARY=-lshiboken6.%{py_suffix} \
|
||||
-DPYTHON_SUFFIX=.%{py_suffix} \
|
||||
-DPYSIDE_INCLUDE_DIR=/usr/include/PySide2 \
|
||||
-DPYSIDE_LIBRARY=-lpyside2.%{py_suffix} \
|
||||
-DPYTHON_EXECUTABLE:FILEPATH=/usr/bin/python3 \
|
||||
-DPYSIDE_INCLUDE_DIR=/usr/include/PySide6 \
|
||||
-DPYSIDE_LIBRARY=-lpyside6.%{py_suffix} \
|
||||
-DPython3_EXECUTABLE:FILEPATH=/usr/bin/python3 \
|
||||
-DMEDFILE_INCLUDE_DIRS=%{MEDFILE_INCLUDE_DIRS} \
|
||||
-DOpenGL_GL_PREFERENCE=GLVND \
|
||||
-DCOIN3D_INCLUDE_DIR=%{_includedir}/Coin4 \
|
||||
-DCOIN3D_DOC_PATH=%{_datadir}/Coin4/Coin \
|
||||
-DUSE_OCC=TRUE \
|
||||
%if %{pcl_enabled}
|
||||
-DFREECAD_USE_PCL:BOOL=ON \
|
||||
%else
|
||||
-DFREECAD_USE_PCL:BOOL=OFF \
|
||||
%endif
|
||||
%if ! %{bundled_smesh}
|
||||
-DFREECAD_USE_EXTERNAL_SMESH=TRUE \
|
||||
-DSMESH_FOUND=TRUE \
|
||||
@@ -226,7 +238,7 @@ LDFLAGS='-Wl,--as-needed -Wl,--no-undefined'; export LDFLAGS
|
||||
-DPACKAGE_WCREF="%{release} (Git)" \
|
||||
-DPACKAGE_WCURL="git://github.com/%{github_name}/FreeCAD.git main" \
|
||||
-DENABLE_DEVELOPER_TESTS=FALSE \
|
||||
-DBUILD_GUI=TRUE \
|
||||
-DBUILD_GUI=TRUE \
|
||||
../
|
||||
|
||||
make fc_version
|
||||
@@ -274,12 +286,13 @@ popd
|
||||
|
||||
# Remove obsolete Start_Page.html
|
||||
rm -f %{buildroot}%{_docdir}/%{name}/Start_Page.html
|
||||
# Belongs in %%license not %%doc
|
||||
rm -f %{buildroot}%{_docdir}/freecad/ThirdPartyLibraries.html
|
||||
|
||||
# Remove header from external library that's erroneously installed
|
||||
rm -f %{buildroot}%{_libdir}/%{name}/include/E57Format/E57Export.h
|
||||
|
||||
rm -rf %{buildroot}%{_includedir}/OndselSolver/*
|
||||
rm -f %{buildroot}%{_libdir}/%{name}/share/pkgconfig/OndselSolver.pc
|
||||
|
||||
# Bug maintainers to keep %%{plugins} macro up to date.
|
||||
#
|
||||
# Make sure there are no plugins that need to be added to plugins macro
|
||||
@@ -346,12 +359,13 @@ fi
|
||||
%{_datadir}/pixmaps/*
|
||||
%{_datadir}/mime/packages/*
|
||||
%{_datadir}/thumbnailers/*
|
||||
%{_libdir}/../lib/python*/site-packages/%{name}/*
|
||||
|
||||
%files data
|
||||
%{_datadir}/%{name}/
|
||||
%{_docdir}/%{name}/LICENSE.html
|
||||
|
||||
%{_docdir}/%{name}/ThirdPartyLibraries.html
|
||||
|
||||
%changelog
|
||||
|
||||
|
||||
* Mon Mar 10 2025 Leif-Jöran Olsson <info@friprogramvarusyndikatet.se> - 1.1.0-1
|
||||
- Adding support for building with Qt6 and PySide6 for Fedora 40+
|
||||
|
||||
@@ -0,0 +1,154 @@
|
||||
[project]
|
||||
name = "FreeCAD"
|
||||
version = "1.0.0"
|
||||
description = "pixi instructions for FreeCAD"
|
||||
authors = ["looooo <sppedflyer@gmail.com>"]
|
||||
channels = ["conda-forge"]
|
||||
platforms = [ "linux-64", "linux-aarch64", "osx-64", "osx-arm64", "win-64" ]
|
||||
|
||||
[dependencies]
|
||||
ccache = "*"
|
||||
cmake = "3.28.3"
|
||||
coin3d = "*"
|
||||
compilers = "*"
|
||||
conda-devenv = "*"
|
||||
debugpy = "*"
|
||||
doxygen = "*"
|
||||
eigen = "*"
|
||||
fmt = "*"
|
||||
freetype = "*"
|
||||
git = "*"
|
||||
graphviz = "*"
|
||||
hdf5 = "*"
|
||||
libboost-devel = "*"
|
||||
matplotlib = "*"
|
||||
ninja = "*"
|
||||
noqt5 = "*"
|
||||
numpy = "*"
|
||||
occt = "*"
|
||||
openssl = "*"
|
||||
pcl = "*"
|
||||
pip = "*"
|
||||
pivy = "*"
|
||||
ply = "*"
|
||||
pre-commit = "*"
|
||||
pybind11 = "*"
|
||||
pyside6 = "*"
|
||||
python = "3.13"
|
||||
pyyaml = "*"
|
||||
qt6-main = "*"
|
||||
scipy = ">=1.14.1,<2"
|
||||
six = "*"
|
||||
smesh = "*"
|
||||
swig = "*"
|
||||
vtk = "*"
|
||||
xerces-c = "*"
|
||||
yaml-cpp = "*"
|
||||
zlib = "*"
|
||||
zstd = "*"
|
||||
|
||||
## Linux Dependencies (x86-64)
|
||||
[target.linux-64.dependencies]
|
||||
kernel-headers_linux-64 = "*"
|
||||
libdrm-cos7-x86_64 = "*"
|
||||
libselinux-cos7-x86_64 = "*"
|
||||
libsepol-cos7-x86_64 = "*"
|
||||
libspnav = "*"
|
||||
libx11-common-cos7-x86_64 = "*"
|
||||
libx11-cos7-x86_64 = "*"
|
||||
libxau-cos7-x86_64 = "*"
|
||||
libxcb-cos7-x86_64 = "*"
|
||||
libxdamage-cos7-x86_64 = "*"
|
||||
libxext-cos7-x86_64 = "*"
|
||||
libxfixes-cos7-x86_64 = "*"
|
||||
libxi-cos7-x86_64 = "*"
|
||||
libxi-devel-cos7-x86_64 = "*"
|
||||
libxxf86vm-cos7-x86_64 = "*"
|
||||
mesa-dri-drivers-cos7-x86_64 = "*"
|
||||
mesa-libegl-cos7-x86_64 = "*"
|
||||
mesa-libegl-devel-cos7-x86_64 = "*"
|
||||
mesa-libgl-cos7-x86_64 = "*"
|
||||
mesa-libgl-devel-cos7-x86_64 = "*"
|
||||
pixman-cos7-x86_64 = "*"
|
||||
sed = "*"
|
||||
sysroot_linux-64 = "*"
|
||||
xorg-x11-server-common-cos7-x86_64 = "*"
|
||||
xorg-x11-server-xvfb-cos7-x86_64 = "*"
|
||||
xorg-xproto = "*"
|
||||
|
||||
## Linux Dependencies (aarch64)
|
||||
[target.linux-aarch64.dependencies]
|
||||
kernel-headers_linux-aarch64 = "*"
|
||||
libdrm-cos7-aarch64 = "*"
|
||||
libglvnd-cos7-aarch64 = "*"
|
||||
libglvnd-glx-cos7-aarch64 = "*"
|
||||
libselinux-cos7-aarch64 = "*"
|
||||
libsepol-cos7-aarch64 = "*"
|
||||
libspnav = "*"
|
||||
libx11-common-cos7-aarch64 = "*"
|
||||
libx11-cos7-aarch64 = "*"
|
||||
libxau-cos7-aarch64 = "*"
|
||||
libxcb-cos7-aarch64 = "*"
|
||||
libxdamage-cos7-aarch64 = "*"
|
||||
libxext-cos7-aarch64 = "*"
|
||||
libxfixes-cos7-aarch64 = "*"
|
||||
libxi-cos7-aarch64 = "*"
|
||||
libxi-devel-cos7-aarch64 = "*"
|
||||
libxxf86vm-cos7-aarch64 = "*"
|
||||
mesa-dri-drivers-cos7-aarch64 = "*"
|
||||
mesa-khr-devel-cos7-aarch64 = "*"
|
||||
mesa-libegl-cos7-aarch64 = "*"
|
||||
mesa-libegl-devel-cos7-aarch64 = "*"
|
||||
mesa-libgbm-cos7-aarch64 = "*"
|
||||
mesa-libgl-cos7-aarch64 = "*"
|
||||
mesa-libgl-devel-cos7-aarch64 = "*"
|
||||
mesa-libglapi-cos7-aarch64 = "*"
|
||||
pixman-cos7-aarch64 = "*"
|
||||
sed = "*"
|
||||
sysroot_linux-aarch64 = "*"
|
||||
xorg-x11-server-common-cos7-aarch64 = "*"
|
||||
xorg-x11-server-xvfb-cos7-aarch64 = "*"
|
||||
xorg-xproto = "*"
|
||||
|
||||
## macOS Dependencies (Intel)
|
||||
[target.osx-64.dependencies]
|
||||
sed = "*"
|
||||
|
||||
## macOS Dependencies (Apple Silicon)
|
||||
[target.osx-arm64.dependencies]
|
||||
sed = "*"
|
||||
|
||||
## Qt 6 Configuration Presets
|
||||
[target.linux-64.tasks]
|
||||
configure = { cmd = [ "cmake", "-B", "build", "--preset", "conda-linux-debug", "-DFREECAD_QT_VERSION=6", "-DBUILD_REVERSEENGINEERING=OFF" ], depends-on = ["initialize"]}
|
||||
configure-debug = { cmd = [ "cmake", "-B", "build", "--preset", "conda-linux-debug", "-DFREECAD_QT_VERSION=6", "-DBUILD_REVERSEENGINEERING=OFF" ], depends-on = ["initialize"]}
|
||||
configure-release = { cmd = [ "cmake", "-B", "build", "--preset", "conda-linux-release", "-DFREECAD_QT_VERSION=6", "-DBUILD_REVERSEENGINEERING=OFF" ], depends-on = ["initialize"]}
|
||||
|
||||
[target.linux-aarch64.tasks]
|
||||
configure = { cmd = [ "cmake", "-B", "build", "--preset", "conda-linux-debug", "-DFREECAD_QT_VERSION=6", "-DBUILD_REVERSEENGINEERING=OFF" ], depends-on= ["initialize"]}
|
||||
configure-debug = { cmd = [ "cmake", "-B", "build", "--preset", "conda-linux-debug", "-DFREECAD_QT_VERSION=6", "-DBUILD_REVERSEENGINEERING=OFF" ], depends-on= ["initialize"]}
|
||||
configure-release = { cmd = [ "cmake", "-B", "build", "--preset", "conda-linux-release", "-DFREECAD_QT_VERSION=6", "-DBUILD_REVERSEENGINEERING=OFF" ], depends-on= ["initialize"]}
|
||||
|
||||
[target.osx-64.tasks]
|
||||
configure = { cmd = [ "cmake", "-B", "build", "--preset", "conda-macos-debug", "-DFREECAD_QT_VERSION=6", "-DBUILD_REVERSEENGINEERING=OFF" ], depends-on = ["initialize"]}
|
||||
configure-debug = { cmd = [ "cmake", "-B", "build", "--preset", "conda-macos-debug", "-DFREECAD_QT_VERSION=6", "-DBUILD_REVERSEENGINEERING=OFF" ], depends-on = ["initialize"]}
|
||||
configure-release = { cmd = [ "cmake", "-B", "build", "--preset", "conda-macos-release", "-DFREECAD_QT_VERSION=6", "-DBUILD_REVERSEENGINEERING=OFF" ], depends-on = ["initialize"]}
|
||||
|
||||
[target.osx-arm64.tasks]
|
||||
configure = { cmd = [ "cmake", "-B", "build", "--preset", "conda-macos-debug", "-DFREECAD_QT_VERSION=6", "-DBUILD_REVERSEENGINEERING=OFF" ], depends-on = ["initialize"]}
|
||||
configure-debug = { cmd = [ "cmake", "-B", "build", "--preset", "conda-macos-debug", "-DFREECAD_QT_VERSION=6", "-DBUILD_REVERSEENGINEERING=OFF" ], depends-on = ["initialize"]}
|
||||
configure-release = { cmd = [ "cmake", "-B", "build", "--preset", "conda-macos-release", "-DFREECAD_QT_VERSION=6", "-DBUILD_REVERSEENGINEERING=OFF" ], depends-on = ["initialize"]}
|
||||
|
||||
[target.win-64.tasks]
|
||||
configure = { cmd = [ "cmake", "-B", "build", "--preset", "conda-windows-debug", "-DFREECAD_QT_VERSION=6", "-DBUILD_REVERSEENGINEERING=OFF" ], depends-on = ["initialize"]}
|
||||
configure-debug = { cmd = [ "cmake", "-B", "build", "--preset", "conda-windows-debug", "-DFREECAD_QT_VERSION=6", "-DBUILD_REVERSEENGINEERING=OFF" ], depends-on = ["initialize"]}
|
||||
configure-release = { cmd = [ "cmake", "-B", "build", "--preset", "conda-windows-release", "-DFREECAD_QT_VERSION=6", "-DBUILD_REVERSEENGINEERING=OFF" ], depends-on = ["initialize"]}
|
||||
freecad = { cmd = [ ".pixi/envs/default/Library/bin/FreeCAD.exe" ], depends-on = ["install"]}
|
||||
|
||||
## Tasks
|
||||
[tasks]
|
||||
initialize = { cmd = ["git", "submodule", "update", "--init", "--recursive"]}
|
||||
build = { cmd = [ "cmake", "--build", "build" ] }
|
||||
install = { cmd = [ "cmake", "--install", "build" ] }
|
||||
test = { cmd = [ "ctest", "--test-dir", "build" ] }
|
||||
freecad = "build/bin/FreeCAD"
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
function git_commit_no {
|
||||
commits=$(curl -s 'https://api.github.com/repos/FreeCAD/FreeCAD/compare/120ca87015...master' | grep "\"ahead_by\":" | sed -s 's/ //g' | sed -s 's/"ahead_by"://' | sed -s 's/,//')
|
||||
commits=$(curl -s 'https://api.github.com/repos/FreeCAD/FreeCAD/compare/120ca87015...main' | grep "\"ahead_by\":" | sed -s 's/ //g' | sed -s 's/"ahead_by"://' | sed -s 's/,//')
|
||||
echo -n $((commits + 1))
|
||||
}
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
// </history>
|
||||
#include <navlib/navlib_types.h>
|
||||
// stdlib
|
||||
#include <chrono>
|
||||
#include <map>
|
||||
#include <memory>
|
||||
#include <stdexcept>
|
||||
|
||||
Vendored
+1
-1
Submodule src/3rdParty/OndselSolver updated: 91f70382be...09d6175a2b
@@ -96,7 +96,11 @@ public:
|
||||
vtkCellLinks* GetLinks()
|
||||
{
|
||||
#ifdef VTK_CELL_ARRAY_V2
|
||||
#if VTK_VERSION_NUMBER_QUICK >= 90300000000
|
||||
return static_cast<vtkCellLinks*>(vtkUnstructuredGrid::GetLinks());
|
||||
#else
|
||||
return static_cast<vtkCellLinks*>(GetCellLinks());
|
||||
#endif
|
||||
#else
|
||||
return Links;
|
||||
#endif
|
||||
|
||||
@@ -4713,7 +4713,11 @@ void SMDS_Mesh::dumpGrid(string ficdump)
|
||||
}
|
||||
ficcon << "-------------------------------- connectivity " << nbPoints << endl;
|
||||
#ifdef VTK_CELL_ARRAY_V2
|
||||
#if VTK_VERSION_NUMBER_QUICK >= 90300000000
|
||||
vtkCellLinks *links = static_cast<vtkCellLinks*>(myGrid->GetLinks());
|
||||
#else
|
||||
vtkCellLinks *links = static_cast<vtkCellLinks*>(myGrid->GetCellLinks());
|
||||
#endif
|
||||
#else
|
||||
vtkCellLinks *links = myGrid->GetCellLinks();
|
||||
#endif
|
||||
|
||||
@@ -69,7 +69,11 @@ void SMDS_MeshNode::init(int id, int meshId, int shapeId, double x, double y, do
|
||||
SMDS_UnstructuredGrid * grid = mesh->getGrid();
|
||||
vtkPoints *points = grid->GetPoints();
|
||||
points->InsertPoint(myVtkID, x, y, z);
|
||||
#if VTK_VERSION_NUMBER_QUICK >= 90300000000
|
||||
SMDS_CellLinks *cellLinks = dynamic_cast<SMDS_CellLinks*>(grid->GetLinks());
|
||||
#else
|
||||
SMDS_CellLinks *cellLinks = dynamic_cast<SMDS_CellLinks*>(grid->GetCellLinks());
|
||||
#endif
|
||||
assert(cellLinks);
|
||||
cellLinks->ResizeForPoint( myVtkID );
|
||||
}
|
||||
@@ -191,7 +195,11 @@ public:
|
||||
SMDS_ElemIteratorPtr SMDS_MeshNode::
|
||||
GetInverseElementIterator(SMDSAbs_ElementType type) const
|
||||
{
|
||||
#if VTK_VERSION_NUMBER_QUICK >= 90300000000
|
||||
vtkCellLinks::Link l = static_cast<vtkCellLinks*>(SMDS_Mesh::_meshList[myMeshId]->getGrid()->GetLinks())->GetLink(myVtkID);
|
||||
#else
|
||||
vtkCellLinks::Link l = static_cast<vtkCellLinks*>(SMDS_Mesh::_meshList[myMeshId]->getGrid()->GetCellLinks())->GetLink(myVtkID);
|
||||
#endif
|
||||
//MESSAGE("myID " << myID << " ncells " << l.ncells);
|
||||
return SMDS_ElemIteratorPtr(new SMDS_MeshNode_MyInvIterator(SMDS_Mesh::_meshList[myMeshId], l.cells, l.ncells, type));
|
||||
}
|
||||
@@ -251,7 +259,11 @@ elementsIterator(SMDSAbs_ElementType type) const
|
||||
return SMDS_MeshElement::elementsIterator(SMDSAbs_Node);
|
||||
else
|
||||
{
|
||||
#if VTK_VERSION_NUMBER_QUICK >= 90300000000
|
||||
vtkCellLinks::Link l = static_cast<vtkCellLinks*>(SMDS_Mesh::_meshList[myMeshId]->getGrid()->GetLinks())->GetLink(myVtkID);
|
||||
#else
|
||||
vtkCellLinks::Link l = static_cast<vtkCellLinks*>(SMDS_Mesh::_meshList[myMeshId]->getGrid()->GetCellLinks())->GetLink(myVtkID);
|
||||
#endif
|
||||
return SMDS_ElemIteratorPtr(new SMDS_MeshNode_MyIterator(SMDS_Mesh::_meshList[myMeshId], l.cells, l.ncells, type));
|
||||
}
|
||||
}
|
||||
@@ -350,7 +362,11 @@ void SMDS_MeshNode::AddInverseElement(const SMDS_MeshElement* ME)
|
||||
const SMDS_MeshCell *cell = dynamic_cast<const SMDS_MeshCell*> (ME);
|
||||
assert(cell);
|
||||
SMDS_UnstructuredGrid* grid = SMDS_Mesh::_meshList[myMeshId]->getGrid();
|
||||
#if VTK_VERSION_NUMBER_QUICK >= 90300000000
|
||||
vtkCellLinks *Links = static_cast<vtkCellLinks*>(grid->GetLinks());
|
||||
#else
|
||||
vtkCellLinks *Links = static_cast<vtkCellLinks*>(grid->GetCellLinks());
|
||||
#endif
|
||||
Links->ResizeCellList(myVtkID, 1);
|
||||
Links->AddCellReference(cell->getVtkId(), myVtkID);
|
||||
}
|
||||
@@ -366,7 +382,11 @@ void SMDS_MeshNode::ClearInverseElements()
|
||||
|
||||
bool SMDS_MeshNode::emptyInverseElements()
|
||||
{
|
||||
#if VTK_VERSION_NUMBER_QUICK >= 90300000000
|
||||
vtkCellLinks::Link l = static_cast<vtkCellLinks*>(SMDS_Mesh::_meshList[myMeshId]->getGrid()->GetLinks())->GetLink(myVtkID);
|
||||
#else
|
||||
vtkCellLinks::Link l = static_cast<vtkCellLinks*>(SMDS_Mesh::_meshList[myMeshId]->getGrid()->GetCellLinks())->GetLink(myVtkID);
|
||||
#endif
|
||||
return (l.ncells == 0);
|
||||
}
|
||||
|
||||
@@ -378,7 +398,11 @@ bool SMDS_MeshNode::emptyInverseElements()
|
||||
|
||||
int SMDS_MeshNode::NbInverseElements(SMDSAbs_ElementType type) const
|
||||
{
|
||||
#if VTK_VERSION_NUMBER_QUICK >= 90300000000
|
||||
vtkCellLinks::Link l = static_cast<vtkCellLinks*>(SMDS_Mesh::_meshList[myMeshId]->getGrid()->GetLinks())->GetLink(myVtkID);
|
||||
#else
|
||||
vtkCellLinks::Link l = static_cast<vtkCellLinks*>(SMDS_Mesh::_meshList[myMeshId]->getGrid()->GetCellLinks())->GetLink(myVtkID);
|
||||
#endif
|
||||
|
||||
if ( type == SMDSAbs_All )
|
||||
return l.ncells;
|
||||
|
||||
+10
-7
@@ -32,6 +32,7 @@
|
||||
#include <vtkDoubleArray.h>
|
||||
#include <vtkIdTypeArray.h>
|
||||
#include <vtkUnsignedCharArray.h>
|
||||
#include <vtkVersionMacros.h>
|
||||
|
||||
#include <list>
|
||||
#include <climits>
|
||||
@@ -249,14 +250,16 @@ void SMDS_UnstructuredGrid::compactGrid(std::vector<int>& idNodesOldToNew, int n
|
||||
}
|
||||
}
|
||||
|
||||
if (this->FaceLocations)
|
||||
vtkIdTypeArray* thisFaceLocations = GetFaceLocations();
|
||||
vtkIdTypeArray* thisFaces = GetFaces();
|
||||
if (thisFaceLocations)
|
||||
{
|
||||
vtkIdTypeArray *newFaceLocations = vtkIdTypeArray::New();
|
||||
newFaceLocations->Initialize();
|
||||
newFaceLocations->Allocate(newTypes->GetSize());
|
||||
vtkIdTypeArray *newFaces = vtkIdTypeArray::New();
|
||||
newFaces->Initialize();
|
||||
newFaces->Allocate(this->Faces->GetSize());
|
||||
newFaces->Allocate(thisFaces->GetSize());
|
||||
for (int i = 0; i < oldCellSize; i++)
|
||||
{
|
||||
if (this->Types->GetValue(i) == VTK_EMPTY_CELL)
|
||||
@@ -265,16 +268,16 @@ void SMDS_UnstructuredGrid::compactGrid(std::vector<int>& idNodesOldToNew, int n
|
||||
if (newTypes->GetValue(newCellId) == VTK_POLYHEDRON)
|
||||
{
|
||||
newFaceLocations->InsertNextValue(newFaces->GetMaxId()+1);
|
||||
int oldFaceLoc = this->FaceLocations->GetValue(i);
|
||||
int nCellFaces = this->Faces->GetValue(oldFaceLoc++);
|
||||
int oldFaceLoc = thisFaceLocations->GetValue(i);
|
||||
int nCellFaces = thisFaces->GetValue(oldFaceLoc++);
|
||||
newFaces->InsertNextValue(nCellFaces);
|
||||
for (int n=0; n<nCellFaces; n++)
|
||||
{
|
||||
int nptsInFace = this->Faces->GetValue(oldFaceLoc++);
|
||||
int nptsInFace = thisFaces->GetValue(oldFaceLoc++);
|
||||
newFaces->InsertNextValue(nptsInFace);
|
||||
for (int k=0; k<nptsInFace; k++)
|
||||
{
|
||||
int oldpt = this->Faces->GetValue(oldFaceLoc++);
|
||||
int oldpt = thisFaces->GetValue(oldFaceLoc++);
|
||||
newFaces->InsertNextValue(idNodesOldToNew[oldpt]);
|
||||
}
|
||||
}
|
||||
@@ -292,7 +295,7 @@ void SMDS_UnstructuredGrid::compactGrid(std::vector<int>& idNodesOldToNew, int n
|
||||
}
|
||||
else
|
||||
{
|
||||
this->SetCells(newTypes, newLocations, newConnectivity, FaceLocations, Faces);
|
||||
this->SetCells(newTypes, newLocations, newConnectivity, thisFaceLocations, thisFaces);
|
||||
}
|
||||
|
||||
newPoints->Delete();
|
||||
|
||||
@@ -11348,7 +11348,11 @@ bool SMESH_MeshEditor::DoubleNodesOnGroupBoundaries( const std::vector<TIDSorted
|
||||
{
|
||||
int oldId = *itn;
|
||||
//MESSAGE(" node " << oldId);
|
||||
#if VTK_VERSION_NUMBER_QUICK >= 90300000000
|
||||
vtkCellLinks::Link l = static_cast<vtkCellLinks*>(grid->GetLinks())->GetLink(oldId);
|
||||
#else
|
||||
vtkCellLinks::Link l = static_cast<vtkCellLinks*>(grid->GetCellLinks())->GetLink(oldId);
|
||||
#endif
|
||||
for (int i=0; i<l.ncells; i++)
|
||||
{
|
||||
int vtkId = l.cells[i];
|
||||
@@ -11708,7 +11712,11 @@ bool SMESH_MeshEditor::DoubleNodesOnGroupBoundaries( const std::vector<TIDSorted
|
||||
{
|
||||
int oldId = itnod->first;
|
||||
//MESSAGE(" node " << oldId);
|
||||
#if VTK_VERSION_NUMBER_QUICK >= 90300000000
|
||||
vtkCellLinks::Link l = static_cast<vtkCellLinks*>(grid->GetLinks())->GetLink(oldId);
|
||||
#else
|
||||
vtkCellLinks::Link l = static_cast<vtkCellLinks*>(grid->GetCellLinks())->GetLink(oldId);
|
||||
#endif
|
||||
for (int i = 0; i < l.ncells; i++)
|
||||
{
|
||||
int vtkId = l.cells[i];
|
||||
|
||||
+13
-1
@@ -37,6 +37,7 @@
|
||||
# include <boost/date_time/posix_time/posix_time.hpp>
|
||||
# include <chrono>
|
||||
# include <random>
|
||||
# include <fmt/format.h>
|
||||
#endif
|
||||
|
||||
#ifdef FC_OS_WIN32
|
||||
@@ -1142,6 +1143,17 @@ std::string Application::getExecutableName()
|
||||
return mConfig["ExeName"];
|
||||
}
|
||||
|
||||
std::string Application::getNameWithVersion()
|
||||
{
|
||||
auto appname = QCoreApplication::applicationName().toStdString();
|
||||
auto config = App::Application::Config();
|
||||
auto major = config["BuildVersionMajor"];
|
||||
auto minor = config["BuildVersionMinor"];
|
||||
auto point = config["BuildVersionPoint"];
|
||||
auto suffix = config["BuildVersionSuffix"];
|
||||
return fmt::format("{} {}.{}.{}{}", appname, major, minor, point, suffix);
|
||||
}
|
||||
|
||||
std::string Application::getTempPath()
|
||||
{
|
||||
return mConfig["AppTempPath"];
|
||||
@@ -3049,7 +3061,7 @@ void Application::LoadParameters()
|
||||
}
|
||||
}
|
||||
|
||||
#if defined(_MSC_VER) && BOOST_VERSION < 108300
|
||||
#if defined(_MSC_VER) && BOOST_VERSION < 108200
|
||||
// fix weird error while linking boost (all versions of VC)
|
||||
// VS2010: https://forum.freecad.org/viewtopic.php?f=4&t=1886&p=12553&hilit=boost%3A%3Afilesystem%3A%3Aget#p12553
|
||||
namespace boost { namespace program_options { std::string arg="arg"; } }
|
||||
|
||||
@@ -406,6 +406,7 @@ public:
|
||||
//@{
|
||||
static std::string getHomePath();
|
||||
static std::string getExecutableName();
|
||||
static std::string getNameWithVersion();
|
||||
/*!
|
||||
Returns the temporary directory. By default, this is set to the
|
||||
system's temporary directory but can be customized by the user.
|
||||
|
||||
@@ -851,7 +851,7 @@ PyObject *Application::sCheckLinkDepth(PyObject * /*self*/, PyObject *args)
|
||||
return nullptr;
|
||||
|
||||
PY_TRY {
|
||||
return Py::new_reference_to(Py::Int(GetApplication().checkLinkDepth(depth, MessageOption::Throw)));
|
||||
return Py::new_reference_to(Py::Long(GetApplication().checkLinkDepth(depth, MessageOption::Throw)));
|
||||
}PY_CATCH;
|
||||
}
|
||||
|
||||
@@ -926,7 +926,7 @@ PyObject *Application::sSetActiveTransaction(PyObject * /*self*/, PyObject *args
|
||||
return nullptr;
|
||||
|
||||
PY_TRY {
|
||||
Py::Int ret(GetApplication().setActiveTransaction(name, Base::asBoolean(persist)));
|
||||
Py::Long ret(GetApplication().setActiveTransaction(name, Base::asBoolean(persist)));
|
||||
return Py::new_reference_to(ret);
|
||||
}PY_CATCH;
|
||||
}
|
||||
@@ -943,7 +943,7 @@ PyObject *Application::sGetActiveTransaction(PyObject * /*self*/, PyObject *args
|
||||
Py_Return;
|
||||
Py::Tuple ret(2);
|
||||
ret.setItem(0,Py::String(name));
|
||||
ret.setItem(1,Py::Int(id));
|
||||
ret.setItem(1,Py::Long(id));
|
||||
return Py::new_reference_to(ret);
|
||||
}PY_CATCH;
|
||||
}
|
||||
|
||||
@@ -56,6 +56,10 @@ include_directories(
|
||||
${CMAKE_BINARY_DIR}/src
|
||||
${CMAKE_SOURCE_DIR}/src
|
||||
${CMAKE_CURRENT_BINARY_DIR}
|
||||
)
|
||||
|
||||
include_directories(
|
||||
SYSTEM
|
||||
${Boost_INCLUDE_DIRS}
|
||||
${PYTHON_INCLUDE_DIRS}
|
||||
${XercesC_INCLUDE_DIRS}
|
||||
|
||||
@@ -117,7 +117,7 @@
|
||||
<Documentation>
|
||||
<UserDocu>Geometry Tag</UserDocu>
|
||||
</Documentation>
|
||||
<Parameter Name="Tag" Type="Int"/>
|
||||
<Parameter Name="Tag" Type="Long"/>
|
||||
</Attribute>
|
||||
<Attribute Name="Hasher">
|
||||
<Documentation>
|
||||
@@ -129,7 +129,7 @@
|
||||
<Documentation>
|
||||
<UserDocu>Get the current element map size</UserDocu>
|
||||
</Documentation>
|
||||
<Parameter Name="ElementMapSize" Type="Int" />
|
||||
<Parameter Name="ElementMapSize" Type="Long" />
|
||||
</Attribute>
|
||||
<Attribute Name="ElementMap">
|
||||
<Documentation>
|
||||
|
||||
@@ -106,9 +106,9 @@ PyObject* ComplexGeoDataPy::getFacesFromSubElement(PyObject *args)
|
||||
Py::List facet;
|
||||
for (const auto & it : facets) {
|
||||
Py::Tuple f(3);
|
||||
f.setItem(0,Py::Int(int(it.I1)));
|
||||
f.setItem(1,Py::Int(int(it.I2)));
|
||||
f.setItem(2,Py::Int(int(it.I3)));
|
||||
f.setItem(0,Py::Long(int(it.I1)));
|
||||
f.setItem(1,Py::Long(int(it.I2)));
|
||||
f.setItem(2,Py::Long(int(it.I3)));
|
||||
facet.append(f);
|
||||
}
|
||||
tuple.setItem(1, facet);
|
||||
@@ -141,8 +141,8 @@ PyObject* ComplexGeoDataPy::getLinesFromSubElement(PyObject *args)
|
||||
Py::List line;
|
||||
for (const auto & it : lines) {
|
||||
Py::Tuple l(2);
|
||||
l.setItem(0,Py::Int((int)it.I1));
|
||||
l.setItem(1,Py::Int((int)it.I2));
|
||||
l.setItem(0,Py::Long((int)it.I1));
|
||||
l.setItem(1,Py::Long((int)it.I2));
|
||||
line.append(l);
|
||||
}
|
||||
tuple.setItem(1, line);
|
||||
@@ -204,8 +204,8 @@ PyObject* ComplexGeoDataPy::getLines(PyObject *args)
|
||||
Py::List line;
|
||||
for (const auto & it : lines) {
|
||||
Py::Tuple l(2);
|
||||
l.setItem(0,Py::Int((int)it.I1));
|
||||
l.setItem(1,Py::Int((int)it.I2));
|
||||
l.setItem(0,Py::Long((int)it.I1));
|
||||
l.setItem(1,Py::Long((int)it.I2));
|
||||
line.append(l);
|
||||
}
|
||||
tuple.setItem(1, line);
|
||||
@@ -236,9 +236,9 @@ PyObject* ComplexGeoDataPy::getFaces(PyObject *args)
|
||||
Py::List facet;
|
||||
for (const auto & it : facets) {
|
||||
Py::Tuple f(3);
|
||||
f.setItem(0,Py::Int((int)it.I1));
|
||||
f.setItem(1,Py::Int((int)it.I2));
|
||||
f.setItem(2,Py::Int((int)it.I3));
|
||||
f.setItem(0,Py::Long((int)it.I1));
|
||||
f.setItem(1,Py::Long((int)it.I2));
|
||||
f.setItem(2,Py::Long((int)it.I3));
|
||||
facet.append(f);
|
||||
}
|
||||
tuple.setItem(1, facet);
|
||||
@@ -494,9 +494,9 @@ Py::Dict ComplexGeoDataPy::getElementReverseMap() const
|
||||
return ret;
|
||||
}
|
||||
|
||||
Py::Int ComplexGeoDataPy::getElementMapSize() const
|
||||
Py::Long ComplexGeoDataPy::getElementMapSize() const
|
||||
{
|
||||
return Py::Int((long)getComplexGeoDataPtr()->getElementMapSize());
|
||||
return Py::Long((long)getComplexGeoDataPtr()->getElementMapSize());
|
||||
}
|
||||
|
||||
void ComplexGeoDataPy::setHasher(Py::Object obj)
|
||||
@@ -559,12 +559,12 @@ Py::String ComplexGeoDataPy::getElementMapVersion() const
|
||||
}
|
||||
|
||||
|
||||
Py::Int ComplexGeoDataPy::getTag() const
|
||||
Py::Long ComplexGeoDataPy::getTag() const
|
||||
{
|
||||
return Py::Int(getComplexGeoDataPtr()->Tag);
|
||||
return Py::Long(getComplexGeoDataPtr()->Tag);
|
||||
}
|
||||
|
||||
void ComplexGeoDataPy::setTag(Py::Int tag)
|
||||
void ComplexGeoDataPy::setTag(Py::Long tag)
|
||||
{
|
||||
getComplexGeoDataPtr()->Tag = tag;
|
||||
}
|
||||
|
||||
@@ -3623,15 +3623,15 @@ void Document::_removeObject(DocumentObject* pcObject)
|
||||
if (!d->rollback && d->activeUndoTransaction) {
|
||||
// Undo stuff
|
||||
signalTransactionRemove(*pcObject, d->activeUndoTransaction);
|
||||
breakDependency(pcObject, true);
|
||||
d->activeUndoTransaction->addObjectNew(pcObject);
|
||||
}
|
||||
else {
|
||||
// for a rollback delete the object
|
||||
signalTransactionRemove(*pcObject, 0);
|
||||
breakDependency(pcObject, true);
|
||||
}
|
||||
|
||||
breakDependency(pcObject, true);
|
||||
|
||||
// remove from map
|
||||
pcObject->setStatus(ObjectStatus::Remove, false); // Unset the bit to be on the safe side
|
||||
d->objectIdMap.erase(pcObject->_Id);
|
||||
|
||||
@@ -305,7 +305,7 @@ or None if the GUI is not up</UserDocu>
|
||||
<Documentation>
|
||||
<UserDocu>The unique identifier (among its document) of this object</UserDocu>
|
||||
</Documentation>
|
||||
<Parameter Name="ID" Type="Int"/>
|
||||
<Parameter Name="ID" Type="Long"/>
|
||||
</Attribute>
|
||||
<Attribute Name="Removing" ReadOnly="true">
|
||||
<Documentation>
|
||||
|
||||
@@ -776,8 +776,8 @@ int DocumentObjectPy::setCustomAttributes(const char* , PyObject *)
|
||||
return 0;
|
||||
}
|
||||
|
||||
Py::Int DocumentObjectPy::getID() const {
|
||||
return Py::Int(getDocumentObjectPtr()->getID());
|
||||
Py::Long DocumentObjectPy::getID() const {
|
||||
return Py::Long(getDocumentObjectPtr()->getID());
|
||||
}
|
||||
|
||||
Py::Boolean DocumentObjectPy::getRemoving() const {
|
||||
|
||||
@@ -301,25 +301,25 @@ sort: whether to topologically sort the return list
|
||||
<Documentation>
|
||||
<UserDocu>The Undo mode of the Document (0 = no Undo, 1 = Undo/Redo)</UserDocu>
|
||||
</Documentation>
|
||||
<Parameter Name="UndoMode" Type="Int" />
|
||||
<Parameter Name="UndoMode" Type="Long" />
|
||||
</Attribute>
|
||||
<Attribute Name="UndoRedoMemSize" ReadOnly="true">
|
||||
<Documentation>
|
||||
<UserDocu>The size of the Undo stack in byte</UserDocu>
|
||||
</Documentation>
|
||||
<Parameter Name="UndoRedoMemSize" Type="Int" />
|
||||
<Parameter Name="UndoRedoMemSize" Type="Long" />
|
||||
</Attribute>
|
||||
<Attribute Name="UndoCount" ReadOnly="true">
|
||||
<Documentation>
|
||||
<UserDocu>Number of possible Undos</UserDocu>
|
||||
</Documentation>
|
||||
<Parameter Name="UndoCount" Type="Int" />
|
||||
<Parameter Name="UndoCount" Type="Long" />
|
||||
</Attribute>
|
||||
<Attribute Name="RedoCount" ReadOnly="true">
|
||||
<Documentation>
|
||||
<UserDocu>Number of possible Redos</UserDocu>
|
||||
</Documentation>
|
||||
<Parameter Name="RedoCount" Type="Int"/>
|
||||
<Parameter Name="RedoCount" Type="Long"/>
|
||||
</Attribute>
|
||||
<Attribute Name="UndoNames" ReadOnly="true">
|
||||
<Documentation>
|
||||
|
||||
+11
-11
@@ -319,7 +319,7 @@ PyObject* DocumentPy::addObject(PyObject *args, PyObject *kwd)
|
||||
if (view)
|
||||
pyvp = Py::Object(view);
|
||||
if (pyvp.isNone())
|
||||
pyvp = Py::Int(1);
|
||||
pyvp = Py::Long(1);
|
||||
// 'pyvp' is the python class with the implementation for ViewProvider
|
||||
if (pyvp.hasAttr("__vobject__")) {
|
||||
pyvp.setAttr("__vobject__", pyftr.getAttr("ViewObject"));
|
||||
@@ -583,7 +583,7 @@ PyObject* DocumentPy::recompute(PyObject * args)
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
return Py::new_reference_to(Py::Int(objectCount));
|
||||
return Py::new_reference_to(Py::Long(objectCount));
|
||||
} PY_CATCH;
|
||||
}
|
||||
|
||||
@@ -758,30 +758,30 @@ Py::List DocumentPy::getRootObjectsIgnoreLinks() const
|
||||
return res;
|
||||
}
|
||||
|
||||
Py::Int DocumentPy::getUndoMode() const
|
||||
Py::Long DocumentPy::getUndoMode() const
|
||||
{
|
||||
return Py::Int(getDocumentPtr()->getUndoMode());
|
||||
return Py::Long(getDocumentPtr()->getUndoMode());
|
||||
}
|
||||
|
||||
void DocumentPy::setUndoMode(Py::Int arg)
|
||||
void DocumentPy::setUndoMode(Py::Long arg)
|
||||
{
|
||||
getDocumentPtr()->setUndoMode(arg);
|
||||
}
|
||||
|
||||
|
||||
Py::Int DocumentPy::getUndoRedoMemSize() const
|
||||
Py::Long DocumentPy::getUndoRedoMemSize() const
|
||||
{
|
||||
return Py::Int((long)getDocumentPtr()->getUndoMemSize());
|
||||
return Py::Long((long)getDocumentPtr()->getUndoMemSize());
|
||||
}
|
||||
|
||||
Py::Int DocumentPy::getUndoCount() const
|
||||
Py::Long DocumentPy::getUndoCount() const
|
||||
{
|
||||
return Py::Int((long)getDocumentPtr()->getAvailableUndos());
|
||||
return Py::Long((long)getDocumentPtr()->getAvailableUndos());
|
||||
}
|
||||
|
||||
Py::Int DocumentPy::getRedoCount() const
|
||||
Py::Long DocumentPy::getRedoCount() const
|
||||
{
|
||||
return Py::Int((long)getDocumentPtr()->getAvailableRedos());
|
||||
return Py::Long((long)getDocumentPtr()->getAvailableRedos());
|
||||
}
|
||||
|
||||
Py::List DocumentPy::getUndoNames() const
|
||||
|
||||
@@ -340,7 +340,7 @@ EXPO [eE][-+]?[0-9]+
|
||||
{DIGIT}*","{DIGIT}+{EXPO}? COUNTCHARS; yylval.fvalue = num_change(yytext,',','.'); return yylval.fvalue == 1 ? ONE : NUM;
|
||||
{DIGIT}+{EXPO} COUNTCHARS; yylval.fvalue = num_change(yytext,',','.'); return yylval.fvalue == 1 ? ONE : NUM;
|
||||
{DIGIT}+ { COUNTCHARS;
|
||||
yylval.ivalue = strtoll( yytext, NULL, 0 );
|
||||
yylval.ivalue = strtoll( yytext, NULL, 10 );
|
||||
if (yylval.ivalue == LLONG_MIN)
|
||||
throw Base::UnderflowError("Integer underflow");
|
||||
else if (yylval.ivalue == LLONG_MAX)
|
||||
|
||||
@@ -264,12 +264,12 @@ bool FeaturePythonImp::getSubObject(DocumentObject *&ret, const char *subname,
|
||||
args.setItem(0, Py::Object(object->getPyObject(), true));
|
||||
if(!subname) subname = "";
|
||||
args.setItem(1,Py::String(subname));
|
||||
args.setItem(2,Py::Int(pyObj?2:1));
|
||||
args.setItem(2,Py::Long(pyObj?2:1));
|
||||
Base::MatrixPy *pyMat = new Base::MatrixPy(new Base::Matrix4D);
|
||||
if(_mat) *pyMat->getMatrixPtr() = *_mat;
|
||||
args.setItem(3,Py::asObject(pyMat));
|
||||
args.setItem(4,Py::Boolean(transform));
|
||||
args.setItem(5,Py::Int(depth));
|
||||
args.setItem(5,Py::Long(depth));
|
||||
|
||||
Py::Object res(Base::pyCall(py_getSubObject.ptr(),args.ptr()));
|
||||
if(res.isNone()) {
|
||||
@@ -320,7 +320,7 @@ bool FeaturePythonImp::getSubObjects(std::vector<std::string> &ret, int reason)
|
||||
try {
|
||||
Py::Tuple args(2);
|
||||
args.setItem(0, Py::Object(object->getPyObject(), true));
|
||||
args.setItem(1, Py::Int(reason));
|
||||
args.setItem(1, Py::Long(reason));
|
||||
Py::Object res(Base::pyCall(py_getSubObjects.ptr(),args.ptr()));
|
||||
if(!res.isTrue())
|
||||
return true;
|
||||
@@ -359,7 +359,7 @@ bool FeaturePythonImp::getLinkedObject(DocumentObject *&ret, bool recurse,
|
||||
if(_mat) *pyMat->getMatrixPtr() = *_mat;
|
||||
args.setItem(2,Py::asObject(pyMat));
|
||||
args.setItem(3,Py::Boolean(transform));
|
||||
args.setItem(4,Py::Int(depth));
|
||||
args.setItem(4,Py::Long(depth));
|
||||
|
||||
Py::Object res(Base::pyCall(py_getLinkedObject.ptr(),args.ptr()));
|
||||
if(!res.isTrue()) {
|
||||
@@ -432,7 +432,7 @@ int FeaturePythonImp::isElementVisible(const char *element) const {
|
||||
Py::Tuple args(2);
|
||||
args.setItem(0, Py::Object(object->getPyObject(), true));
|
||||
args.setItem(1,Py::String(element?element:""));
|
||||
return Py::Int(Base::pyCall(py_isElementVisible.ptr(),args.ptr()));
|
||||
return Py::Long(Base::pyCall(py_isElementVisible.ptr(),args.ptr()));
|
||||
}
|
||||
catch (Py::Exception&) {
|
||||
if (PyErr_ExceptionMatches(PyExc_NotImplementedError)) {
|
||||
@@ -453,7 +453,7 @@ int FeaturePythonImp::setElementVisible(const char *element, bool visible) {
|
||||
args.setItem(0, Py::Object(object->getPyObject(), true));
|
||||
args.setItem(1,Py::String(element?element:""));
|
||||
args.setItem(2,Py::Boolean(visible));
|
||||
return Py::Int(Base::pyCall(py_setElementVisible.ptr(),args.ptr()));
|
||||
return Py::Long(Base::pyCall(py_setElementVisible.ptr(),args.ptr()));
|
||||
}
|
||||
catch (Py::Exception&) {
|
||||
if (PyErr_ExceptionMatches(PyExc_NotImplementedError)) {
|
||||
@@ -534,7 +534,7 @@ int FeaturePythonImp::canLoadPartial() const {
|
||||
try {
|
||||
Py::Tuple args(1);
|
||||
args.setItem(0, Py::Object(object->getPyObject(), true));
|
||||
Py::Int ret(Base::pyCall(py_canLoadPartial.ptr(),args.ptr()));
|
||||
Py::Long ret(Base::pyCall(py_canLoadPartial.ptr(),args.ptr()));
|
||||
return ret;
|
||||
}
|
||||
catch (Py::Exception&) {
|
||||
|
||||
@@ -916,6 +916,7 @@ class Scheme(IntEnum):
|
||||
MmMin = 6
|
||||
ImperialCivil = 7
|
||||
FemMilliMeterNewton = 8
|
||||
MeterDecimal = 9
|
||||
|
||||
App.Units.Scheme = Scheme
|
||||
|
||||
|
||||
@@ -297,6 +297,11 @@ Base::Placement GeoFeature::getGlobalPlacement(App::DocumentObject* targetObj,
|
||||
|
||||
if (targetObj == rootObj) return plc;
|
||||
|
||||
if (rootObj->isLink()) {
|
||||
// Update doc in case its an external link.
|
||||
doc = rootObj->getLinkedObject()->getDocument();
|
||||
}
|
||||
|
||||
for (auto& name : names) {
|
||||
App::DocumentObject* obj = doc->getObject(name.c_str());
|
||||
if (!obj) {
|
||||
|
||||
+1
-1
@@ -364,7 +364,7 @@ App::DocumentObjectExecReturn *LinkBaseExtension::extensionExecute() {
|
||||
} else {
|
||||
const auto &elements = _getElementListValue();
|
||||
for(int i=0; i<_getElementCountValue(); ++i) {
|
||||
args.setItem(2, Py::Int(i));
|
||||
args.setItem(2, Py::Long(i));
|
||||
if(i < (int)elements.size())
|
||||
args.setItem(3, Py::asObject(elements[i]->getPyObject()));
|
||||
else
|
||||
|
||||
@@ -238,7 +238,7 @@ PyObject* LinkBaseExtensionPy::setLink(PyObject *_args)
|
||||
PyObject *key, *value;
|
||||
Py_ssize_t pos = 0;
|
||||
while(PyDict_Next(pcObj, &pos, &key, &value))
|
||||
parseLink(ext,Py::Int(key),value);
|
||||
parseLink(ext,Py::Long(key),value);
|
||||
}else if(PySequence_Check(pcObj)) {
|
||||
ext->setLink(-1,nullptr);
|
||||
Py::Sequence seq(pcObj);
|
||||
|
||||
@@ -626,16 +626,16 @@ Py::Object ObjectIdentifier::Component::get(const Py::Object &pyobj) const {
|
||||
res = pyobj.getAttr(getName());
|
||||
} else if(isArray()) {
|
||||
if(pyobj.isMapping())
|
||||
res = Py::Mapping(pyobj).getItem(Py::Int(begin));
|
||||
res = Py::Mapping(pyobj).getItem(Py::Long(begin));
|
||||
else
|
||||
res = Py::Sequence(pyobj).getItem(begin);
|
||||
}else if(isMap())
|
||||
res = Py::Mapping(pyobj).getItem(getName());
|
||||
else {
|
||||
assert(isRange());
|
||||
Py::Object slice(PySlice_New(Py::Int(begin).ptr(),
|
||||
end!=INT_MAX?Py::Int(end).ptr():nullptr,
|
||||
step!=1?Py::Int(step).ptr():nullptr),true);
|
||||
Py::Object slice(PySlice_New(Py::Long(begin).ptr(),
|
||||
end!=INT_MAX?Py::Long(end).ptr():nullptr,
|
||||
step!=1?Py::Long(step).ptr():nullptr),true);
|
||||
PyObject *r = PyObject_GetItem(pyobj.ptr(),slice.ptr());
|
||||
if(!r)
|
||||
Base::PyException::ThrowException();
|
||||
@@ -654,16 +654,16 @@ void ObjectIdentifier::Component::set(Py::Object &pyobj, const Py::Object &value
|
||||
Base::PyException::ThrowException();
|
||||
} else if(isArray()) {
|
||||
if(pyobj.isMapping())
|
||||
Py::Mapping(pyobj).setItem(Py::Int(begin),value);
|
||||
Py::Mapping(pyobj).setItem(Py::Long(begin),value);
|
||||
else
|
||||
Py::Sequence(pyobj).setItem(begin,value);
|
||||
}else if(isMap())
|
||||
Py::Mapping(pyobj).setItem(getName(),value);
|
||||
else {
|
||||
assert(isRange());
|
||||
Py::Object slice(PySlice_New(Py::Int(begin).ptr(),
|
||||
end!=INT_MAX?Py::Int(end).ptr():nullptr,
|
||||
step!=1?Py::Int(step).ptr():nullptr),true);
|
||||
Py::Object slice(PySlice_New(Py::Long(begin).ptr(),
|
||||
end!=INT_MAX?Py::Long(end).ptr():nullptr,
|
||||
step!=1?Py::Long(step).ptr():nullptr),true);
|
||||
if(PyObject_SetItem(pyobj.ptr(),slice.ptr(),value.ptr())<0)
|
||||
Base::PyException::ThrowException();
|
||||
}
|
||||
@@ -674,16 +674,16 @@ void ObjectIdentifier::Component::del(Py::Object &pyobj) const {
|
||||
pyobj.delAttr(getName());
|
||||
else if(isArray()) {
|
||||
if(pyobj.isMapping())
|
||||
Py::Mapping(pyobj).delItem(Py::Int(begin));
|
||||
Py::Mapping(pyobj).delItem(Py::Long(begin));
|
||||
else
|
||||
PySequence_DelItem(pyobj.ptr(),begin);
|
||||
} else if(isMap())
|
||||
Py::Mapping(pyobj).delItem(getName());
|
||||
else {
|
||||
assert(isRange());
|
||||
Py::Object slice(PySlice_New(Py::Int(begin).ptr(),
|
||||
end!=INT_MAX?Py::Int(end).ptr():nullptr,
|
||||
step!=1?Py::Int(step).ptr():nullptr),true);
|
||||
Py::Object slice(PySlice_New(Py::Long(begin).ptr(),
|
||||
end!=INT_MAX?Py::Long(end).ptr():nullptr,
|
||||
step!=1?Py::Long(step).ptr():nullptr),true);
|
||||
if(PyObject_DelItem(pyobj.ptr(),slice.ptr())<0)
|
||||
Base::PyException::ThrowException();
|
||||
}
|
||||
|
||||
@@ -100,6 +100,8 @@
|
||||
#include <boost/filesystem/operations.hpp>
|
||||
#include <boost/filesystem/path.hpp>
|
||||
|
||||
#endif //_PreComp_
|
||||
#include <fmt/format.h>
|
||||
|
||||
#endif //_PreComp_
|
||||
|
||||
#endif // APP_PRECOMPILED_H
|
||||
|
||||
@@ -199,8 +199,10 @@ struct PropertyCleaner {
|
||||
while (!_RemovedProps.empty()) {
|
||||
auto p = _RemovedProps.back();
|
||||
_RemovedProps.pop_back();
|
||||
if(p != prop)
|
||||
if (p != prop) {
|
||||
p->setContainer(nullptr);
|
||||
delete p;
|
||||
}
|
||||
else
|
||||
found = true;
|
||||
}
|
||||
|
||||
@@ -267,7 +267,7 @@ PyObject* PropertyContainerPy::setPropertyStatus(PyObject *args)
|
||||
status.set(it->second, value);
|
||||
}
|
||||
else if (item.isNumeric()) {
|
||||
int v = Py::Int(item);
|
||||
int v = Py::Long(item);
|
||||
if (v < 0) {
|
||||
value = false;
|
||||
v = -v;
|
||||
@@ -323,7 +323,7 @@ PyObject* PropertyContainerPy::getPropertyStatus(PyObject *args)
|
||||
}
|
||||
}
|
||||
if (!found)
|
||||
ret.append(Py::Int(static_cast<long>(i)));
|
||||
ret.append(Py::Long(static_cast<long>(i)));
|
||||
}
|
||||
}
|
||||
return Py::new_reference_to(ret);
|
||||
|
||||
@@ -478,7 +478,7 @@ void PropertyEnumeration::setPyObject(PyObject *value)
|
||||
if(seq.size() == 2) {
|
||||
Py::Object v(seq[0].ptr());
|
||||
if(!v.isString() && v.isSequence()) {
|
||||
idx = Py::Int(seq[1].ptr());
|
||||
idx = Py::Long(seq[1].ptr());
|
||||
seq = v;
|
||||
}
|
||||
}
|
||||
@@ -579,14 +579,14 @@ bool PropertyEnumeration::getPyPathValue(const ObjectIdentifier &path, Py::Objec
|
||||
else {
|
||||
Py::Tuple tuple(2);
|
||||
tuple.setItem(0, res);
|
||||
tuple.setItem(1, Py::Int(getValue()));
|
||||
tuple.setItem(1, Py::Long(getValue()));
|
||||
r = tuple;
|
||||
}
|
||||
} else if (p == ".String") {
|
||||
auto v = getValueAsString();
|
||||
r = Py::String(v?v:"");
|
||||
} else
|
||||
r = Py::Int(getValue());
|
||||
r = Py::Long(getValue());
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -1389,6 +1389,10 @@ void PropertyString::setValue(const char* newLabel)
|
||||
obj->onBeforeChangeLabel(label);
|
||||
newLabel = label.c_str();
|
||||
|
||||
if (newLabel == _cValue) {
|
||||
return;
|
||||
}
|
||||
|
||||
if(!obj->getDocument()->testStatus(App::Document::Restoring)) {
|
||||
// Only update label reference if we are not restoring. When
|
||||
// importing (which also counts as restoring), it is possible the
|
||||
|
||||
@@ -40,13 +40,13 @@ base64: indicate if the input 'txt' is base64 encoded binary data
|
||||
<Documentation>
|
||||
<UserDocu>Return count of used hashes</UserDocu>
|
||||
</Documentation>
|
||||
<Parameter Name="Count" Type="Int" />
|
||||
<Parameter Name="Count" Type="Long" />
|
||||
</Attribute>
|
||||
<Attribute Name="Size" ReadOnly="true">
|
||||
<Documentation>
|
||||
<UserDocu>Return the size of the hashes</UserDocu>
|
||||
</Documentation>
|
||||
<Parameter Name="Size" Type="Int"/>
|
||||
<Parameter Name="Size" Type="Long"/>
|
||||
</Attribute>
|
||||
<Attribute Name="SaveAll">
|
||||
<Documentation>
|
||||
@@ -58,7 +58,7 @@ base64: indicate if the input 'txt' is base64 encoded binary data
|
||||
<Documentation>
|
||||
<UserDocu>Data length exceed this threshold will be hashed before storing</UserDocu>
|
||||
</Documentation>
|
||||
<Parameter Name="Threshold" Type="Int"/>
|
||||
<Parameter Name="Threshold" Type="Long"/>
|
||||
</Attribute>
|
||||
<Attribute Name="Table" ReadOnly="true">
|
||||
<Documentation>
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
<Documentation>
|
||||
<UserDocu>Return the integer value of this ID</UserDocu>
|
||||
</Documentation>
|
||||
<Parameter Name="Value" Type="Int"/>
|
||||
<Parameter Name="Value" Type="Long"/>
|
||||
</Attribute>
|
||||
<Attribute Name="Related" ReadOnly="true">
|
||||
<Documentation>
|
||||
@@ -54,7 +54,7 @@
|
||||
<Documentation>
|
||||
<UserDocu>Geometry index. Only meaningful for geometry element name</UserDocu>
|
||||
</Documentation>
|
||||
<Parameter Name="Index" Type="Int"/>
|
||||
<Parameter Name="Index" Type="Long"/>
|
||||
</Attribute>
|
||||
<ClassDeclarations>private:
|
||||
friend class StringID;
|
||||
|
||||
@@ -9572,7 +9572,7 @@ case 137:
|
||||
YY_RULE_SETUP
|
||||
#line 342 "ExpressionParser.l"
|
||||
{ COUNTCHARS;
|
||||
yylval.ivalue = strtoll( yytext, NULL, 0 );
|
||||
yylval.ivalue = strtoll( yytext, NULL, 10 );
|
||||
if (yylval.ivalue == LLONG_MIN)
|
||||
throw Base::UnderflowError("Integer underflow");
|
||||
else if (yylval.ivalue == LLONG_MAX)
|
||||
|
||||
@@ -10,6 +10,10 @@ include_directories(
|
||||
${CMAKE_SOURCE_DIR}/src
|
||||
${CMAKE_CURRENT_BINARY_DIR}
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
)
|
||||
|
||||
include_directories(
|
||||
SYSTEM
|
||||
${Boost_INCLUDE_DIRS}
|
||||
${PYTHON_INCLUDE_DIRS}
|
||||
${XercesC_INCLUDE_DIRS}
|
||||
|
||||
@@ -212,7 +212,7 @@ PyObject* MatrixPy::number_power_handler(PyObject* self, PyObject* other, PyObje
|
||||
|
||||
Base::Matrix4D a = static_cast<MatrixPy*>(self)->value();
|
||||
|
||||
long b = Py::Int(other);
|
||||
long b = Py::Long(other);
|
||||
if (b == 0) {
|
||||
return new MatrixPy(Matrix4D());
|
||||
}
|
||||
@@ -363,7 +363,7 @@ PyObject* MatrixPy::hasScale(PyObject* args)
|
||||
ScaleType type = getMatrixPtr()->hasScale(tol);
|
||||
Py::Module mod("FreeCAD");
|
||||
return Py::new_reference_to(
|
||||
mod.callMemberFunction("ScaleType", Py::TupleN(Py::Int(static_cast<int>(type)))));
|
||||
mod.callMemberFunction("ScaleType", Py::TupleN(Py::Long(static_cast<int>(type)))));
|
||||
}
|
||||
|
||||
PyObject* MatrixPy::decompose(PyObject* args)
|
||||
|
||||
@@ -26,7 +26,7 @@ Class to dump and restore the content of an object.</UserDocu>
|
||||
<Documentation>
|
||||
<UserDocu>Memory size of the object in bytes.</UserDocu>
|
||||
</Documentation>
|
||||
<Parameter Name="MemSize" Type="Int"/>
|
||||
<Parameter Name="MemSize" Type="Long"/>
|
||||
</Attribute>
|
||||
<Methode Name="dumpContent" Keyword="true" Const="true">
|
||||
<Documentation>
|
||||
|
||||
@@ -52,9 +52,9 @@ Py::String PersistencePy::getContent() const
|
||||
return {writer.getString()};
|
||||
}
|
||||
|
||||
Py::Int PersistencePy::getMemSize() const
|
||||
Py::Long PersistencePy::getMemSize() const
|
||||
{
|
||||
return Py::Int((long)getPersistencePtr()->getMemSize());
|
||||
return Py::Long((long)getPersistencePtr()->getMemSize());
|
||||
}
|
||||
|
||||
PyObject* PersistencePy::dumpContent(PyObject* args, PyObject* kwds)
|
||||
|
||||
@@ -641,9 +641,9 @@ Py::Dict QuantityPy::getFormat() const
|
||||
QuantityFormat fmt = getQuantityPtr()->getFormat();
|
||||
|
||||
Py::Dict dict;
|
||||
dict.setItem("Precision", Py::Int(fmt.precision));
|
||||
dict.setItem("Precision", Py::Long(fmt.precision));
|
||||
dict.setItem("NumberFormat", Py::Char(fmt.toFormat()));
|
||||
dict.setItem("Denominator", Py::Int(fmt.denominator));
|
||||
dict.setItem("Denominator", Py::Long(fmt.denominator));
|
||||
return dict;
|
||||
}
|
||||
|
||||
@@ -652,14 +652,14 @@ void QuantityPy::setFormat(Py::Dict arg)
|
||||
QuantityFormat fmt = getQuantityPtr()->getFormat();
|
||||
|
||||
if (arg.hasKey("Precision")) {
|
||||
Py::Int prec(arg.getItem("Precision"));
|
||||
Py::Long prec(arg.getItem("Precision"));
|
||||
fmt.precision = static_cast<int>(prec);
|
||||
}
|
||||
|
||||
if (arg.hasKey("NumberFormat")) {
|
||||
Py::Object item = arg.getItem("NumberFormat");
|
||||
if (item.isNumeric()) {
|
||||
int format = static_cast<int>(Py::Int(item));
|
||||
int format = static_cast<int>(Py::Long(item));
|
||||
if (format < 0 || format > QuantityFormat::Scientific) {
|
||||
throw Py::ValueError("Invalid format value");
|
||||
}
|
||||
@@ -681,7 +681,7 @@ void QuantityPy::setFormat(Py::Dict arg)
|
||||
}
|
||||
|
||||
if (arg.hasKey("Denominator")) {
|
||||
Py::Int denom(arg.getItem("Denominator"));
|
||||
Py::Long denom(arg.getItem("Denominator"));
|
||||
int fracInch = static_cast<int>(denom);
|
||||
// check that the value is positive and a power of 2
|
||||
if (fracInch <= 0) {
|
||||
|
||||
@@ -393,3 +393,17 @@ std::vector<std::string> Base::Tools::splitSubName(const std::string& subname)
|
||||
|
||||
return subNames;
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
|
||||
void Base::ZipTools::rewrite(const std::string& source, const std::string& target)
|
||||
{
|
||||
Base::PyGILStateLocker lock;
|
||||
PyObject* module = PyImport_ImportModule("freecad.utils_zip");
|
||||
if (!module) {
|
||||
throw Py::Exception();
|
||||
}
|
||||
|
||||
Py::Module commands(module, true);
|
||||
commands.callMemberFunction("rewrite", Py::TupleN(Py::String(source), Py::String(target)));
|
||||
}
|
||||
|
||||
@@ -329,6 +329,14 @@ struct BaseExport Tools
|
||||
static std::vector<std::string> splitSubName(const std::string& subname);
|
||||
};
|
||||
|
||||
struct BaseExport ZipTools
|
||||
{
|
||||
/**
|
||||
* @brief rewrite Rewrite a zip file under a new name.
|
||||
*/
|
||||
static void rewrite(const std::string& source, const std::string& target);
|
||||
};
|
||||
|
||||
|
||||
} // namespace Base
|
||||
|
||||
|
||||
@@ -35,6 +35,7 @@ set(EXT_FILES
|
||||
sketcher.py
|
||||
UiTools.py
|
||||
utils.py
|
||||
utils_zip.py
|
||||
)
|
||||
|
||||
foreach (it ${EXT_FILES})
|
||||
|
||||
@@ -31,7 +31,7 @@ import FreeCAD
|
||||
|
||||
def get_python_exe() -> str:
|
||||
"""Find Python. In preference order
|
||||
A) The value of the PythonExecutableForPip user preference
|
||||
A) The value of the BaseApp/Preferences/PythonConsole/ExternalPythonExecutable user preference
|
||||
B) The executable located in the same bin directory as FreeCAD and called "python3"
|
||||
C) The executable located in the same bin directory as FreeCAD and called "python"
|
||||
D) The result of a shutil search for your system's "python3" executable
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
# (c) 2024 Werner Mayer LGPL
|
||||
|
||||
__author__ = "Werner Mayer"
|
||||
__url__ = "https://www.freecad.org"
|
||||
__doc__ = "Helper module to convert zip files"
|
||||
|
||||
|
||||
import zipfile
|
||||
|
||||
def rewrite(source: str, target: str):
|
||||
source_zip = zipfile.ZipFile(source, "r")
|
||||
target_zip = zipfile.ZipFile(target, "w")
|
||||
|
||||
for name in source_zip.namelist():
|
||||
target_zip.writestr(name, source_zip.open(name).read())
|
||||
|
||||
source_zip.close()
|
||||
target_zip.close()
|
||||
@@ -161,5 +161,7 @@ private:
|
||||
mutable std::array<SbVec2f, hitTestingResolution> hitTestPattern;
|
||||
mutable bool patternInitialized;
|
||||
std::vector<std::string> exportedCommandSets;
|
||||
mutable bool wasPointerPick = false;
|
||||
double orthoNearDistance = 0.0;
|
||||
};
|
||||
#endif
|
||||
@@ -101,11 +101,16 @@ long NavlibInterface::GetPointerPosition(navlib::point_t& position) const
|
||||
|
||||
QPoint viewPoint = currentView.pView3d->mapFromGlobal(QCursor::pos());
|
||||
viewPoint.setY(currentView.pView3d->height() - viewPoint.y());
|
||||
|
||||
double scaling = inventorViewer->devicePixelRatio();
|
||||
viewPoint *= scaling;
|
||||
|
||||
SbVec3f worldPosition =
|
||||
inventorViewer->getPointOnFocalPlane(SbVec2s(viewPoint.x(), viewPoint.y()));
|
||||
|
||||
std::copy(worldPosition.getValue(), worldPosition.getValue() + 3, &position.x);
|
||||
|
||||
wasPointerPick = true;
|
||||
|
||||
return 0;
|
||||
}
|
||||
return navlib::make_result_code(navlib::navlib_errc::no_data_available);
|
||||
@@ -122,6 +127,8 @@ CameraType NavlibInterface::getCamera() const
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
template SoCamera* NavlibInterface::getCamera<SoCamera*>() const;
|
||||
|
||||
void NavlibInterface::onViewChanged(const Gui::MDIView* view)
|
||||
{
|
||||
if (view == nullptr)
|
||||
@@ -180,7 +187,8 @@ void NavlibInterface::enableNavigation()
|
||||
exportCommands(std::string(wb));
|
||||
});
|
||||
|
||||
exportCommands("StartWorkbench");
|
||||
auto activeWorkbench = Gui::WorkbenchManager::instance()->activeName();
|
||||
exportCommands(activeWorkbench);
|
||||
|
||||
initializePivot();
|
||||
connectActiveTab();
|
||||
@@ -269,34 +277,8 @@ long NavlibInterface::SetCameraMatrix(const navlib::matrix_t& matrix)
|
||||
|
||||
pCamera->orientation = SbRotation(cameraMatrix);
|
||||
pCamera->position.setValue(matrix(3, 0), matrix(3, 1), matrix(3, 2));
|
||||
|
||||
const Gui::View3DInventorViewer* inventorViewer = currentView.pView3d->getViewer();
|
||||
SoGetBoundingBoxAction action(inventorViewer->getSoRenderManager()->getViewportRegion());
|
||||
|
||||
action.apply(inventorViewer->getSceneGraph());
|
||||
|
||||
const SbBox3f boundingBox = action.getBoundingBox();
|
||||
SbVec3f modelCenter = boundingBox.getCenter();
|
||||
const float modelRadius = (boundingBox.getMin() - modelCenter).length();
|
||||
|
||||
navlib::bool_t isPerspective;
|
||||
GetIsViewPerspective(isPerspective);
|
||||
if (!isPerspective) {
|
||||
cameraMatrix.inverse().multVecMatrix(modelCenter, modelCenter);
|
||||
|
||||
const float nearDist = -(modelRadius + modelCenter.getValue()[2]);
|
||||
const float farDist = nearDist + 2.0f * modelRadius;
|
||||
|
||||
if (nearDist < 0.0f) {
|
||||
pCamera->nearDistance.setValue(nearDist);
|
||||
pCamera->farDistance.setValue(-nearDist);
|
||||
}
|
||||
else {
|
||||
pCamera->nearDistance.setValue(-farDist);
|
||||
pCamera->farDistance.setValue(farDist);
|
||||
}
|
||||
}
|
||||
pCamera->touch();
|
||||
|
||||
return 0;
|
||||
}
|
||||
return navlib::make_result_code(navlib::navlib_errc::no_data_available);
|
||||
@@ -348,11 +330,16 @@ long NavlibInterface::GetViewExtents(navlib::box_t& extents) const
|
||||
return navlib::make_result_code(navlib::navlib_errc::no_data_available);
|
||||
|
||||
const SbViewVolume viewVolume = pCamera->getViewVolume(pCamera->aspectRatio.getValue());
|
||||
const float halfHeight = viewVolume.getHeight() / 2.0f;
|
||||
const float halfWidth = viewVolume.getWidth() / 2.0f;
|
||||
const float farDistance = viewVolume.nearToFar + viewVolume.nearDist;
|
||||
const double halfHeight = static_cast<double>(viewVolume.getHeight() / 2.0f);
|
||||
const double halfWidth = static_cast<double>(viewVolume.getWidth() / 2.0f);
|
||||
const double halfDepth = 1.0e8;
|
||||
|
||||
extents = {-halfWidth, -halfHeight, -farDistance, halfWidth, halfHeight, farDistance};
|
||||
extents = {-halfWidth,
|
||||
-halfHeight,
|
||||
-halfDepth,
|
||||
halfWidth,
|
||||
halfHeight,
|
||||
halfDepth};
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -390,6 +377,7 @@ long NavlibInterface::SetViewExtents(const navlib::box_t& extents)
|
||||
GetViewExtents(oldExtents);
|
||||
|
||||
pCamera->scaleHeight(extents.max.x / oldExtents.max.x);
|
||||
orthoNearDistance = pCamera->nearDistance.getValue();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -109,9 +109,11 @@ long NavlibInterface::SetPivotVisible(bool visible)
|
||||
return 0;
|
||||
}
|
||||
|
||||
extern template SoCamera* NavlibInterface::getCamera<SoCamera*>() const;
|
||||
|
||||
long NavlibInterface::GetHitLookAt(navlib::point_t& position) const
|
||||
{
|
||||
if (is2DView())
|
||||
if (is2DView() || !is3DView())
|
||||
return navlib::make_result_code(navlib::navlib_errc::no_data_available);
|
||||
|
||||
const Gui::View3DInventorViewer* const inventorViewer = currentView.pView3d->getViewer();
|
||||
@@ -136,29 +138,50 @@ long NavlibInterface::GetHitLookAt(navlib::point_t& position) const
|
||||
|
||||
pCamera->orientation.getValue().getValue(cameraMatrix);
|
||||
|
||||
// Initialize the samples array if it wasn't done before
|
||||
// Initialize the samples array if it wasn't done before
|
||||
initializePattern();
|
||||
|
||||
navlib::bool_t isPerspective;
|
||||
GetIsViewPerspective(isPerspective);
|
||||
|
||||
for (uint32_t i = 0; i < hitTestingResolution; i++) {
|
||||
// Scale the sample like it was defined in camera space (placed on XY plane)
|
||||
SbVec3f transform(
|
||||
hitTestPattern[i][0] * ray.radius, hitTestPattern[i][1] * ray.radius, 0.0f);
|
||||
|
||||
// Apply the model-view transform to a sample (only the rotation)
|
||||
cameraMatrix.multVecMatrix(transform, transform);
|
||||
SbVec3f origin;
|
||||
|
||||
// Calculate origin of current hit-testing ray
|
||||
SbVec3f newOrigin = ray.origin + transform;
|
||||
if (wasPointerPick) {
|
||||
origin = ray.origin;
|
||||
}
|
||||
else {
|
||||
// Scale the sample like it was defined in camera space (placed on XY plane)
|
||||
SbVec3f transform(hitTestPattern[i][0] * ray.radius,
|
||||
hitTestPattern[i][1] * ray.radius,
|
||||
0.0f);
|
||||
|
||||
// Apply the model-view transform to a sample (only the rotation)
|
||||
cameraMatrix.multVecMatrix(transform, transform);
|
||||
|
||||
// Calculate origin of current hit-testing ray
|
||||
origin = ray.origin + transform;
|
||||
}
|
||||
|
||||
// Perform the hit-test
|
||||
rayPickAction.setRay(newOrigin, ray.direction);
|
||||
if (isPerspective) {
|
||||
rayPickAction.setRay(origin,
|
||||
ray.direction,
|
||||
pCamera->nearDistance.getValue(),
|
||||
pCamera->farDistance.getValue());
|
||||
}
|
||||
else {
|
||||
rayPickAction.setRay(origin, ray.direction);
|
||||
}
|
||||
|
||||
rayPickAction.apply(pSceneGraph);
|
||||
SoPickedPoint* pickedPoint = rayPickAction.getPickedPoint();
|
||||
|
||||
// Check if there was a hit
|
||||
if (pickedPoint != nullptr) {
|
||||
SbVec3f hitPoint = pickedPoint->getPoint();
|
||||
float distance = (newOrigin - hitPoint).length();
|
||||
float distance = (origin - hitPoint).length();
|
||||
|
||||
// Save hit of the lowest depth
|
||||
if (distance < minLength) {
|
||||
@@ -166,6 +189,11 @@ long NavlibInterface::GetHitLookAt(navlib::point_t& position) const
|
||||
closestHitPoint = hitPoint;
|
||||
}
|
||||
}
|
||||
|
||||
if (wasPointerPick) {
|
||||
wasPointerPick = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (minLength < MAX_FLOAT) {
|
||||
@@ -219,7 +247,22 @@ long NavlibInterface::SetHitDirection(const navlib::vector_t& direction)
|
||||
|
||||
long NavlibInterface::SetHitLookFrom(const navlib::point_t& eye)
|
||||
{
|
||||
ray.origin.setValue(eye.x, eye.y, eye.z);
|
||||
navlib::bool_t isPerspective;
|
||||
|
||||
GetIsViewPerspective(isPerspective);
|
||||
|
||||
if (isPerspective) {
|
||||
ray.origin.setValue(eye.x, eye.y, eye.z);
|
||||
}
|
||||
else {
|
||||
auto pCamera = getCamera<SoCamera*>();
|
||||
if (pCamera == nullptr) {
|
||||
return navlib::make_result_code(navlib::navlib_errc::no_data_available);
|
||||
}
|
||||
|
||||
SbVec3f position = pCamera->position.getValue();
|
||||
ray.origin = position + orthoNearDistance * ray.direction;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -184,11 +184,16 @@ bool Gui::ActiveObjectList::hasObject(const char*name)const
|
||||
|
||||
void ActiveObjectList::objectDeleted(const ViewProviderDocumentObject &vp)
|
||||
{
|
||||
//maybe boost::bimap or boost::multi_index
|
||||
for (auto it = _ObjectMap.begin(); it != _ObjectMap.end(); ++it) {
|
||||
if (it->second.obj == vp.getObject()) {
|
||||
_ObjectMap.erase(it);
|
||||
return;
|
||||
// Hint: With C++20 std::erase_if for containers can be used
|
||||
auto isEqual = [&vp](const auto& item) {
|
||||
return item.second.obj == vp.getObject();
|
||||
};
|
||||
for (auto it = _ObjectMap.begin(); it != _ObjectMap.end();) {
|
||||
if (isEqual(*it)) {
|
||||
it = _ObjectMap.erase(it);
|
||||
}
|
||||
else {
|
||||
++it;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+12
-3
@@ -559,8 +559,15 @@ Application::Application(bool GUIenabled)
|
||||
_pcWorkbenchDictionary = PyDict_New();
|
||||
|
||||
#ifdef USE_3DCONNEXION_NAVLIB
|
||||
// Instantiate the 3Dconnexion controller
|
||||
pNavlibInterface = new NavlibInterface();
|
||||
ParameterGrp::handle hViewGrp = App::GetApplication().GetParameterGroupByPath(
|
||||
"User parameter:BaseApp/Preferences/View");
|
||||
if (!hViewGrp->GetBool("LegacySpaceMouseDevices", false)) {
|
||||
// Instantiate the 3Dconnexion controller
|
||||
pNavlibInterface = new NavlibInterface();
|
||||
}
|
||||
else {
|
||||
pNavlibInterface = nullptr;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (GUIenabled) {
|
||||
@@ -2296,7 +2303,9 @@ void Application::runApplication()
|
||||
Gui::getMainWindow()->setProperty("eventLoop", true);
|
||||
|
||||
#ifdef USE_3DCONNEXION_NAVLIB
|
||||
Instance->pNavlibInterface->enableNavigation();
|
||||
if (Instance->pNavlibInterface) {
|
||||
Instance->pNavlibInterface->enableNavigation();
|
||||
}
|
||||
#endif
|
||||
|
||||
runEventLoop(mainApp);
|
||||
|
||||
@@ -352,6 +352,7 @@ public:
|
||||
|
||||
static PyObject* sShowDownloads (PyObject *self,PyObject *args);
|
||||
static PyObject* sShowPreferences (PyObject *self,PyObject *args);
|
||||
static PyObject* sShowPreferencesByName (PyObject *self,PyObject *args);
|
||||
|
||||
static PyObject* sCreateViewer (PyObject *self,PyObject *args);
|
||||
static PyObject* sGetMarkerIndex (PyObject *self,PyObject *args);
|
||||
|
||||
@@ -332,6 +332,13 @@ PyMethodDef Application::Methods[] = {
|
||||
"\n"
|
||||
"grp: str\n Group to show.\n"
|
||||
"index : int\n Page index."},
|
||||
{"showPreferencesByName", (PyCFunction) Application::sShowPreferencesByName, METH_VARARGS,
|
||||
"showPreferencesByName(grp, pagename) -> None\n"
|
||||
"\n"
|
||||
"Show the preferences window.\n"
|
||||
"\n"
|
||||
"grp: str\n Group to show.\n"
|
||||
"pagename : str\n Page to show."},
|
||||
{"createViewer", (PyCFunction) Application::sCreateViewer, METH_VARARGS,
|
||||
"createViewer(views=1, name) -> View3DInventorPy or AbstractSplitViewPy\n"
|
||||
"\n"
|
||||
@@ -721,10 +728,11 @@ PyObject* Application::sExport(PyObject * /*self*/, PyObject *args)
|
||||
if (view3d)
|
||||
view3d->viewAll();
|
||||
QPrinter printer(QPrinter::ScreenResolution);
|
||||
// setPdfVersion sets the printied PDF Version to comply with PDF/A-1b, more details under: https://www.kdab.com/creating-pdfa-documents-qt/
|
||||
// setPdfVersion sets the printed PDF Version to comply with PDF/A-1b, more details under: https://www.kdab.com/creating-pdfa-documents-qt/
|
||||
printer.setPdfVersion(QPagedPaintDevice::PdfVersion_A1b);
|
||||
printer.setOutputFormat(QPrinter::PdfFormat);
|
||||
printer.setOutputFileName(fileName);
|
||||
printer.setCreator(QString::fromStdString(App::Application::getNameWithVersion()));
|
||||
view->print(&printer);
|
||||
}
|
||||
}
|
||||
@@ -1378,16 +1386,39 @@ PyObject* Application::sShowDownloads(PyObject * /*self*/, PyObject *args)
|
||||
Py_Return;
|
||||
}
|
||||
|
||||
PyObject* Application::sShowPreferences(PyObject * /*self*/, PyObject *args)
|
||||
PyObject* Application::sShowPreferences(PyObject* /*self*/, PyObject* args)
|
||||
{
|
||||
char *pstr = nullptr;
|
||||
int idx=0;
|
||||
if (!PyArg_ParseTuple(args, "|si", &pstr, &idx))
|
||||
char* pstr = nullptr;
|
||||
int idx = 0;
|
||||
if (!PyArg_ParseTuple(args, "|si", &pstr, &idx)) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
Gui::Dialog::DlgPreferencesImp cDlg(getMainWindow());
|
||||
if (pstr)
|
||||
cDlg.activateGroupPage(QString::fromUtf8(pstr),idx);
|
||||
if (pstr) {
|
||||
cDlg.activateGroupPage(QString::fromUtf8(pstr), idx);
|
||||
}
|
||||
|
||||
WaitCursor wc;
|
||||
wc.restoreCursor();
|
||||
cDlg.exec();
|
||||
wc.setWaitCursor();
|
||||
|
||||
Py_Return;
|
||||
}
|
||||
|
||||
PyObject* Application::sShowPreferencesByName(PyObject* /*self*/, PyObject* args)
|
||||
{
|
||||
char* pstr = nullptr;
|
||||
const char* prefType = "";
|
||||
if (!PyArg_ParseTuple(args, "s|s", &pstr, &prefType)) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
Gui::Dialog::DlgPreferencesImp cDlg(getMainWindow());
|
||||
if (pstr && prefType) {
|
||||
cDlg.activateGroupPageByPageName(QString::fromUtf8(pstr), QString::fromUtf8(prefType));
|
||||
}
|
||||
|
||||
WaitCursor wc;
|
||||
wc.restoreCursor();
|
||||
|
||||
@@ -197,13 +197,11 @@ SbBool BlenderNavigationStyle::processSoEvent(const SoEvent * const ev)
|
||||
const auto * const event = (const SoLocation2Event *) ev;
|
||||
if (this->currentmode == NavigationStyle::ZOOMING) {
|
||||
this->zoomByCursor(posn, prevnormalized);
|
||||
newmode = NavigationStyle::SELECTION;
|
||||
processed = true;
|
||||
}
|
||||
else if (this->currentmode == NavigationStyle::PANNING) {
|
||||
float ratio = vp.getViewportAspectRatio();
|
||||
panCamera(viewer->getSoRenderManager()->getCamera(), ratio, this->panningplane, posn, prevnormalized);
|
||||
newmode = NavigationStyle::SELECTION;
|
||||
processed = true;
|
||||
}
|
||||
else if (this->currentmode == NavigationStyle::DRAGGING) {
|
||||
@@ -277,6 +275,13 @@ SbBool BlenderNavigationStyle::processSoEvent(const SoEvent * const ev)
|
||||
break;
|
||||
|
||||
default:
|
||||
// Reset mode to IDLE when button 3 is released
|
||||
// This stops the PANNING when button 3 is released but SHIFT is still pressed
|
||||
// This stops the ZOOMING when button 3 is released but CTRL is still pressed
|
||||
if ((curmode == NavigationStyle::PANNING || curmode == NavigationStyle::ZOOMING)
|
||||
&& !this->button3down) {
|
||||
newmode = NavigationStyle::IDLE;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
+89
-51
@@ -19,21 +19,21 @@ IF(CMAKE_BUILD_TYPE)
|
||||
add_definitions(-DCMAKE_BUILD_TYPE="${CMAKE_BUILD_TYPE}")
|
||||
ENDIF(CMAKE_BUILD_TYPE)
|
||||
|
||||
if (FREECAD_USE_3DCONNEXION)
|
||||
if (FREECAD_USE_3DCONNEXION_LEGACY AND (MSVC OR APPLE))
|
||||
add_definitions(-D_USE_3DCONNEXION_SDK)
|
||||
if(APPLE)
|
||||
set(3DCONNEXION_LINKFLAGS "-F/Library/Frameworks -weak_framework 3DconnexionClient")
|
||||
set(3DCONNEXION_INCLUDE_DIR ${3DCONNEXIONCLIENT_FRAMEWORK}/Headers
|
||||
list(APPEND 3DCONNEXION_INCLUDE_DIR ${3DCONNEXIONCLIENT_FRAMEWORK}/Headers
|
||||
${3DCONNEXIONCLIENT_FRAMEWORK}/Headers/3DconnexionClient )
|
||||
endif(APPLE)
|
||||
endif(FREECAD_USE_3DCONNEXION)
|
||||
endif(FREECAD_USE_3DCONNEXION_LEGACY AND (MSVC OR APPLE))
|
||||
|
||||
if(FREECAD_USE_3DCONNEXION_NAVLIB AND (MSVC OR APPLE))
|
||||
add_definitions(-DUSE_3DCONNEXION_NAVLIB)
|
||||
if(APPLE)
|
||||
add_definitions(-D__APPLE__)
|
||||
endif(APPLE)
|
||||
set(3DCONNEXION_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/src/3rdParty/3Dconnexion/inc)
|
||||
list(APPEND 3DCONNEXION_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/src/3rdParty/3Dconnexion/inc)
|
||||
endif(FREECAD_USE_3DCONNEXION_NAVLIB AND (MSVC OR APPLE))
|
||||
|
||||
if (BUILD_VR)
|
||||
@@ -56,6 +56,10 @@ include_directories(
|
||||
${CMAKE_CURRENT_BINARY_DIR}/TaskView
|
||||
${CMAKE_CURRENT_BINARY_DIR}/Quarter
|
||||
${CMAKE_CURRENT_BINARY_DIR}/DAGView
|
||||
)
|
||||
|
||||
include_directories(
|
||||
SYSTEM
|
||||
${Boost_INCLUDE_DIRS}
|
||||
${EIGEN3_INCLUDE_DIR}
|
||||
${COIN3D_INCLUDE_DIRS}
|
||||
@@ -78,7 +82,7 @@ if(MSVC)
|
||||
${OPENGL_gl_LIBRARY}
|
||||
)
|
||||
|
||||
if(FREECAD_USE_3DCONNEXION)
|
||||
if(FREECAD_USE_3DCONNEXION_LEGACY)
|
||||
list(APPEND FreeCADGui_LIBS
|
||||
hid
|
||||
)
|
||||
@@ -103,6 +107,7 @@ if (WIN32)
|
||||
endif()
|
||||
|
||||
include_directories(
|
||||
SYSTEM
|
||||
${QtCore_INCLUDE_DIRS}
|
||||
${QtWidgets_INCLUDE_DIRS}
|
||||
${QtOpenGL_INCLUDE_DIRS}
|
||||
@@ -126,6 +131,7 @@ list(APPEND FreeCADGui_LIBS
|
||||
|
||||
if(${Qt5WinExtras_FOUND})
|
||||
include_directories(
|
||||
SYSTEM
|
||||
${Qt5WinExtras_INCLUDE_DIRS}
|
||||
)
|
||||
list(APPEND FreeCADGui_LIBS
|
||||
@@ -133,12 +139,13 @@ if(${Qt5WinExtras_FOUND})
|
||||
)
|
||||
endif()
|
||||
|
||||
IF(SPNAV_FOUND)
|
||||
IF(SPNAV_FOUND AND FREECAD_USE_3DCONNEXION_LEGACY)
|
||||
add_definitions(-D_USE_3DCONNEXION_SDK)
|
||||
if(SPNAV_USE_X11)
|
||||
add_definitions(-DSPNAV_USE_X11)
|
||||
if (FREECAD_QT_MAJOR_VERSION EQUAL 5 AND UNIX AND NOT APPLE)
|
||||
find_package(Qt5X11Extras REQUIRED)
|
||||
include_directories(${Qt5X11Extras_INCLUDE_DIRS})
|
||||
include_directories(SYSTEM ${Qt5X11Extras_INCLUDE_DIRS})
|
||||
list(APPEND FreeCADGui_LIBS ${Qt5X11Extras_LIBRARIES})
|
||||
# Note that Qt6 has removed the QtX11Extras files
|
||||
endif()
|
||||
@@ -151,35 +158,43 @@ IF(SPNAV_FOUND)
|
||||
SET(FreeCADGui_SDK_SRCS
|
||||
3Dconnexion/GuiAbstractNativeEvent.cpp
|
||||
3Dconnexion/GuiNativeEventLinuxX11.cpp
|
||||
)
|
||||
)
|
||||
SET(FreeCADGui_SDK_MOC_HDRS
|
||||
3Dconnexion/GuiAbstractNativeEvent.h
|
||||
3Dconnexion/GuiNativeEventLinuxX11.h
|
||||
)
|
||||
)
|
||||
else(SPNAV_USE_X11)
|
||||
SET(FreeCADGui_SDK_SRCS
|
||||
3Dconnexion/GuiAbstractNativeEvent.cpp
|
||||
3Dconnexion/GuiNativeEventLinux.cpp
|
||||
)
|
||||
)
|
||||
SET(FreeCADGui_SDK_MOC_HDRS
|
||||
3Dconnexion/GuiAbstractNativeEvent.h
|
||||
3Dconnexion/GuiNativeEventLinux.h
|
||||
)
|
||||
)
|
||||
endif(SPNAV_USE_X11)
|
||||
SOURCE_GROUP("3D connexion SDK" FILES ${FreeCADGui_SDK_SRCS})
|
||||
list(APPEND FreeCADGui_connexion_SRCS
|
||||
${FreeCADGui_SDK_SRCS}
|
||||
)
|
||||
list(APPEND FreeCADGui_connexion_HDRS
|
||||
${FreeCADGui_SDK_MOC_HDRS}
|
||||
)
|
||||
|
||||
add_definitions(-DSPNAV_FOUND)
|
||||
include_directories(
|
||||
SYSTEM
|
||||
${SPNAV_INCLUDE_DIR}
|
||||
)
|
||||
list(APPEND FreeCADGui_LIBS
|
||||
${SPNAV_LIBRARIES}
|
||||
)
|
||||
ENDIF(SPNAV_FOUND)
|
||||
ENDIF(SPNAV_FOUND AND FREECAD_USE_3DCONNEXION_LEGACY)
|
||||
|
||||
IF(OCULUS_FOUND)
|
||||
add_definitions(-DOCULUS_FOUND)
|
||||
include_directories(
|
||||
SYSTEM
|
||||
${OCULUS_INCLUDE_DIRS}
|
||||
)
|
||||
list(APPEND FreeCADGui_LIBS
|
||||
@@ -190,6 +205,7 @@ ENDIF(OCULUS_FOUND)
|
||||
if(FREECAD_USE_SHIBOKEN)
|
||||
add_definitions(-DHAVE_SHIBOKEN${PYSIDE_MAJOR_VERSION})
|
||||
include_directories(
|
||||
SYSTEM
|
||||
${SHIBOKEN_INCLUDE_DIR}
|
||||
)
|
||||
if (SHIBOKEN_LIBRARY)
|
||||
@@ -211,6 +227,7 @@ endif(FREECAD_USE_SHIBOKEN)
|
||||
|
||||
if(FREECAD_USE_PYSIDE)
|
||||
include_directories(
|
||||
SYSTEM
|
||||
${PYSIDE_INCLUDE_DIR}
|
||||
${PYSIDE_INCLUDE_DIR}/QtCore
|
||||
${PYSIDE_INCLUDE_DIR}/QtGui
|
||||
@@ -231,6 +248,7 @@ if(FREECAD_USE_PYSIDE)
|
||||
endif ()
|
||||
endif (PYSIDE_LIBRARY)
|
||||
include_directories(
|
||||
SYSTEM
|
||||
${PYSIDE_INCLUDE_DIR}/QtWidgets
|
||||
)
|
||||
add_definitions(-DHAVE_PYSIDE${PYSIDE_MAJOR_VERSION})
|
||||
@@ -269,32 +287,44 @@ SET(FreeCADGui_XML_SRCS
|
||||
SOURCE_GROUP("XML" FILES ${FreeCADApp_XML_SRCS})
|
||||
|
||||
# The 3D Connexion SDK files
|
||||
if(FREECAD_USE_3DCONNEXION AND MSVC)
|
||||
SET(FreeCADGui_SDK_SRCS
|
||||
3Dconnexion/I3dMouseParams.h
|
||||
3Dconnexion/MouseParameters.cpp
|
||||
3Dconnexion/MouseParameters.h
|
||||
3Dconnexion/GuiAbstractNativeEvent.cpp
|
||||
3Dconnexion/GuiNativeEventWin32.cpp
|
||||
)
|
||||
SOURCE_GROUP("3D connexion SDK" FILES ${FreeCADGui_SDK_SRCS})
|
||||
SET(FreeCADGui_SDK_MOC_HDRS
|
||||
3Dconnexion/GuiAbstractNativeEvent.h
|
||||
3Dconnexion/GuiNativeEventWin32.h
|
||||
)
|
||||
endif(FREECAD_USE_3DCONNEXION AND MSVC)
|
||||
if(FREECAD_USE_3DCONNEXION_LEGACY AND MSVC)
|
||||
SET(FreeCADGui_SDK_SRCS
|
||||
3Dconnexion/I3dMouseParams.h
|
||||
3Dconnexion/MouseParameters.cpp
|
||||
3Dconnexion/MouseParameters.h
|
||||
3Dconnexion/GuiAbstractNativeEvent.cpp
|
||||
3Dconnexion/GuiNativeEventWin32.cpp
|
||||
)
|
||||
SOURCE_GROUP("3D connexion SDK" FILES ${FreeCADGui_SDK_SRCS})
|
||||
SET(FreeCADGui_SDK_MOC_HDRS
|
||||
3Dconnexion/GuiAbstractNativeEvent.h
|
||||
3Dconnexion/GuiNativeEventWin32.h
|
||||
)
|
||||
list(APPEND FreeCADGui_connexion_SRCS
|
||||
${FreeCADGui_SDK_SRCS}
|
||||
)
|
||||
list(APPEND FreeCADGui_connexion_HDRS
|
||||
${FreeCADGui_SDK_MOC_HDRS}
|
||||
)
|
||||
endif(FREECAD_USE_3DCONNEXION_LEGACY AND MSVC)
|
||||
|
||||
if(FREECAD_USE_3DCONNEXION AND APPLE)
|
||||
SET(FreeCADGui_SDK_SRCS
|
||||
3Dconnexion/GuiAbstractNativeEvent.cpp
|
||||
3Dconnexion/GuiNativeEventMac.cpp
|
||||
)
|
||||
SOURCE_GROUP("3D connexion SDK" FILES ${FreeCADGui_SDK_SRCS})
|
||||
SET(FreeCADGui_SDK_MOC_HDRS
|
||||
3Dconnexion/GuiAbstractNativeEvent.h
|
||||
3Dconnexion/GuiNativeEventMac.h
|
||||
)
|
||||
endif(FREECAD_USE_3DCONNEXION AND APPLE)
|
||||
if(FREECAD_USE_3DCONNEXION_LEGACY AND APPLE)
|
||||
SET(FreeCADGui_SDK_SRCS
|
||||
3Dconnexion/GuiAbstractNativeEvent.cpp
|
||||
3Dconnexion/GuiNativeEventMac.cpp
|
||||
)
|
||||
SOURCE_GROUP("3D connexion SDK" FILES ${FreeCADGui_SDK_SRCS})
|
||||
SET(FreeCADGui_SDK_MOC_HDRS
|
||||
3Dconnexion/GuiAbstractNativeEvent.h
|
||||
3Dconnexion/GuiNativeEventMac.h
|
||||
)
|
||||
list(APPEND FreeCADGui_connexion_SRCS
|
||||
${FreeCADGui_SDK_SRCS}
|
||||
)
|
||||
list(APPEND FreeCADGui_connexion_HDRS
|
||||
${FreeCADGui_SDK_MOC_HDRS}
|
||||
)
|
||||
endif(FREECAD_USE_3DCONNEXION_LEGACY AND APPLE)
|
||||
|
||||
if(FREECAD_USE_3DCONNEXION_NAVLIB AND (MSVC OR APPLE))
|
||||
SET(NAVLIB_STUB_DIR ${CMAKE_SOURCE_DIR}/src/3rdParty/3Dconnexion/src)
|
||||
@@ -306,9 +336,15 @@ if(FREECAD_USE_3DCONNEXION_NAVLIB AND (MSVC OR APPLE))
|
||||
${NAVLIB_STUB_DIR}/navlib_stub.c
|
||||
)
|
||||
SOURCE_GROUP("3Dconnexion Navlib" FILES ${FreeCADGui_SDK_SRCS})
|
||||
SET(FreeCADGui_SDK_MOC_HDRS
|
||||
SET(FreeCADGui_SDK_MOC_HDRS
|
||||
3Dconnexion/navlib/NavlibInterface.h
|
||||
)
|
||||
)
|
||||
list(APPEND FreeCADGui_connexion_SRCS
|
||||
${FreeCADGui_SDK_SRCS}
|
||||
)
|
||||
list(APPEND FreeCADGui_connexion_HDRS
|
||||
${FreeCADGui_SDK_MOC_HDRS}
|
||||
)
|
||||
endif(FREECAD_USE_3DCONNEXION_NAVLIB AND (MSVC OR APPLE))
|
||||
|
||||
set_property(SOURCE GraphvizView.h GraphvizView.cpp PROPERTY SKIP_AUTOMOC ON)
|
||||
@@ -390,9 +426,9 @@ SET(Gui_UIC_SRCS
|
||||
VectorListEditor.ui
|
||||
)
|
||||
|
||||
if(FREECAD_3DCONNEXION_SUPPORT STREQUAL "Raw input")
|
||||
list(APPEND Gui_UIC_SRCS DlgCustomizeSpNavSettings.ui)
|
||||
endif(FREECAD_3DCONNEXION_SUPPORT STREQUAL "Raw input")
|
||||
if(FREECAD_USE_3DCONNEXION_LEGACY)
|
||||
list(APPEND Gui_UIC_SRCS DlgCustomizeSpNavSettings.ui)
|
||||
endif(FREECAD_USE_3DCONNEXION_LEGACY)
|
||||
|
||||
set (FreeCAD_TR_QRC ${CMAKE_CURRENT_BINARY_DIR}/Language/FreeCAD_translation.qrc)
|
||||
qt_find_and_add_translation(QM_SRCS "Language/FreeCAD_*.ts"
|
||||
@@ -579,10 +615,10 @@ SET(Dialog_Customize_HPP_SRCS
|
||||
ListWidgetDragBugFix.h
|
||||
)
|
||||
|
||||
if(FREECAD_3DCONNEXION_SUPPORT STREQUAL "Raw input")
|
||||
list(APPEND Dialog_Customize_CPP_SRCS DlgCustomizeSpaceball.cpp DlgCustomizeSpNavSettings.cpp)
|
||||
list(APPEND Dialog_Customize_HPP_SRCS DlgCustomizeSpaceball.h DlgCustomizeSpNavSettings.h)
|
||||
endif(FREECAD_3DCONNEXION_SUPPORT STREQUAL "Raw input")
|
||||
if(FREECAD_USE_3DCONNEXION_LEGACY)
|
||||
list(APPEND Dialog_Customize_CPP_SRCS DlgCustomizeSpaceball.cpp DlgCustomizeSpNavSettings.cpp)
|
||||
list(APPEND Dialog_Customize_HPP_SRCS DlgCustomizeSpaceball.h DlgCustomizeSpNavSettings.h)
|
||||
endif(FREECAD_USE_3DCONNEXION_LEGACY)
|
||||
|
||||
SET(Dialog_Customize_SRCS
|
||||
${Dialog_Customize_CPP_SRCS}
|
||||
@@ -593,9 +629,9 @@ SET(Dialog_Customize_SRCS
|
||||
DlgToolbars.ui
|
||||
)
|
||||
|
||||
if(FREECAD_3DCONNEXION_SUPPORT STREQUAL "Raw input")
|
||||
list(APPEND Dialog_Customize_SRCS DlgCustomizeSpNavSettings.ui)
|
||||
endif(FREECAD_3DCONNEXION_SUPPORT STREQUAL "Raw input")
|
||||
if(FREECAD_USE_3DCONNEXION_LEGACY)
|
||||
list(APPEND Dialog_Customize_SRCS DlgCustomizeSpNavSettings.ui)
|
||||
endif(FREECAD_USE_3DCONNEXION_LEGACY)
|
||||
|
||||
SOURCE_GROUP("Dialog\\Customize" FILES ${Dialog_Customize_SRCS})
|
||||
|
||||
@@ -1018,6 +1054,7 @@ SET(Inventor_CPP_SRCS
|
||||
Inventor/SoAutoZoomTranslation.cpp
|
||||
Inventor/MarkerBitmaps.cpp
|
||||
Inventor/SmSwitchboard.cpp
|
||||
Inventor/SoFCTransform.cpp
|
||||
SoFCBackgroundGradient.cpp
|
||||
SoFCBoundingBox.cpp
|
||||
SoFCColorBar.cpp
|
||||
@@ -1049,6 +1086,7 @@ SET(Inventor_SRCS
|
||||
Inventor/SoAutoZoomTranslation.h
|
||||
Inventor/MarkerBitmaps.h
|
||||
Inventor/SmSwitchboard.h
|
||||
Inventor/SoFCTransform.h
|
||||
SoFCBackgroundGradient.h
|
||||
SoFCBoundingBox.h
|
||||
SoFCColorBar.h
|
||||
@@ -1291,11 +1329,11 @@ SET(FreeCADGui_SRCS
|
||||
StartupProcess.h
|
||||
TransactionObject.h
|
||||
ToolHandler.h
|
||||
${FreeCADGui_SDK_MOC_HDRS}
|
||||
)
|
||||
|
||||
SET(FreeCADGui_SRCS
|
||||
${FreeCADGui_SDK_SRCS}
|
||||
${FreeCADGui_connexion_SRCS}
|
||||
${FreeCADGui_connexion_HDRS}
|
||||
${FreeCADGui_CPP_SRCS}
|
||||
${FreeCADGui_XML_SRCS}
|
||||
${qsint_MOC_SRCS}
|
||||
|
||||
+2
-2
@@ -1560,7 +1560,7 @@ void PythonGroupCommand::activated(int iMsg)
|
||||
if (cmd.hasAttr("Activated")) {
|
||||
Py::Callable call(cmd.getAttr("Activated"));
|
||||
Py::Tuple args(1);
|
||||
args.setItem(0, Py::Int(iMsg));
|
||||
args.setItem(0, Py::Long(iMsg));
|
||||
Py::Object ret = call.apply(args);
|
||||
}
|
||||
// If the command group doesn't implement the 'Activated' method then invoke the command directly
|
||||
@@ -1640,7 +1640,7 @@ Action * PythonGroupCommand::createAction()
|
||||
|
||||
if (cmd.hasAttr("GetDefaultCommand")) {
|
||||
Py::Callable call2(cmd.getAttr("GetDefaultCommand"));
|
||||
Py::Int def(call2.apply(args));
|
||||
Py::Long def(call2.apply(args));
|
||||
defaultId = static_cast<int>(def);
|
||||
}
|
||||
|
||||
|
||||
@@ -877,7 +877,7 @@ public:
|
||||
sGroup = "View";
|
||||
sMenuText = QT_TR_NOOP("Link actions");
|
||||
sToolTipText = QT_TR_NOOP("Actions that apply to link objects");
|
||||
sWhatsThis = "Std_LinkMakeRelative";
|
||||
sWhatsThis = "Std_LinkActions";
|
||||
sStatusTip = QT_TR_NOOP("Actions that apply to link objects");
|
||||
eType = AlterDoc;
|
||||
bCanLog = false;
|
||||
|
||||
@@ -238,9 +238,7 @@ void DlgAddPropertyVarSet::addEditor(PropertyEditor::PropertyItem* propertyItem,
|
||||
editor.reset(propertyItem->createEditor(this, [this]() {
|
||||
this->valueChanged();
|
||||
}));
|
||||
if (type == "App::PropertyFont") {
|
||||
propertyItem->setEditorData(editor.get(), QVariant());
|
||||
}
|
||||
propertyItem->setEditorData(editor.get(), QVariant());
|
||||
editor->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred);
|
||||
editor->setObjectName(QString::fromUtf8("editor"));
|
||||
auto formLayout = qobject_cast<QFormLayout*>(layout());
|
||||
|
||||
@@ -601,6 +601,7 @@ void DlgMacroExecuteImp::onToolbarButtonClicked()
|
||||
QAbstractButton* doNotShowAgainButton =
|
||||
msgBox.addButton(tr("Do not show again"), QMessageBox::YesRole);
|
||||
msgBox.setText(tr("Guided Walkthrough"));
|
||||
msgBox.setObjectName(QString::fromLatin1("macroGuideWalkthrough"));
|
||||
msgBox.setInformativeText(tr("This will guide you in setting up this macro in a custom \
|
||||
global toolbar. Instructions will be in red text inside the dialog.\n\
|
||||
\n\
|
||||
|
||||
@@ -289,7 +289,9 @@ PreferencePage* DlgPreferencesImp::createPreferencePage(const std::string& pageN
|
||||
|
||||
auto resetMargins = [](QWidget* widget) {
|
||||
widget->setContentsMargins(0, 0, 0, 0);
|
||||
widget->layout()->setContentsMargins(0, 0, 0, 0);
|
||||
if (auto layout = widget->layout()) {
|
||||
layout->setContentsMargins(0, 0, 0, 0);
|
||||
}
|
||||
};
|
||||
|
||||
// settings layout already takes care for margins, we need to reset everything to 0
|
||||
@@ -503,6 +505,38 @@ void DlgPreferencesImp::activateGroupPage(const QString& group, int index)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Activates the page with name \a pageName of the group with name \a group.
|
||||
*/
|
||||
void DlgPreferencesImp::activateGroupPageByPageName(const QString& group, const QString& pageName)
|
||||
{
|
||||
|
||||
for (int i = 0; i < ui->groupWidgetStack->count(); i++) {
|
||||
auto* pageStackWidget = qobject_cast<QStackedWidget*>(ui->groupWidgetStack->widget(i));
|
||||
|
||||
if (!pageStackWidget) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (pageStackWidget->property(GroupNameProperty).toString() == group) {
|
||||
ui->groupWidgetStack->setCurrentWidget(pageStackWidget);
|
||||
for (int pageIdx = 0; pageIdx < pageStackWidget->count(); pageIdx++) {
|
||||
auto page = qobject_cast<PreferencePage*>(pageStackWidget->widget(pageIdx));
|
||||
if (page) {
|
||||
if (page->property(PageNameProperty).toString() == pageName) {
|
||||
pageStackWidget->setCurrentIndex(pageIdx);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
updatePageDependentWidgets();
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the group name \a group and position \a index of the active page.
|
||||
*/
|
||||
|
||||
@@ -149,6 +149,7 @@ public:
|
||||
void reject() override;
|
||||
void reload();
|
||||
void activateGroupPage(const QString& group, int index);
|
||||
void activateGroupPageByPageName(const QString& group, const QString& pageName);
|
||||
void activeGroupPage(QString& group, int& index) const;
|
||||
|
||||
protected:
|
||||
|
||||
@@ -223,7 +223,7 @@ obj : Gui.ViewProvider</UserDocu>
|
||||
<Documentation>
|
||||
<UserDocu>Current edit mode. Only meaningful when there is a current object in edit.</UserDocu>
|
||||
</Documentation>
|
||||
<Parameter Name="EditMode" Type="Int" />
|
||||
<Parameter Name="EditMode" Type="Long" />
|
||||
</Attribute>
|
||||
<Attribute Name="Document" ReadOnly="true">
|
||||
<Documentation>
|
||||
|
||||
@@ -471,7 +471,7 @@ Py::Object DocumentPy::getInEditInfo() const {
|
||||
return Py::None();
|
||||
|
||||
return Py::TupleN(Py::Object(vp->getObject()->getPyObject(),true),
|
||||
Py::String(subname),Py::String(subelement),Py::Int(mode));
|
||||
Py::String(subname),Py::String(subelement),Py::Long(mode));
|
||||
}
|
||||
|
||||
void DocumentPy::setInEditInfo(Py::Object arg)
|
||||
@@ -486,12 +486,12 @@ void DocumentPy::setInEditInfo(Py::Object arg)
|
||||
pyobj)->getViewProviderDocumentObjectPtr(),subname);
|
||||
}
|
||||
|
||||
Py::Int DocumentPy::getEditMode() const
|
||||
Py::Long DocumentPy::getEditMode() const
|
||||
{
|
||||
int mode = -1;
|
||||
getDocumentPtr()->getInEdit(nullptr,nullptr,&mode);
|
||||
|
||||
return Py::Int(mode);
|
||||
return Py::Long(mode);
|
||||
}
|
||||
|
||||
Py::Boolean DocumentPy::getTransacting() const
|
||||
|
||||
@@ -511,6 +511,7 @@ void EditorView::printPdf()
|
||||
printer.setPdfVersion(QPagedPaintDevice::PdfVersion_A1b);
|
||||
printer.setOutputFormat(QPrinter::PdfFormat);
|
||||
printer.setOutputFileName(filename);
|
||||
printer.setCreator(QString::fromStdString(App::Application::getNameWithVersion()));
|
||||
d->textEdit->document()->print(&printer);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -311,5 +311,4 @@ void ExpressionWidget::makeLabel(QLineEdit* le)
|
||||
iconLabel->setStyleSheet(QString::fromLatin1("QLabel { border: none; padding: 0px; padding-top: %2px; width: %1px; height: %1px }").arg(iconHeight).arg(frameWidth/2));
|
||||
iconLabel->hide();
|
||||
iconLabel->setExpressionText(QString());
|
||||
le->setStyleSheet(QString::fromLatin1("QLineEdit { padding-right: %1px } ").arg(iconHeight+frameWidth));
|
||||
}
|
||||
|
||||
@@ -59,7 +59,15 @@ Gui::GUIApplicationNativeEventAware::~GUIApplicationNativeEventAware() = default
|
||||
void Gui::GUIApplicationNativeEventAware::initSpaceball(QMainWindow *window)
|
||||
{
|
||||
#if defined(_USE_3DCONNEXION_SDK) || defined(SPNAV_FOUND)
|
||||
# if defined(USE_3DCONNEXION_NAVLIB)
|
||||
ParameterGrp::handle hViewGrp = App::GetApplication().GetParameterGroupByPath(
|
||||
"User parameter:BaseApp/Preferences/View");
|
||||
if (nativeEvent && hViewGrp->GetBool("LegacySpaceMouseDevices", false)) {
|
||||
nativeEvent->initSpaceball(window);
|
||||
}
|
||||
# else
|
||||
nativeEvent->initSpaceball(window);
|
||||
# endif
|
||||
#else
|
||||
Q_UNUSED(window);
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,91 @@
|
||||
// SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
|
||||
/***************************************************************************
|
||||
* Copyright (c) 2024 Werner Mayer <wmayer[at]users.sourceforge.net> *
|
||||
* *
|
||||
* This file is part of FreeCAD. *
|
||||
* *
|
||||
* FreeCAD is free software: you can redistribute it and/or modify it *
|
||||
* under the terms of the GNU Lesser General Public License as *
|
||||
* published by the Free Software Foundation, either version 2.1 of the *
|
||||
* License, or (at your option) any later version. *
|
||||
* *
|
||||
* FreeCAD is distributed in the hope that it will be useful, but *
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
|
||||
* Lesser General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU Lesser General Public *
|
||||
* License along with FreeCAD. If not, see *
|
||||
* <https://www.gnu.org/licenses/>. *
|
||||
* *
|
||||
**************************************************************************/
|
||||
|
||||
#include "PreCompiled.h"
|
||||
|
||||
#ifndef _PreComp_
|
||||
#include <Inventor/actions/SoCallbackAction.h>
|
||||
#include <Inventor/actions/SoGetBoundingBoxAction.h>
|
||||
#include <Inventor/actions/SoGetPrimitiveCountAction.h>
|
||||
#include <Inventor/actions/SoGLRenderAction.h>
|
||||
#include <Inventor/actions/SoPickAction.h>
|
||||
#include <Inventor/elements/SoModelMatrixElement.h>
|
||||
#endif
|
||||
|
||||
#include "SoFCTransform.h"
|
||||
|
||||
|
||||
using namespace Gui;
|
||||
|
||||
SO_NODE_SOURCE(SoFCTransform)
|
||||
|
||||
void SoFCTransform::initClass()
|
||||
{
|
||||
SO_NODE_INIT_CLASS(SoFCTransform, SoTransform, "Transform");
|
||||
}
|
||||
|
||||
SoFCTransform::SoFCTransform()
|
||||
{
|
||||
SO_NODE_CONSTRUCTOR(SoFCTransform);
|
||||
}
|
||||
|
||||
void SoFCTransform::GLRender(SoGLRenderAction * action)
|
||||
{
|
||||
SoFCTransform::doAction(action);
|
||||
}
|
||||
|
||||
void SoFCTransform::callback(SoCallbackAction * action)
|
||||
{
|
||||
SoFCTransform::doAction(action);
|
||||
}
|
||||
|
||||
void SoFCTransform::pick(SoPickAction * action)
|
||||
{
|
||||
SoFCTransform::doAction(action);
|
||||
}
|
||||
|
||||
void SoFCTransform::getPrimitiveCount(SoGetPrimitiveCountAction * action)
|
||||
{
|
||||
SoFCTransform::doAction(action);
|
||||
}
|
||||
|
||||
void SoFCTransform::getBoundingBox(SoGetBoundingBoxAction * action)
|
||||
{
|
||||
SoFCTransform::doAction(action);
|
||||
}
|
||||
|
||||
void SoFCTransform::doAction(SoAction * action)
|
||||
{
|
||||
SbMatrix matrix;
|
||||
matrix.setTransform(this->translation.getValue(),
|
||||
this->rotation.getValue(),
|
||||
this->scaleFactor.getValue(),
|
||||
this->scaleOrientation.getValue(),
|
||||
this->center.getValue());
|
||||
|
||||
// This is different to SoTransform::doAction() where model matrix
|
||||
// is always set
|
||||
if (matrix != SbMatrix::identity()) {
|
||||
SoModelMatrixElement::mult(action->getState(), this, matrix);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
// SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
|
||||
/***************************************************************************
|
||||
* Copyright (c) 2024 Werner Mayer <wmayer[at]users.sourceforge.net> *
|
||||
* *
|
||||
* This file is part of FreeCAD. *
|
||||
* *
|
||||
* FreeCAD is free software: you can redistribute it and/or modify it *
|
||||
* under the terms of the GNU Lesser General Public License as *
|
||||
* published by the Free Software Foundation, either version 2.1 of the *
|
||||
* License, or (at your option) any later version. *
|
||||
* *
|
||||
* FreeCAD is distributed in the hope that it will be useful, but *
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
|
||||
* Lesser General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU Lesser General Public *
|
||||
* License along with FreeCAD. If not, see *
|
||||
* <https://www.gnu.org/licenses/>. *
|
||||
* *
|
||||
**************************************************************************/
|
||||
|
||||
#ifndef GUI_INVENTOR_SOFCTRANSFORM_H
|
||||
#define GUI_INVENTOR_SOFCTRANSFORM_H
|
||||
|
||||
#include <Inventor/nodes/SoTransform.h>
|
||||
#include <FCGlobal.h>
|
||||
|
||||
namespace Gui
|
||||
{
|
||||
|
||||
/**
|
||||
* @class SoFCTransform
|
||||
* @brief A temporary workaround for coin3d/coin#534.
|
||||
*
|
||||
* This class is a workaround for a missing feature to reduce the OpenGL stack size.
|
||||
* The issue was reported here: https://github.com/coin3d/coin/issues/534
|
||||
* And was merged here: https://github.com/coin3d/coin/pull/535
|
||||
*
|
||||
* Once this feature is available in all supported versions of Coin3D, this class should
|
||||
* be removed and all instances should revert to using SoTransform.
|
||||
*/
|
||||
class GuiExport SoFCTransform : public SoTransform
|
||||
{
|
||||
using inherited = SoTransform;
|
||||
|
||||
SO_NODE_HEADER(SoFCTransform);
|
||||
|
||||
public:
|
||||
static void initClass();
|
||||
SoFCTransform();
|
||||
|
||||
protected:
|
||||
void GLRender(SoGLRenderAction * action) override;
|
||||
void callback(SoCallbackAction * action) override;
|
||||
void pick(SoPickAction * action) override;
|
||||
void getPrimitiveCount(SoGetPrimitiveCountAction * action) override;
|
||||
void getBoundingBox(SoGetBoundingBoxAction * action) override;
|
||||
void doAction(SoAction * action) override;
|
||||
};
|
||||
|
||||
} // namespace Gui
|
||||
|
||||
#endif // GUI_INVENTOR_SOFCTRANSFORM_H
|
||||
@@ -154,7 +154,7 @@ Return a tuple(path,detail) for the coin3D SoPath and SoDetail of the element
|
||||
<Documentation>
|
||||
<UserDocu>Set the element size to create an array of linked object</UserDocu>
|
||||
</Documentation>
|
||||
<Parameter Name="Count" Type="Int" />
|
||||
<Parameter Name="Count" Type="Long" />
|
||||
</Attribute>
|
||||
<Methode Name="getChildren" Const="true">
|
||||
<Documentation>
|
||||
|
||||
@@ -83,7 +83,7 @@ PyObject* LinkViewPy::setMaterial(PyObject *args) {
|
||||
Py_ssize_t pos = 0;
|
||||
std::map<int,App::Material*> materials;
|
||||
while(PyDict_Next(pyObj, &pos, &key, &value)) {
|
||||
Py::Int idx(key);
|
||||
Py::Long idx(key);
|
||||
if(value == Py_None)
|
||||
materials[(int)idx] = nullptr;
|
||||
else if(!PyObject_TypeCheck(value,&App::MaterialPy::Type)) {
|
||||
@@ -135,7 +135,7 @@ PyObject* LinkViewPy::setTransform(PyObject *args) {
|
||||
Py_ssize_t pos = 0;
|
||||
std::map<int,Base::Matrix4D*> mat;
|
||||
while(PyDict_Next(pyObj, &pos, &key, &value)) {
|
||||
Py::Int idx(key);
|
||||
Py::Long idx(key);
|
||||
if(!PyObject_TypeCheck(value,&Base::MatrixPy::Type)) {
|
||||
PyErr_SetString(PyExc_TypeError, "exepcting a type of Matrix");
|
||||
return nullptr;
|
||||
@@ -384,11 +384,11 @@ PyObject* LinkViewPy::getChildren(PyObject *args) {
|
||||
return Py::new_reference_to(ret);
|
||||
}
|
||||
|
||||
Py::Int LinkViewPy::getCount() const {
|
||||
return Py::Int(getLinkViewPtr()->getSize());
|
||||
Py::Long LinkViewPy::getCount() const {
|
||||
return Py::Long(getLinkViewPtr()->getSize());
|
||||
}
|
||||
|
||||
void LinkViewPy::setCount(Py::Int count) {
|
||||
void LinkViewPy::setCount(Py::Long count) {
|
||||
try {
|
||||
getLinkViewPtr()->setSize((int)count);
|
||||
} catch (const Base::Exception& e) {
|
||||
|
||||
@@ -39,6 +39,7 @@
|
||||
|
||||
#include <Base/Interpreter.h>
|
||||
#include <App/Document.h>
|
||||
#include <App/Application.h>
|
||||
|
||||
#include "MDIView.h"
|
||||
#include "MDIViewPy.h"
|
||||
@@ -264,6 +265,7 @@ void MDIView::printPdf()
|
||||
printer.setPdfVersion(QPagedPaintDevice::PdfVersion_A1b);
|
||||
printer.setOutputFormat(QPrinter::PdfFormat);
|
||||
printer.setOutputFileName(filename);
|
||||
printer.setCreator(QString::fromStdString(App::Application::getNameWithVersion()));
|
||||
print(&printer);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -80,6 +80,9 @@ bool MacroFile::commit()
|
||||
|
||||
// sort import lines and avoid duplicates
|
||||
QTextStream str(&file);
|
||||
#if QT_VERSION < QT_VERSION_CHECK(6,0,0)
|
||||
str.setCodec("UTF-8");
|
||||
#endif
|
||||
QStringList import;
|
||||
import << QString::fromLatin1("import FreeCAD");
|
||||
QStringList body;
|
||||
|
||||
@@ -2616,12 +2616,7 @@ void MainWindow::setWindowTitle(const QString& string)
|
||||
|
||||
if (showVersion) {
|
||||
// set main window title with FreeCAD Version
|
||||
auto config = App::Application::Config();
|
||||
QString major = QString::fromUtf8(config["BuildVersionMajor"].c_str());
|
||||
QString minor = QString::fromUtf8(config["BuildVersionMinor"].c_str());
|
||||
QString point = QString::fromUtf8(config["BuildVersionPoint"].c_str());
|
||||
QString suffix = QString::fromUtf8(config["BuildVersionSuffix"].c_str());
|
||||
title = QString::fromUtf8("%1 %2.%3.%4%5").arg(appname, major, minor, point, suffix);
|
||||
title = QString::fromStdString(App::Application::getNameWithVersion());
|
||||
}
|
||||
else {
|
||||
title = appname;
|
||||
|
||||
@@ -887,15 +887,6 @@ void NavigationStyle::spin(const SbVec2f & pointerpos)
|
||||
spinprojector->setSphere(SbSphere {SbVec3f {0, 0, 0}, FCSphereSheetProjector::defaultSphereRadius});
|
||||
}
|
||||
|
||||
if (this->rotationCenterMode && this->rotationCenterFound) {
|
||||
SbVec3f hitpoint = this->rotationCenter;
|
||||
|
||||
// set to the given position
|
||||
SbVec3f direction;
|
||||
viewer->getSoRenderManager()->getCamera()->orientation.getValue().multVec(SbVec3f(0, 0, -1), direction);
|
||||
viewer->getSoRenderManager()->getCamera()->position = hitpoint - viewer->getSoRenderManager()->getCamera()->focalDistance.getValue() * direction;
|
||||
}
|
||||
|
||||
// 0000333: Turntable camera rotation
|
||||
SbMatrix mat;
|
||||
viewer->getSoRenderManager()->getCamera()->orientation.getValue().getValue(mat);
|
||||
@@ -912,16 +903,12 @@ void NavigationStyle::spin(const SbVec2f & pointerpos)
|
||||
r.setValue(axis, radians);
|
||||
}
|
||||
r.invert();
|
||||
this->reorientCamera(viewer->getSoRenderManager()->getCamera(), r);
|
||||
|
||||
if (this->rotationCenterMode && this->rotationCenterFound) {
|
||||
float ratio = vp.getViewportAspectRatio();
|
||||
SbViewVolume vv = viewer->getSoRenderManager()->getCamera()->getViewVolume(vp.getViewportAspectRatio());
|
||||
SbPlane panplane = vv.getPlane(viewer->getSoRenderManager()->getCamera()->focalDistance.getValue());
|
||||
SbVec2f posn;
|
||||
posn[0] = float(this->localPos[0]) / float(std::max((int)(glsize[0]-1), 1));
|
||||
posn[1] = float(this->localPos[1]) / float(std::max((int)(glsize[1]-1), 1));
|
||||
panCamera(viewer->getSoRenderManager()->getCamera(), ratio, panplane, posn, SbVec2f(0.5,0.5));
|
||||
this->reorientCamera(viewer->getSoRenderManager()->getCamera(), r, rotationCenter);
|
||||
}
|
||||
else {
|
||||
this->reorientCamera(viewer->getSoRenderManager()->getCamera(), r);
|
||||
}
|
||||
|
||||
// Calculate an average angle magnitude value to make the transition
|
||||
@@ -963,15 +950,6 @@ void NavigationStyle::spin_simplified(SoCamera* cam, SbVec2f curpos, SbVec2f pre
|
||||
{
|
||||
assert(this->spinprojector);
|
||||
|
||||
if (this->rotationCenterMode && this->rotationCenterFound) {
|
||||
SbVec3f hitpoint = this->rotationCenter;
|
||||
|
||||
// set to the given position
|
||||
SbVec3f direction;
|
||||
viewer->getSoRenderManager()->getCamera()->orientation.getValue().multVec(SbVec3f(0, 0, -1), direction);
|
||||
viewer->getSoRenderManager()->getCamera()->position = hitpoint - viewer->getSoRenderManager()->getCamera()->focalDistance.getValue() * direction;
|
||||
}
|
||||
|
||||
// 0000333: Turntable camera rotation
|
||||
SbMatrix mat;
|
||||
viewer->getSoRenderManager()->getCamera()->orientation.getValue().getValue(mat);
|
||||
@@ -989,19 +967,12 @@ void NavigationStyle::spin_simplified(SoCamera* cam, SbVec2f curpos, SbVec2f pre
|
||||
r.setValue(axis, radians);
|
||||
}
|
||||
r.invert();
|
||||
this->reorientCamera(cam, r);
|
||||
|
||||
if (this->rotationCenterMode && this->rotationCenterFound) {
|
||||
const SbViewportRegion & vp = viewer->getSoRenderManager()->getViewportRegion();
|
||||
SbVec2s glsize(vp.getViewportSizePixels());
|
||||
|
||||
float ratio = vp.getViewportAspectRatio();
|
||||
SbViewVolume vv = viewer->getSoRenderManager()->getCamera()->getViewVolume(vp.getViewportAspectRatio());
|
||||
SbPlane panplane = vv.getPlane(viewer->getSoRenderManager()->getCamera()->focalDistance.getValue());
|
||||
SbVec2f posn;
|
||||
posn[0] = float(this->localPos[0]) / float(std::max((int)(glsize[0]-1), 1));
|
||||
posn[1] = float(this->localPos[1]) / float(std::max((int)(glsize[1]-1), 1));
|
||||
panCamera(viewer->getSoRenderManager()->getCamera(), ratio, panplane, posn, SbVec2f(0.5,0.5));
|
||||
this->reorientCamera(viewer->getSoRenderManager()->getCamera(), r, rotationCenter);
|
||||
}
|
||||
else {
|
||||
this->reorientCamera(viewer->getSoRenderManager()->getCamera(), r);
|
||||
}
|
||||
|
||||
hasDragged = true;
|
||||
|
||||
@@ -60,9 +60,9 @@ PreferencePack::PreferencePack(const fs::path& path, const App::Metadata& metada
|
||||
auto cssPaths = QDir::searchPaths(QString::fromUtf8("css"));
|
||||
auto overlayPaths = QDir::searchPaths(QString::fromUtf8("overlay"));
|
||||
|
||||
qssPaths.append(QString::fromStdString(_path.string()));
|
||||
cssPaths.append(QString::fromStdString(_path.string()));
|
||||
overlayPaths.append(QString::fromStdString(_path.string() + "/overlay"));
|
||||
qssPaths.append(QString::fromStdString(Base::FileInfo::pathToString(_path)));
|
||||
cssPaths.append(QString::fromStdString(Base::FileInfo::pathToString(_path)));
|
||||
overlayPaths.append(QString::fromStdString(Base::FileInfo::pathToString(_path) + "/overlay"));
|
||||
|
||||
QDir::setSearchPaths(QString::fromUtf8("qss"), qssPaths);
|
||||
QDir::setSearchPaths(QString::fromUtf8("css"), cssPaths);
|
||||
@@ -80,7 +80,7 @@ bool PreferencePack::apply() const
|
||||
auto preMacroPath = _path / "pre.FCMacro";
|
||||
if (fs::exists(preMacroPath)) {
|
||||
try {
|
||||
Base::Interpreter().runFile(preMacroPath.string().c_str(), false);
|
||||
Base::Interpreter().runFile(Base::FileInfo::pathToString(preMacroPath).c_str(), false);
|
||||
}
|
||||
catch (...) {
|
||||
Base::Console().Message("PreferencePack application aborted by the preferencePack's pre.FCMacro");
|
||||
@@ -89,13 +89,13 @@ bool PreferencePack::apply() const
|
||||
}
|
||||
|
||||
// Back up the old config file
|
||||
auto savedPreferencePacksDirectory = fs::path(App::Application::getUserAppDataDir()) / "SavedPreferencePacks";
|
||||
auto savedPreferencePacksDirectory = fs::path(Base::FileInfo::stringToPath(App::Application::getUserAppDataDir())) / "SavedPreferencePacks";
|
||||
auto backupFile = savedPreferencePacksDirectory / "user.cfg.backup";
|
||||
try {
|
||||
fs::remove(backupFile);
|
||||
}
|
||||
catch (...) {}
|
||||
App::GetApplication().GetUserParameter().SaveDocument(backupFile.string().c_str());
|
||||
App::GetApplication().GetUserParameter().SaveDocument(Base::FileInfo::pathToString(backupFile).c_str());
|
||||
|
||||
// Apply the config settings
|
||||
applyConfigChanges();
|
||||
@@ -104,11 +104,11 @@ bool PreferencePack::apply() const
|
||||
auto postMacroPath = _path / "post.FCMacro";
|
||||
if (fs::exists(postMacroPath)) {
|
||||
try {
|
||||
Base::Interpreter().runFile(postMacroPath.string().c_str(), false);
|
||||
Base::Interpreter().runFile(Base::FileInfo::pathToString(postMacroPath).c_str(), false);
|
||||
}
|
||||
catch (...) {
|
||||
Base::Console().Message("PreferencePack application reverted by the preferencePack's post.FCMacro");
|
||||
App::GetApplication().GetUserParameter().LoadDocument(backupFile.string().c_str());
|
||||
App::GetApplication().GetUserParameter().LoadDocument(Base::FileInfo::pathToString(backupFile).c_str());
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -127,7 +127,7 @@ void PreferencePack::applyConfigChanges() const
|
||||
auto configFile = _path / (_metadata.name() + ".cfg");
|
||||
if (fs::exists(configFile)) {
|
||||
auto newParameters = ParameterManager::Create();
|
||||
newParameters->LoadDocument(configFile.string().c_str());
|
||||
newParameters->LoadDocument(Base::FileInfo::pathToString(configFile).c_str());
|
||||
auto baseAppGroup = App::GetApplication().GetUserParameter().GetGroup("BaseApp");
|
||||
newParameters->GetGroup("BaseApp")->insertTo(baseAppGroup);
|
||||
}
|
||||
@@ -135,9 +135,9 @@ void PreferencePack::applyConfigChanges() const
|
||||
|
||||
PreferencePackManager::PreferencePackManager()
|
||||
{
|
||||
auto modPath = fs::path(App::Application::getUserAppDataDir()) / "Mod";
|
||||
auto savedPath = fs::path(App::Application::getUserAppDataDir()) / "SavedPreferencePacks";
|
||||
auto resourcePath = fs::path(App::Application::getResourceDir()) / "Gui" / "PreferencePacks";
|
||||
auto modPath = fs::path(Base::FileInfo::stringToPath(App::Application::getUserAppDataDir())) / "Mod";
|
||||
auto savedPath = fs::path(Base::FileInfo::stringToPath(App::Application::getUserAppDataDir())) / "SavedPreferencePacks";
|
||||
auto resourcePath = fs::path(Base::FileInfo::stringToPath(App::Application::getResourceDir())) / "Gui" / "PreferencePacks";
|
||||
_preferencePackPaths.push_back(resourcePath);
|
||||
_preferencePackPaths.push_back(modPath);
|
||||
_preferencePackPaths.push_back(savedPath);
|
||||
@@ -167,7 +167,7 @@ void Gui::PreferencePackManager::AddPackToMetadata(const std::string &packName)
|
||||
{
|
||||
std::lock_guard<std::mutex> lock(_mutex);
|
||||
auto savedPreferencePacksDirectory =
|
||||
fs::path(App::Application::getUserAppDataDir()) / "SavedPreferencePacks";
|
||||
fs::path(Base::FileInfo::stringToPath(App::Application::getUserAppDataDir())) / "SavedPreferencePacks";
|
||||
fs::path preferencePackDirectory(savedPreferencePacksDirectory / packName);
|
||||
if (fs::exists(preferencePackDirectory) && !fs::is_directory(preferencePackDirectory))
|
||||
throw std::runtime_error("Cannot create " + savedPreferencePacksDirectory.string()
|
||||
@@ -222,7 +222,7 @@ void Gui::PreferencePackManager::importConfig(const std::string& packName,
|
||||
AddPackToMetadata(packName);
|
||||
|
||||
auto savedPreferencePacksDirectory =
|
||||
fs::path(App::Application::getUserAppDataDir()) / "SavedPreferencePacks";
|
||||
fs::path(Base::FileInfo::stringToPath(App::Application::getUserAppDataDir())) / "SavedPreferencePacks";
|
||||
auto cfgFilename = savedPreferencePacksDirectory / packName / (packName + ".cfg");
|
||||
#if BOOST_VERSION >= 107400
|
||||
fs::copy_file(path, cfgFilename, fs::copy_options::overwrite_existing);
|
||||
@@ -243,20 +243,20 @@ void Gui::PreferencePackManager::FindPreferencePacksInPackage(const fs::path &mo
|
||||
catch (...) {
|
||||
// Failed to read the metadata, or to create the preferencePack based on it...
|
||||
auto packageMetadataFile = mod / "package.xml";
|
||||
Base::Console().Error("Failed to read %s\n", packageMetadataFile.string().c_str());
|
||||
Base::Console().Error("Failed to read %s\n", Base::FileInfo::pathToString(packageMetadataFile).c_str());
|
||||
}
|
||||
}
|
||||
|
||||
void PreferencePackManager::TryFindPreferencePacksInPackage(const boost::filesystem::path& mod)
|
||||
{
|
||||
auto packageMetadataFile = mod / "package.xml";
|
||||
static const auto modDirectory = fs::path(App::Application::getUserAppDataDir()) / "Mod" / "SavedPreferencePacks";
|
||||
static const auto resourcePath = fs::path(App::Application::getResourceDir()) / "Gui" / "PreferencePacks";
|
||||
static const auto modDirectory = fs::path(Base::FileInfo::stringToPath(App::Application::getUserAppDataDir())) / "Mod" / "SavedPreferencePacks";
|
||||
static const auto resourcePath = fs::path(Base::FileInfo::stringToPath(App::Application::getResourceDir())) / "Gui" / "PreferencePacks";
|
||||
|
||||
if (fs::exists(packageMetadataFile) && fs::is_regular_file(packageMetadataFile)) {
|
||||
App::Metadata metadata(packageMetadataFile);
|
||||
auto content = metadata.content();
|
||||
auto basename = mod.filename().string();
|
||||
auto basename = Base::FileInfo::pathToString(mod.filename());
|
||||
if (mod == modDirectory)
|
||||
basename = "##USER_SAVED##";
|
||||
else if (mod == resourcePath)
|
||||
@@ -365,7 +365,7 @@ void Gui::PreferencePackManager::deleteUserPack(const std::string& name)
|
||||
{
|
||||
if (name.empty())
|
||||
return;
|
||||
auto savedPreferencePacksDirectory = fs::path(App::Application::getUserAppDataDir()) / "SavedPreferencePacks";
|
||||
auto savedPreferencePacksDirectory = fs::path(Base::FileInfo::stringToPath(App::Application::getUserAppDataDir())) / "SavedPreferencePacks";
|
||||
auto savedPath = savedPreferencePacksDirectory / name;
|
||||
std::unique_ptr<App::Metadata> metadata;
|
||||
if (fs::exists(savedPreferencePacksDirectory / "package.xml")) {
|
||||
@@ -454,13 +454,13 @@ void PreferencePackManager::save(const std::string& name, const std::vector<Temp
|
||||
outputParameterManager->CreateDocument();
|
||||
for (const auto& t : templates) {
|
||||
auto templateParameterManager = ParameterManager::Create();
|
||||
templateParameterManager->LoadDocument(t.path.string().c_str());
|
||||
templateParameterManager->LoadDocument(Base::FileInfo::pathToString(t.path).c_str());
|
||||
copyTemplateParameters(*templateParameterManager, *outputParameterManager);
|
||||
}
|
||||
auto savedPreferencePacksDirectory =
|
||||
fs::path(App::Application::getUserAppDataDir()) / "SavedPreferencePacks";
|
||||
fs::path(Base::FileInfo::stringToPath(App::Application::getUserAppDataDir())) / "SavedPreferencePacks";
|
||||
auto cfgFilename = savedPreferencePacksDirectory / name / (name + ".cfg");
|
||||
outputParameterManager->SaveDocument(cfgFilename.string().c_str());
|
||||
outputParameterManager->SaveDocument(Base::FileInfo::pathToString(cfgFilename).c_str());
|
||||
}
|
||||
|
||||
// Needed until we support only C++20 and above and can use std::string's built-in ends_with()
|
||||
@@ -480,7 +480,7 @@ std::vector<fs::path> scanForTemplateFolders(const std::string& groupName, const
|
||||
templateFolders.push_back(entry);
|
||||
}
|
||||
else {
|
||||
std::string subgroupName = groupName + "/" + entry.filename().string();
|
||||
std::string subgroupName = groupName + "/" + Base::FileInfo::pathToString(entry.filename());
|
||||
for (const auto& subentry : fs::directory_iterator(entry)) {
|
||||
auto contents = scanForTemplateFolders(subgroupName, subentry);
|
||||
std::copy(contents.begin(), contents.end(), std::back_inserter(templateFolders));
|
||||
@@ -501,7 +501,7 @@ std::vector<PreferencePackManager::TemplateFile> scanForTemplateFiles(const std:
|
||||
continue;
|
||||
for (const auto& entry : fs::directory_iterator(templateDir)) {
|
||||
if (entry.path().extension() == ".cfg") {
|
||||
auto name = entry.path().filename().stem().string();
|
||||
auto name = Base::FileInfo::pathToString(entry.path().filename().stem());
|
||||
std::replace(name.begin(), name.end(), '_', ' ');
|
||||
// Make sure we don't insert the same thing twice...
|
||||
if (std::find_if(templateFiles.begin(), templateFiles.end(), [groupName, name](const auto &rhs)->bool {
|
||||
@@ -527,8 +527,8 @@ std::vector<PreferencePackManager::TemplateFile> PreferencePackManager::template
|
||||
// * $DATA_DIR/Mod/**/PreferencePackTemplates/(Appearance|Behavior)/*
|
||||
// (alternate spellings are provided for packages using CamelCase and snake_case, and both major English dialects)
|
||||
|
||||
auto resourcePath = fs::path(App::Application::getResourceDir()) / "Gui";
|
||||
auto modPath = fs::path(App::Application::getUserAppDataDir()) / "Mod";
|
||||
auto resourcePath = fs::path(Base::FileInfo::stringToPath(App::Application::getResourceDir())) / "Gui";
|
||||
auto modPath = fs::path(Base::FileInfo::stringToPath(App::Application::getUserAppDataDir())) / "Mod";
|
||||
|
||||
std::string group = "Built-In";
|
||||
if (fs::exists(resourcePath) && fs::is_directory(resourcePath)) {
|
||||
@@ -538,7 +538,7 @@ std::vector<PreferencePackManager::TemplateFile> PreferencePackManager::template
|
||||
|
||||
if (fs::exists(modPath) && fs::is_directory(modPath)) {
|
||||
for (const auto& mod : fs::directory_iterator(modPath)) {
|
||||
group = mod.path().filename().string();
|
||||
group = Base::FileInfo::pathToString(mod.path().filename());
|
||||
const auto localFiles = scanForTemplateFiles(group, mod);
|
||||
std::copy(localFiles.begin(), localFiles.end(), std::back_inserter(_templateFiles));
|
||||
}
|
||||
@@ -549,7 +549,7 @@ std::vector<PreferencePackManager::TemplateFile> PreferencePackManager::template
|
||||
|
||||
void Gui::PreferencePackManager::BackupCurrentConfig() const
|
||||
{
|
||||
auto backupDirectory = fs::path(App::Application::getUserAppDataDir()) / "SavedPreferencePacks" / "Backups";
|
||||
auto backupDirectory = fs::path(Base::FileInfo::stringToPath(App::Application::getUserAppDataDir())) / "SavedPreferencePacks" / "Backups";
|
||||
fs::create_directories(backupDirectory);
|
||||
|
||||
// Create a timestamped filename:
|
||||
@@ -559,14 +559,14 @@ void Gui::PreferencePackManager::BackupCurrentConfig() const
|
||||
auto filename = backupDirectory / timestampStream.str();
|
||||
|
||||
// Save the current config:
|
||||
App::GetApplication().GetUserParameter().SaveDocument(filename.string().c_str());
|
||||
App::GetApplication().GetUserParameter().SaveDocument(Base::FileInfo::pathToString(filename).c_str());
|
||||
}
|
||||
|
||||
void Gui::PreferencePackManager::DeleteOldBackups() const
|
||||
{
|
||||
constexpr auto oneWeek = 60.0 * 60.0 * 24.0 * 7.0;
|
||||
const auto now = std::time(nullptr);
|
||||
auto backupDirectory = fs::path(App::Application::getUserAppDataDir()) / "SavedPreferencePacks" / "Backups";
|
||||
auto backupDirectory = fs::path(Base::FileInfo::stringToPath(App::Application::getUserAppDataDir())) / "SavedPreferencePacks" / "Backups";
|
||||
if (fs::exists(backupDirectory) && fs::is_directory(backupDirectory)) {
|
||||
for (const auto& backup : fs::directory_iterator(backupDirectory)) {
|
||||
if (std::difftime(now, fs::last_write_time(backup)) > oneWeek) {
|
||||
@@ -582,7 +582,7 @@ void Gui::PreferencePackManager::DeleteOldBackups() const
|
||||
std::vector<boost::filesystem::path> Gui::PreferencePackManager::configBackups() const
|
||||
{
|
||||
std::vector<boost::filesystem::path> results;
|
||||
auto backupDirectory = fs::path(App::Application::getUserAppDataDir()) / "SavedPreferencePacks" / "Backups";
|
||||
auto backupDirectory = fs::path(Base::FileInfo::stringToPath(App::Application::getUserAppDataDir())) / "SavedPreferencePacks" / "Backups";
|
||||
if (fs::exists(backupDirectory) && fs::is_directory(backupDirectory)) {
|
||||
for (const auto& backup : fs::directory_iterator(backupDirectory)) {
|
||||
results.push_back(backup);
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
<FCInt Name="gridTransparency" Value="0"/>
|
||||
<FCUInt Name="constructioncolor" Value="746455039"/>
|
||||
<FCUInt Name="gridColor" Value="4294967295"/>
|
||||
<FCUInt Name="snapcolor" Value="4294967295"/>
|
||||
<FCUInt Name="snapcolor" Value="4289331455"/>
|
||||
</FCParamGroup>
|
||||
<FCParamGroup Name="Spreadsheet">
|
||||
<FCText Name="AliasedCellBackgroundColor">#9b4de6</FCText>
|
||||
|
||||
@@ -1,304 +1,178 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
|
||||
<FCParameters>
|
||||
<FCParamGroup Name="Root">
|
||||
<FCParamGroup Name="BaseApp">
|
||||
<FCParamGroup Name="Preferences">
|
||||
<FCParamGroup Name="Editor">
|
||||
<FCUInt Name="Block comment" Value="2694882304"/>
|
||||
<FCUInt Name="Bookmark" Value="16776960"/>
|
||||
<FCUInt Name="Breakpoint" Value="4278190080"/>
|
||||
<FCUInt Name="Character" Value="4278190080"/>
|
||||
<FCUInt Name="Class name" Value="4289331200"/>
|
||||
<FCUInt Name="Comment" Value="11141120"/>
|
||||
<FCUInt Name="Current line highlight" Value="3772833792"/>
|
||||
<FCUInt Name="Define name" Value="4289331200"/>
|
||||
<FCUInt Name="Keyword" Value="65280"/>
|
||||
<FCUInt Name="Number" Value="65280"/>
|
||||
<FCUInt Name="Operator" Value="2694882304"/>
|
||||
<FCUInt Name="Python error" Value="4278190080"/>
|
||||
<FCUInt Name="Python output" Value="2863300352"/>
|
||||
<FCUInt Name="String" Value="4278190080"/>
|
||||
<FCUInt Name="Text" Value="809320704"/>
|
||||
</FCParamGroup>
|
||||
<FCParamGroup Name="MainWindow">
|
||||
<FCText Name="OverlayActiveStyleSheet">Light Theme + Dark Background.qss</FCText>
|
||||
<FCText Name="StyleSheet"/>
|
||||
<FCText Name="Theme">FreeCAD Classic</FCText>
|
||||
</FCParamGroup>
|
||||
<FCParamGroup Name="Mod">
|
||||
<FCParamGroup Name="Arch">
|
||||
<FCUInt Name="ColorHelpers" Value="674321151"/>
|
||||
<FCUInt Name="defaultSpaceColor" Value="4280090879"/>
|
||||
<FCUInt Name="PanelColor" Value="3416289279"/>
|
||||
<FCUInt Name="RebarColor" Value="3111475967"/>
|
||||
<FCUInt Name="StructureColor" Value="2527705855"/>
|
||||
<FCUInt Name="WallColor" Value="3604403967"/>
|
||||
<FCUInt Name="WindowGlassColor" Value="1572326399"/>
|
||||
</FCParamGroup>
|
||||
<FCParamGroup Name="CAM">
|
||||
<FCUInt Name="DefaultBBoxNormalColor" Value="4294967295"/>
|
||||
<FCUInt Name="DefaultBBoxSelectionColor" Value="3372220415"/>
|
||||
<FCUInt Name="DefaultHighlightPathColor" Value="4286382335"/>
|
||||
<FCUInt Name="DefaultNormalPathColor" Value="11141375"/>
|
||||
<FCUInt Name="DefaultPathMarkerColor" Value="1442775295"/>
|
||||
<FCUInt Name="DefaultProbePathColor" Value="4294903295"/>
|
||||
<FCUInt Name="DefaultRapidPathColor" Value="2852126975"/>
|
||||
</FCParamGroup>
|
||||
<FCParamGroup Name="Draft">
|
||||
<FCInt Name="gridTransparency" Value="0"/>
|
||||
<FCUInt Name="color" Value="3435980288"/>
|
||||
<FCUInt Name="constructioncolor" Value="746455039"/>
|
||||
<FCUInt Name="DefaultAnnoLineColor" Value="255"/>
|
||||
<FCUInt Name="DefaultTextColor" Value="255"/>
|
||||
<FCUInt Name="gridColor" Value="842157055"/>
|
||||
<FCUInt Name="snapcolor" Value="4289331455"/>
|
||||
</FCParamGroup>
|
||||
<FCParamGroup Name="Measure">
|
||||
<FCParamGroup Name="Appearance">
|
||||
<FCUInt Name="DefaultLineColor" Value="4294967295"/>
|
||||
<FCUInt Name="DefaultTextBackgroundColor" Value="255"/>
|
||||
<FCUInt Name="DefaultTextColor" Value="4294967295"/>
|
||||
</FCParamGroup>
|
||||
</FCParamGroup>
|
||||
<FCParamGroup Name="Mesh">
|
||||
<FCUInt Name="BackfaceColor" Value="3435973887"/>
|
||||
<FCUInt Name="LineColor" Value="255"/>
|
||||
<FCUInt Name="MeshColor" Value="3435973887"/>
|
||||
</FCParamGroup>
|
||||
<FCParamGroup Name="Sketcher">
|
||||
<FCParamGroup Name="General">
|
||||
<FCUInt Name="GridDivLineColor" Value="2998055679"/>
|
||||
<FCUInt Name="GridLineColor" Value="2998055679"/>
|
||||
</FCParamGroup>
|
||||
</FCParamGroup>
|
||||
<FCParamGroup Name="Spreadsheet">
|
||||
<FCText Name="AliasedCellBackgroundColor">#feff9e</FCText>
|
||||
<FCText Name="NegativeNumberColor">#000000</FCText>
|
||||
<FCText Name="PositiveNumberColor">#000000</FCText>
|
||||
<FCText Name="TextColor">#000000</FCText>
|
||||
</FCParamGroup>
|
||||
<FCParamGroup Name="Start">
|
||||
<FCUInt Name="FileThumbnailBackgroundColor" Value="3554532863"/>
|
||||
<FCUInt Name="FileThumbnailBorderColor" Value="1654713087"/>
|
||||
<FCUInt Name="FileThumbnailSelectionColor" Value="648178175"/>
|
||||
</FCParamGroup>
|
||||
<FCParamGroup Name="TechDraw">
|
||||
<FCParamGroup Name="Colors">
|
||||
<FCBool Name="LightOnDark" Value="0"/>
|
||||
<FCBool Name="Monochrome" Value="0"/>
|
||||
<FCUInt Name="Background" Value="3553874943"/>
|
||||
<FCUInt Name="CutSurfaceColor" Value="3553874943"/>
|
||||
<FCUInt Name="FaceColor" Value="4294967295"/>
|
||||
<FCUInt Name="GeomHatch" Value="255"/>
|
||||
<FCUInt Name="gridColor" Value="255"/>
|
||||
<FCUInt Name="Hatch" Value="255"/>
|
||||
<FCUInt Name="HiddenColor" Value="255"/>
|
||||
<FCUInt Name="LightTextColor" Value="4294967295"/>
|
||||
<FCUInt Name="NormalColor" Value="255"/>
|
||||
<FCUInt Name="PageColor" Value="4294967295"/>
|
||||
<FCUInt Name="PreSelectColor" Value="4294902015"/>
|
||||
<FCUInt Name="SelectColor" Value="16711935"/>
|
||||
<FCUInt Name="TemplateUnderlineColor" Value="65535"/>
|
||||
</FCParamGroup>
|
||||
<FCParamGroup Name="Decorations">
|
||||
<FCUInt Name="CenterColor" Value="255"/>
|
||||
<FCUInt Name="HighlightColor" Value="255"/>
|
||||
<FCUInt Name="SectionColor" Value="255"/>
|
||||
<FCUInt Name="VertexColor" Value="255"/>
|
||||
</FCParamGroup>
|
||||
<FCParamGroup Name="Dimensions">
|
||||
<FCUInt Name="Color" Value="255"/>
|
||||
</FCParamGroup>
|
||||
<FCParamGroup Name="Markups">
|
||||
<FCUInt Name="Color" Value="255"/>
|
||||
</FCParamGroup>
|
||||
</FCParamGroup>
|
||||
</FCParamGroup>
|
||||
<FCParamGroup Name="NaviCube">
|
||||
<FCUInt Name="BaseColor" Value="3806916480"/>
|
||||
</FCParamGroup>
|
||||
<FCParamGroup Name="OutputWindow">
|
||||
<FCUInt Name="colorError" Value="4278190335"/>
|
||||
<FCUInt Name="colorLogging" Value="65535"/>
|
||||
<FCUInt Name="colorText" Value="809320959"/>
|
||||
<FCUInt Name="colorWarning" Value="4289331455"/>
|
||||
</FCParamGroup>
|
||||
<FCParamGroup Name="Themes">
|
||||
<FCUInt Name="ThemeAccentColor1" Value="1434171135"/>
|
||||
<FCUInt Name="ThemeAccentColor2" Value="1434171135"/>
|
||||
<FCUInt Name="ThemeAccentColor3" Value="1434171135"/>
|
||||
</FCParamGroup>
|
||||
<FCParamGroup Name="TreeView">
|
||||
<FCUInt Name="TreeActiveColor" Value="1016200447"/>
|
||||
<FCUInt Name="TreeEditColor" Value="1588208639"/>
|
||||
</FCParamGroup>
|
||||
<FCParamGroup Name="View">
|
||||
<FCUInt Name="HighlightColor" Value="3789624575"/>
|
||||
<FCUInt Name="SelectionColor" Value="481107199"/>
|
||||
<FCBool Name="Gradient" Value="1"/>
|
||||
<FCBool Name="RadialGradient" Value="0"/>
|
||||
<FCBool Name="Simple" Value="0"/>
|
||||
<FCBool Name="UseBackgroundColorMid" Value="0"/>
|
||||
<FCUInt Name="AnnotationTextColor" Value="4294967295"/>
|
||||
<FCUInt Name="AxisLetterColor" Value="255"/>
|
||||
<FCUInt Name="RotationCenterColor" Value="4278190131"/>
|
||||
<FCText Name="NewDocumentCameraOrientation">Trimetric</FCText>
|
||||
<FCUInt Name="BackgroundColor" Value="336897023"/>
|
||||
<FCUInt Name="BackgroundColor2" Value="859006463"/>
|
||||
<FCUInt Name="BackgroundColor3" Value="2543299327"/>
|
||||
<FCUInt Name="BackgroundColor4" Value="1869583359"/>
|
||||
<FCBool Name="Simple" Value="0"/>
|
||||
<FCBool Name="Gradient" Value="1"/>
|
||||
<FCBool Name="RadialGradient" Value="0"/>
|
||||
<FCBool Name="UseBackgroundColorMid" Value="0"/>
|
||||
<FCUInt Name="BoundingBoxColor" Value="4294967295"/>
|
||||
<FCUInt Name="CbLabelColor" Value="4294967295"/>
|
||||
<FCUInt Name="DefaultShapeColor" Value="3435980543"/>
|
||||
<FCUInt Name="ConstrainedDimColor" Value="4280680703"/>
|
||||
<FCUInt Name="ConstrainedIcoColor" Value="4280680703"/>
|
||||
<FCUInt Name="ConstructionColor" Value="746455039"/>
|
||||
<FCUInt Name="CreateLineColor" Value="2139062271"/>
|
||||
<FCUInt Name="CursorCrosshairColor" Value="4294967295"/>
|
||||
<FCUInt Name="CursorTextColor" Value="65535"/>
|
||||
<FCUInt Name="DeactivatedConstrDimColor" Value="2139062271"/>
|
||||
<FCUInt Name="DefaultAmbientColor" Value="1431655935"/>
|
||||
<FCUInt Name="DefaultEmissiveColor" Value="255"/>
|
||||
<FCUInt Name="DefaultSpecularColor" Value="2290649343"/>
|
||||
<FCBool Name="RandomColor" Value="0"/>
|
||||
<FCUInt Name="DefaultShapeColor" Value="3435980543"/>
|
||||
<FCUInt Name="DefaultShapeLineColor" Value="421075455"/>
|
||||
<FCInt Name="DefaultShapeLineWidth" Value="2"/>
|
||||
<FCUInt Name="DefaultShapeVertexColor" Value="421075455"/>
|
||||
<FCInt Name="DefaultShapePointSize" Value="2"/>
|
||||
<FCUInt Name="BoundingBoxColor" Value="4294967295"/>
|
||||
<FCFloat Name="BoundingBoxFontSize" Value="10.000000000000"/>
|
||||
<FCUInt Name="AnnotationTextColor" Value="4294967295"/>
|
||||
<FCUInt Name="DefaultSpecularColor" Value="2290649343"/>
|
||||
<FCUInt Name="EditedEdgeColor" Value="4294967295"/>
|
||||
<FCUInt Name="ExprBasedConstrDimColor" Value="4286523135"/>
|
||||
<FCUInt Name="ExternalColor" Value="3425924095"/>
|
||||
<FCUInt Name="FullyConstrainedColor" Value="16711935"/>
|
||||
<FCUInt Name="FullyConstraintConstructionElementColor" Value="2410282495"/>
|
||||
<FCUInt Name="FullyConstraintElementColor" Value="2161156351"/>
|
||||
<FCUInt Name="FullyConstraintInternalAlignmentColor" Value="3739142399"/>
|
||||
<FCUInt Name="HighlightColor" Value="3789624575"/>
|
||||
<FCUInt Name="InternalAlignedGeoColor" Value="2998042623"/>
|
||||
<FCUInt Name="InvalidSketchColor" Value="4285333759"/>
|
||||
<FCUInt Name="NonDrivingConstrDimColor" Value="2555903"/>
|
||||
<FCUInt Name="RotationCenterColor" Value="4278190131"/>
|
||||
<FCUInt Name="SelectionColor" Value="481107199"/>
|
||||
<FCUInt Name="SketchEdgeColor" Value="4294967295"/>
|
||||
<FCUInt Name="SketchVertexColor" Value="4294967295"/>
|
||||
<FCUInt Name="EditedEdgeColor" Value="4294967295"/>
|
||||
<FCUInt Name="ConstructionColor" Value="746455039"/>
|
||||
<FCUInt Name="ExternalColor" Value="3425924095"/>
|
||||
<FCUInt Name="InvalidSketchColor" Value="4285333759"/>
|
||||
<FCUInt Name="FullyConstrainedColor" Value="16711935"/>
|
||||
<FCUInt Name="InternalAlignedGeoColor" Value="2998042623"/>
|
||||
<FCUInt Name="FullyConstraintElementColor" Value="2161156351"/>
|
||||
<FCUInt Name="FullyConstraintConstructionElementColor" Value="2410282495"/>
|
||||
<FCUInt Name="FullyConstraintInternalAlignmentColor" Value="3739142399"/>
|
||||
<FCUInt Name="ConstrainedIcoColor" Value="4280680703"/>
|
||||
<FCUInt Name="NonDrivingConstrDimColor" Value="2555903"/>
|
||||
<FCUInt Name="ConstrainedDimColor" Value="4280680703"/>
|
||||
<FCUInt Name="ExprBasedConstrDimColor" Value="4286523135"/>
|
||||
<FCUInt Name="DeactivatedConstrDimColor" Value="2139062271"/>
|
||||
<FCUInt Name="CursorTextColor" Value="65535"/>
|
||||
<FCUInt Name="CursorCrosshairColor" Value="4294967295"/>
|
||||
<FCUInt Name="CreateLineColor" Value="2139062271"/>
|
||||
</FCParamGroup>
|
||||
<FCParamGroup Name="Editor">
|
||||
<FCUInt Name="Text" Value="809320704"/>
|
||||
<FCUInt Name="Bookmark" Value="16776960"/>
|
||||
<FCUInt Name="Breakpoint" Value="4278190080"/>
|
||||
<FCUInt Name="Keyword" Value="65280"/>
|
||||
<FCUInt Name="Comment" Value="11141120"/>
|
||||
<FCUInt Name="Block comment" Value="2694882304"/>
|
||||
<FCUInt Name="Number" Value="65280"/>
|
||||
<FCUInt Name="String" Value="4278190080"/>
|
||||
<FCUInt Name="Character" Value="4278190080"/>
|
||||
<FCUInt Name="Class name" Value="4289331200"/>
|
||||
<FCUInt Name="Define name" Value="4289331200"/>
|
||||
<FCUInt Name="Operator" Value="2694882304"/>
|
||||
<FCUInt Name="Python output" Value="2863300352"/>
|
||||
<FCUInt Name="Python error" Value="4278190080"/>
|
||||
<FCUInt Name="Current line highlight" Value="3772833792"/>
|
||||
<FCInt Name="FontSize" Value="10"/>
|
||||
</FCParamGroup>
|
||||
<FCParamGroup Name="OutputWindow">
|
||||
<FCUInt Name="colorText" Value="809320959"/>
|
||||
<FCUInt Name="colorLogging" Value="65535"/>
|
||||
<FCUInt Name="colorWarning" Value="4289331455"/>
|
||||
<FCUInt Name="colorError" Value="4278190335"/>
|
||||
</FCParamGroup>
|
||||
<FCParamGroup Name="Mod">
|
||||
<FCParamGroup Name="Start">
|
||||
<FCInt Name="FileThumbnailIconsSize" Value="128"/>
|
||||
<FCUInt Name="FileThumbnailBorderColor" Value="1654713087"/>
|
||||
<FCUInt Name="FileThumbnailBackgroundColor" Value="3554532863"/>
|
||||
<FCUInt Name="FileThumbnailSelectionColor" Value="648178175"/>
|
||||
</FCParamGroup>
|
||||
<FCParamGroup Name="Arch">
|
||||
<FCUInt Name="ColorHelpers" Value="674321151"/>
|
||||
<FCUInt Name="WallColor" Value="3604403967"/>
|
||||
<FCUInt Name="StructureColor" Value="2527705855"/>
|
||||
<FCUInt Name="RebarColor" Value="3111475967"/>
|
||||
<FCUInt Name="WindowGlassColor" Value="1572326399"/>
|
||||
<FCUInt Name="PanelColor" Value="3416289279"/>
|
||||
<FCUInt Name="defaultSpaceColor" Value="4280090879"/>
|
||||
</FCParamGroup>
|
||||
<FCParamGroup Name="Measure">
|
||||
<FCParamGroup Name="Appearance">
|
||||
<FCInt Name="DefaultFontSize" Value="18"/>
|
||||
<FCUInt Name="DefaultTextColor" Value="4294967295"/>
|
||||
<FCUInt Name="DefaultLineColor" Value="4294967295"/>
|
||||
<FCUInt Name="DefaultTextBackgroundColor" Value="255"/>
|
||||
</FCParamGroup>
|
||||
</FCParamGroup>
|
||||
<FCParamGroup Name="TechDraw">
|
||||
<FCParamGroup Name="Decorations">
|
||||
<FCUInt Name="SectionColor" Value="255"/>
|
||||
<FCUInt Name="CenterColor" Value="255"/>
|
||||
<FCUInt Name="VertexColor" Value="255"/>
|
||||
<FCUInt Name="HighlightColor" Value="255"/>
|
||||
</FCParamGroup>
|
||||
<FCParamGroup Name="Colors">
|
||||
<FCUInt Name="Hatch" Value="255"/>
|
||||
<FCUInt Name="Background" Value="3553874943"/>
|
||||
<FCUInt Name="PreSelectColor" Value="4294902015"/>
|
||||
<FCUInt Name="HiddenColor" Value="255"/>
|
||||
<FCUInt Name="SelectColor" Value="16711935"/>
|
||||
<FCUInt Name="NormalColor" Value="255"/>
|
||||
<FCUInt Name="CutSurfaceColor" Value="3553874943"/>
|
||||
<FCUInt Name="GeomHatch" Value="255"/>
|
||||
<FCUInt Name="FaceColor" Value="4294967295"/>
|
||||
<FCBool Name="ClearFace" Value="0"/>
|
||||
<FCUInt Name="gridColor" Value="255"/>
|
||||
<FCUInt Name="PageColor" Value="4294967295"/>
|
||||
<FCBool Name="LightOnDark" Value="0"/>
|
||||
<FCBool Name="Monochrome" Value="0"/>
|
||||
<FCUInt Name="LightTextColor" Value="4294967295"/>
|
||||
<FCUInt Name="TemplateUnderlineColor" Value="65535"/>
|
||||
</FCParamGroup>
|
||||
<FCParamGroup Name="Dimensions">
|
||||
<FCInt Name="StandardAndStyle" Value="0"/>
|
||||
<FCBool Name="UseGlobalDecimals" Value="1"/>
|
||||
<FCBool Name="ShowUnits" Value="0"/>
|
||||
<FCInt Name="AltDecimals" Value="2"/>
|
||||
<FCFloat Name="FontSize" Value="5.000000000000"/>
|
||||
<FCFloat Name="TolSizeAdjust" Value="0.800000000000"/>
|
||||
<FCText Name="DiameterSymbol">⌀</FCText>
|
||||
<FCInt Name="ArrowStyle" Value="0"/>
|
||||
<FCFloat Name="ArrowSize" Value="3.500000000000"/>
|
||||
<FCText Name="formatSpec">%.2w</FCText>
|
||||
<FCFloat Name="GapISO" Value="0.000000000000"/>
|
||||
<FCFloat Name="GapASME" Value="0.000000000000"/>
|
||||
<FCFloat Name="LineSpacingFactorISO" Value="2.000000000000"/>
|
||||
<FCFloat Name="BalloonKink" Value="5.000000000000"/>
|
||||
<FCUInt Name="Color" Value="255"/>
|
||||
<FCBool Name="AutoCorrectRefs" Value="1"/>
|
||||
</FCParamGroup>
|
||||
<FCParamGroup Name="Markups">
|
||||
<FCUInt Name="Color" Value="255"/>
|
||||
</FCParamGroup>
|
||||
<FCParamGroup Name="Labels">
|
||||
<FCText Name="LabelFont">osifont</FCText>
|
||||
<FCFloat Name="LabelSize" Value="5.000000000000"/>
|
||||
</FCParamGroup>
|
||||
<FCParamGroup Name="Rez"/>
|
||||
<FCParamGroup Name="Files">
|
||||
<FCText Name="TemplateFile"></FCText>
|
||||
<FCText Name="TemplateDir"></FCText>
|
||||
<FCText Name="FileHatch"></FCText>
|
||||
<FCText Name="LineGroupFile"></FCText>
|
||||
<FCText Name="WeldingDir"></FCText>
|
||||
<FCText Name="DirSymbol"></FCText>
|
||||
</FCParamGroup>
|
||||
<FCParamGroup Name="Standards">
|
||||
<FCInt Name="LineStandard" Value="1"/>
|
||||
<FCInt Name="SectionLineStandard" Value="0"/>
|
||||
</FCParamGroup>
|
||||
<FCParamGroup Name="dimensioning">
|
||||
<FCBool Name="SingleDimensioningTool" Value="1"/>
|
||||
<FCBool Name="SeparatedDimensioningTools" Value="0"/>
|
||||
<FCBool Name="DimensioningDiameter" Value="1"/>
|
||||
<FCBool Name="DimensioningRadius" Value="1"/>
|
||||
</FCParamGroup>
|
||||
<FCParamGroup Name="General">
|
||||
<FCBool Name="GlobalUpdateDrawings" Value="1"/>
|
||||
<FCBool Name="AllowPageOverride" Value="1"/>
|
||||
<FCBool Name="KeepPagesUpToDate" Value="1"/>
|
||||
<FCBool Name="AutoDist" Value="1"/>
|
||||
<FCInt Name="ProjectionAngle" Value="0"/>
|
||||
<FCBool Name="showGrid" Value="0"/>
|
||||
<FCFloat Name="gridSpacing" Value="10.000000000000"/>
|
||||
<FCBool Name="multiSelection" Value="0"/>
|
||||
<FCBool Name="UseCameraDirection" Value="0"/>
|
||||
<FCBool Name="AlwaysShowLabel" Value="0"/>
|
||||
<FCFloat Name="DefaultScale" Value="1.000000000000"/>
|
||||
<FCInt Name="DefaultScaleType" Value="0"/>
|
||||
<FCFloat Name="DefaultViewScale" Value="1.000000000000"/>
|
||||
<FCFloat Name="VertexScale" Value="5.000000000000"/>
|
||||
<FCFloat Name="TemplateDotSize" Value="3.000000000000"/>
|
||||
<FCInt Name="EdgeCapStyle" Value="0"/>
|
||||
<FCBool Name="ShowDetailMatting" Value="1"/>
|
||||
<FCBool Name="ShowDetailHighlight" Value="1"/>
|
||||
<FCBool Name="HandleFaces" Value="1"/>
|
||||
<FCBool Name="ShowSectionEdges" Value="1"/>
|
||||
<FCBool Name="SectionFuseFirst" Value="0"/>
|
||||
<FCFloat Name="EdgeFuzz" Value="10.000000000000"/>
|
||||
<FCFloat Name="MarkFuzz" Value="5.000000000000"/>
|
||||
<FCBool Name="ReportProgress" Value="0"/>
|
||||
<FCBool Name="NewFaceFinder" Value="1"/>
|
||||
<FCInt Name="ScrubCount" Value="1"/>
|
||||
</FCParamGroup>
|
||||
<FCParamGroup Name="PAT">
|
||||
<FCText Name="FilePattern"></FCText>
|
||||
<FCText Name="NamePattern">Diamond</FCText>
|
||||
<FCInt Name="MaxSeg" Value="10000"/>
|
||||
</FCParamGroup>
|
||||
<FCParamGroup Name="LeaderLine">
|
||||
<FCBool Name="AutoHorizontal" Value="1"/>
|
||||
</FCParamGroup>
|
||||
<FCParamGroup Name="HLR">
|
||||
<FCBool Name="SeamViz" Value="0"/>
|
||||
<FCBool Name="SmoothViz" Value="1"/>
|
||||
<FCBool Name="HardViz" Value="1"/>
|
||||
<FCBool Name="UsePolygon" Value="0"/>
|
||||
<FCBool Name="IsoViz" Value="0"/>
|
||||
<FCBool Name="SmoothHid" Value="0"/>
|
||||
<FCBool Name="SeamHid" Value="0"/>
|
||||
<FCBool Name="IsoHid" Value="0"/>
|
||||
<FCInt Name="IsoCount" Value="0"/>
|
||||
<FCBool Name="HardHid" Value="0"/>
|
||||
</FCParamGroup>
|
||||
<FCParamGroup Name="debug">
|
||||
<FCBool Name="debugSection" Value="0"/>
|
||||
<FCBool Name="debugDetail" Value="0"/>
|
||||
<FCBool Name="allowCrazyEdge" Value="0"/>
|
||||
</FCParamGroup>
|
||||
</FCParamGroup>
|
||||
<FCParamGroup Name="CAM">
|
||||
<FCUInt Name="DefaultNormalPathColor" Value="11141375"/>
|
||||
<FCUInt Name="DefaultRapidPathColor" Value="2852126975"/>
|
||||
<FCInt Name="DefaultPathLineWidth" Value="1"/>
|
||||
<FCUInt Name="DefaultPathMarkerColor" Value="1442775295"/>
|
||||
<FCUInt Name="DefaultProbePathColor" Value="4294903295"/>
|
||||
<FCUInt Name="DefaultHighlightPathColor" Value="4286382335"/>
|
||||
<FCUInt Name="DefaultBBoxSelectionColor" Value="3372220415"/>
|
||||
<FCUInt Name="DefaultBBoxNormalColor" Value="4294967295"/>
|
||||
</FCParamGroup>
|
||||
<FCParamGroup Name="Draft">
|
||||
<FCUInt Name="color" Value="3435980288"/>
|
||||
<FCUInt Name="constructioncolor" Value="746455039"/>
|
||||
<FCUInt Name="DefaultTextColor" Value="255"/>
|
||||
<FCText Name="svgDashedLine">3,1</FCText>
|
||||
<FCText Name="svgDashdotLine">3,1,0.2,1</FCText>
|
||||
<FCText Name="svgDottedLine">0.5,1</FCText>
|
||||
<FCFloat Name="HatchPatternSize" Value="0.030000000000"/>
|
||||
<FCInt Name="gridTransparency" Value="0"/>
|
||||
<FCUInt Name="gridColor" Value="842157055"/>
|
||||
<FCUInt Name="snapcolor" Value="4289396735"/>
|
||||
<FCInt Name="DefaultAnnoLineWidth" Value="2"/>
|
||||
<FCUInt Name="DefaultAnnoLineColor" Value="255"/>
|
||||
</FCParamGroup>
|
||||
<FCParamGroup Name="OpenSCAD">
|
||||
<FCInt Name="useMaxFN" Value="16"/>
|
||||
<FCInt Name="exportConvexity" Value="10"/>
|
||||
<FCFloat Name="exportFa" Value="12.000000000000"/>
|
||||
<FCFloat Name="exportFs" Value="2.000000000000"/>
|
||||
<FCFloat Name="meshdeflection" Value="0.000000000000"/>
|
||||
<FCText Name="openscadexecutable"></FCText>
|
||||
<FCText Name="transferdirectory"></FCText>
|
||||
<FCInt Name="transfermechanism" Value="0"/>
|
||||
<FCBool Name="printVerbose" Value="0"/>
|
||||
<FCBool Name="useViewProviderTree" Value="0"/>
|
||||
<FCBool Name="useMultmatrixFeature" Value="0"/>
|
||||
</FCParamGroup>
|
||||
<FCParamGroup Name="Sketcher">
|
||||
<FCParamGroup Name="Snap"/>
|
||||
<FCParamGroup Name="General">
|
||||
<FCUInt Name="GridLineColor" Value="2998055679"/>
|
||||
<FCUInt Name="GridDivLineColor" Value="2998055679"/>
|
||||
<FCInt Name="GridLineWidth" Value="1"/>
|
||||
<FCInt Name="GridDivLineWidth" Value="2"/>
|
||||
</FCParamGroup>
|
||||
<FCParamGroup Name="View">
|
||||
<FCInt Name="EdgeWidth" Value="2"/>
|
||||
<FCInt Name="ConstructionWidth" Value="2"/>
|
||||
<FCInt Name="InternalWidth" Value="2"/>
|
||||
<FCInt Name="ExternalWidth" Value="2"/>
|
||||
<FCInt Name="EdgePattern" Value="65535"/>
|
||||
<FCInt Name="ConstructionPattern" Value="64764"/>
|
||||
<FCInt Name="InternalPattern" Value="64764"/>
|
||||
<FCInt Name="ExternalPattern" Value="58596"/>
|
||||
</FCParamGroup>
|
||||
</FCParamGroup>
|
||||
<FCParamGroup Name="Mesh">
|
||||
<FCUInt Name="MeshColor" Value="3435973887"/>
|
||||
<FCUInt Name="LineColor" Value="255"/>
|
||||
<FCUInt Name="BackfaceColor" Value="3435973887"/>
|
||||
</FCParamGroup>
|
||||
</FCParamGroup>
|
||||
<FCParamGroup Name="MainWindow">
|
||||
<FCText Name="Theme">FreeCAD Classic</FCText>
|
||||
<FCText Name="OverlayActiveStyleSheet">Light Theme + Dark Background.qss</FCText>
|
||||
<FCText Name="StyleSheet"/>
|
||||
</FCParamGroup>
|
||||
<FCParamGroup Name="TreeView">
|
||||
<FCUInt Name="TreeEditColor" Value="1588208639"/>
|
||||
<FCUInt Name="TreeActiveColor" Value="1016200447"/>
|
||||
</FCParamGroup>
|
||||
<FCParamGroup Name="NaviCube">
|
||||
<FCUInt Name="BaseColor" Value="3806916480"/>
|
||||
<FCInt Name="InactiveOpacity" Value="50"/>
|
||||
</FCParamGroup>
|
||||
</FCParamGroup>
|
||||
</FCParamGroup>
|
||||
|
||||
@@ -1,188 +1,151 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
|
||||
<FCParameters>
|
||||
|
||||
<FCParamGroup Name="Root">
|
||||
<FCParamGroup Name="BaseApp">
|
||||
<FCParamGroup Name="Preferences">
|
||||
<FCParamGroup Name="Themes">
|
||||
<FCUInt Name="ThemeAccentColor1" Value="1252392959"/>
|
||||
<FCUInt Name="ThemeAccentColor2" Value="3027763199"/>
|
||||
<FCUInt Name="ThemeAccentColor3" Value="404564735"/>
|
||||
</FCParamGroup>
|
||||
<FCParamGroup Name="View">
|
||||
<FCUInt Name="SketchEdgeColor" Value="4059297279"/>
|
||||
<FCUInt Name="SketchVertexColor" Value="4059297279"/>
|
||||
<FCUInt Name="EditedEdgeColor" Value="4059297279"/>
|
||||
<FCUInt Name="EditedVertexColor" Value="4199699199"/>
|
||||
<FCUInt Name="ConstructionColor" Value="865792255"/>
|
||||
<FCUInt Name="ExternalColor" Value="3428706559"/>
|
||||
<FCUInt Name="InvalidSketchColor" Value="4252898559"/>
|
||||
<FCUInt Name="FullyConstrainedColor" Value="1958221567"/>
|
||||
<FCUInt Name="InternalAlignedGeoColor" Value="865792255"/>
|
||||
<FCUInt Name="FullyConstraintElementColor" Value="11173887"/>
|
||||
<FCUInt Name="FullyConstraintConstructionElementColor" Value="2462511359"/>
|
||||
<FCUInt Name="FullyConstraintInternalAlignmentColor" Value="2462511359"/>
|
||||
<FCUInt Name="FullyConstraintConstructionPointColor" Value="4205291519"/>
|
||||
<FCUInt Name="ConstrainedIcoColor" Value="4199699199"/>
|
||||
<FCUInt Name="NonDrivingConstrDimColor" Value="865792255"/>
|
||||
<FCUInt Name="ConstrainedDimColor" Value="4199699199"/>
|
||||
<FCUInt Name="ExprBasedConstrDimColor" Value="4252898559"/>
|
||||
<FCUInt Name="DeactivatedConstrDimColor" Value="2257491711"/>
|
||||
<FCUInt Name="CursorTextColor" Value="2914369023"/>
|
||||
<FCUInt Name="CursorCrosshairColor" Value="4059297279"/>
|
||||
<FCUInt Name="CreateLineColor" Value="4059297279"/>
|
||||
<FCBool Name="ShowRotationCenter" Value="1"/>
|
||||
<FCBool Name="ShowNaviCube" Value="1"/>
|
||||
<FCBool Name="ShowSelectionBoundingBox" Value="0"/>
|
||||
<FCBool Name="UseAutoRotation" Value="1"/>
|
||||
<FCBool Name="UseVBO" Value="1"/>
|
||||
<FCInt Name="AntiAliasing" Value="4"/>
|
||||
<FCInt Name="RenderCache" Value="0"/>
|
||||
<FCInt Name="SegmentsPerGeometry" Value="100"/>
|
||||
<FCUInt Name="BoundingBoxColor" Value="4059297279"/>
|
||||
<FCFloat Name="BoundingBoxFontSize" Value="10.000000000000"/>
|
||||
<FCFloat Name="ViewScalingFactor" Value="1.000000000000"/>
|
||||
<FCBool Name="EnableBacklight" Value="1"/>
|
||||
<FCBool Name="Gradient" Value="0"/>
|
||||
<FCBool Name="RadialGradient" Value="0"/>
|
||||
<FCBool Name="RandomColor" Value="0"/>
|
||||
<FCBool Name="Simple" Value="0"/>
|
||||
<FCBool Name="UseBackgroundColorMid" Value="0"/>
|
||||
<FCInt Name="BacklightIntensity" Value="70"/>
|
||||
<FCInt Name="DefaultShapeTransparency" Value="0"/>
|
||||
<FCBool Name="Simple" Value="1"/>
|
||||
<FCUInt Name="AnnotationTextColor" Value="2914369023"/>
|
||||
<FCUInt Name="BackgroundColor" Value="993737727"/>
|
||||
<FCUInt Name="BackgroundColor2" Value="1482187775"/>
|
||||
<FCUInt Name="BackgroundColor3" Value="741103615"/>
|
||||
<FCUInt Name="BackgroundColor4" Value="623200767"/>
|
||||
<FCUInt Name="BacklightColor" Value="4059297279"/>
|
||||
<FCUInt Name="BoundingBoxColor" Value="4059297279"/>
|
||||
<FCUInt Name="DefaultShapeColor" Value="1920565503"/>
|
||||
<FCUInt Name="HighlightColor" Value="611232767"/>
|
||||
<FCUInt Name="SelectionColor" Value="899696639"/>
|
||||
<FCUInt Name="CbLabelColor" Value="2914369023"/>
|
||||
</FCParamGroup>
|
||||
<FCParamGroup Name="Editor">
|
||||
<FCUInt Name="Text" Value="3570717696"/>
|
||||
<FCUInt Name="Block comment" Value="3465639936"/>
|
||||
<FCUInt Name="Bookmark" Value="16776960"/>
|
||||
<FCUInt Name="Breakpoint" Value="4278190080"/>
|
||||
<FCUInt Name="Keyword" Value="1453118976"/>
|
||||
<FCUInt Name="Comment" Value="1788433664"/>
|
||||
<FCUInt Name="Block comment" Value="3465639936"/>
|
||||
<FCUInt Name="Number" Value="3050219520"/>
|
||||
<FCUInt Name="String" Value="3465639936"/>
|
||||
<FCUInt Name="Character" Value="4278190080"/>
|
||||
<FCUInt Name="Class name" Value="1321840640"/>
|
||||
<FCUInt Name="Define name" Value="3705448960"/>
|
||||
<FCUInt Name="Operator" Value="3570717696"/>
|
||||
<FCUInt Name="Python output" Value="2863300352"/>
|
||||
<FCUInt Name="Python error" Value="4252787200"/>
|
||||
<FCUInt Name="Comment" Value="1788433664"/>
|
||||
<FCUInt Name="Current line highlight" Value="524114944"/>
|
||||
<FCInt Name="FontSize" Value="10"/>
|
||||
<FCUInt Name="Define name" Value="3705448960"/>
|
||||
<FCUInt Name="Keyword" Value="1453118976"/>
|
||||
<FCUInt Name="Number" Value="3050219520"/>
|
||||
<FCUInt Name="Operator" Value="3570717696"/>
|
||||
<FCUInt Name="Python error" Value="4252787200"/>
|
||||
<FCUInt Name="Python output" Value="2863300352"/>
|
||||
<FCUInt Name="String" Value="3465639936"/>
|
||||
<FCUInt Name="Text" Value="3570717696"/>
|
||||
</FCParamGroup>
|
||||
<FCParamGroup Name="OutputWindow">
|
||||
<FCUInt Name="colorText" Value="3570717951"/>
|
||||
<FCUInt Name="colorLogging" Value="1437270015"/>
|
||||
<FCUInt Name="colorWarning" Value="4252787455"/>
|
||||
<FCUInt Name="colorError" Value="4278190335"/>
|
||||
</FCParamGroup>
|
||||
<FCParamGroup Name="OpenGL">
|
||||
<FCBool Name="UseSoftwareOpenGL" Value="0"/>
|
||||
<FCParamGroup Name="MainWindow">
|
||||
<FCText Name="OverlayActiveStyleSheet">Dark Theme + Dark Background.qss</FCText>
|
||||
<FCText Name="QtStyle">Fusion</FCText>
|
||||
<FCText Name="StyleSheet">FreeCAD Dark.qss</FCText>
|
||||
<FCText Name="Theme">FreeCAD Dark</FCText>
|
||||
</FCParamGroup>
|
||||
<FCParamGroup Name="Mod">
|
||||
<FCParamGroup Name="Start">
|
||||
</FCParamGroup>
|
||||
<FCParamGroup Name="Arch">
|
||||
<FCUInt Name="WallColor" Value="3604403967"/>
|
||||
<FCUInt Name="StructureColor" Value="2527705855"/>
|
||||
<FCUInt Name="RebarColor" Value="3111475967"/>
|
||||
<FCUInt Name="WindowColor" Value="556614399"/>
|
||||
<FCUInt Name="WindowGlassColor" Value="1572326399"/>
|
||||
<FCUInt Name="PanelColor" Value="3416289279"/>
|
||||
<FCUInt Name="ColorHelpers" Value="1347440895"/>
|
||||
<FCUInt Name="defaultSpaceColor" Value="4280090879"/>
|
||||
<FCUInt Name="PanelColor" Value="3416289279"/>
|
||||
<FCUInt Name="RebarColor" Value="3111475967"/>
|
||||
<FCUInt Name="StructureColor" Value="2527705855"/>
|
||||
<FCUInt Name="WallColor" Value="3604403967"/>
|
||||
<FCUInt Name="WindowColor" Value="556614399"/>
|
||||
<FCUInt Name="WindowGlassColor" Value="1572326399"/>
|
||||
</FCParamGroup>
|
||||
<FCParamGroup Name="Measure">
|
||||
<FCParamGroup Name="Appearance">
|
||||
<FCBool Name="DefaultMirror" Value="0"/>
|
||||
<FCFloat Name="DefaultDistFactor" Value="1.000000000000"/>
|
||||
<FCInt Name="DefaultFontSize" Value="18"/>
|
||||
<FCUInt Name="DefaultTextColor" Value="4177132287"/>
|
||||
<FCUInt Name="DefaultLineColor" Value="4177132287"/>
|
||||
<FCUInt Name="DefaultTextBackgroundColor" Value="556083711"/>
|
||||
</FCParamGroup>
|
||||
</FCParamGroup>
|
||||
<FCParamGroup Name="TechDraw">
|
||||
<FCParamGroup Name="Decorations">
|
||||
<FCUInt Name="SectionColor" Value="255"/>
|
||||
<FCUInt Name="CenterColor" Value="255"/>
|
||||
<FCUInt Name="VertexColor" Value="255"/>
|
||||
<FCUInt Name="HighlightColor" Value="255"/>
|
||||
</FCParamGroup>
|
||||
<FCParamGroup Name="Colors">
|
||||
<FCBool Name="ClearFace" Value="1"/>
|
||||
<FCUInt Name="Hatch" Value="255"/>
|
||||
<FCUInt Name="Background" Value="556083711"/>
|
||||
<FCUInt Name="PreSelectColor" Value="4240710143"/>
|
||||
<FCUInt Name="HiddenColor" Value="255"/>
|
||||
<FCUInt Name="SelectColor" Value="1958221567"/>
|
||||
<FCUInt Name="NormalColor" Value="255"/>
|
||||
<FCUInt Name="CutSurfaceColor" Value="3470056191"/>
|
||||
<FCUInt Name="GeomHatch" Value="255"/>
|
||||
<FCUInt Name="FaceColor" Value="4059297279"/>
|
||||
</FCParamGroup>
|
||||
</FCParamGroup>
|
||||
<FCParamGroup Name="Path">
|
||||
<FCParamGroup Name="CAM">
|
||||
<FCUInt Name="DefaultBBoxNormalColor" Value="4059297279"/>
|
||||
<FCUInt Name="DefaultBBoxSelectionColor" Value="582537215"/>
|
||||
<FCUInt Name="DefaultHighlightPathColor" Value="4252898303"/>
|
||||
<FCUInt Name="DefaultNormalPathColor" Value="1086347263"/>
|
||||
<FCUInt Name="DefaultRapidPathColor" Value="4199699199"/>
|
||||
<FCUInt Name="DefaultPathMarkerColor" Value="1958221567"/>
|
||||
<FCUInt Name="DefaultProbePathColor" Value="4240710143"/>
|
||||
<FCUInt Name="DefaultHighlightPathColor" Value="4252898303"/>
|
||||
<FCUInt Name="DefaultBBoxSelectionColor" Value="582537215"/>
|
||||
<FCUInt Name="DefaultBBoxNormalColor" Value="4059297279"/>
|
||||
</FCParamGroup>
|
||||
<FCParamGroup Name="Part">
|
||||
<FCUInt Name="Dimensions3dColor" Value="4199699199"/>
|
||||
<FCUInt Name="DimensionsAngularColor" Value="865792255"/>
|
||||
<FCUInt Name="DimensionsDeltaColor" Value="314085375"/>
|
||||
<FCUInt Name="DefaultRapidPathColor" Value="4199699199"/>
|
||||
</FCParamGroup>
|
||||
<FCParamGroup Name="Draft">
|
||||
<FCInt Name="gridTransparency" Value="0"/>
|
||||
<FCUInt Name="constructioncolor" Value="746455039"/>
|
||||
<FCUInt Name="gridColor" Value="1230002175"/>
|
||||
<FCUInt Name="snapcolor" Value="4294967295"/>
|
||||
<FCUInt Name="snapcolor" Value="4289331455"/>
|
||||
</FCParamGroup>
|
||||
<FCParamGroup Name="Spreadsheet">
|
||||
<FCText Name="AliasedCellBackgroundColor">#1864ab</FCText>
|
||||
<FCText Name="TextColor">#f8f9fa</FCText>
|
||||
<FCText Name="PositiveNumberColor">#f8f9fa</FCText>
|
||||
<FCText Name="NegativeNumberColor">#f8f9fa</FCText>
|
||||
<FCParamGroup Name="Measure">
|
||||
<FCParamGroup Name="Appearance">
|
||||
<FCUInt Name="DefaultLineColor" Value="4177132287"/>
|
||||
<FCUInt Name="DefaultTextBackgroundColor" Value="556083711"/>
|
||||
<FCUInt Name="DefaultTextColor" Value="4177132287"/>
|
||||
</FCParamGroup>
|
||||
</FCParamGroup>
|
||||
<FCParamGroup Name="Sketcher">
|
||||
<FCParamGroup Name="General">
|
||||
<FCUInt Name="GridLineColor" Value="1230002175"/>
|
||||
<FCUInt Name="GridDivLineColor" Value="1230002175"/>
|
||||
<FCInt Name="GridDivLinePattern" Value="65535"/>
|
||||
<FCInt Name="GridLinePattern" Value="43690"/>
|
||||
<FCUInt Name="GridLineColor" Value="1230002175"/>
|
||||
</FCParamGroup>
|
||||
</FCParamGroup>
|
||||
<FCParamGroup Name="Spreadsheet">
|
||||
<FCText Name="AliasedCellBackgroundColor">#1864ab</FCText>
|
||||
<FCText Name="NegativeNumberColor">#f8f9fa</FCText>
|
||||
<FCText Name="PositiveNumberColor">#f8f9fa</FCText>
|
||||
<FCText Name="TextColor">#f8f9fa</FCText>
|
||||
</FCParamGroup>
|
||||
<FCParamGroup Name="TechDraw">
|
||||
<FCParamGroup Name="Colors">
|
||||
<FCUInt Name="Background" Value="556083711"/>
|
||||
<FCUInt Name="CutSurfaceColor" Value="3470056191"/>
|
||||
<FCUInt Name="FaceColor" Value="4059297279"/>
|
||||
<FCUInt Name="GeomHatch" Value="255"/>
|
||||
<FCUInt Name="Hatch" Value="255"/>
|
||||
<FCUInt Name="HiddenColor" Value="255"/>
|
||||
<FCUInt Name="NormalColor" Value="255"/>
|
||||
<FCUInt Name="PreSelectColor" Value="4240710143"/>
|
||||
<FCUInt Name="SelectColor" Value="1958221567"/>
|
||||
</FCParamGroup>
|
||||
<FCParamGroup Name="Decorations">
|
||||
<FCUInt Name="CenterColor" Value="255"/>
|
||||
<FCUInt Name="HighlightColor" Value="255"/>
|
||||
<FCUInt Name="SectionColor" Value="255"/>
|
||||
<FCUInt Name="VertexColor" Value="255"/>
|
||||
</FCParamGroup>
|
||||
</FCParamGroup>
|
||||
</FCParamGroup>
|
||||
<FCParamGroup Name="TreeView">
|
||||
<FCUInt Name="TreeEditColor" Value="1434171135"/>
|
||||
<FCUInt Name="TreeActiveColor" Value="556083711"/>
|
||||
<FCInt Name="ItemBackgroundPadding" Value="11"/>
|
||||
<FCInt Name="FontSize" Value="11"/>
|
||||
<FCParamGroup Name="OutputWindow">
|
||||
<FCUInt Name="colorError" Value="4278190335"/>
|
||||
<FCUInt Name="colorLogging" Value="1437270015"/>
|
||||
<FCUInt Name="colorText" Value="3570717951"/>
|
||||
<FCUInt Name="colorWarning" Value="4252787455"/>
|
||||
</FCParamGroup>
|
||||
<FCParamGroup Name="MainWindow">
|
||||
<FCText Name="QtStyle">Fusion</FCText>
|
||||
<FCBool Name="TiledBackground" Value="0"/>
|
||||
<FCText Name="Theme">FreeCAD Dark</FCText>
|
||||
<FCText Name="StyleSheet">FreeCAD Dark.qss</FCText>
|
||||
<FCText Name="OverlayActiveStyleSheet">Dark Theme + Dark Background.qss</FCText>
|
||||
<FCParamGroup Name="Themes">
|
||||
<FCUInt Name="ThemeAccentColor1" Value="1252392959"/>
|
||||
<FCUInt Name="ThemeAccentColor2" Value="3027763199"/>
|
||||
<FCUInt Name="ThemeAccentColor3" Value="404564735"/>
|
||||
</FCParamGroup>
|
||||
<FCParamGroup Name="TreeView">
|
||||
<FCInt Name="FontSize" Value="11"/>
|
||||
<FCInt Name="ItemBackgroundPadding" Value="11"/>
|
||||
<FCUInt Name="TreeActiveColor" Value="556083711"/>
|
||||
<FCUInt Name="TreeEditColor" Value="1434171135"/>
|
||||
</FCParamGroup>
|
||||
<FCParamGroup Name="View">
|
||||
<FCBool Name="Gradient" Value="0"/>
|
||||
<FCBool Name="RadialGradient" Value="0"/>
|
||||
<FCBool Name="Simple" Value="1"/>
|
||||
<FCBool Name="UseBackgroundColorMid" Value="0"/>
|
||||
<FCUInt Name="AnnotationTextColor" Value="2914369023"/>
|
||||
<FCUInt Name="BackgroundColor" Value="993737727"/>
|
||||
<FCUInt Name="BackgroundColor2" Value="1482187775"/>
|
||||
<FCUInt Name="BackgroundColor3" Value="741103615"/>
|
||||
<FCUInt Name="BackgroundColor4" Value="623200767"/>
|
||||
<FCUInt Name="BoundingBoxColor" Value="4059297279"/>
|
||||
<FCUInt Name="CbLabelColor" Value="2914369023"/>
|
||||
<FCUInt Name="ConstrainedDimColor" Value="4199699199"/>
|
||||
<FCUInt Name="ConstrainedIcoColor" Value="4199699199"/>
|
||||
<FCUInt Name="ConstructionColor" Value="865792255"/>
|
||||
<FCUInt Name="CreateLineColor" Value="4059297279"/>
|
||||
<FCUInt Name="CursorCrosshairColor" Value="4059297279"/>
|
||||
<FCUInt Name="CursorTextColor" Value="2914369023"/>
|
||||
<FCUInt Name="DeactivatedConstrDimColor" Value="2257491711"/>
|
||||
<FCUInt Name="DefaultShapeColor" Value="1920565503"/>
|
||||
<FCUInt Name="EditedEdgeColor" Value="4059297279"/>
|
||||
<FCUInt Name="EditedVertexColor" Value="4199699199"/>
|
||||
<FCUInt Name="ExprBasedConstrDimColor" Value="4252898559"/>
|
||||
<FCUInt Name="ExternalColor" Value="3428706559"/>
|
||||
<FCUInt Name="FullyConstrainedColor" Value="1958221567"/>
|
||||
<FCUInt Name="FullyConstraintConstructionElementColor" Value="2462511359"/>
|
||||
<FCUInt Name="FullyConstraintConstructionPointColor" Value="4205291519"/>
|
||||
<FCUInt Name="FullyConstraintElementColor" Value="11173887"/>
|
||||
<FCUInt Name="FullyConstraintInternalAlignmentColor" Value="2462511359"/>
|
||||
<FCUInt Name="HighlightColor" Value="611232767"/>
|
||||
<FCUInt Name="InternalAlignedGeoColor" Value="865792255"/>
|
||||
<FCUInt Name="InvalidSketchColor" Value="4252898559"/>
|
||||
<FCUInt Name="NonDrivingConstrDimColor" Value="865792255"/>
|
||||
<FCUInt Name="SelectionColor" Value="899696639"/>
|
||||
<FCUInt Name="SketchEdgeColor" Value="4059297279"/>
|
||||
<FCUInt Name="SketchVertexColor" Value="4059297279"/>
|
||||
</FCParamGroup>
|
||||
</FCParamGroup>
|
||||
</FCParamGroup>
|
||||
</FCParamGroup>
|
||||
|
||||
</FCParameters>
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user