Compare commits

...

219 Commits

Author SHA1 Message Date
Adrian Insaurralde Avalos 256fc7eff3 AddonManager: fix create_pip_call 2025-08-05 17:19:07 -03:00
Adrián Insaurralde Avalos ccc98966e6 WindowsInstaller: use --safe-mode in freecadcmd commands [skip ci] 2025-08-05 10:50:56 -03:00
Adrian Insaurralde Avalos b0127687c2 bump version to 1.0.2 2025-08-03 20:01:51 -03:00
chris 8637434db9 Backport fix for #20656 - fix compilation with occt 7.9 2025-08-03 19:54:58 -03:00
github-actions[bot] 199b4c81d1 [Backport releases/FreeCAD-1-0] Import: DXF, handle non-standard 8859_1 encoding (#22840)
* Import: DXF, handle non-standard 8859_1 encoding (#21905)

* Import: improve DXF importer exception handling

* Import: DXF, pinpoint erroneous header section when reading

* Import: tackle 8859_1 non-standard encoding name

(cherry picked from commit 1e29a3273f)

* Use `Base::RuntimeError` instead of `Base::Exception` since it's constructor is protected in 1.0

---------

Co-authored-by: Furgo <148809153+furgo16@users.noreply.github.com>
Co-authored-by: Adrian Insaurralde Avalos <adrianinsaval@gmail.com>
2025-08-02 11:57:09 -03:00
github-actions[bot] 34b70663d1 Assembly: Fix crash 20614 (#22844)
* Assembly: Fix crash 20614 (#22538)

(cherry picked from commit facfbeb47e)

* adapt to `getMovingPartFromRef` from 1.0 branch

* fix `Console().Warning` has PascalCase name in 1.0

---------

Co-authored-by: PaddleStroke <pierrelouis.boyer@gmail.com>
Co-authored-by: Adrian Insaurralde Avalos <adrianinsaval@gmail.com>
2025-08-01 09:28:01 -03:00
Syres916 1bcf27e1aa [Measure] Fix seg fault in MeasurePosition::execute if subElements is empty (#22016)
* [Measure] take into account if subElements is empty

* [Measure] Remove unnecessary else block

(cherry picked from commit 7e6775d2c0)
2025-07-31 11:18:58 -03:00
Jakub Klinkovský 8c8a418c95 Use vtkUnstructuredGrid::GetLinks instead of vtkUnstructuredGrid::GetCellLinks for VTK >= 9.3
The vtkUnstructuredGrid::GetCellLinks has been deprecated in VTK 9.3 and
silently removed in 9.5:

https://gitlab.kitware.com/vtk/vtk/-/blob/master/Documentation/release/9.3.md
(cherry picked from commit 3d2b7dc9c7)
2025-07-31 11:18:36 -03:00
jffmichi 7317eb3035 CAM: remove redundant move after drilling
(cherry picked from commit 3bce6e3fc9)
2025-07-31 11:17:18 -03:00
Syres916 1dea8f3ca9 [1.0] [Gui] Fix wildcard call disconnects warnings Qt6.9 2025-07-31 10:41:52 -03:00
Syres916 19c54a8a66 [1.0] [GUI] Remove dark fringe around letters 2025-07-31 10:41:34 -03:00
Syres916 e6b82ca9e1 [1.0] [Points] Add e57 to import file extensions 2025-07-31 10:41:18 -03:00
Syres916 7d6bcbc03a [TechDraw] update to align with newer templates 2025-07-31 10:41:03 -03:00
Syres916 8588a85fa1 [1.0] [TechDraw] Fix Qt6 compatability of FillTemplateFields tool 2025-07-31 10:40:46 -03:00
Adrian Insaurralde Avalos faa260f0ce conda ci: use conda cdt packages and run on ubuntu 24.04 2025-07-30 17:53:54 -03:00
Adrian Insaurralde Avalos 42299aefca conda ci: pin compilers on linux and macos 2025-07-30 17:53:54 -03:00
Chris Hennes 3f5f828c25 Tests: Save/restore Materials user prefs
(cherry picked from commit d54ff81870)
2025-07-30 17:53:54 -03:00
Chris Hennes 18dd3f83ed Tests: Ensure tests use a fixture that inits app
(cherry picked from commit 25f1d28468)
2025-07-30 17:53:54 -03:00
Syres916 2255548c52 [CAM] write the post file with UTF-8 encoding
Based on #20421, Fixes #18698
2025-07-28 13:14:44 -03:00
Roy-043 48226c3346 BIM: fix Arch_SectionPlane 'Toggle Cutview' issue 2025-07-11 15:53:40 +02:00
Roy-043 552309b38e Update BimTDPage.py 2025-07-11 15:49:48 +02:00
Roy-043 b78dd00d31 Update ArchSchedule.py 2025-07-11 15:48:52 +02:00
Roy-043 872d98d7df Update ArchAxis.py 2025-07-11 15:47:13 +02:00
Roy-043 8502c09b45 Update BimProjectManager.py 2025-07-11 15:41:04 +02:00
Roy-043 34f8982b81 Update ArchMaterial.py 2025-07-11 15:39:29 +02:00
Roy-043 5921f4cd03 BIM: fix filtering out level issue (#22059)
* Update ifc_status.py

* Update ifc_tools.py
2025-07-11 15:37:08 +02:00
Roy-043 c78d633d07 BIM: fix index error in ifc_viewproviders.py
Fixes #21912
2025-07-11 15:36:21 +02:00
Roy-043 a8bf9a5f41 BIM: Roof add tolerance to parallel check (#21814)
Fixes #21796.
2025-07-11 15:35:29 +02:00
Benjamin Guest e23a81e0c4 TechDraw: Fix dimension alignment issue.
Fixes issue #19121 "dimension numbers placed lower than normal".

Problem:

QGCustomText has a new method `alignmentRect` which can optionally return a
`tightBoundingRect` instead of the regular `boundingRect`. The
`alignmentRect` is used for laying out the `QGIDatumLabel`, however
QGraphicsItemGroup's `childrenBoundingRect` use the childrens'
`boundingRect` and knows nothing of `alignmentRect`. The result is an
improperly sized label and frame and miss alignment. Additionally
`childrenBoundingRect` calculations includes hidden views, so even though
the `m_tolTextOver` and `m_tolTextUnder` are hidden they still affect
the bounding rect size.

Solution:

1. Implement new method `QGIDatumLabel::tightBoundingRect` this
   calculates the bounding rect using the subview's
   `aligmentRect` if there is text in the custom text.
2. Use `tightBoundingRect` in place of `boundingRect` to for the drawing of
   arrows and the exact dim frames.
3. This PR acknowledges that there are some edge case fonts that while not
   clipped may not interface perfectly with arrows and the exact dimension
   frame.
4. Fix vertical alignment of `m_tolTextOver` / `m_tolTextUnder`
5. Incorporate PR Review comments
2025-06-13 20:28:36 -03:00
tritao 010d37deda Standardize on Py::Long type for Python bindings. 2025-05-15 19:59:08 -03:00
Roy-043 5391e21d4e BIM: fix BIM_WPView command (#20741)
* BIM: fix BIM_WPView command

The BIM_WPView command did not work properly. This was mainly due to a faulty import.

* Updated to avoid a linter warning
2025-05-15 11:28:19 +02:00
Roy-043 e94e1d9260 BIM: BIM_Leader would create a wire with fewer than 2 points
If the BIM_Leader was escaped without clicking a point, or after cicking only 1 point, a Draft_Wire object would still be created.
2025-05-15 11:26:29 +02:00
Roy-043 1331b1f4b7 Merge pull request #20529 from Roy-043/Draft-fix-alignment-of-dim-arrows
Draft: fix alignment of dim arrows
2025-05-15 11:25:40 +02:00
Adrian Insaurralde Avalos ba50b8ce79 fedora rpm packaging: fix inverted pcl_enabled conditionals [skip ci] 2025-05-14 09:59:15 -03:00
Adrian Insaurralde Avalos 878f0b8c9c bump version to 1.0.1 2025-05-13 23:58:13 -03:00
Benjamin Nauck eebef0613b Update ondselsolver 2025-05-13 23:58:13 -03:00
Adrian Insaurralde Avalos 2aee1066ef fedora rpm packaging: tweak rpmbuild options
change `bundled_zipios` option to enabled by default, it was wrongly always set to enabled no matter what option was chosen
change `bundled_pycxx` option to enabled by default
add `pcl_enabled` option
2025-05-13 23:58:13 -03:00
Adrian Insaurralde Avalos 5929a5de39 fedora rpm packaging: use standard macro to package sources 2025-05-13 23:54:50 -03:00
ljo 315585ca87 Fix RPM packaging and add support for building with Qt6 and PySide6 for Fedora 40+ (#19565)
(cherry picked from commit afe23a432c)
2025-05-13 19:17:27 -03:00
Leif-Jöran Olsson 54b689fc23 Fixing ambiguiguous python shebang in installed script freecad-thumbnailer. Removed skip ci according to instruction.
(cherry picked from commit fb5ded6e53)
2025-05-13 19:17:27 -03:00
Adrián Insaurralde Avalos 0207f7716a WindowsInstaller: multiple improvements and fixes
update artwork
adapt to conda builds
make msvc redist directory optional
automate version information definition
use relative directories for file locations definitions
improve/update readme
partially update Delete.bat for qt6 libpack
add .gitignore
update signing.bat and add hashing command
2025-05-13 19:17:27 -03:00
Adrian Insaurralde Avalos 7637a991a9 Improvements and fixes on macos sing and notarize script 2025-05-13 19:17:27 -03:00
Syres916 ca9489c740 [App] add MeterDecimal to Unit Scheme Enum (#21275) 2025-05-12 13:14:55 -03:00
Adrian Insaurralde Avalos aa6f2943a9 github ci: use container for ubuntu 20.04 workflow
github deprecated the ubuntu-20.04 runner so it didn't work anymore, some adjustments where necessary
2025-05-11 17:25:18 -03:00
Syres916 deb68996f3 [1.0] [Gui] Fix bottomRight index by correcting last row count 2025-04-28 13:23:22 -03:00
Syres916 32a69b227f Backport of PR19377 and PR19765 to releases/1.0 branch 2025-04-21 11:37:36 -03:00
Roy-043 d9177606f5 Backport of #20436
Draft: Update checked state of grid button when switching the grid
2025-03-26 15:24:34 +01:00
Roy-043 71ba4d58fa Draft: show and hide Tray with delay
Without this delay the Tray may not display if Draft is the start-up workbench.

When the Draft workbench is autoloaded the Tray is shown and then immediately hidden. Because of this, hiding the tray must also happen with a delay.
2025-03-23 11:07:02 +01:00
Roy-043 c4a9c75bcc BIM: HumanFigure.brep: fix typo in create_qrc.py
Fixes #20289

My bad. Because of this typo the brep file was not included in Arch_rc.py.
2025-03-20 18:12:18 +01:00
Roy-043 b9bd1ca9db Draft: fix sweep==0 issue with Draft_Rotate
This is side-issue fixed with #19927. The rest of that PR should not be backported.
2025-03-19 11:26:47 +01:00
Roy-043 a2f3edbbf9 Draft: fix Draft_Edit issue with Gesture navigation
Fixes #19519
2025-03-19 11:19:13 +01:00
Roy-043 912e9a1429 BIM: fix ArchAxis index errors
Fixes #19577

Apparently the ViewObject can be updated before the Shape of the objects has been changed. To catch this the number of edges is checked in the `onChanged` method of the ViewObject.

There was an additional index error if the Limit property was not zero.
2025-03-19 11:10:01 +01:00
GHDE dee64c7c5d fixed openExternalLinks in DlbAbout (FreeCAD#16423) 2025-03-18 23:25:23 -03:00
Furgo 3fffb79426 BIM: include selected objects when creating a level 2025-03-18 23:18:57 -03:00
Adrian Insaurralde 0667e59d01 Fix backport of #19458 on occt 7.3 2025-03-18 17:21:13 -03:00
captain0xff a42141ea13 stop the cursor from flickering while picking a cosmetic vertex in techdraw 2025-03-18 16:13:29 -03:00
Kevin Martin ffec2d3055 Correct Issue 19980 for the 1.0 tree
Make no Change notification if an object's Label, after making it Unique and letting OnBeforeChangeLabel alter it, ends up equal to its current value.
2025-03-18 15:49:44 -03:00
Roy-043 865652822a Draft: make Draft_Edit also detect key up events
The key down events can be claimed by shortcuts from other workbenches. Detecting both the down and up events does not seem to cause problems.
2025-03-18 15:24:36 -03:00
Furgo 7406f274fb BIM: Arch imports ArchSpace methods 2025-03-17 20:11:28 -03:00
PaddleStroke 71a2315a5c Core: Text object: Fix icon of the tab. 2025-03-17 20:09:27 -03:00
PaddleStroke 0fcdecc934 QuickMeasure: Do not measure datums 2025-03-17 20:01:49 -03:00
PaddleStroke edfe5f4958 Fix #20004 2025-03-17 19:51:34 -03:00
j-hap 77269ee53b TechDraw: Fix double free when resetting line formats 2025-03-17 19:36:32 -03:00
Aurélien Pascal 1f42e804d7 TechDraw: Fix hatch drawing (#19458)
* TechDraw: Fix hatch drawing (#16353)

* TechDraw: Fix hatch drawing in Tech View
2025-03-17 19:33:12 -03:00
wmayer 25a3bd1239 Mesh: Workaround to load 3mf files not supported by zipios library
Mesh: Add comment explaining the workaround
2025-03-17 19:31:51 -03:00
Benjamin Bræstrup Sayoc 666600b589 Build: suppress warnings from 3rd party libraries
Warnings from 3rd parties are not relevant and are only polluting the warning output. Marking these libraries as SYSTEM suppresses warning.

https://gcc.gnu.org/onlinedocs/cpp/Invocation.html#index-I
https://gcc.gnu.org/onlinedocs/cpp/System-Headers.html
2025-03-17 18:17:46 -03:00
Adrian Insaurralde 37b5ac7b1c pixi: use cos7 packages on linux-64 2025-03-17 18:17:46 -03:00
Jacob Oursland 144fa63a8b CI: Enable GitHub Problem Matchers for compiler warnings. 2025-03-17 18:17:46 -03:00
mosfet80 94b30af836 Update pixi (#19625) 2025-03-17 18:17:46 -03:00
mosfet80 f34b73e46d Update sub_buildPixi.yml
Update checkout to version 4 -> default runtime to node20
2025-03-17 18:17:46 -03:00
mosfet80 1c18001290 Update sub_buildPixi.yml 2025-03-17 18:17:46 -03:00
mosfet80 2a9d56ea7e Update pixi.toml
fix version
2025-03-17 18:17:46 -03:00
lorenz fc48d88bca pixi: update to py3.13 (#18832)
* pixi: update to py3.13

* pixi: Update gh-action to use pixi v0.39.4

* Pixi: add dep. xorg-xproto for linux

* update lock-file
2025-03-17 18:17:46 -03:00
Jacob Oursland fe51a4d2de pixi: Add run freecad configuration for Windows.
Windows requires running from an installed FreeCAD, not simply the build environment.  This
commit performs the install and execution from the installation environment.
2025-03-17 18:17:46 -03:00
looooo a1aa127617 CI: add pixi github action
partial backport to keep conda qt5 CI workflows
2025-03-17 18:17:46 -03:00
looooo 23b77b096f pixi: add pixi.toml and pixi.lock 2025-03-17 18:17:46 -03:00
Jacob Oursland a2576785e7 CMake: modernize to use CMAKE_<LANG>_COMPILER_LAUNCHER for ccache. 2025-03-17 18:17:46 -03:00
Jacob Oursland 1c684b2c25 CMake: emit message when ccache is detected. 2025-03-17 18:17:46 -03:00
Jacob Oursland 0eda35d19f Mesh: Add template type to WM4 TRational variables. 2025-03-17 18:17:46 -03:00
Jacob Oursland 55e942ba94 Mesh: move counter declaration to loop-local. 2025-03-17 18:17:46 -03:00
Jacob Oursland 216a30ac57 CMake: Add missing target_link_directories() for OCCT. 2025-03-17 18:17:46 -03:00
Jacob Oursland c2ba10d4e4 App: Reduce BOOST_VERSION workaround to fix boost symbol linker error on Win-Qt5. 2025-03-17 18:17:46 -03:00
Chris Hennes b05242c27a CI: Make black line length match pre-commit 2025-03-17 18:17:46 -03:00
Adrian Insaurralde 299e7d3f0c CI: fix assembly unit tests executable name 2025-03-17 18:17:46 -03:00
Chris Hennes f5415a2511 CI: Add missing C++ tests to CI run
The current structure of the CI system explicitly lists the tests to run, and several recently-added test executables were not included in the list.
2025-03-17 18:17:46 -03:00
Chris Hennes 7670663f4a Spacemouse: Add #include <chrono> 2025-03-17 18:17:46 -03:00
Furgo e8db8a52b4 Add-On Manager: list correct vendor path for snaps (#19816) 2025-02-27 18:20:55 -03:00
Furgo 48004949de Add-On Manager: generalize removal of non-compatible pip options for the snap package (#19814) 2025-02-27 18:19:52 -03:00
xtemp09 9bd72d7bb3 [Spreadsheet] Remove prepended apostrophe if cell content is copied into clipboard (#19781)
* [Spreadsheet] Remove prepended apostrophe if cell content is copied into
clipboard

Closes #10058.
2025-02-27 18:18:57 -03:00
Andrew Shkolik 0ff7f0f5ff Surface - Fill boundary curves not honor SplitCurve edge if it's part of BSpline 2025-02-27 18:18:51 -03:00
Chris Hennes 2462f72ebf Addon Manager: Fix pip on Snap and AppImage
Also fixes various issues with dependency updater
2025-02-27 18:12:26 -03:00
Robert Schiele f1e86b9304 Fix: Linux builds fail at link time referencing missing symbols from 3DConnexions SDK (#19865)
backport of #19406

Co-authored-by: Patryk Skowroński <pskowronski@3dconnexion.com>
2025-02-27 15:13:32 -03:00
Adrian Insaurralde 9faedf7618 CMake: add missing ifs to support building 1.0 with LibPack 3.1.0 2025-02-26 00:04:33 -03:00
Chris Hennes b68dfbaf6d CMake: Support building 1.0 with LibPack 3.1.0 2025-02-24 13:23:26 -03:00
Adrian Insaurralde 7e08681df4 Gui: hide legacy spacemouse support PrefCheckBox if navlib isn't enabled 2025-02-23 15:17:29 -03:00
Adrian Insaurralde ef4d3714b3 Fix spnav not enabled by default on linux after #19226 and #19407 2025-02-23 15:17:29 -03:00
Chris Hennes fabaf130ec Gui: Disable spacemouse init if not legacy 2025-02-23 15:17:29 -03:00
Chris Hennes 317def083a GUI: Disable legacy spnav code when legacy is false
We don't ever want to connect to both libspnav and NavLib
2025-02-23 15:17:29 -03:00
Adrian Insaurralde 59341f7570 Backport: Enabling 3Dconnexion NavLib integration for MacOS (PR #17000) 2025-02-23 15:17:29 -03:00
wmayer 365fca1abb MSVC: Fix linking error when 3Dconnexion support is set to 'Raw input' 2025-02-23 15:14:36 -03:00
wmayer fa88a6e74e CMake: Handle build time checks to choose between modern and/or legacy space mouse devices 2025-02-23 15:14:36 -03:00
wmayer 0ce373c072 Gui: Add runtime check to choose between modern and legacy space mouse devices 2025-02-23 15:14:36 -03:00
Adrian Insaurralde 9afc9bb4d3 [CI][conda] Update qt5 devenv and remove default channel from workflows 2025-02-23 15:14:36 -03:00
Adrián Insaurralde Avalos 7aeb9ebfcf Merge pull request #19724 from LarryWoestman/pr_1_0
CAM:  A set of commits that are ready to be backported to the 1.0 branch from #18103 #19006 and #18685
2025-02-23 12:34:43 -03:00
pre-commit-ci[bot] 6ea40c3e63 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2025-02-20 01:11:11 +00:00
lorenz 3c6140dc26 cam: remove imghdr import (#18081) 2025-02-19 17:37:05 -03:00
Yorik van Havre c0363e14da BIM: Do not change important pref options without user's consent - fixes #19163 2025-02-19 17:36:26 -03:00
Lawrence Woestman d9561a8574 CAM: Fixed F parameter handling for only rotary axes
with tests
2025-02-18 19:06:51 -08:00
Lawrence Woestman 1c04b7cc96 CAM: converted the refactored* postprocessors to the new API
with corresponding tests
2025-02-18 19:06:51 -08:00
Lawrence Woestman 66d406b06f CAM: fixed A, B, and C axis handling; added relevant tests 2025-02-18 19:06:51 -08:00
Lawrence Woestman 0c9891be4b Added a line to make the build work
Note that this is the same change as Commit 1fdd2ya
	which hasn't been backported yet.
2025-02-18 19:05:41 -08:00
Adrian Insaurralde e960b745f9 Fix missing bracket after bad backport of #18644 2025-02-18 18:18:38 -03:00
Jiří Mácha 3aa55e5e91 Assembly: migrationScript2 and migrationScript4 improved and refactored
Description of Defects in migrationScript2 and migrationScript4:

Several additional issues have been identified in the Assembly
functions migrationScript4 and migrationScript2, beyond those fixed in
patch 71f0104bb2.

One common problem is that the Joint property Reference1 or Reference2
can be set to an invalid format. For example, user can manually cause
this issue by assigning an incorrect reference (e.g., the Z-axis) to
these properties via the FreeCAD GUI.  When this happens, internal
errors (exceptions and their corresponding Python call stack) are
reported in the Report View.  However, such information is not helpful
for the user to fix their 3D model.

Issues with the Current Implementation (Using migrationScript4 as
Reference):

- Lack of Type Validation for Reference1 and Reference2:

  The script does not check whether joint.Reference1[1] or
  joint.Reference2[1] is a sequence. If this condition is not met,
  statements like:

    sub1 = joint.Reference1[1][0]

  will throw an exception, printing the Python call stack.

- Lack of Length Validation for Sequences:

  The script does not ensure that the sequence length is sufficient
  for indexing. For example, joint.Reference1 and joint.Reference2
  must each have at least two elements to allow:

    joint.Reference1[1][1]
    joint.Reference2[1][1]

  Without validation, such calls can result in exceptions, printing the
  Python call stack.

- No Feedback on Problematic Joint:

  The user is not informed about which Assembly joint in the object
  hierarchy has an invalid Reference1 or Reference2. Depending on the
  size of the 3D model, identifying the defect can be time-consuming
  and frustrating without proper feedback.

This patch is focused on:

- Reporting Problematic Joint Path:

  A new function has been added to retrieve the full path to the
  Assembly joint. The return value (a string) is used to report the
  issue.

- Improved Exception Handling:

  Instead of adding more conditional checks (see above), exception
  handling is implemented. AttributeError, IndexError, and TypeError
  exceptions are caught. The exception message (excluding the call
  stack) is displayed at the end of a user-friendly warning.

- User-Friendly Warnings in the Report View:

  A single-line warning is now shown in the Report View, containing
  the following details:

    - Source of Warning:              'Assembly joint'
    - Location in the 3D Model: e.g., 'Assembly_XY.object_XY.joint_XY'
    - Problematic Attribute: e.g.,    'ReferenceXY'
    - Exception Message: e.g.,        'list index out of range'

- Refactoring and Optimization:

  The functions were refactored and optimized at the end of the
  conversion process.

Advantages:

- Cleaner Report View:
  Internal errors (e.g., Python call stacks) are no longer logged in
  the Report View, as they are not useful for end users. Only the
  exception message is displayed.

- Improved User Feedback:
  Users can now identify the problematic Assembly joint in the object
  hierarchy, saving significant time and effort.

- Robust and Concise Code:
  The solution simplifies the code while increasing its robustness.
2025-02-18 17:22:09 -03:00
wmayer c75fe83a4e App: Fix possible crash when postponing the destruction of a removed property
Fixes #18601
2025-02-18 17:17:27 -03:00
PaddleStroke b8b02f5f46 Assembly: Make ExplodedView: a group extension. So that we don't mimick group. Fixing the delete exploded view group issue 2025-02-18 17:15:27 -03:00
wmayer 9040a14d7b Part: Fix getIcon() of several view providers to return full path name of the icon file 2025-02-18 17:13:22 -03:00
Pascal de Bruijn 0dff5334d1 TechDraw: fix editable/autofill scale in Templates 2025-02-18 17:08:50 -03:00
Pascal de Bruijn db1f37a98a TechDraw: Component Drawing as default document type (#18827)
Presumably Component Drawings are more common as opposed to Assembly Drawing's
therefore FreeCAD's default should reflect this.

find src/Mod/TechDraw/Templates -iname "*.svg" -exec sed -i 's#Assembly Drawing#Component Drawing#g' "{}" \;
2025-02-18 17:08:35 -03:00
Roy-043 c4e292bd66 BIM: Improve onChanged Placement code
* Switched Component code to new Comp=True version of code.
* Made the Placement code in both files identical. This also solves that Rotating a BuildingPart was not propagated to children.
2025-02-18 13:26:12 +01:00
Chris Hennes 9dd074ff6d Points: Add missing QMessageBox include to PCH file 2025-02-17 21:40:14 -06:00
Benjamin Nauck 8de5d74502 Backport: Core: Implement SoFCTransform node (#19672)
* Core: Implement SoFCTransform node

In its doAction() method it only sets the model matrix if it's not the identity matrix.
This improves the issue #7606


* Add doc string to SoFCTransform

Co-authored-by: Benjamin Nauck <benjamin@nauck.se>
Co-authored-by: wmayer <wmayer@freecad.org>
Co-authored-by: wwmayer <werner.wm.mayer@gmx.de>
2025-02-17 19:38:10 -03:00
Adrian Insaurralde 5c23509370 Add proper PDF creator metadata (backport PR #18824)
[pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

App: Add utility method to get app name with version included

Gui: Migrate to using App::Application::getNameWithVersion

Spreadsheet: Migrate to using App::Application::getNameWithVersion

TD: Migrate to using App::Application::getNameWithVersion

Drawing: Migrate to using App::Application::getNameWithVersion
2025-02-17 14:21:35 -03:00
Syres916 78d954d086 [Techdraw] Import SVG files with UTF-8 encoding (#18816)
* [Techdraw] Fix importing SVG files with UTF-8 encoding

* [Techdraw] fix Lint feedback
2025-02-17 14:13:22 -03:00
Paul Lee 526ee2c9c4 [ArchWall] Fix Regression Single-edge Wall w/ Multi-Material
Forum Discussion
- https://forum.freecad.org/viewtopic.php?t=93610&start=10#p806296

Github Issues
- https://github.com/FreeCAD/FreeCAD/issues/19147#issuecomment-2607946858
2025-02-17 15:13:30 +01:00
Roy-043 95dfb2ede8 Merge pull request #19089 from Roy-043/Draft-Clone-avoid-B-spline-faces-in-more-cases
Draft: Clone: avoid B-spline faces in more cases
2025-02-17 15:12:53 +01:00
Daniel Wood cfb02b88be CAM: Tool Bit Library Fixes (#18973)
* remove unused else
* Enable reloading / re-selection of libraries
* Reload the libraries when exiting the editor
* Clear the model to prevent duplicate entries
* add missing docstring to reduce linting warnings
* Maintain any previous library selection when editing
2025-02-17 00:56:02 -03:00
MisterMaker a28fb062b9 [stylesheets] Gathering of stylesheet fixes (#18929)
* this is a workaround to remove caps

pelase ignore this hackery

* And now the caps are gone

* a bunch of small tweaks and fixes.

* Update FreeCAD Light.qss

updated menubar color light theme

* updated the buttons a tiny bit

* Fix for to short buttons.

Couldn't test it since my macro window is broken.

Co-Authored-By: Syres916 <46537884+Syres916@users.noreply.github.com>

* qspinbox disabled tweaks.

* Update FreeCAD Dark.qss

Tweaked the buttons a bit so they are more in line with the light theme.

* Update FreeCAD Dark.qss

small tweaks

* reversed the spreadsheet headers gradient for dark

* Update light with undo arrows position

Co-Authored-By: Syres916 <46537884+Syres916@users.noreply.github.com>

* Update undo buttons arrow position dark

Co-Authored-By: Syres916 <46537884+Syres916@users.noreply.github.com>

* added an offset to qcombobox

* removed the fix since it ruined every Qcombobox.

* Tabs update more clean less gradients.

* Update DlgMacroExecuteImp.cpp

fixing conflicts

* Update DlgMacroExecuteImp.cpp

* Delete DlgMacroExecuteImp.cpp

* Create DlgMacroExecuteImp.cpp

* Revert "Create DlgMacroExecuteImp.cpp"

This reverts commit 8de8f7506177d773bb356fd0e22a66466c25b668.

* Revert "Delete DlgMacroExecuteImp.cpp"

This reverts commit 41315f31abdad79afd4b696ee15c603de3e4a6a1.

* Revert "Update DlgMacroExecuteImp.cpp"

This reverts commit aa792291684e2d674f6961c641c8e2f8b9af12c8.

* Revert "Update DlgMacroExecuteImp.cpp"

This reverts commit e8376a8fdf11d7fd014f2c46f189afdca42833ce.

* Delete src/Gui/DlgMacroExecuteImp.cpp

* Update DlgMacroExecuteImp.cpp

finally realized what was going on lol

---------

Co-authored-by: Syres916 <46537884+Syres916@users.noreply.github.com>
2025-02-17 00:50:08 -03:00
PaddleStroke c7a1792309 Stylesheet toolbar background (#18831) 2025-02-17 00:41:23 -03:00
PaddleStroke 0141331dbd TechDraw: Assembly exploded views : revert #17726 2025-02-17 00:39:16 -03:00
Kacper Donat 6c8f9b28a0 App: Fix GeoFeature::getGlobalPlacement when rootObj is Link
This fixes a case when in case of rootObj being Link placement was not
calculated correctly due to not changing of the document. While for
original use it was fine as this was mostly used in case where there was
defined non-link root for general case Links can be root objects of the
document.
2025-02-17 00:31:02 -03:00
marioalexis e18e786f76 Fem: Fix references assignment in centrif example 2025-02-17 00:27:44 -03:00
herbkonik 5613501758 CAM: Fix bug that incorrectly calculates corner radius (#18724)
OCL requires three elements for defining a bullnose cutter: overall diameter, corner radius, and overall length. FreeCAD is providing the correct diameter and length, but the corner radius is calculated incorrectly in SurfaceSupport.py
Props go to Edyork in https://forum.freecad.org/viewtopic.php?p=798895#p798895
2025-02-17 00:22:18 -03:00
wmayer 4505c28cb6 Gui: Fix copying elements in the tree view by holding CTRL key
In older versions it was possible to copy elements with drag and drop by holding the CTRL key. Since v0.20 or v0.21 this wasn't possible any
more so that elements are always moved.

Note: Copying is only allowed for elements that have a parent object.
2025-02-17 00:19:04 -03:00
WandererFan e605d73d3f [TD]Dimension font clipping (fix #11452) (#18771)
* [TD]separate alignment and rendering bounding rectangles

* [TD]use alignment rectangle (fix #11452)
2025-02-17 00:17:45 -03:00
wwmayer aff5cdf016 Fix issues in ellipse creation (#18800)
* Sketcher: Handle exceptions in onViewValueChanged

Because the method onViewValueChanged is used as a Qt slot it must handle all possibly raised exceptions as otherwise
they will slip through GUIApplication::notify() that usually results into a crash on some platforms like macOS

* Sketch: Handle undefined values in calculateThroughPointMinorAxisParameters

* The argument of acos() must be in the range [-1, +1], otherwise it returns nan (not a number)
* The value of sin(0) = 0. So, it cannot be used in the denominator of a fraction
2025-02-17 00:14:53 -03:00
MisterMaker 25f929c572 Stylesheets spreadsheets visual fix. (#18719)
* this fixes the spreadsheet alignment and the corner button

* missed a line
2025-02-17 00:13:21 -03:00
wmayer fafff3a08b smesh: Fix build failure with vtk 9.4
Fixes #18423
2025-02-17 00:09:56 -03:00
WandererFan 149b64e8ef [TD]Fix transparent area in pdf (fix #18443) (#18507)
* [TD]fix transparent areas in pdf (#18443)

* [TD]restore use of PDF/A-1b format

- was not working in older versions of QPdfWriter
2025-02-17 00:07:21 -03:00
Bas Ruigrok 48dca901e6 Gui: Fix Blender and Revit navigation issues with shift key in sketcher 2025-02-17 00:03:50 -03:00
Rotzbua 11136b282f feat(win): add registry for silent uninstall
Entry is recommended to support the silent uninstall process without knowing the arguments.
https://nsis.sourceforge.io/Add_uninstall_information_to_Add/Remove_Programs#Recommended_values
2025-02-17 00:00:02 -03:00
Pieter Hijma 5d4587cfb3 Gui: Fix VarSet dialog 2 digit problem 2025-02-16 23:53:02 -03:00
mwganson 3209329eb4 [Part TopoShapeExpansion] move shape transform from make element copy into ruled surface function since it does not work well when copying vertex objects 2025-02-16 23:38:30 -03:00
Chris Hennes 2718d4589b Ext: Correct user preference specified in comment 2025-02-16 23:37:25 -03:00
Bas Ruigrok b11d4211e4 Gui: Fix camera position shift when starting rotation 2025-02-16 23:36:06 -03:00
Roy-043 0e3d2a208f PrefPacks: Add spreadsheet colors to classic theme
Fixes #17984.
2025-02-16 15:27:33 -03:00
Ian Hunter 5f2ac5479b Fix bug preventing filtering named constraints (#19339)
* Fix bug preventing filtering named constraints

There was a bug (see issue #11843) that displayed a filter for Named
constraints in the Sketcher Workbench whose toggling did not affect the
UI in any way. This enables this feature by checking if a given
constraint has a custom name or not and then appropriately toggling its
visibility.

* Use `std::string::empty()` per reviewer suggestion

Co-authored-by: Benjamin Nauck <benjamin@nauck.se>

---------

Co-authored-by: Chris Hennes <chennes@pioneerlibrarysystem.org>
Co-authored-by: Benjamin Nauck <benjamin@nauck.se>
2025-02-16 14:36:18 -03:00
Tim 12dc5829d7 [AddonManager] Fix construct_git_url return urls with '.git'. (#19242)
* [AddonManager] Fix construct_git_url return urls with '.git'.
2025-02-16 14:34:53 -03:00
Syres916 b638dba12c [Gui] fix the FPS text visibilty issues raised in #19371 (#19385)
* [Gui] fix the FPS text visibilty issues
* [Gui] code efficiency based on suggestions
* [Gui] update color parameter
* [Gui] Fix Lint feedback
* [Gui] check if string is empty
2025-02-16 14:14:44 -03:00
Roy-043 2a26b3d01b Draft: Avoid setRadiusValue error message
Fixes #19386.
2025-02-16 14:02:24 -03:00
Benjamin Nauck 9ad1aee683 CAM: Fix finish passes by avoiding fuzzy in Area.cpp (#19525) 2025-02-16 13:25:12 -03:00
tritao cff1b1921c Gui: Check if document exists in View3DInventorViewer::setOverrideMode. 2025-02-16 13:24:10 -03:00
Roy-043 79655aabf6 Draft: Fix line length input issue
Fixes #19451.
2025-02-16 13:23:29 -03:00
Chris Hennes 67b10dd24e Core: Update copyright date range to include 2025 (#19520)
* Main: Update copyright date range to include 2025
* GUI: Update copyright date range to include 2025
2025-02-16 13:20:42 -03:00
Benjamin Nauck 630f7bcd29 Revert "refactor: taskpanel ui on linux"
This reverts commit 537ad0fd7a.
2025-02-05 08:52:30 -06:00
Alfredo Monclus 537ad0fd7a refactor: taskpanel ui on linux 2025-01-27 14:07:14 -03:00
phaseloop 6d35b82899 CAM: Fix finishing pass (#17960)
* CAM: Fix finishing pass

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* add finishing pass unit (by @baehr)

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-01-27 14:04:11 -03:00
Lawrence Woestman 4dca99183d CAM: Fixed script-style postprocessors getting the wrong __name__
Also added a test that the __name__ of the postprocessor is correct
2025-01-27 14:02:56 -03:00
Stan Tomlinson 4ee2c5d9db improved checks in GUI/Jobs.py/claimChildren
eliminate some error messages when a Job is not fully loaded
  (or when not properly constructed via scripting)

TESTED ON V0.21 -- code hasn't changed since then
2025-01-27 13:53:05 -03:00
Shai Seger 245b62b8fa [CAM Simulator] Add ifdef to fix OpenGL compatibility on linux. issue #18707 (#18746)
* Add ifdef to fix compilation on linux. issue #18707

* remove multisample line altogether
2025-01-27 13:42:45 -03:00
Joona Okkonen 7dca20f979 Backport version. Sketcher: Fixed mapping error when attempting to create a sketch inside a group. (#19215)
* Sketcher mapping error fix

Fixed an issue in the Sketcher where attempting to create a sketch while a group is selected caused a mapping error. Now, when a sketch is created with a group selected, the sketch will be placed inside the group.

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: Joona <jookkone@edu.lapinamk.fi>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-01-24 08:04:20 -06:00
Roy-043 1e55e402ae Draft and BIM: Layer manager did not accept zero transparency 2025-01-10 23:44:28 +01:00
Roy-043 e557658def Merge pull request #18949 from Roy-043/Draft-and-Pref-Packs-fix-snapcolor
Draft (and Pref Packs): fix snapcolor
2025-01-09 12:04:02 +01:00
Benjamin Nauck 695f0cfe32 Remove octal in expressions when there's a leading zero 2025-01-09 11:55:43 +01:00
Roy-043 7b29489d3d Merge pull request #18959 from Roy-043/Core-fix-sWhatsThis-for-Std_LinkActions
Core: fix sWhatsThis for Std_LinkActions
2025-01-09 11:37:57 +01:00
Roy-043 485f239d6d Merge pull request #18942 from Roy-043/Draft-fix-selection-for-FacebinderTaskPanel
Draft: fix selection for FacebinderTaskPanel
2025-01-09 11:37:18 +01:00
Roy-043 ab3d0c319c Draft: fix axis calculation in make_sketch
Fixes #18713.

The code follows the suggestion by imm/webmite:
https://forum.freecad.org/viewtopic.php?p=799014#p799014

@webmite Thank you.
2025-01-09 09:41:03 +01:00
wmayer 9e4419a19c Gui: Check for exising layout before accessing it
It still must be checked if the crash in #18747 will be fixed.
2025-01-08 11:27:38 +01:00
Yorik van Havre b0c4aeee9e BIM: Fixed nativeIFC license - issue #18622 2025-01-07 16:06:13 +01:00
Roy-043 5a16f625b7 Part: copy_visual_attributes did not handle Draft Link arrays
Fixes #16541.
Fixes #18760.
2025-01-06 18:17:13 +01:00
pre-commit-ci[bot] d9e8fe0d7d [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2024-12-23 14:12:57 -03:00
Demolux d1707fdf10 BOM generation missing columns and .doCommandEval bugfix
BOM generation bugfix: Columns are persistent and .doCommandEval dependency circumvented #18615 backport to 1.0
2024-12-20 14:26:32 -03:00
Tobias Frost aaf2b6ed10 Fix SPDX Identifier to match license 2024-12-20 14:10:04 -03:00
Alfredo Monclus 4edb2e328c fix(PD): size should be enabled if profile is not none 2024-12-20 14:10:02 -03:00
Roy-043 4f9e833512 BIM: fix Wiki links in BIM Tutorial 2024-12-18 10:39:27 +01:00
Vincenzo Calligaro 82d1210f81 Updated tests affected by the modification
Signed-off-by: Vincenzo Calligaro <vincenzo.calligaro@gmail.com>
2024-12-16 13:47:54 -03:00
Vincenzo Calligaro 9a4b9c5277 [PartDesign] Hole: restore missing call to FeatureAddSub::refineShapeIfActive()
Signed-off-by: Vincenzo Calligaro <vincenzo.calligaro@gmail.com>
2024-12-16 13:47:54 -03:00
Syres916 9423cb9250 [Gui] Show Preferences page by name rather than index 2024-12-16 13:47:54 -03:00
Roy-043 cb49d64bbe BIM: Fix ArchReference problem caused by TNP code
Due to TNP code Document.xml can contain (for example)` <Part ElementMap="0.4" file="Box001.Shape.brp"/>` instead of `<Part file="Box001.Shape.brp"/>`.
2024-12-16 15:29:25 +01:00
wmayer 8f9c76a95d Sketch: Fix possible crash in BSpline::splineValue
There is an underflow of an unsigned int in the calling instance that sets the parameter 'p' to 2**32-1.
But the size of the passed vector is 0. To fix the crash first check if p is less then the size of the vector.

See: https://forum.freecad.org/viewtopic.php?t=92815
2024-12-15 19:24:04 -03:00
wmayer 1b1927bed7 Test: Add unit test to read in 3MF file 2024-12-15 19:20:58 -03:00
wmayer b027cfbf2e Mesh: Improve 3MF format to support files from 'Make World' 2024-12-15 19:20:58 -03:00
Yorik van Havre 9ea63ce943 BIM: Fixed image loading of the tutorial - fixes #17863 2024-12-15 19:13:03 -03:00
Adrian Insaurralde Avalos b5ee6ef952 [Points WB] fix issue where points are inaccurately imported when the points are far from the origin. This PR checks if the bounding box contains the origin and offers to move it to the origin if not, addresses issue #5808
[pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

Update src/Mod/Points/Gui/Command.cpp

backport of PR #17282
2024-12-15 18:11:13 -03:00
Florian Foinant-Willig 2ea219412b PartDesign: fix helix with negative angle 2024-12-15 16:55:18 -03:00
Syres916 92bbe88322 [Gui] Tree, set FontSize on start of application 2024-12-15 13:24:28 -03:00
Patryk Skowroński a1929d704a Update for 3Dconnexion NavLib integration (#18433)
* Fixed QuickZoom crash & picking in ortho view

* Fixed QuickZoom for high DPI screens

* Fixed return value for SetHitLookFrom

Co-authored-by: Benjamin Nauck <benjamin@nauck.se>

* Removed whitespace from GetPointerPosition

Co-authored-by: Benjamin Nauck <benjamin@nauck.se>

---------

Co-authored-by: Patryk Skowroński <pskowronski@3dconnexion.com>
Co-authored-by: Benjamin Nauck <benjamin@nauck.se>
2024-12-15 13:19:52 -03:00
Adrian Insaurralde Avalos 992c234e2c [TD] Backport PR #18083: Fix crash on no mdi (fix #16672)
[TD]add preference for auto workbench switch

[TD]prevent fail on auto switch to hidden tab

[TD]prevent crash on attempt to print hidden page

[TD]prevent use of non-exist/hidden tab in exports
2024-12-15 12:30:33 -03:00
wmayer 8aa75c09d1 PD: Fix possible crash in up to shape 2024-12-15 12:16:34 -03:00
Chris Hennes f7f3119d43 Merge pull request #17799 from Roy-043/Gui-FreeCAD-Light-PreferencePack-should-not-change-PickRadius
Gui: Remove rogue preferences from PreferencePacks (Light theme should not change PickRadius)
2024-12-07 13:04:52 +01:00
Roy-043 f0ef15df98 Merge pull request #18307 from Roy-043/Draft-Fix-make_point-color-regression
Draft: Fix make_point color regression
2024-12-05 12:10:37 +01:00
Roy-043 a7f1699e0d Merge pull request #18212 from Roy-043/Draft-Fix-finish-behavior-of-Draft_Edit-on-doc-close
Draft: Fix finish behavior of commands on doc close
2024-12-05 12:10:06 +01:00
Roy-043 f7f85143bb Draft: minor improvements for gui_edit.py (#17970)
* Draft: minor improvements for gui_edit.py

* Fix error...
2024-12-05 12:09:26 +01:00
Chris Mayo 366fe0b74e BIM: Replace use of ArchWorkbench in ArchSelectionObserver 2024-12-04 11:32:49 +01:00
Roy-043 b10f001c3a Merge pull request #18164 from Roy-043/Draft-Fix-cursor-scaling-for-xcb-platform
Draft: Fix cursor scaling for xcb platform
2024-11-29 18:01:57 +01:00
Roy-043 1372cdb506 Draft: fix color of arrays (#18123)
If `get_diffuse_color` returned a list with a single color, the list was wrongly multiplied. Regression introduced in V0.21, but in that version the error was masked by how Core handled the diffuse color.

Fixes #17052.
2024-11-29 18:01:09 +01:00
bdieterm 88fae786a5 Gui: use utf-8 encoding for saving recorded macros
FCMacros always have the header "# -*- coding: utf-8 -*".
But the QTextStream class in Qt5 does not always use utf-8 for saving the text file.
2024-11-29 13:56:17 -03:00
wmayer 865997597a Gui: Fixes #16637: Can no longer set transparency of Link faces 2024-11-28 17:20:57 +01:00
wmayer dc6d5e1e9f Core: Fix crash in ActiveObjectList
Forum: https://forum.freecad.org/viewtopic.php?t=91823
2024-11-28 17:16:55 +01:00
wmayer d88524b4f7 Core: Fix unicode path names under Windows 2024-11-26 10:22:32 -06:00
Chris Hennes b6ff2a67c6 Start: Show thumbnail if filename contains a dot
Backport of #18139
2024-11-26 08:59:22 -06:00
wmayer a15134d79b Core: Do not detach object from document before the call of breakDependency
This fixes #17900
2024-11-25 11:25:31 -06:00
PaddleStroke 80ec1e00b9 Assembly: Fix joints not being deleted when subassembly is deleted. 2024-11-25 11:21:01 -06:00
Roy-043 f1c740af0e Increase the delay to be on the safe side. 2024-11-25 15:03:42 +01:00
Roy-043 ff9b93de0d Draft: avoid listing status bar widgets in toolbar area context menu
Fixes #16832.

In V1.0 the two Draft status bar widgets appear as checkboxes without label in the toolbar area context menu. They should not be listed in that menu, as was the case in V0.21. Their visibility is controlled via preferences.

Additionally, in case the Draft WB is only preloaded, the widgets would display in another workbench. This is prevented by using a delay.
2024-11-25 15:03:25 +01:00
Roy-043 9c944183d0 BIM: Fix calculation of fence sections (#18042)
* BIM: Fix calculation of fence sections

The length  and placement of fence sections was only correct if they were cut to size.

* Fix required another change.
2024-11-25 14:57:28 +01:00
paul cd92e568d5 [Draft Gui_Stretch] Improve Stretch Rectangle Behaviour (#18063)
* [Draft gui_stretch] Improve Stretch Rectangle Behaviour

Feature Improvement discussed at FreeCAD Forum :
- https://forum.freecad.org/viewtopic.php?t=92124#p792118  (Draft_Stretching the whole rectangle creates a new wire)

Currently, 3 cases in general, proposed PR improve Case 3 below :

1. The original object is a Rectangle, if after stretching it is no longer a rectangle, it makes a copy turning it into a Wire which reflect the result of stretching.
   - Current behanviour is good for user, no change.
2. If after stretching it is still a rectangle, the code just resize the original.
   - Current behanviour is good for user, no change.
3. Now, if the user 'stretch' the whole rectangle, the code creates a copy as DWire in the 'stretched location'.
** - Users find this not intuitive, better just move the whole rectangle.
2024-11-25 14:55:54 +01:00
Roy-043 807d523660 BIM+Draft: Bring back human figure
* For the human figure attached to the Draft grid a hard-coded point list is used (instead deriving the points from human figure.brep). This is more efficient and avoids a dependency on the BIM WB.
* The default for the human figure preference of the grid was changed to false. And the tooltip adjusted.
2024-11-25 13:37:03 +01:00
wmayer 08fef7405c Core: Fix dangling pointer in SoFCUnifiedSelection::setSelection
This fixes #17965: Measurement: Crash when clicking on COM label
2024-11-22 17:04:10 +01:00
Roy-043 c1f45b0c96 Draft: Fix extra_scale error in hatch.py (#17715)
Fixes #17712.
2024-11-22 11:09:37 +01:00
Roy-043 a512314442 Draft: fix tray construction mode button for Light and Dark themes (#17886)
Fixes #17869.
2024-11-22 11:09:00 +01:00
Adrian Insaurralde Avalos 2fcc5317fe cmake: remove rc4 suffix from version info 2024-11-18 13:48:00 -03:00
Jiří Mácha 78a2a9c002 Assembly: fixed defect in the migrationScript4 function
The old CAD model created by the development version of FreeCAD
(in which the Assembly workbench was used) contained joints that,
for some reason, had an empty Joint Connector 1 reference (Reference1).

This was causing an exception and a crash of the Python function
called migrationScript4. The FreeCAD Report view contained:

23:28:29  pyException: Traceback (most recent call last):
  File "/FreeCAD/Mod/Assembly/JointObject.py", line 175, in onDocumentRestored
    self.createProperties(joint)
  File "/FreeCAD/Mod/Assembly/JointObject.py", line 181, in createProperties
    self.migrationScript4(joint)
  File "/FreeCAD/Mod/Assembly/JointObject.py", line 514, in migrationScript4
    if hasattr(joint, "Reference1") and joint.Reference1[0] is not None:
                                        ~~~~~~~~~~~~~~~~^^^
<class 'TypeError'>: 'NoneType' object is not subscriptable

This patch attempts to avoid such exceptions by validating the type of
the property variable before accessing it.
2024-11-18 10:46:53 -06:00
PaddleStroke 076623ef73 Assembly: Store DocumentObject instead of mbdPart for the dragged parts. Fixing the bug where doDragStep was 50% of time failing to find the correct DocumentObject due to bundling. 2024-11-18 10:44:03 -06:00
Jonas Bähr bbd366b5a7 CAM: Fix Helix Defaults in Setup Sheet
With PR #17655 (commit 1027926), the property "Direction" was changed
being an input to an output and the new "Cut Mode" took over (to
implement #14314). Unfortunately, this change was not reflected in the
Setup Sheet (or "Op Defaults" as it's called on the Job panel). This
commit fixes this.
2024-11-18 10:39:24 -06:00
Jonas Bähr 1ef5bd3fc3 CAM: Fix creating Helix on Prototype
For the "Op Defaults" from the setup sheet the operations get created
with a `OpPrototype` instead of a real document object. This prototype
provides only a small subset of FreeCAD's document object API. When a
new Job is created via the GUI, each registered operation is created
with such a dummy to populate the setup sheet panel. And if such an
operation uses document APIs not provided by the prototype, the enire
job creation fails, see #17871.
Unfortunately we don't have tests for the GUI part, where all the
operations are regsitered and thus the integration with all of them
could be verified, this I just created a local test for the helix, where
the actual issue was reported -- this can be verified with headlessly.
2024-11-18 10:39:11 -06:00
Adrián Insaurralde Avalos 83646753e0 Update version to 1.0.0RC4 2024-11-13 22:01:49 -03:00
PaddleStroke bdcf40a17c Assembly: JointObject refactor adaptUi 2024-11-13 12:15:16 -03:00
PaddleStroke 24e5b181b5 Assembly: Improve joint taskbox offset ui. 2024-11-13 12:15:16 -03:00
Adrián Insaurralde Avalos d548f81525 Revert "Assembly: JointObject refactor adaptUi"
This reverts commit 00c992ff34.
2024-11-13 12:15:16 -03:00
704 changed files with 28523 additions and 7020 deletions
+18
View File
@@ -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
}
]
}
]
}
+19
View File
@@ -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
}
]
}
]
}
+11 -25
View File
@@ -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 }}
+218
View File
@@ -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 }}
+21 -5
View File
@@ -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 }}
@@ -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
-133
View File
@@ -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 }}
+1 -1
View File
@@ -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
+3
View File
@@ -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
View File
@@ -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
View File
@@ -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"
}
}
}
]
}
}
+3
View File
@@ -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 )
+6 -4
View File
@@ -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()
+6
View File
@@ -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}")
+58 -55
View File
@@ -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
View File
@@ -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+
+16539
View File
File diff suppressed because it is too large Load Diff
+154
View File
@@ -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
View File
@@ -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>
@@ -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
+4
View File
@@ -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
+24
View File
@@ -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
View File
@@ -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
View File
@@ -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"; } }
+1
View File
@@ -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.
+3 -3
View File
@@ -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;
}
+4
View File
@@ -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}
+2 -2
View File
@@ -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>
+15 -15
View File
@@ -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;
}
+2 -2
View File
@@ -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);
+1 -1
View File
@@ -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>
+2 -2
View File
@@ -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 {
+4 -4
View File
@@ -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
View File
@@ -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
+1 -1
View File
@@ -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)
+7 -7
View File
@@ -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&) {
+1
View File
@@ -916,6 +916,7 @@ class Scheme(IntEnum):
MmMin = 6
ImperialCivil = 7
FemMilliMeterNewton = 8
MeterDecimal = 9
App.Units.Scheme = Scheme
+5
View File
@@ -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
View File
@@ -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
+1 -1
View File
@@ -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);
+12 -12
View File
@@ -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();
}
+3 -1
View File
@@ -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
+3 -1
View File
@@ -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;
}
+2 -2
View File
@@ -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);
+7 -3
View File
@@ -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
+3 -3
View File
@@ -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>
+2 -2
View File
@@ -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;
+1 -1
View File
@@ -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)
+4
View File
@@ -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}
+2 -2
View File
@@ -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)
+1 -1
View File
@@ -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>
+2 -2
View File
@@ -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)
+5 -5
View File
@@ -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) {
+14
View File
@@ -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)));
}
+8
View File
@@ -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
+1
View File
@@ -35,6 +35,7 @@ set(EXT_FILES
sketcher.py
UiTools.py
utils.py
utils_zip.py
)
foreach (it ${EXT_FILES})
+1 -1
View File
@@ -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
+18
View File
@@ -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
+21 -33
View File
@@ -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;
}
+55 -12
View File
@@ -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;
}
+10 -5
View File
@@ -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
View File
@@ -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);
+1
View File
@@ -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);
+38 -7
View File
@@ -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();
+7 -2
View File
@@ -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
View File
@@ -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
View File
@@ -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);
}
+1 -1
View File
@@ -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;
+1 -3
View File
@@ -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());
+1
View File
@@ -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\
+35 -1
View File
@@ -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.
*/
+1
View File
@@ -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:
+1 -1
View File
@@ -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>
+3 -3
View File
@@ -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
+1
View File
@@ -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);
}
}
-1
View File
@@ -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
+91
View File
@@ -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);
}
}
+65
View File
@@ -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
+1 -1
View File
@@ -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>
+5 -5
View File
@@ -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) {
+2
View File
@@ -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);
}
}
+3
View File
@@ -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;
+1 -6
View File
@@ -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;
+8 -37
View File
@@ -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;
+31 -31
View File
@@ -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