Compare commits

..

1567 Commits

Author SHA1 Message Date
Chris Hennes 9fc7709969 Build: Update sign tool installation command in workflow
Cannot pin to a specific version since it is perpetually a "pre-release".
2026-03-18 14:41:41 -05:00
Kacper Donat 12cced51f1 Merge pull request #21978 from theo-vt/document_transaction
GSOC Multi file editing
2026-03-18 18:37:38 +01:00
Chris Hennes 439c50c5c4 Build: Pin Eigen to fix weekly build failure (#28421)
Pin version to >=3.3,<5 because of PCL incompatibility
2026-03-18 17:10:27 +00:00
Petter Reinholdtsen 87a3bcf9db Gui: Don't add redundant == or != to nullptr conditions
Follow C++ Core Guidelines ES.87: Don't add redundant == or != to conditions.
2026-03-18 11:15:45 -05:00
Benjamin Nauck 8910345149 Merge pull request #28033 from chennes/azureCodeSigning3
Packaging: Add Azure-based artifact signing on Win
2026-03-18 16:05:33 +01:00
PaddleStroke af4e54a6b7 Assembly: Fix datum typo in isBodySubObject (#28415) 2026-03-18 07:36:12 -05:00
wandererfan 90a0132533 [TD]fix selection order prevents area dimension 2026-03-17 14:18:03 -05:00
Chris Hennes fe425c3f57 Merge pull request #27747 from WandererFan/SmoothEdges
TechDraw: Draw smooth edges with thin line
2026-03-17 13:51:57 -05:00
dependabot[bot] 8098d72bb2 Bump step-security/harden-runner from 2.15.1 to 2.16.0
Bumps [step-security/harden-runner](https://github.com/step-security/harden-runner) from 2.15.1 to 2.16.0.
- [Release notes](https://github.com/step-security/harden-runner/releases)
- [Commits](https://github.com/step-security/harden-runner/compare/58077d3c7e43986b6b15fba718e8ea69e387dfcc...fa2e9d605c4eeb9fcad4c99c224cee0c6c7f3594)

---
updated-dependencies:
- dependency-name: step-security/harden-runner
  dependency-version: 2.16.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-03-17 12:50:09 -05:00
dependabot[bot] ebde1e3d9a Bump actions/dependency-review-action from 4.8.2 to 4.8.3
Bumps [actions/dependency-review-action](https://github.com/actions/dependency-review-action) from 4.8.2 to 4.8.3.
- [Release notes](https://github.com/actions/dependency-review-action/releases)
- [Commits](https://github.com/actions/dependency-review-action/compare/3c4e3dcb1aa7874d2c16be7d79418e9b7efd6261...05fe4576374b728f0c523d6a13d64c25081e0803)

---
updated-dependencies:
- dependency-name: actions/dependency-review-action
  dependency-version: 4.8.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-03-17 12:47:55 -05:00
dependabot[bot] d9b4006aa1 Bump geekyeggo/delete-artifact from 5.1.0 to 6.0.0
Bumps [geekyeggo/delete-artifact](https://github.com/geekyeggo/delete-artifact) from 5.1.0 to 6.0.0.
- [Release notes](https://github.com/geekyeggo/delete-artifact/releases)
- [Changelog](https://github.com/GeekyEggo/delete-artifact/blob/main/CHANGELOG.md)
- [Commits](https://github.com/geekyeggo/delete-artifact/compare/f275313e70c08f6120db482d7a6b98377786765b...176a747ab7e287e3ff4787bf8a148716375ca118)

---
updated-dependencies:
- dependency-name: geekyeggo/delete-artifact
  dependency-version: 6.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-03-17 12:43:27 -05:00
Chris Hennes 0b78b5ade8 Merge pull request #28247 from hyarion/various-text-fixes
Sketcher: Fix minor text tool issues
2026-03-17 11:44:40 -05:00
Benjamin Nauck 4750f06058 Build: Add harfbuzz to pixi.toml
It is already in pixi.lock
2026-03-17 11:28:13 -05:00
Chris Hennes 0cb8f7e240 Sketcher: Add backwards-compat path for external geo
Before 0aed23c (PR #19582), external geometry projection used a different algorithm and produced slightly different geometry for some kinds of projections (B-splines in particular). This adds a backwards-compatibility path that allows old files to continue to use the old algorithm, while using the new and improved algorithm with new files.
2026-03-17 15:22:11 +01:00
Chris Hennes 49d7d77274 PD: Add migration to handle reversed TwoLengths prism
Commit a346c266 (PR #21794) was a major refactoring of the extrusion code, and one consequence of it was that the 'TwoLengths' extrusion was deprecated and replaced. The code that replaced it generated the same final geometry, but in the opposite direction, changing the face order and breaking the element names. This commit adds a backwards-compatibility branch to the file loading code that flips the direction of the inputs, so the final output matches the original.
2026-03-17 02:06:42 +01:00
Bas Ruigrok d443d5b065 Gui: Combine getFocalPoint() and getCenterPointOnFocalPlane() 2026-03-16 23:10:11 +01:00
tarman3 013a1d5f3a CAM: Job Stock - Exclude PartDesign elements 2026-03-16 22:23:48 +01:00
Alfredo Monclus 180c39709a PartDesign: thread texture (#22573)
* PD: Hole Thread texture

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

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

* refactor: vp-texture remove logging

* refactor: vp-hole cleanup unused declaration

* refactor: vp-hole remove logging

* refactor: vp-hole use convertTo

* refactor: vp-hole use freecad_cast

* refactor: make unwrapsurface private

* fix: logic error with model-thread handling

* fix: modelthreadchanged issues

threaddepth doesnt depend on modeled or not so remove it

* fix: model thread getting disabled when it shouldnt

* revert: use base-0 poly triangulation

previously had issues, but all is good now

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2026-03-16 21:52:36 +01:00
marioalexis 601bcd5e3d App: Fix separator path in safe mode 2026-03-16 21:03:28 +01:00
PaddleStroke dcb380e1ca Sketcher: Text position OVP fix 2026-03-16 19:15:09 +01:00
Alfredo Monclus cfe641fb7d Gui: improve quantitySpinbox / Sketcher OVP (#25978)
* Gui: fix quantity spinbox size not adapting to number of decimals

* Gui: fix quantity spinbox units getting cut (force max chars)

* Gui: editableDatumLabel remove hardcoded values

* fixes

* Gui: sketcher ovp auto adjust size

* Gui: ovp fix cursor jumping behind the unit

* Gui: Refactor changes to QuantitySpinBox

The QuantitySpinBox uses d-pointer (pimpl) to store its private data -
this commit ensures that all state is stored here and exposed via
getters and setters + qproperties.

* Gui: sketcher ovp fix cursor jumping after the unit

* Gui: allow quantitySpinBox to set max digits allowed

Useful for adjustable width in the Sketcher OVP

---------

Co-authored-by: Kacper Donat <kadet1090@gmail.com>
2026-03-16 18:41:00 +01:00
PaddleStroke d384c9d8cb Link : Fix transparent face regression 2026-03-16 18:32:36 +01:00
PaddleStroke 3620b68b21 Assembly: Command: Select joints of component (#27530)
* Assembly: Command: Select joints of component https://github.com/FreeCAD/FreeCAD/issues/23721

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

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

* Update src/Mod/Assembly/Gui/Commands.cpp

Co-authored-by: Chris Hennes <chennes@pioneerlibrarysystem.org>

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Chris Hennes <chennes@pioneerlibrarysystem.org>
2026-03-16 18:25:05 +01:00
tarman3 20e70f84e1 CAM: ToolController - Default RampFeed after migration (#27191) 2026-03-16 13:10:34 -04:00
Nishendra Singh e28b1ce1ad techdraw: added supplementary angle display 2026-03-16 18:07:32 +01:00
Alfredo Monclus c8efc26982 PartDesign: fix the range of the custom clearance of threads (#26296)
* PartDesign: fix the range of the custom clearance of threads

* PartDesign: hole ensure diameter is on the correct range
2026-03-16 18:02:31 +01:00
Loke Strøm 9abe7b4af1 Sketcher: Fix: Arc of Hyperbola (#27656)
* Sketcher: Fix: Arc of Hyperbola

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

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

* Added minor grater than major radius support

* Fixed merge errors

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

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

* Improved comments and added a confused points check for S1 and S2 distance.

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

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

* Added compile check for occ version and check before getting minor radius.

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

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

* Apply suggestions from code review

OCC version check

Co-authored-by: Chris Hennes <chennes@pioneerlibrarysystem.org>

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Chris Hennes <chennes@pioneerlibrarysystem.org>
2026-03-16 17:49:34 +01:00
Timothy Miller 27f077c62b Part: Fix AttacherEngine property not synced with AttacherType (#15716)
When Part2DObject (e.g., Sketch) is created, it calls setAttacher() to
set up AttachEnginePlane. This updated the internal AttacherType property
but left the user-visible AttacherEngine enum at its default "Engine 3D".

Now setAttacher() also updates AttacherEngine for non-base attachers,
keeping the visible property in sync with the actual engine type.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-03-16 17:42:36 +01:00
PaddleStroke eabd052c17 Core: Fix freecad when windows path has non ASCII characters (#28222)
* Core: Fix freecad when Windows username has non ASCII characters

* Update ApplicationDirectories.cpp

* Tests: Add tests of pathToString/stringToPath

Validates the fix for non-ASCII characters in filesystem paths (e.g.
Windows usernames with umlauts). Includes Windows-specific tests that
verify pathToString produces UTF-8 from wide-string paths and that
the naive fs::path::string() does not. On Linux these functions are
effectively a no-op, so the tests themselves are only really useful
on Windows.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Chris Hennes <chennes@pioneerlibrarysystem.org>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-16 17:37:43 +01:00
freecad-gh-actions-translation-bot 706b01f607 Update translations from Crowdin 2026-03-16 17:31:49 +01:00
dependabot[bot] 8a2f665430 Bump github/issue-metrics from 4.1.0 to 4.1.1
Bumps [github/issue-metrics](https://github.com/github/issue-metrics) from 4.1.0 to 4.1.1.
- [Release notes](https://github.com/github/issue-metrics/releases)
- [Commits](https://github.com/github/issue-metrics/compare/41a7961f701cc64490f32e143af8ef479b93e87d...6a35322ff89cee3e1a594d282c27eb34bffa9174)

---
updated-dependencies:
- dependency-name: github/issue-metrics
  dependency-version: 4.1.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-03-16 14:05:28 +01:00
sliptonic 9fe630e0c3 Merge pull request #23093 from Connor9220/UpdateCircularHoleBaseGUI
CAM: Circular Hole Improvements - GUI sorting enhancements, and migration fixes
2026-03-15 15:02:28 -05:00
Ladislav Michl 91f015b132 Gui: {get,set}Camera expects utf-8 encoding
Python interface to the setCamera() is using 's' format string, which
converts Unicode object to C string using 'utf-8' encoding. Reflect
that for QString conversion as well.
2026-03-15 20:38:42 +01:00
theo-vt ad630cbb9c Use new transaction methods in dlgmaterial 2026-03-14 12:35:31 -04:00
theo-vt 51ac15b375 Allow one clipping plane dock widget per document 2026-03-14 12:15:47 -04:00
theo-vt db1469f219 Add dialog for link insertion when selection buffer is empty 2026-03-14 12:15:47 -04:00
theo-vt 1665dec4e4 Adress review 2026-03-14 12:15:47 -04:00
theo-vt 99e414efab Return string instead of const char* in Selection::getSelectedElement 2026-03-14 12:15:47 -04:00
theo-vt 7cb3815fb1 Filter events per document at the SelectionObserver level 2026-03-14 12:15:47 -04:00
theo-vt 5c6bf5461d Remove most activate-deactivate 2026-03-14 12:15:47 -04:00
theo-vt 3076ce66be Scope the selection per document 2026-03-14 12:15:47 -04:00
theo-vt d59471b6bd Gui: Allow a selection gate per document 2026-03-14 12:15:47 -04:00
theo-vt 4ba5504e7a Remove dupplicate clone code causing crash 2026-03-14 12:15:46 -04:00
theo-vt 7db3f901fd Fix diapearing sketcher tools 2026-03-14 12:15:46 -04:00
theo-vt f4665aa7b5 Core: support multiple active transactions 2026-03-14 12:15:46 -04:00
sliptonic 6d8b98d471 block delete logic 2026-03-14 11:19:14 -04:00
tarman3 03f506c5a5 fix onDocumentRestored 2026-03-14 11:18:54 -04:00
Turan Furkan Topak d90c88f0fc make polar and circular arrays aware of the active working plane (#28324) 2026-03-14 13:18:00 +01:00
Bojan Pejic df8c6b5db9 BIM: fix zero level height warning dialog (#28065)
* BIM: fix zero level height warning dialog
2026-03-14 11:48:49 +00:00
Yash Suthar 5455306a4a Draft: fix angular mode extension lines creation (#27987)
* Draft: fix angular mode extension lines creation

Signed-off-by: Yash Suthar <yashsuthar983@gmail.com>

* Draft: update the agularDimension extlines svg representation

Signed-off-by: Yash Suthar <yashsuthar983@gmail.com>

---------

Signed-off-by: Yash Suthar <yashsuthar983@gmail.com>
2026-03-14 12:34:58 +01:00
Furgo d1476c819c BIM: refactor link processing, add BIM_Link wrapper command (#28104)
* BIM: refactor, introduce link properties override helper

* BIM: add Link support to Arch_Add, Arch_Remove

Fixes: https://github.com/FreeCAD/FreeCAD/issues/26255
Fixes: https://github.com/FreeCAD/FreeCAD/issues/28139

Co-authored-by: Roy-043 <70520633+Roy-043@users.noreply.github.com>

* BIM: add link command wrapper

* BIM: add link addition and removal tests

---------

Co-authored-by: Roy-043 <70520633+Roy-043@users.noreply.github.com>
2026-03-14 12:22:02 +01:00
Billy Huddleston 88a74cfa3a Fix Drag'n drop for QT6.10
Fix Merge conflicts
2026-03-13 18:09:12 -04:00
Billy Huddleston 5e818e961c CAM: Remove "Automatic TSP" mode and improve natural sorting
CAM: CircularHoleBase - Fix onDocumentRestored

Removed the expermental "Automatic TSP" sorting mode and ensured legacy
files are migrated to "Automatic". Start using C++ TSP sorting for
"Automatic" mode for better performance. Refactored natural sorting for
table columns, relocating the utility class for reuse and using a robust
sort key.

src/Mod/CAM/Path/Op/CircularHoleBase.py:
- Removed "Automatic TSP" from SortingMode options and logic
- Added migration logic for legacy "Automatic TSP" values
- Cleaned up redundant assignments

src/Mod/CAM/Path/Op/Gui/CircularHoleBase.py:
- Updated to use relocated NaturalSortTableWidgetItem for feature and
diameter columns
- Improved sorting behavior for mixed text/number columns

src/Mod/CAM/Path/Base/Gui/Util.py:
- Added NaturalSortTableWidgetItem using the existing natural_sort_key
for robust sorting
2026-03-13 15:57:13 -04:00
Billy Huddleston fdef6c35e7 GUI sorting enhancements, and migration fixes
This update enhances the GUI with new sorting modes and manual reordering, and
adds migration logic to ensure robust property

src/Mod/CAM/Gui/Resources/panels/PageBaseHoleGeometryEdit.ui:
- Add Sorting mode combo box with "Automatic", "Automatic TSP", and "Manual" options
- Add UI improvements for hole sorting, selection, and filtering

src/Mod/CAM/Path/Op/CircularHoleBase.py:
- Add migration logic to ensure SortingMode property exists and is up to date
- Use sort_locations_tsp when SortingMode is "Automatic TSP"

src/Mod/CAM/Path/Op/Gui/CircularHoleBase.py:
- Add RowMoveTableWidget for manual row reordering in the GUI
- Update TaskPanelHoleGeometryPage to support new sorting modes and improved UI behavior
2026-03-13 15:56:14 -04:00
Chris Hennes 4ac848aab0 Merge pull request #26031 from pjcreath/split-sketchobject
Split monolithic SketchObject.cpp
2026-03-13 14:37:49 -05:00
sliptonic e1fdc27e7c Merge pull request #28321 from davidgilkaufman/roadmap_clipper
[CAM] Clipper upgrade roadmap epic
2026-03-13 13:35:07 -05:00
sliptonic 0caccde398 Merge pull request #25667 from tarman3/boundary_threshold
CAM: DressupBoundary - RetractThreshold
2026-03-13 12:52:59 -05:00
sliptonic 244dffcfb7 Merge pull request #27514 from tarman3/holes_diameter
CAM: CircularHoleBase - Fix holeDiameter() for face
2026-03-13 12:45:43 -05:00
David Kaufman 5328e74e3d link FPA grant proposal 2026-03-13 13:27:54 -04:00
sliptonic 3c48b4a950 CAM: Machine-based postprocessing (#27507)
CAM: Add template dropdown below machine name in editor

Adds a template selection dropdown to the Machine Editor dialog,
positioned below the machine name field. Dropdown lists user and
built-in templates for new machines only. Adds MachineFactory
template discovery and ensures templates are copied to build directory.

src/Mod/CAM/CMakeLists.txt:
- Copy machine templates to build directory for runtime access

src/Mod/CAM/Machine/models/machine.py:
- Add MachineFactory.list_builtin_templates() for template discovery
- Use FreeCAD install path for built-in templates

src/Mod/CAM/Machine/ui/editor/machine_editor.py:
- Add template dropdown below name field for new machines
- Populate dropdown with user and built-in templates
- Update UI fields when template is selected

Major improvements to the GenericPlasma postprocessor with new dialog-based
mode selection and robust plasma cutting features.

New Features:
- Add pre_processing_dialog() for interactive mode selection
- Replace persistent mark_entry_only property with runtime dialog
- User-friendly choice between Normal Cutting and Mark Entry Points Only
- Enhanced torch control with pierce height movement
- Complete mark_entry_only implementation with proper marking sequence
- Improved error handling and state management

Technical Improvements:
- Add _reset_plasma_state() for clean per-operation tracking
- Fix Z direction detection with proper null checking
- Enhanced height extraction from StartDepth/FinalDepth/ClearanceHeight
- Better error handling with debug logging
- Graceful fallback when GUI not available

Bug Fixes:
- Fix torch control to move to pierce height before ignition
- Fix force_rapid_feeds to remove F parameters (revert from override)
- Fix state tracking initialization and null value handling
- Add proper state reset for each operationUses a dialog to set mark_only.

Co-authored-by: tarman3 <joice501790018@tutamail.com>
2026-03-13 13:18:45 -04:00
sliptonic a78c31be69 Merge pull request #28274 from Connor9220/FixToolbitSubClass
CAM: Fix saving of _shape_type for toolbits
2026-03-13 12:11:19 -05:00
sliptonic c2495411b7 Merge pull request #28173 from tarman3/linking_opti
CAM: Linking - Minor optimization for simple solid
2026-03-13 12:01:50 -05:00
sliptonic 1a8e2fb333 Merge pull request #28172 from tarman3/maneuver_toCommand
CAM: Maneuver - Move instruction_to_command() to class
2026-03-13 12:00:07 -05:00
sliptonic 73c3c78474 Merge pull request #28167 from tarman3/machinestate
CAM: MachineState - Allow process list of commands
2026-03-13 11:57:49 -05:00
sliptonic 509c881ea0 Merge pull request #28140 from tarman3/linking_tolerance
CAM: Linking - Tolerance in get_linking_moves()
2026-03-13 11:55:08 -05:00
David Kaufman d690dcb1d3 Clipper upgrade roadmap 2026-03-13 11:47:33 -04:00
dependabot[bot] 493829b376 Bump actions/download-artifact from 8.0.0 to 8.0.1
Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 8.0.0 to 8.0.1.
- [Release notes](https://github.com/actions/download-artifact/releases)
- [Commits](https://github.com/actions/download-artifact/compare/70fc10c6e5e1ce46ad2ea6f2b72d43f7d47b13c3...3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c)

---
updated-dependencies:
- dependency-name: actions/download-artifact
  dependency-version: 8.0.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-03-12 21:46:11 -05:00
pre-commit-ci[bot] 0819d776d7 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2026-03-12 20:25:01 +00:00
pjcreath 79aca8950f Sketch: [5/5] Fix up files after splitting SketchObject.cpp
Remove stale includes and make other adjustments for compilation.
2026-03-12 16:17:08 -04:00
pjcreath 8efe9964e7 Sketch: [4/5] Move code from SketchObject.cpp to SketchObjectExternal.cpp.
This is a purely mechanical reorganization with no functional changes.
Use "git blame -C --minimal" to trace line origins prior to this commit.
2026-03-12 16:17:08 -04:00
pjcreath eda87a7efe Sketch: [3/5] Move code from SketchObject.cpp to SketchObjectGeometry.cpp.
This is a purely mechanical reorganization with no functional changes.
Use "git blame -C --minimal" to trace line origins prior to this commit.
2026-03-12 16:17:08 -04:00
pjcreath e1815f10ff Sketch: [2/5] Move code from SketchObject.cpp to SketchObjectConstraints.cpp.
This is a purely mechanical reorganization with no functional changes.
Use "git blame -C --minimal" to trace line origins prior to this commit.
2026-03-12 16:17:08 -04:00
pjcreath 7d39a9d59a Sketch: [1/5] Move code from SketchObject.cpp to SketchObjectOperations.cpp.
This is a purely mechanical reorganization with no functional changes.
Use "git blame -C --minimal" to trace line origins prior to this commit.
2026-03-12 16:17:08 -04:00
wmayer baa47bd606 Sketch: Refactor SketchObject::getPoint
Add the helper class SketchGeometryType and the interface SketchGeometry with the needed sub-classes to
remove the cascaded if-else construct
2026-03-12 16:17:08 -04:00
wmayer 51b37da53e Sketch: Fix crash when moving sketch with hidden constraints
Clicking the eye icon on the constraints panel hides all constraints. This calls SketchObject::setVirtualSpace where the existing Constraint
objects will be replaced. However, the Constraint objects are also stored inside the member 'solvedSketch' but won't be replaced so that the
pointers there will become dangling.

If the user starts to drag the sketch the pointers are still dangling and cause a crash when calling 'solvedSketch.moveGeometries'.

The crash can be reproduced with:
1. Create a sketch
2. Add a single line
3. Set a length constraint
4. Make it a non-driving constraint
5. Hide it with the eye icon or by unticking the check box
6. Move the line

The same crash also occurs when calling the methods setLabelDistance() or setLabelPosition() from Python and then trying to move the sketch.

Solution:

To fix the problem add the lightweight method 'Sketch::updateConstraints' and call it inside SketchObject::setVirtualSpace to quickly update
the pointers after invalidating them.

This fixes issue 19566
2026-03-12 16:17:08 -04:00
André Lopes 8ce3c4a1cc Fix #24079: clarify TechDraw Scale tooltip (#28293) 2026-03-12 18:12:02 +00:00
Roy-043 037ce3bffd BIM: update tooltips in BIM Setup to match current prefs
Related to #25004

Updated the tooltips to point to correct pref pages.

Additionally:
* Minor text tweaks.
* Replaced "Gui::PrefColorButton" with "Gui::ColorButton".
2026-03-12 18:28:48 +01:00
Roy-043 b9306c6f63 BIM: fix BuildingPart color issues including v1.0 regressions (#28001)
* BIM: fix BuildingPart color issues including v1.0 regressions

Fixes #27136.

* [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>
2026-03-12 14:39:24 +00:00
tarman3 7b2b972efa CAM: MachineState - Allow process list of commands 2026-03-12 10:28:31 +02:00
filippor 6d66721582 fix CAM missing python file in cmake 2026-03-11 22:03:23 -04:00
Billy Huddleston 448235cd2b CAM: Fix saving of _shape_type for toolbits
Corrects logic so that the _shape_type is saved properly and not always
defaulted to the primary toolbit type. Ensures subclass/alias
information is preserved when saving toolbits.

src/Mod/CAM/Path/Tool/toolbit/models/base.py:
- Fix fallback logic for _shape_type to correctly save subclass/alias
when present
- Only default to primary type if _shape_type is missing or matches the
main class

src/Mod/CAM/Path/Tool/docobject/ui/docobject.py:
- Improve label formatting by handling underscores, hyphens, and extra
spaces

src/Mod/CAM/Path/Tool/toolbit/ui/typefilter.py:
- Simplify type filter mapping and display logic for toolbit subtypes
2026-03-11 21:58:32 -04:00
Bojan a729bb4bc1 Material: add transaction support to Std_SetMaterial task 2026-03-11 20:00:39 -05:00
Chris Hennes 03fc08d02e Revert "[Weekly Build] Update IfcOpenShell to 0.8.4"
This reverts commit 5e7bbe15e3.
2026-03-11 08:18:44 +01:00
WandererFan e44c1ce75a TechDraw: Allow 3d dimension references to use point objects (#28199)
* [TD]fix 3d point object reference in dimension

* [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>
2026-03-11 06:08:35 +01:00
marioalexis 4083c7c616 Fem: Add name to examples dock widget 2026-03-11 06:05:07 +01:00
PaddleStroke 76a84f63ab Sketcher: Dimension tool: don't update distance type based on position for horizontal/vert 2026-03-11 05:36:10 +01:00
WandererFan 065315d7a4 TechDraw: fix crash in area dim for face with nested voids (#28097) 2026-03-10 22:57:59 -05:00
Chris Hennes 6206ed2c51 Packaging: Add Azure-based artifact signing on Win
Sign all *.exe, *.dll, and *.pyd files in the bin directory of the
build, as well as the two Chocolatey stubs and the installer. Requires
the use of several environment variables and secrets, documented at
https://github.com/FreeCAD/DevelopersHandbook/blob/main/technical/codesigning.md#windows
2026-03-10 22:25:02 -05:00
PaddleStroke 451072f0d7 Sketcher : arc with symmetric + 2 coincidence fix (#28120) 2026-03-10 22:13:02 -05:00
Roy-043 0b232ac1ff Draft: Avoid import of whole Draft module (#25386) 2026-03-10 21:59:36 -05:00
Grzegorz Kwacz 737cab44f2 Gui/View: Move (get|set)Camera to methods (#27801) 2026-03-10 21:57:34 -05:00
Benjamin Nauck a06be5de68 Sketcher: Fix void bounding box fall-through in constraint visualization
Add missing break after hiding rectangle points for a void bounding box,
preventing fall-through to CornerMin()/CornerMax() which would produce
undefined values.
2026-03-10 19:11:48 +01:00
Benjamin Nauck 0ea238f90c Sketcher: Fix dangling command context on double-click text edit
Remove the openCommand() call in editDoubleClicked() since
EditTextDialog already manages its own command lifecycle. The redundant
outer command was never closed when the user cancelled the dialog.
2026-03-10 19:11:48 +01:00
Benjamin Nauck 5ae85148cc Merge pull request #22217 from PaddleStroke/sk_texttool
Sketcher: Text tool
2026-03-10 18:07:50 +01:00
tarman3 1182be91bc CAM: Maneuver - Move instruction_to_command() to class 2026-03-10 15:52:35 +02:00
Benjamin Nauck cd5876dc54 Sketcher: Escape text and font path in EditTextDialog
Escape user-provided text and font path strings before inserting them
into the Python command string, preventing breakage or injection from
strings containing quotes or backslashes.
2026-03-10 12:54:45 +01:00
Benjamin Nauck ca4660167e Sketcher: Add .ttc (TrueType Collection) to font file discovery 2026-03-10 12:54:45 +01:00
Benjamin Nauck a0c97a102e Part: Add HarfBuzz text shaping for proper kerning in makeTextWires
Replace the character-by-character positioning loop with HarfBuzz
text shaping. The old code used FT_Get_Kerning which only reads
legacy kern tables. HarfBuzz handles both GPOS kerning and legacy
kern tables, as well as ligatures and complex script shaping.
2026-03-10 12:54:45 +01:00
Roy-043 90c83636cb Draft: update GUI text in Draft_SelectPlane
After #27979, the Draft_SelectPlane code also accepts 1 or 2 vertices. This PR updates the task panel text accordingly.
2026-03-10 10:33:23 +01:00
tarman3 e561950ff8 CAM: Linking - Minor optimization for simple solid 2026-03-10 09:06:14 +02:00
PaddleStroke e7e5e39e7b Sketcher: Change default text to Text 2026-03-10 07:22:26 +01:00
paddle d842e4151c Sketcher: Text: Fixes 2026-03-10 07:22:25 +01:00
paddle 320bd61156 Sketcher: Text tool - review changes 2026-03-10 07:22:25 +01:00
PaddleStroke fed11359d9 Update SketcherToolDefaultWidget.h 2026-03-10 07:22:09 +01:00
paddle fdf0013dcb Sketcher: Text tool 2026-03-10 07:21:04 +01:00
tarman3 bf98221885 CAM: Linking - Tolerance in get_linking_moves() 2026-03-10 06:52:28 +02:00
Bojan d214306d1b PartDesign/Part: prevent chamfer crash on OCC kernel failure 2026-03-10 01:52:57 +01:00
PaddleStroke a0af0d2b85 Link: Fix mirror twice color issue (#28071) 2026-03-09 22:12:34 +01:00
Turan Furkan Topak ee27de857a Contribution Standards: Adding new rules, mostly around AI discussions (#24646) 2026-03-09 15:55:49 -05:00
sliptonic 4afbadec04 Merge pull request #26605 from tarman3/inspect_title
CAM: Inspect and Export - Window title
2026-03-09 15:25:18 -05:00
sliptonic cdd9d685fe CAM: Improvements to machine (#28011)
* CAM:  Improvements to machine

* CAM: SPDX

* lint and translation string problems

* fixing headers and missing toolhead tests

---------

Co-authored-by: tarman3 <joice501790018@tutamail.com>
2026-03-09 14:02:31 -04:00
Krish Sharma a34bad7da4 Add status bar hints for modifier keys in Std_Measure (#26568)
* Add status bar hints for modifier keys in Std_Measure

* Align status bar hints according to design guide

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

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

* Update src/Mod/Measure/Gui/TaskMeasure.cpp

Co-authored-by: Max Wilfinger <6246609+maxwxyz@users.noreply.github.com>

* Update src/Mod/Measure/Gui/TaskMeasure.cpp

Co-authored-by: Max Wilfinger <6246609+maxwxyz@users.noreply.github.com>

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

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

* Replace 'invert' with 'toggle' to improve readability

* Added missing namespace qualifier

* Fix MSVC list assignment errors with explicit std::list<InputHint>

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

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

* fix InputHint': undeclared identifier

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Max Wilfinger <6246609+maxwxyz@users.noreply.github.com>
2026-03-09 18:24:54 +01:00
PaddleStroke e20b42e484 Assembly: fix joint creation not working on draft links (#26085)
* Assembly: add support for draft links

* Update AssemblyObject.cpp

* Update ViewProviderAssembly.cpp

* Update GeoFeature.cpp

* Update JointObject.py

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

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

* [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>
2026-03-09 18:15:01 +01:00
PaddleStroke 79923c16f3 Gui: Fix shortcut warning (#28217) 2026-03-09 18:00:22 +01:00
Bojan 004927e16e TechDraw: clear selection after editing Annotation from 2D page Fixes FreeCAD#27983 2026-03-09 17:59:17 +01:00
Yorik van Havre e8d9f30c10 Merge pull request #28020 from Roy-043/BIM-remove-switch-to-beam-creation-based-on-dimensions
BIM: remove switch to profile beam creation based on dimensions
2026-03-09 16:52:18 +00:00
dependabot[bot] f06dfa5af8 Bump github/issue-metrics from 3.25.5 to 4.1.0
Bumps [github/issue-metrics](https://github.com/github/issue-metrics) from 3.25.5 to 4.1.0.
- [Release notes](https://github.com/github/issue-metrics/releases)
- [Commits](https://github.com/github/issue-metrics/compare/67526e7bd8100b870f10b1c120780a8375777b43...41a7961f701cc64490f32e143af8ef479b93e87d)

---
updated-dependencies:
- dependency-name: github/issue-metrics
  dependency-version: 4.1.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-03-09 14:22:17 +01:00
Jonas Voigt dc1e96c46a Gui: Add styling to spreadsheet color picker (#28191) 2026-03-09 13:11:44 +00:00
freecad-gh-actions-translation-bot 96afba8351 Update translations from Crowdin 2026-03-09 07:28:51 +01:00
Chris Hennes 72b9a91337 Materials: Correct missing or incorrect licenses and authors
During conversion of some materials from the originals, in some cases authorship
was lost, or licensing mistaken. In addition, during their creation some files
had incorrect licenses applied. Files previously licensed LGPL-2.1.-or-later had
that license restored. Other files were re-licensed by agreement of their
author.

Co-Authored-By: David Carter <dcarter@davidcarter.ca>
2026-03-09 06:02:07 +01:00
WandererFan c468a622e6 TechDraw: Trap attempt to write to held file (#25716) 2026-03-09 04:32:27 +00:00
marioalexis edde9fb18e Fem: Remove transparency from equation icons 2026-03-09 05:15:36 +01:00
Roy-043 5754c66a55 BIM: do not process shapes of BuildingParts for TD BIMViews
Fixes #17661.
Fixes #27396.

In ArchSectionPlane.py the shape of BuildingParts was also processed. This resulted in duplicate geometry as BuildingParts inherit their shape from their (also processed) content.

This PR requires some testing, it should not be backported to v1.1.
2026-03-08 22:11:20 -05:00
Roy-043 146ed0d704 Draft: allow more than 1 character for in-command shortcuts (#26950) 2026-03-08 22:08:57 -05:00
Chris Hennes e807d2d421 Part: Fix dangling pointer in getElementSource() 2026-03-08 22:50:47 +01:00
Parag Debnath 0e83500531 Core: Fix the visibility of bounding boxes (#28123)
Co-authored-by: Parag Debnath <paragforwork@gmail.com>
2026-03-08 22:48:04 +01:00
Chris Hennes 143c1737af Merge pull request #25200 from pieterhijma/doc-formatting
Doc: Improve the formatting of doxygen output
2026-03-08 15:32:15 -05:00
tarman3 f7939beee0 CAM: Linking - Tolerance in get_linking_moves() 2026-03-08 21:30:24 +02:00
marioalexis84 c6aeec9146 Fem: Add method to create custom arrays in pipeline (#26076)
Co-authored-by: Chris Hennes <chennes@pioneerlibrarysystem.org>
2026-03-08 19:25:48 +00:00
marioalexis 9e065cdb7f Fem: Add command to clear mesh groups 2026-03-08 13:58:12 -05:00
marioalexis b55dd47120 Spreadsheet: Include missing header <QTextDocument> 2026-03-08 13:42:34 -05:00
Gaurang-2005 11dd9d8870 Fix Collada exporter skipping App::Link geometry (#27974)
* Fix Collada exporter skipping App::Link geometry

Resolve App::Link objects recursively during export so referenced
geometry is included in the .dae output while preserving link placement.

* Arch: Fix Collada export for App::Link objects

The Collada exporter skipped geometry for App::Link instances because
it only handled objects directly present in the document.

This change resolves Link objects using getLinkedObject() and exports
their referenced geometry while applying the placement of the exporting
instance.

The original App::Part expansion behavior is preserved.

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

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

* Arch: fix placement handling for App::Link and primitives in Collada export

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

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

* final change

* [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>
2026-03-08 17:31:54 +00:00
marioalexis 88940fb375 Fem: Fix crash in pipeline 2026-03-08 11:24:52 -05:00
dependabot[bot] aa5feb3df0 CI: Pin actions/github script to 8.1.0 by hash 2026-03-08 11:15:35 -05:00
dependabot[bot] dee9d5a498 Bump step-security/harden-runner from 2.13.3 to 2.14.0
Bumps [step-security/harden-runner](https://github.com/step-security/harden-runner) from 2.13.3 to 2.14.0.
- [Release notes](https://github.com/step-security/harden-runner/releases)
- [Commits](https://github.com/step-security/harden-runner/compare/df199fb7be9f65074067a9eb93f12bb4c5547cf2...20cf305ff2072d973412fa9b1e3a4f227bda3c76)

---
updated-dependencies:
- dependency-name: step-security/harden-runner
  dependency-version: 2.14.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-03-08 11:12:32 -05:00
marioalexis 8c18208c97 Fem: Add log verbosity preference to Elmer 2026-03-08 11:09:37 -05:00
Bojan Pejic d68b0c087e Draft: move working plane to vertex when pre-selected (#27979) 2026-03-08 11:53:13 +00:00
Chris 35b77bc069 bim: attempt to fix crash with issue #27984 bim text in td doc (#28135) 2026-03-08 12:30:51 +01:00
tarman3 0702616895 CAM: BoundaryDressup - RetractThreshold 2026-03-08 12:47:43 +02:00
theo-vt f36aeef878 Sketcher.planegcs: don't check for constraint update in solve routine 2026-03-07 17:41:35 -06:00
Syres916 5e7bbe15e3 [Weekly Build] Update IfcOpenShell to 0.8.4 2026-03-07 16:50:58 -06:00
Maik-0000FF 687c75e5bc Gui: Fix Linux SpaceMouse performance: event coalescing, camera batching, per-axis deadzone (#28110)
* Fix Linux SpaceMouse jerkiness: coalesce spnav events and batch camera updates

On Linux, pollSpacenav() posts every spnav motion event individually
(125-250Hz from spacenavd), each triggering a full scene redraw. Combined
with camera->orientation and camera->position each triggering separate
Coin3D notifications, this results in up to 500 redraws/sec.

Fix 1 - Event coalescing (GuiNativeEventLinux.cpp):
The drain loop now keeps only the latest motion state and posts once after
all pending events are consumed. SpaceMouse events are absolute deflection
(current puck position), not deltas, so the latest event always contains
the complete state.

Fix 2 - Batched camera updates (NavigationStyle.cpp):
Wrap camera property changes in enableNotify(false/true) + touch() so
Coin3D fires a single redraw instead of two per event.

Together this reduces redraws from ~500/sec to ~60/sec (display refresh),
eliminating the jerky navigation that Linux users experience with complex
models.

Fixes #25926

* Add per-axis deadzone filtering for Linux SpaceMouse

Each SpaceMouse axis has different sensitivity and noise characteristics.
A single global deadzone is too coarse — rotation axes may need different
thresholds than translation axes.

Read per-axis deadzone values from user.cfg (BaseApp/Spaceball/Motion)
using keys PanLRDeadzone, PanUDDeadzone, ZoomDeadzone, TiltDeadzone,
RollDeadzone, SpinDeadzone. Values default to 0 (no filtering).

Axis values below their individual threshold are zeroed before posting
the motion event, preventing unintended drift from sensor noise while
preserving intentional small movements.

This is the Linux equivalent of deadzone handling that NavLib provides
on Windows/macOS.

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

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

* Use std::array for axisDeadzoneKeys to avoid magic number

Replace C-style array with std::array and use .size() instead of
hardcoded loop bound, as suggested in code review.

* Cache deadzone values with ParameterGrp Observer instead of polling

Replace per-event GetParameterGroupByPath + GetInt calls with a static
DeadzoneCache that loads values once and updates them via
ParameterGrp::ObserverType when user.cfg changes. Also use
static constexpr for the keys array and std::abs for readability.

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

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

* Move DeadzoneCache from static local to member variable

Replace the static local DeadzoneCache in pollSpacenav() with a
std::unique_ptr<DeadzoneCache> member of GuiNativeEvent, initialized
in initSpaceball() after the spnav connection is established.
Forward-declare in the header to keep includes minimal.

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

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

---------

Co-authored-by: Maik-0000FF <Maik-0000FF@users.noreply.github.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2026-03-07 22:37:59 +01:00
PaddleStroke 36dd4b983c Sketcher: Dimension tool: Filter coincident points (#27630) 2026-03-07 15:34:56 -06:00
Chris cee71e1fb1 CMake: Add check for Qt/PySide version mismatch (#27156)
* CMake: fixes issue #27065 check for Qt/PySide version mismatches
* lint / format several PySide related CMake files
2026-03-07 15:12:57 -06:00
mosfet80 baed171ec5 PD: Remove unused variable from TaskRevolutionParameters.cpp (#26009) 2026-03-07 14:19:05 -06:00
PeterfoxUwU ecb188fe4c Base: Added Quantities for Optic/Chemical mechanics (#27944)
* Base: Added Quantities for Optic/Chemical mechanics

* [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>
2026-03-07 21:10:40 +01:00
Grzegorz Kwacz 1027be1efa Spreadsheet: Decrease default size (#27152)
* Spreadsheet: dynamic row and coulumn counts

* Spreadsheet: test distant cell

* Spreadsheet: fix removeColumns condition

* Spreadsheet: Fix zoom detachment

* Spreadsheet: Fix SheetModel::containInView

* Spreadsheet: Make sure the number of rows/cols decreases correctly after removal

* Spreadsheet: Code quality fixes

* Spreadsheet: Fix typo

* Spreadsheet: Move sheet->insert/remove outside Qt signals

* Update src/Mod/Spreadsheet/Gui/SheetTableView.cpp

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

* Update src/Mod/Spreadsheet/Gui/SheetModel.h

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

* Spreadsheet: Add comment about nesting beginInsertColumn

* Spreadsheet: Remove c-style Qt header

---------

Co-authored-by: Benjamin Nauck <benjamin@nauck.se>
2026-03-07 20:59:49 +01:00
Andrea d2b84db105 Sketcher: Cleanup commented-out code
Remove the TestSketcherGui file entirely, it contained only commented
lines. Delete commented out debugging output. Remove other commented-out
code that didn't have any explanation or justification for leaving it
in.
2026-03-07 13:55:52 -06:00
Benjamin Nauck c263d8f51c Merge pull request #18678 from chennes/applicationAddTranslatableExportType 2026-03-07 17:03:09 +01:00
Chris Hennes 0f0d2c849f Points: Add translation tags to export formats 2026-03-07 00:47:05 -06:00
Chris Hennes 025d4a9f5c Part: Add translation tags to export formats 2026-03-07 00:47:05 -06:00
Chris Hennes 8140957413 OpenSCAD: Add translation tags to export formats 2026-03-07 00:47:05 -06:00
Chris Hennes 6ad2206595 Mesh: Add translation tags to export formats 2026-03-07 00:47:05 -06:00
Chris Hennes dff7fc6ca8 Import: Add translation tags to export formats 2026-03-07 00:47:00 -06:00
Chris Hennes 1671ecb902 FEM: Add translation tags to export formats 2026-03-07 00:46:53 -06:00
Chris Hennes 8a17ca36a4 Draft: Add translation tags to export formats 2026-03-07 00:46:53 -06:00
Chris Hennes b8929f279f BIM: Add translation tags to export formats 2026-03-07 00:46:53 -06:00
Chris Hennes 07540ad3ba Gui: Add translation tags to export formats 2026-03-07 00:46:53 -06:00
Chris Hennes c387a4b5c9 App: Create addTranslatableExportType method
This method aims to solve the problem of untranslatable description
strings on file types. Some, but not all, file format description
strings contain translatable elements. For example, some languages
may translate "FEM mesh formats". Many format descriptions include
the words "file," "format," or "mesh" -- these could potentially be
replaced with localized versions.
2026-03-07 00:46:47 -06:00
Chris Hennes 21ef29bb82 Merge pull request #27969 from 3x380V/pd_cleanup
PartDesign: Minor cleanup
2026-03-07 00:27:26 -06:00
Chris Hennes 8cb06956d0 Merge pull request #27759 from dhruvjamwal/main
Fix #27741: Prevent camel case splitting on numbers in Property Editor.
2026-03-07 00:08:47 -06:00
Benjamin Nauck 17651fbfa4 Part: Fix signal handler compatibility with OCCT 8
OCCT 8.0.0 removed the NewInstance/Jump API from signal exception
classes in favor of Standard_ErrorHandler::Abort.
2026-03-06 23:58:26 -06:00
Yurii Sokolovskyi 87651cdd4c Autoconstraints redundancy error message fix
Report view now shows which sketch caused the 'Autoconstraints cause redundancy, Removing them' error
2026-03-06 23:26:26 -06:00
dependabot[bot] d34969f7d6 Bump actions/download-artifact from 7.0.0 to 8.0.0
Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 7.0.0 to 8.0.0.
- [Release notes](https://github.com/actions/download-artifact/releases)
- [Commits](https://github.com/actions/download-artifact/compare/37930b1c2abaa49bbe596cd826c3c89aef350131...70fc10c6e5e1ce46ad2ea6f2b72d43f7d47b13c3)

---
updated-dependencies:
- dependency-name: actions/download-artifact
  dependency-version: 8.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-03-06 23:19:22 -06:00
Chris Hennes 60ebafd0b3 Gui: Tweak comment for clarity
Co-authored-by: Pieter Hijma <pieterhijma@users.noreply.github.com>
2026-03-06 22:36:12 -06:00
Chris Hennes 15dd009f13 Tests: Add test for PropertyItem setName() behavior 2026-03-06 22:34:42 -06:00
marioalexis dbb6cbe335 Fem: Add property to set pipeline and filters color if Field is None - fixes #21352 2026-03-06 22:25:42 -06:00
Ladislav Michl 2dcb495a67 TD: Fix warnings 2026-03-06 22:23:46 -06:00
Pieter Hijma a102c8a359 Gui: Prevent unhandled exception adding properties
This commit prevents unhandled exceptions to be thrown in the Add
Property dialog.  When the user provides a valid name, for example 'Abc'
and then an invalid name, for example 'Abc^', an exception is thrown
that is caught by Qt's notify which may lead to a crash.  This is caused
by the fact that the editor is still bound to the old property that has
been removed.  The main idea was to preserve values that were provided
by the user as long as possible, also when a property name changes.
This design goal tried to preserve the user provided value even if the
property name is not valid.  Although the underlying property item is
explicitly unbound in that situation, the editor is not.

The solution is to also explicitly unbind the editor if there is an
editor that can have bindings.  Unbinding an editor does not
automatically hide the f(x) symbol in the editor (leading to errors on
unbound editors), so this commit also adds a bit of logic to hide
the f(x) symbol when an editor is unbound.
2026-03-06 22:12:49 -06:00
Kristian Rekstad 8fda540e1a Idf: improve dox 2026-03-06 20:50:45 -06:00
PaddleStroke bbd1266398 PartDesign: Fix wireframe not working on external link to body 2026-03-06 20:34:17 -06:00
Petter Reinholdtsen 087522528b Base: Corrected delete() call in XMLTools.
The memory is allocated using new() with alignment requirements, and
should be deleted using the same alignment requirement.  See
issue #27781 for the valgrind error.
2026-03-06 19:18:01 -06:00
marioalexis 18cf24e1d9 Fem: Show all solvers in tool bar - fixes #27703 2026-03-06 17:17:25 -06:00
Connor9220 f0a70d5468 Merge pull request #23747 from tarman3/selectside
CAM: Path.Op.Area - Fix offer side
2026-03-06 17:50:15 -05:00
tarman3 26357db694 CAM: Inspect and Export gcode window title 2026-03-06 21:46:58 +02:00
PaddleStroke 83d14b785e Sketcher: Fix crash on external deletion (#27717)
* Sketcher: Fix crash on external deletion

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

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

* Update SketchObject.pyi

* Update SketchObjectPyImp.cpp

* Update ViewProviderSketch.cpp

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

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

* Update SketchObjectPyImp.cpp

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

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

* Sketcher: Fix last external not being removed from ref 27719

* Update SketchObject.cpp

* Update SketchObject.cpp

* Update SketchObject.h

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

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

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

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

* rename fixMissingAxisInExternalGeo

* Update SketchObject.cpp

* Update SketchObjectPyImp.cpp

* [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>
2026-03-06 19:19:13 +00:00
PaddleStroke bc0d94d7a7 RTGroup 2: App: add PropertyListsT::removeIf() (#26173)
* App: add PropertyListsT::removeIf()

For convenient list value filtering.
Co-authored-by: Zheng Lei <realthunder.dev@gmail.com>

* Update Property.h

* Update Property.h
2026-03-06 19:15:33 +00:00
Connor9220 840122a358 Merge pull request #26976 from tarman3/points_coincide_list
CAM: Path.Geom.pointsCoincide - allow list and tuple
2026-03-06 12:36:09 -05:00
FilippoR a18f77f3b8 fix CAMTests.TestPathOpUtil.TestPathOpUtil.test46 & test47 (#28038)
* fix CAMTests.TestPathOpUtil.TestPathOpUtil.test46

* fix CAMTests.TestPathOpUtil.TestPathOpUtil.test47

* disable CAMTests.TestTestPost.TestTestPost.test00190
2026-03-06 12:31:05 -05:00
Connor9220 eb522b52dc Merge pull request #26507 from tarman3/save_gcode
CAM: Exporting G-code - Buttons text
2026-03-06 12:13:22 -05:00
tarman3 04e0518051 CAM: LeadInOut - Fix positive overtravel for open profile (#25482)
* CAM: LeadInOut - Replace G01 by G1

* CAM: LeadInOut - Fix positive overtravel for open profile
2026-03-06 12:08:10 -05:00
Connor9220 dac4062d54 Merge pull request #27960 from petterreinholdtsen/cam-fanuc-new-improved
CAM: Improved Fanuc support (header, python warnings).
2026-03-06 11:56:22 -05:00
PaddleStroke 949c5421cf Sketcher: refactor removeAxesAlignment (#27451) 2026-03-06 17:29:52 +01:00
PaddleStroke 912fd47b5f Merge pull request #27531 from PaddleStroke/asm_gotolink
Assembly: Command: Got to linked assembly
2026-03-06 15:50:59 +01:00
kkocdko b098f3ad44 Linux: use exec command in AppRun 2026-03-06 15:45:51 +01:00
PaddleStroke f65dda922f Assembly: Fix JCS position if assembly is transformed (#28089)
* Assembly: Fix JCS position if assembly is transformed

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

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

* redrawJointPlacement & showPreviewJCS Refactor to avoid duplicate code

* Assembly: JointObject: Simplify setJCSPosition

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

* Update JointObject.py

* Update src/Mod/Assembly/JointObject.py

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Benjamin Nauck <benjamin@nauck.se>
2026-03-06 09:41:15 +00:00
Petter Reinholdtsen 4c6eed1e63 CAM: Improved Fanuc support (header, python warnings).
Adjusted G code output to include FreeCAD body and job information.
The first comment in the G code is shown on the machine controller,
and should contain useful information for operators to to identify
jobs.  Fetch the body and job label using findParentJob and insert it
into the G code.  For some reason the body and job information is not
available when called from TestFanucPost.py, so handle case where it
is undefined as earlier.  This new use of findParentJob exposes error
in mock code used in code tests.  This is fixed in a different pull
request to make this patch easily backportable to the 1.1 branch.

Fixed issues with Fanuc post processor discovered by lint.  Made sure
global variables used are declared.  This fixes issue updating the
postamble and preamble introduced in
ef794c31bd

Added docstrings, adjusted import statements and wrapped long line to
keep linter happy.

Reformatted code with black for consistent formatting.

Also reverted obsolete setText() workaround from commit
9c78ced00c now
that https://github.com/FreeCAD/FreeCAD/pull/26008 is merged.
2026-03-06 09:09:11 +01:00
Benjamin Nauck 6238fe1081 Merge pull request #26172 from PaddleStroke/patch-985354 2026-03-06 07:10:59 +01:00
sliptonic b20a6acc26 CAM: Consolidates tapping into Drilling as a new strategy. (#27506) 2026-03-05 21:46:32 +01:00
Devanshi Bhatt c6b99363d6 #25004: change the tooltip contents for correct line width location (#28057)
* #25004: change the tooltip contents for correct line width location

* #25004 : Update the tooltip contents for correct line width location
2026-03-05 19:50:22 +00:00
Benjamin Nauck 26435d03fd Merge pull request #27845 from marioalexis84/fem-pipelinepy_time_info 2026-03-05 17:32:45 +01:00
marioalexis 3c56c164ee Fem: Fix start page example 2026-03-05 09:30:04 -06:00
Zheng Lei 6ea74652c9 App: fix PropertyLinkBase::getLinkedObjects() 2026-03-05 08:31:53 +01:00
Parag Debnath 2db12d8a66 added conflict free shortcuts (#28036)
Co-authored-by: Parag Debnath <paragforwork@gmail.com>
2026-03-04 20:57:30 +01:00
Benjamin Nauck 637463ac35 Merge pull request #27746 from furgo16/bim-add-options-task-boxes
BIM: add quick-access options task boxes to all relevant objects
2026-03-03 23:57:35 +01:00
Ladislav Michl e516eae53b Part: Remove deprecated cutFaces 2026-03-03 23:55:29 +01:00
paul e12d8fd01e [ArchWall] Multi-Material width return to Width Property (#27972)
* [ArchWall] Multi-Material width return to Width Property

Fix #27804
- BIM: Wall with MultiMaterial assigned reports wrong Width

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

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

* [ArchWall] Multi-Material width return to Width Property (rev.)

Fix #27804

- BIM: Wall with MultiMaterial assigned reports wrong Width

(rev.
Better algorithm - https://github.com/FreeCAD/FreeCAD/issues/27804#issuecomment-3986056788)

* [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>
2026-03-03 04:53:33 +00:00
Chris Hennes e1644a7310 Merge pull request #27879 from kadet1090/fix-checked-state
Part: Make 3D View properly checkable
2026-03-02 19:22:01 -06:00
marioalexis 3ae8d45506 Fem: Read material info from .frd file 2026-03-02 23:17:45 +01:00
Furgo 2777999d03 BIM: Fix placement jump when uncloning objects (#27597)
* BIM: Fix placement jump when uncloning objects

The Unclone command incorrectly multiplied the parent's placement by the
clone's placement. Since Arch clones store absolute placement (not
relative to the parent), this resulted in a double transform.

This caused baseless walls to jump to a new position upon uncloning.
Standard base-backed walls often masked this bug because their local
placement is usually Identity (0,0,0), but they would also fail if moved
independently of their base.

This fix assigns the clone's current placement directly to the new
object, preserving its position.

Fixes https://github.com/FreeCAD/FreeCAD/issues/26929

* BIM: do placement assignment and recompute only once
2026-03-02 21:58:45 +01:00
Roy-043 64a4cee116 BIM: remove switch to profile beam creation based on dimensions
Fixes #28013.

When creating a structure from a profile the code could ignore `self.bmode` (beam-mode) and create a beam even if the user selected the column option in the task panel.

Rounding errors due to the conversion of numerical values read from the input boxes triggered the bug (89mm -> 3.5" -> 88.89999999999999mm).

But beyond that, it is IMO not correct to disregard user input. If the column option is specified, a column should be created irrespective of the dimensions.
2026-03-02 21:17:56 +01:00
jffmichi fe25d8d0f7 CAM: Fix new CAM simulator on macOS 2026-03-02 11:32:02 -06:00
Florian Foinant-Willig be1ec84709 Sketcher: extend Perpendicular constraint to point point line 2026-03-02 11:30:55 -06:00
Roy-043 ffab288f4e Draft: fix clone diffuse color regression
Fixes #27958.

Delay formatting of clone object to ensure shape availability.
2026-03-02 17:13:13 +00:00
Kacper Donat 2fb271ff28 Gui: Clear cached shape after change to Deviation 2026-03-02 11:12:36 -06:00
marioalexis 617db3a2d4 Fem: Remove deprecated Calculix implementation 2026-03-02 11:09:34 -06:00
nishi 2d6e49cb7f Measurement: label drag when infront of model (#27832)
Co-authored-by: Nishendra Singh <snishendra@student.ethz.ch>
2026-03-02 11:08:54 -06:00
chris jones @ipatch 7d454121de core: fix issue #26478 select all instances even in group with mirror'd objects + unit tests 2026-03-02 11:05:45 -06:00
Grzegorz Kwacz ba404c03ef Spreadsheet: Don't show overlay 2026-03-02 11:04:47 -06:00
sliptonic 8faaa60a0a Merge pull request #27860 from petterreinholdtsen/cam-fanuc-post-crash-fix
CAM: Implemented Fanuc thread tapping and fixed crash in post processor.
2026-03-02 10:59:12 -06:00
chris jones @ipatch 7e7045577f fixes #27968 material: sunset usage of reinterpret_cast 2026-03-02 10:53:08 -06:00
Roy-043 93e537f3b3 BIM: BIM_DrawingView: always create Cut lines view
Fixes #27803.

As suggested by @semhustej: always create the "Cut lines" view, even of there are no solids (yet) that intersect the section plane.
2026-03-02 15:03:28 +00:00
Roy-043 da584c2c84 BIM: fix window hinge direction if edge has no delta Z
Fixes #24903.

If the global Z-coordinates of the endpoints of the hinge edge are equal, compare the local Z-, Y- or X-coordinates instead.
2026-03-02 15:02:22 +00:00
Roy-043 d6479d055d BIM: change TD BIMView linecaps to square 2026-03-02 15:00:54 +00:00
Roy-043 1f848b4d78 BIM: remove superfluous transaction handling when editing IFC props
As pointed out here:
https://github.com/FreeCAD/FreeCAD/pull/26758#issuecomment-3830289031
2026-03-02 14:59:47 +00:00
freecad-gh-actions-translation-bot b78b0a7d60 Update translations from Crowdin 2026-03-02 08:17:01 +01:00
Furgo d321a330ee squash with structure 2026-03-02 07:01:48 +01:00
Furgo 6a4697c74d BIM: _Equipment uses generic options task box on edit 2026-03-02 07:01:48 +01:00
Furgo f329584eb5 BIM: _Structure uses generic options task box on edit 2026-03-02 07:01:48 +01:00
Furgo 6a76d22d76 BIM: _Space uses generic options task box on edit 2026-03-02 07:01:48 +01:00
Furgo 6c85e4a6a2 BIM: Truss uses generic options task box on edit 2026-03-02 07:01:48 +01:00
Furgo d9dc07c890 BIM: _CurtainWall uses generic options task box on edit 2026-03-02 07:01:48 +01:00
Furgo 5199c47c2d BIM: _Panel uses generic options task box on edit 2026-03-02 07:01:48 +01:00
Furgo aade9e1eed BIM: Component provides a reusable options task box 2026-03-02 07:01:39 +01:00
sliptonic 07cc653e66 Merge pull request #27990 from jffmichi/cam_remove_dogbone
CAM: Remove remaining reference to deprecated Dogbone dressup
2026-03-01 21:43:14 -06:00
jffmichi 3a05cb2756 CAM: Remove remaining reference to deprecated Dogbone dressup 2026-03-02 00:19:40 +01:00
Parag Debnath 230b64f2f5 Gui: Add shortcut for save a copy (#27966)
* added shortcut for save copy

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

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

* Ctrl+Alt+Shift+S to save a copy

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

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

---------

Co-authored-by: Parag Debnath <paragforwork@gmail.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2026-03-01 19:42:54 +01:00
Ladislav Michl 1e982cae1f PD: Remove unused remapSupportShape 2026-02-28 23:20:31 +01:00
Ladislav Michl 1ed0e153dc PD: Remove unused parameter from getTopoShapeVerifiedFace 2026-02-28 23:20:17 +01:00
Petter Reinholdtsen 263bfe9948 CAM: Updated Fanuc test and support methods to match working post script.
The thread tapping is corrected and the test code is adjusted to match.
2026-02-28 22:11:15 +01:00
Chris Hennes 61418544a5 Base: Fix typo unexpection->unexpected 2026-02-28 19:57:41 +01:00
Petter Reinholdtsen df1a1ab981 CAM: Implemented Fanuc thread tapping and fixed crash in post processor.
The current post processor fail completely for any operation because the
ShapeName attribute no longer exist.  Changed code to look for attributes
present in FreeCAD 1.1 and master branch.  Rewrote thread tapping code
to work with new tapping support. Switched thread tapping to use feed in
distance per minute (G94) instead of earlier distance per revolution to
avoid switching between mm/min and mm/rev for different operations.

Fixes #27814
2026-02-28 19:38:19 +01:00
Wiljam Holmes 6dfe193428 Sketch: Rename "Attachment Editor" to "Edit Attachment" in context menu 2026-02-28 11:12:01 -06:00
sliptonic ec4dcde60c Merge pull request #27585 from tarman3/holes_auto
CAM: Drillable - Auto-select optimizations
2026-02-28 09:26:33 -06:00
sliptonic df3809e66b Original dogbone dressup has been deprecated for more than 4 years.
Dogbone II is stable.
Removing the deprecated code and tests
2026-02-28 08:47:38 -06:00
FilippoR 8653d94287 App: Add #include <climit> and switch to std::numeric_limits (#27742)
* add missing include to fix compilation on Fedora 44
* change short limit notation
2026-02-28 08:02:23 -06:00
Benjamin Nauck 93f76a8991 Merge pull request #27854 from 3x380V/signal
Part: Use signal handlers based on OCC's implementation
2026-02-28 13:58:19 +01:00
Syres916 34d03ebee6 [Mesh] Stop repeated /home/username/freecad-daily-source/src/Mod/Mesh/App/WildMagic4/Wm4MathMCR.h:30:50: warning: backslash-newline at end of file 2026-02-28 13:45:12 +01:00
wmayer 512cf349f9 Part: Use Part::SignalException in FCBRepAlgoAPI_BooleanOperation::Build
This avoids a hard crash as reported in issue 19403 and still shows the stack trace
2026-02-28 10:11:03 +01:00
wmayer 2eb4dc7c73 Part: Use signal handlers based on OCC's implementation 2026-02-28 10:11:03 +01:00
wmayer be5e657a61 Core: Refactor code to install new and SIGSEGV handlers 2026-02-28 10:11:00 +01:00
PaddleStroke 821596140d Assembly: Show Solver Task only when in Assembly workbench (#27502) 2026-02-28 08:17:43 +01:00
Chris Hennes 0c66d18c21 Wide character support for env vars on windows (#27626)
* Base: Move wstring conversion into Base::Tools

* App: Switch Windows calls from getenv to GetEnvironmentVariableW

* Apply suggestion from @kadet1090

---------

Co-authored-by: Kacper Donat <kadet1090@gmail.com>
2026-02-28 04:02:30 +00:00
Krish Sharma 9ac1b960a6 App: Improve clarity of out-of-scope link error message (#26776) 2026-02-27 21:53:57 -06:00
theo-vt 68b3d8d6e4 App.DocumentObserver: set toPython in all constructors 2026-02-27 21:30:00 -06:00
Adam Spontarelli 88787b11d1 Changed Insert Component parts list to be collapsed by default (#27658)
* Changed Insert Component parts list to be collapsed by default

* only collapse large assemblies and only expand first child.

---------

Co-authored-by: Adam Spontarelli <adam@vector-space.org>
2026-02-27 18:43:28 -06:00
wmayer 8caa218950 Sketcher: Handle exception in DrawSketchHandlerOffset::drawOffsetPreview
Do not let exception slip through Qt event handlers as this is known to cause a crash on macOS.

This fixes issue 19587
2026-02-28 01:33:35 +01:00
wmayer 61d17a6122 Part: Fix crash in Revolution::execute()
If a datum line is used as base shape then it causes a segmentation
fault because the shape is infinite that the CAD kernel fails with.

Solution:
Explicitly check beforehand if the shape is infinite or null.

This fixes issue 21429
2026-02-28 00:38:21 +01:00
wmayer d588e89d1d Gui: Do not allow to activate disabled workbench
Change Command::_assureWorkbench to check if the passed workbench is
disabled or not. If yes then do nothing.

This fixes issue 21477.

Hint: The method Application::activateWorkbench() is still able to
activate a disabled workbench
2026-02-27 23:45:37 +01:00
Chris Hennes 92ebf00cc4 Gui: Add attempted lock file name when IPC fails 2026-02-27 23:37:33 +01:00
Chris Hennes b37da5b3cc App: Check for empty path component name before appending 2026-02-27 23:37:03 +01:00
Chris Hennes 3d60531390 TD: Migrate version check to ProgramVersion class
Eliminates a use of deprecated `sscanf`
2026-02-27 23:30:37 +01:00
Chris Hennes ac576bc05e Part: Migrate version check to ProgramVersion class
Also add v1.2 to the recognized program version enumeration.
2026-02-27 23:30:11 +01:00
Chris Hennes 07e94dfaae Part: Eliminate use of sscanf
Replace with safer modern C++ `std::from_chars` (plus some additional
validation for expected inputs). Includes unit tests for new function.
2026-02-27 23:29:31 +01:00
Chris Hennes b4325de672 Core: Allow implicit construction of QString from ASCII 2026-02-27 23:21:17 +01:00
tarman3 b9b8d4023f CAM: Exporting G-code - Buttons text 2026-02-27 22:56:40 +02:00
tarman3 eb0d7ba6a5 CAM: CircularHoleBase.holeDiameter() - Remove useless obj 2026-02-27 20:43:56 +02:00
tarman3 eaf76e4d0a CAM: CircularHoleBase.holeDiameter() - Fix face 2026-02-27 20:41:07 +02:00
sliptonic b8f98e2842 Merge pull request #27040 from Dimitris75/CAM-Waterline-OCL-Adaptive-Add-Optimize-Linear-Paths
CAM: Waterline OCL Adaptive - Adding Optimize Linear Paths - Removing BoundBox ComboBox
2026-02-27 11:57:53 -06:00
sliptonic 2b98e80313 Merge pull request #27091 from Connor9220/ToolbitSubClass
CAM: Refactor shape type handling for aliases and subtypes
2026-02-27 11:53:47 -06:00
Chris Hennes 659780c31b Tests: Add QtTests run to CI 2026-02-27 11:30:55 -06:00
Dhruv Singh Jamwal 7be33f496e Gui: Prevent camel case splitting on numbers/symbols in Property Editor 2026-02-27 11:30:21 -06:00
sliptonic 51cff10dcc Merge pull request #24849 from tarman3/leadinout_arcz
CAM: LeadInOut - ArcZ following profile
2026-02-27 11:28:06 -06:00
sliptonic c9517011d2 Merge pull request #27504 from tarman3/holes_face_multiple_edges
CAM: CircularHoleBase - Fix holePosition() for face with several arcs
2026-02-27 11:25:20 -06:00
sliptonic 7deca678ca Merge pull request #27686 from tarman3/base_addgeometry_apply
CAM: Base Task Panel - Fix Apply after adding geometry
2026-02-27 11:14:21 -06:00
sliptonic 8a011392bc Merge pull request #27178 from davidgilkaufman/fix_big_arcs
[CAM] separate tolerance variable used for arc fitting from tolerance used for section height offsets
2026-02-27 10:43:50 -06:00
Chris Hennes 0872d45827 Merge pull request #27099 from timpieces/expressionparser-improvements
ExpressionParser: Return unique_ptr from public interface (#27098)
2026-02-27 09:51:08 -06:00
dependabot[bot] e292f96feb Bump actions/upload-artifact from 6.0.0 to 7.0.0
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 6.0.0 to 7.0.0.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v6...v7)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-version: 7.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-02-27 09:48:11 -06:00
FEA-eng 46dd3badbd Replace "Change Image" option name for clarity (#27913) 2026-02-27 13:46:21 +01:00
Benjamin Nauck 8694ccf754 Merge pull request #27862 from marioalexis84/fem-material_nonlinear
Fem: MaterialMechanicalNonlinear grouped under MaterialSolid
2026-02-26 21:32:02 +01:00
sliptonic 4878248572 Merge pull request #27859 from Doriangaensslen/d_dev
CAM: Move ThreadMilling and Tapping from experimental to standard
2026-02-26 14:08:31 -06:00
Furgo 2ee49e0647 BIM: _Wall options task box gains expressions and units support 2026-02-26 20:20:40 +01:00
Parag Debnath ca575acf1e Renamed '3d View' to 'Pick Position'. 2026-02-26 20:11:34 +01:00
marioalexis 046be9efc5 Fem: Update examples 2026-02-26 15:07:57 -03:00
marioalexis a1acc9cf38 Fem: Improve nonlinear properties 2026-02-26 15:07:57 -03:00
Roy-043 bfb0e203da Revert " Draft: fix ghost preview of Arch_SectionPlane and Draft_WorkingPlane…"
This reverts commit 37600b85a0.
2026-02-26 17:17:44 +01:00
Benjamin Nauck f319a57252 Merge pull request #27835 from 3x380V/fem 2026-02-26 17:09:50 +01:00
wmayer e1b9cbf48a FEM: Fix build warnings 2026-02-26 13:44:40 +01:00
wmayer d60deb6fb6 Fem: Optimize netgen mesh creation
When pressing the Apply button the fem mesh feature is computed but still
marked as touched. When pressing the OK button it will be recomputed even
if nothing has changed. To avoid the superfluous recompute purge the
touched flag when the Apply button is pressed.
2026-02-26 13:34:58 +01:00
tarman3 7cb5c2663d CAM: CircularHoleBase.holePosition() - Remove useless obj 2026-02-26 13:43:39 +02:00
tarman3 5e0695d150 CAM: CircularHoleBase.holePosition() - Fix for face with several arcs 2026-02-26 13:43:39 +02:00
Louis Gombert 0df693e204 Remove extra header define checks (#27851) 2026-02-25 22:46:40 -06:00
dependabot[bot] b6c8e68eda Bump step-security/harden-runner from 2.14.2 to 2.15.0
Bumps [step-security/harden-runner](https://github.com/step-security/harden-runner) from 2.14.2 to 2.15.0.
- [Release notes](https://github.com/step-security/harden-runner/releases)
- [Commits](https://github.com/step-security/harden-runner/compare/5ef0c079ce82195b2a36a210272d6b661572d83e...a90bcbc6539c36a85cdfeb73f7e2f433735f215b)

---
updated-dependencies:
- dependency-name: step-security/harden-runner
  dependency-version: 2.15.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-02-25 22:43:52 -06:00
sliptonic a17bb6bf10 Merge pull request #27013 from tarman3/CmdMoveMill
CAM: Path.Geom.CmdMoveMill
2026-02-25 18:31:26 -06:00
Kacper Donat e62d68a49e Gui: Improve visuals of checked toolbar buttons 2026-02-25 21:05:05 +01:00
Kacper Donat 1a8840bff9 Part: Make 3D View properly checkable
This commit fixes the 3D View button in "Location" sections in Part GUI
to stay pressed when it is active.
2026-02-25 21:05:05 +01:00
tarman3 4a773d2f6a CAM: Refactor CmdMoveMill 2026-02-25 20:49:22 +02:00
tarman3 9972df7c1d CAM: Path.Geom.pointsCoincide - allow list and tuple 2026-02-25 20:40:19 +02:00
tarman3 97cf569756 CAM: PathScripts/PathUtils.py - Get CmdMove from Geom 2026-02-25 20:38:49 +02:00
tarman3 6620e149a5 CAM: Path.Geom.CmdMoveMill 2026-02-25 20:38:41 +02:00
sliptonic f2063c055f Cam constants (#27861)
* CAM: Create a more accessible CONSTANTS file

* Changes to make the tests less noisy

* Update src/Mod/CAM/CONSTANTS.py

Co-authored-by: tarman3 <joice501790018@tutamail.com>

* missing cmake change

* maintainer feedback

---------

Co-authored-by: tarman3 <joice501790018@tutamail.com>
2026-02-25 19:11:33 +01:00
Chris Hennes ad50c6eb64 Merge pull request #27428 from kadet1090/add-style-parameter-tuples
Gui: Add Tuple type to StyleParameters
2026-02-25 08:28:50 -06:00
tarman3 657a34b48a CAM: Drillable - allowPartial for faces 2026-02-25 08:07:07 +02:00
Dorian Gaensslen d5397516b5 move thread milling out of experimental too 2026-02-24 21:38:31 +01:00
Dorian Gaensslen 4895bea741 Forum Thread 49591, move from Experimental to standard 2026-02-24 21:11:44 +01:00
tarman3 9abcdad176 CAM: Drillable - Auto-select faces with number edges more than 3 2026-02-24 21:22:04 +02:00
tarman3 e643328599 CAM: Drillable - Optimizations for Auto-select 2026-02-24 21:20:54 +02:00
marioalexis 9c9bf18478 Fem: Set pipeline time info for new CalculiX 2026-02-24 16:15:57 -03:00
marioalexis c1ca8a79c9 Fem: Add method to set pipeline time info data 2026-02-24 16:00:51 -03:00
theo-vt 34ae16cd01 Sketcher: fix evaluation of driven diameter constraint 2026-02-24 19:54:53 +01:00
Ladislav Michl 6d9201c828 PD: Avoid QString to std::string back and forth conversion
Fixes Qt5 build.
2026-02-24 11:30:24 -06:00
sliptonic ab2f655245 Merge pull request #26131 from tarman3/axismap
CAM: Axismap Dressup - Invert rotary axis
2026-02-24 09:34:17 -06:00
Roy-043 650b15dd76 Draft: fix anno style assignment regression
Fixes #27822.

Break statement had wrong indentation.
2026-02-24 13:03:25 +01:00
Syres916 ab5ef99344 [MeshPart] Fix string encoding document, object and subobject names 2026-02-24 00:28:35 -06:00
tarman3 0a4f6ec7c4 CAM: Drillable - Remove raisedFeature() 2026-02-24 06:20:11 +02:00
tarman3 2e7261eec3 CAM: Drillable - Fix linter errors 2026-02-24 06:20:11 +02:00
ᴩʜᴏɴᴇᴅʀᴏɪᴅ e89d849bb7 [ Sketcher ]: Fix Windows Include (#27829) 2026-02-23 21:35:35 -06:00
PaddleStroke 3c860396d8 TechDraw: Annotation tool rework (#24624) 2026-02-24 00:59:15 +00:00
Parag Debnath acb14726b6 Part: add missing tooltips to Location task panel (fixes #27736) 2026-02-23 21:41:16 +01:00
Louis Gombert 0b44a3f6c8 Sketcher: Optimize eliminateNonZerosOverPivotInUpperTriangularMatrix for sparse matrices
Matrix processing function eliminateNonZerosOverPivotInUpperTriangularMatrix tried to eliminate ALL non zero values in the upper triangle, even values under a small epsilon. This makes the routine take much more time than it should be. Not considering small values significantly speeds it up, ultimately increasing sketch constraint solving performance.
2026-02-23 18:30:54 +01:00
tarman3 26a1e452c0 CAM: Profile - Fix 2 equal length edges 2026-02-23 11:30:01 -06:00
PaddleStroke 4deb889057 Assembly: Fix mirrored links not working. (#26090) 2026-02-23 11:29:27 -06:00
xtemp09 59370eeb23 [GUI] Prevent double click event on visibility icon (#26043) 2026-02-23 11:26:15 -06:00
theo-vt 92894ea3a8 Sketcher: Evaluate driven constraints rather than solving them (#26632) 2026-02-23 11:14:22 -06:00
Loke Strøm f153960396 Measurement: Added disc/circular faces measurements radius, diameter and area. (#27415)
* Added disc measurements radius, diameter and area.

* [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>
2026-02-23 18:04:01 +01:00
Paul Ebbers e591fe0901 GUI: Add wrap-around to search in parameters (#24772) 2026-02-23 11:02:55 -06:00
sliptonic 88e7c60414 Merge pull request #27788 from petterreinholdtsen/cam-fanuc-fix-drilling
CAM: Adjusted fanuc post processor to always use required drill parameters.
2026-02-23 10:54:41 -06:00
Yash Suthar 1c0ac9a269 Measure: fix measurements are saved if exit tool by opening a sketch
Signed-off-by: Yash Suthar <yashsuthar983@gmail.com>
2026-02-23 10:47:21 -06:00
PaddleStroke 194ec0820c PartDesign: UpToFace to plane in LCS (#27637)
* PartDesign: UpToFace to plane in LCS

* Update TaskSketchBasedParameters.cpp
2026-02-23 10:46:05 -06:00
tarman3 ab1b3246d4 CAM: AxisMap Dressup - Add 'Invert' to Task panel 2026-02-23 18:42:48 +02:00
tarman3 27b74f3ba3 CAM: AxisMap Dressup - Deflection 2026-02-23 18:42:47 +02:00
tarman3 1396309093 CAM: AxisMap Dressup - Invert axis 2026-02-23 18:42:42 +02:00
Kacper Donat cd19a3cee5 Merge pull request #27127 from alfrix/fix_tapered
PD: hole fix tapered threads not cutting properly
2026-02-23 17:42:24 +01:00
Benjamin Nauck 7923614124 Merge pull request #27367 from 3x380V/app
App: Random fixes 3
2026-02-23 14:09:23 +01:00
captain0xff f238a5f4e5 CAM: fix the transform tool 2026-02-23 11:07:37 +01:00
wmayer 26c2d7a77c App: Fix linter warnings 2026-02-23 10:12:38 +01:00
wmayer 05ef4153f5 App: Add overloaded method Application::closeDocument 2026-02-23 10:12:38 +01:00
wmayer 7a392c4d99 App: Add overloaded method Document::removeObject 2026-02-23 10:12:38 +01:00
wmayer 0eb01c636c App: Fix PropertyFileIncluded::SaveDocFile
Before trying to access the filename check whether it isn't set.
In this case print a warning and return.
2026-02-23 10:12:38 +01:00
wmayer af5c40d8e8 App: Fix some linter warnings 2026-02-23 10:12:38 +01:00
wmayer e4b6e5ab43 App: Add convenience methods to DocumentT and DocumentObjectT 2026-02-23 10:12:38 +01:00
wmayer 322da60cb2 Fix macro Q_DISABLE_COPY_MOVE 2026-02-23 10:12:38 +01:00
Furgo 99d142af38 BIM: rename obsolete Mesh property to HiRes (#27783)
* BIM: rename obsolete Mesh property to HiRes

* BIM: remove unused createMeshView function

* BIM: remove all remaining references of Mesh
2026-02-23 08:09:40 +01:00
freecad-gh-actions-translation-bot 23df715e24 Update translations from Crowdin 2026-02-22 22:04:19 -06:00
marioalexis 159059fc7d Fem: Fix import vtk Python module 2026-02-22 21:51:32 -06:00
marioalexis d4c28786df Fem: Add displace mesh option to CalculiX 2026-02-22 16:29:45 -06:00
ᴩʜᴏɴᴇᴅʀᴏɪᴅ ca9e1ecdf3 All: Header Guards ➞ Pragma Once (#27154) 2026-02-22 16:28:20 -06:00
Max Wilfinger 3a241c5515 Merge pull request #27775 from marioalexis84/fem-elmer_text_output
Fem: Load Elmer text output
2026-02-22 21:30:32 +01:00
tarman3 144f1843fa CAM: Axismap Dressup - Refactoring 2026-02-22 21:36:06 +02:00
tarman3 92a23ca21b CAM: Axismap Dressup - Remove _linear2angular() 2026-02-22 21:36:06 +02:00
tarman3 a57ea57dba CAM: AxisMap Dressup - Remove _stripArcs() 2026-02-22 21:36:06 +02:00
tarman3 0fce2611ad CAM: Base Task Panel - Fix Apply after adding geometry 2026-02-22 16:38:20 +02:00
Morten Vajhøj cc626f88b1 Measurement: Moved buttons to top (#27774)
* Moved button position

* Remove command

Remove setting button position in TaskMeasure constructor.
2026-02-22 12:01:16 +01:00
Petter Reinholdtsen 954a1239f3 Adjusted fanuc post processor to always use required drill parameters.
At least for G73, the Z, Q and R parameters seem to be required.
Assuming drill related parameters are required for all drill
operations to err on the safe side.

Fixes #27413
2026-02-22 09:56:33 +01:00
marioalexis 1e51d10de8 Fem: Enable keep results on rerun option for new CalculiX 2026-02-21 18:40:13 -03:00
marioalexis e116b5ae34 Fem: Load Elmer solver text output 2026-02-21 18:40:06 -03:00
Max Wilfinger 7001255e90 Merge pull request #27749 from marioalexis84/fem-elmer_examples_run
Fem: Run Elmer examples - fixes #27547
2026-02-21 22:04:22 +01:00
Furgo b36991b239 BIM: initial implementation of Sliding Door preset (#27375)
* BIM: initial implementation of sliding door preset

* BIM: fix sliding door context menus

* BIM: limit travel distance

* BIM: increase preset indexes for icons

* BIM: update edit task panel to adapt to sliding doors

* BIM: make rotation/translation data exclusive or

* BIM: remove code duplication for Sliding and -Sliding doors

* BIM: refine travel distance clamping to expose handle

* BIM: make sliding direction independent of geometry direction

* BIM: remove non-visible 2D symbol for now

* BIM: make door leaf wire comment more precise

* BIM: use local coordinates when calculating the start/end points for the sliding track
2026-02-21 19:10:46 +00:00
Max Wilfinger d3496b0458 Merge pull request #27616 from WandererFan/nearestFractionFillTemplateFields
TechDraw: Fix fillTemplateFields returns unusual fractional scale
2026-02-21 16:01:46 +01:00
Max Wilfinger 23f046075a Merge pull request #27577 from pieterhijma/fix-fem-analysis-toggle 2026-02-21 13:54:04 +01:00
Chris Hennes 359e1033ec Addon Manager: Update to 2026-02-19 2026-02-21 13:49:47 +01:00
tarman3 c9518817c6 CAM: Path.Op.Area - Offer side 2026-02-21 08:45:24 +02:00
dependabot[bot] 2fda119f74 Bump korthout/backport-action from 3.4.1 to 4.1.0
Bumps [korthout/backport-action](https://github.com/korthout/backport-action) from 3.4.1 to 4.1.0.
- [Release notes](https://github.com/korthout/backport-action/releases)
- [Commits](https://github.com/korthout/backport-action/compare/d07416681cab29bf2661702f925f020aaa962997...01619ebc9a6e3f6820274221b9956b3e7365000a)

---
updated-dependencies:
- dependency-name: korthout/backport-action
  dependency-version: 4.1.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-02-20 20:20:14 -06:00
chris jones @ipatch 1d6b2a4cca core: git: alphabetize entries in .gitignore and add entry for .clangd 2026-02-21 01:05:06 +01:00
Billy Huddleston 69b1b19024 CAM: Refactor shape type handling for aliases and subtypes
This PR intruduces a way to dynamicly alias toolbits and adds subtype
for toolbits. Prior to this change, aliases were hardcoded in multiple
locations, making it difficult to maintain and extend. Now, aliases
and the newly subtypes are defined in a single JSON file, which is
loaded at runtime. This allows for easier management and addition of new
aliases or subtypes without modifying the codebase.

Updated the shape system to use a dict format for aliases and subtypes,
improved label formatting, and fixed normalization logic for toolbit
types. Enhanced dropdown display and editor logic to properly handle
subtypes and aliases, including special cases for consecutive capitals.

Users can add shape_aliases.json to the toolbit Shape dirctory allowing
theme to add/remove entries.  Adding a "!" in front of a alias or a
subtime removes it from the list.

This PR also introduces the ability for  the user to choose tools from
a libary or all tools when adding tools via the Job panel.

src/Mod/CAM/Path/Tool/docobject/ui/docobject.py:
- Added keep_case and preserve_consecutive_caps options to
_get_label_text for improved label formatting

src/Mod/CAM/Path/Tool/shape/__init__.py:
- Refactored alias/subtype loading to support new dict format
- Applied aliases and subtypes to shape classes

src/Mod/CAM/Path/Tool/shape/models/base.py:
- Added subtypes attribute to ToolBitShape
- Updated class lookup to support subtypes

src/Mod/CAM/Path/Tool/toolbit/models/base.py:
- Improved normalization logic for aliases and subtypes in
ToolBit.from_dict

src/Mod/CAM/Path/Tool/toolbit/ui/editor.py:
- Updated editor logic to use subtypes and aliases for dropdowns
- Improved read-only and editable state handling

src/Mod/CAM/Path/Tool/toolbit/ui/typefilter.py:
- Used _get_label_text for dropdown filter display with improved
formatting

src/Mod/CAM/Tools/Shape/shape_aliases.json:
- Converted to new dict format with separate aliases and subtypes
2026-02-20 18:48:46 -05:00
sliptonic e3857b11a1 Merge pull request #26818 from tarman3/engrave_fix_taskpanel
CAM: Engrave - Fix regression in Task panel after #22304
2026-02-20 12:02:57 -06:00
sliptonic 6a4b6af094 Merge pull request #27389 from tarman3/path_length
CAM: Fix calculation arc move length
2026-02-20 12:00:47 -06:00
sliptonic 088b384216 Merge pull request #27704 from tarman3/leadinout_g00
CAM: LeadInOut - Replace G00 and G01 by G0 and G1
2026-02-20 11:57:10 -06:00
sliptonic 3f83c820d5 Merge pull request #24958 from tarman3/startPoint
CAM: Profile - Start point in the middle of longthest edge
2026-02-20 11:05:53 -06:00
marioalexis 49652e3c60 Fem: Update and clean up examples and test 2026-02-20 13:01:07 -03:00
marioalexis f8e5a92b98 Fem: Add base class for solver and mesher tools 2026-02-20 10:43:49 -03:00
marioalexis 6f8e9f1a9e Fem: Add Tool property to solvers and meshers 2026-02-20 10:43:49 -03:00
chris jones @ipatch b026958f80 part: fixes #27592 add tooltips for part primitives 2026-02-20 10:14:16 +01:00
marcuspollio d90b6ebd0d Gui: Add line selection to TextEditor 2026-02-19 22:24:40 -06:00
dependabot[bot] 0327534ffe Bump actions/upload-artifact from 5.0.0 to 6.0.0
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 5.0.0 to 6.0.0.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v5...v6)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-version: 6.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-02-19 16:20:29 -06:00
dependabot[bot] b4e690d9cb Bump actions/download-artifact from 6.0.0 to 7.0.0
Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 6.0.0 to 7.0.0.
- [Release notes](https://github.com/actions/download-artifact/releases)
- [Commits](https://github.com/actions/download-artifact/compare/018cc2cf5baa6db3ef3c5f8a56943fffe632ef53...37930b1c2abaa49bbe596cd826c3c89aef350131)

---
updated-dependencies:
- dependency-name: actions/download-artifact
  dependency-version: 7.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-02-19 16:20:17 -06:00
wandererfan ba24ab8a49 [TD]fix unhelpful warning message 2026-02-19 15:30:48 -05:00
wandererfan b0e11e286b [TD]use thin line for smooth edges 2026-02-19 15:30:48 -05:00
Pieter Hijma 94c722d285 Fem: Improve visibility toggling Result and Solver 2026-02-19 16:28:00 +01:00
Roy-043 ddb54cce65 BIM: workaround for WP switch crash (issue #26539) (#27373) 2026-02-19 09:26:35 -06:00
Pieter Hijma 0339458869 Core: Disable toggling visibility text document 2026-02-19 16:22:55 +01:00
Furgo 85e0038515 BIM: Set default value of 'MoveWithHost' property to True (#27685) 2026-02-19 14:39:44 +01:00
Yash Suthar f67088a970 Measure: Fix crash while dragging label of unsaved measurment
Signed-off-by: Yash Suthar <yashsuthar983@gmail.com>
2026-02-19 07:36:43 +01:00
Nathan Schulte 99016e37ed Gui: Add startup log when missing SVG support (#27694) 2026-02-18 18:00:14 -06:00
PaddleStroke be6af47f29 Sketcher: Offset: add checkbox tooltips (#26114) 2026-02-18 21:02:54 +00:00
tarman3 c29868cd48 CAM: LeadInOut - Replace G00(1,2,3) by G0(1,2,3) 2026-02-18 20:43:44 +02:00
dependabot[bot] 45f65f643d Bump actions/stale from 10.1.0 to 10.2.0
Bumps [actions/stale](https://github.com/actions/stale) from 10.1.0 to 10.2.0.
- [Release notes](https://github.com/actions/stale/releases)
- [Changelog](https://github.com/actions/stale/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/stale/compare/5f858e3efba33a5ca4407a664cc011ad407f2008...b5d41d4e1d5dceea10e7104786b73624c18a190f)

---
updated-dependencies:
- dependency-name: actions/stale
  dependency-version: 10.2.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-02-18 13:41:16 +01:00
paul aa4a71b55b [ArchWall] Fix Regression: sortSketchWidth only in addon (#27676)
* [ArchWall] Fix Regression: sortSketchWidth only in addon

Regression was introduced when get_width() method uses ArchSketchObject.sortSketchWidth() function in below lines.

https://github.com/FreeCAD/FreeCAD/blob/468269b9a6ea58cd8b0f9d8579b711c530db83b2/src/Mod/BIM/ArchWall.py#L1668-L1673
        if not lwidths:
            if obj.OverrideWidth:
                if obj.Base and obj.Base.isDerivedFrom("Sketcher::SketchObject"):
                    lwidths = ArchSketchObject.sortSketchWidth(
                        obj.Base, obj.OverrideWidth, obj.ArchSketchEdges
                    )

ArchSketchObject.sortSketchWidth() function is not in the FC core ArchSketchObject.py module and this results in error.  This function would only exist when the external add-on is present and loaded.

Previously, a try/exception test was used; now hasattr() is used in this fix to test the presence of the required function before it is used.

* [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>
2026-02-18 11:49:33 +01:00
Yash Suthar 2d3b0a2ded Measure: ix angle measurement for face and edge selection
Signed-off-by: Yash Suthar <yashsuthar983@gmail.com>
2026-02-18 09:21:17 +01:00
Louis Gombert 3bad5dabde Add missing NOLINTEND clang-tidy comment 2026-02-17 15:26:14 -06:00
PaddleStroke bd07c8a214 Sketcher: OVP Fix tab not working when mouse move (#27638)
* Sketcher: OVP Fix tab not working when mouse move

* [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>
2026-02-17 22:02:36 +01:00
Benjamin Nauck 99f4776fda Merge pull request #27381 from furgo16/bim-window-task-panel
BIM: add window options task box
2026-02-17 18:52:33 +01:00
Furgo c788a88d6a BIM: simplify value assignment for quantity spinboxes
Co-authored-by: Roy-043 <70520633+Roy-043@users.noreply.github.com>
2026-02-17 17:19:55 +01:00
Furgo 6f0b1fca3d BIM: use the correct widget for percentages 2026-02-17 17:19:55 +01:00
Furgo 9fad0ed223 BIM: add window options task box 2026-02-17 17:19:55 +01:00
dependabot[bot] fca58d99ed Bump actions/cache from 4.3.0 to 5.0.3
Bumps [actions/cache](https://github.com/actions/cache) from 4.3.0 to 5.0.3.
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](https://github.com/actions/cache/compare/0057852bfaa89a56745cba8c7296529d2fc39830...cdf6c1fa76f9f475f3d7449005a359c84ca0f306)

---
updated-dependencies:
- dependency-name: actions/cache
  dependency-version: 5.0.3
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-02-17 09:08:42 -06:00
bdieterm 468269b9a6 TemplatePyMod: fix DocumentObject for newer FreeCAD versions (#27662)
* TemplatePyMod: fix DocumentObject for newer FreeCAD versions

original bug report:
https://forum.freecad.org/viewtopic.php?p=873546

* TemplatePyMod: fix FeaturePython example for newer FreeCAD versions
2026-02-17 10:07:58 +01:00
Louis Gombert 289411f51c Move costly boost includes out of core headers
Use pimpl or move definitions to .cpp files in order to avoid including huge Boost headers in core FreeCAD headers. Due to boost inclusions in a few core headers, boost graph utilities, multi index and predicates headers were included in in a large portion of translation units, without them being actually required. This helps reduce build time of the project.
2026-02-16 21:58:36 -06:00
Chris Hennes f83aaf0e59 Merge pull request #25538 from marioalexis84/fem-clean_dlg_settings
Fem: Remove unnecessary code
2026-02-16 11:14:31 -06:00
xtemp09 f1d79d9ab4 [GUI] Make precision of QuantitySpinBox accessible from Python 2026-02-16 11:13:52 -06:00
marbocub bc3c0dc19a Sketcher: Add symmetric constraint option (an element + a symmetry line) (#25525) 2026-02-16 11:05:56 -06:00
Steven James 8567dce28a FeaturePython objects include the Python class's __repr__ it their __repr__ (#24462) 2026-02-16 10:57:14 -06:00
Chris Hennes 72a024aaeb Merge pull request #27587 from WandererFan/BrokenViewRemoveFCBRepAlgoAPI_Cut2
TechDraw: FCBRepAlgoAPI_Cut returns null shape for BrokenView break
2026-02-16 10:51:06 -06:00
xtemp09 e0cd49e670 [Spreadsheet] Syncronize scrollbars in ZoomableView
Closes #27165.
2026-02-16 10:38:56 -06:00
Chris 17d5bca2ec part: fixes #27365 mirror place copy at correct location (#27370) 2026-02-16 10:32:08 -06:00
WandererFan 82ba9ec9d8 fix spelling mistake
Co-authored-by: Chris Hennes <chennes@pioneerlibrarysystem.org>
2026-02-16 09:24:47 -05:00
Furgo d05db60465 BIM: prevent child objects from moving during Arch Wall debasing (#27290)
* BIM: regression test for child object stability during wall debasing

Introduces test_debase_wall_stationary_children to verify that objects
attached to a wall (via Additions or Hosts) retain their global position
when the wall's base is removed and its placement is recalculated.

* BIM: Fix wall debasing to maintain stationary child element positions

Corrects the placement propagation that occurred when Arch.debaseWall()
recalculated the Wall's Placement, causing connected children (Windows,
Additions) to shift their global coordinates.

The fix pins children by capturing their current global placements before
the wall's placement is updated, and immediately restoring those placements
after the wall's transformation is complete.

Fixes: https://github.com/FreeCAD/FreeCAD/issues/27267

* Avoid confusing comment about wall placement in TestArchWall.py

---------

Co-authored-by: Roy-043 <70520633+Roy-043@users.noreply.github.com>
2026-02-16 14:14:34 +00:00
PaddleStroke bb5afb911a Sketcher: Fix loss of expression on trim (#27505) 2026-02-15 20:41:13 -06:00
freecad-gh-actions-translation-bot ec9ead0db9 Update translations from Crowdin 2026-02-15 19:41:17 -06:00
PaddleStroke 94a4017432 Assembly: Bom: fix non-grouping regression 2026-02-15 19:03:06 -06:00
Louis Gombert 5f89fd4e98 Replace deprecated QImage::mirrored by QImage::flipped
QImage::mirrored was deprecated and will be deleted by Qt6.13
2026-02-15 18:59:37 -06:00
Grzegorz Kwacz 7b4770c3f2 Remove Navigation from context menu 2026-02-15 18:57:54 -06:00
Chris Hennes f991407900 PD: Return inversion status by reference (#27435)
* PD: Return inversion status by reference

* Update FeatureExtrude.cpp

Co-authored-by: PaddleStroke <pierrelouis.boyer@gmail.com>

---------

Co-authored-by: PaddleStroke <pierrelouis.boyer@gmail.com>
2026-02-16 01:01:37 +01:00
PaddleStroke 47855a018b Assembly: Fix nested assembly stuck isolate bug 2026-02-15 17:50:13 -06:00
wandererfan f60f3d7cc5 [TD]use nearestFraction to get scale 2026-02-15 18:33:09 -05:00
wandererfan bef9d03312 [TD]expose nearestFraction to python 2026-02-15 18:32:06 -05:00
Roy-043 37600b85a0 Draft: fix ghost preview of Arch_SectionPlane and Draft_WorkingPlaneProxy (#27605) 2026-02-15 17:06:44 -06:00
bdieterm ce38741a52 Core: improve Python docstring for Document.addObject 2026-02-15 17:04:19 -06:00
Roy-043 62700a5f12 TemplatePyMod: fix regression due to locked=True mod
Fix regression caused by:
https://github.com/FreeCAD/FreeCAD/commit/a7331cbb43876b14e5e84d1fde1b673e8c381bb7
2026-02-15 12:48:53 -06:00
Furgo 562cac277c BIM: fix coordinate normalization and area calculation for generic ArchComponents (#27322)
* BIM: extend ArchComponent test suite

Adds several unit tests to TestArchComponent.py to validate the
coordinate system logic and CSG behavior of generic Arch Components.

Included tests cover:
- Double-transformation/displacement bugs when using moved base objects.
- Correct alignment of CSG additions/subtractions in world space.
- Consistency of Vertical and Horizontal area calculations for
  rotated components.
- Automatic geometry spreading (arraying) via the Axis property.
- Cleanup behavior ensuring the shape is cleared when the Base
  link is removed.

* BIM: fix double displacement bug and area calculation in ArchComponent

Rewrites ArchComponent.Component.execute to resolve placement
conflicts between the Document Object and its internal TopoShape.

Changes:
- Reset base_shape.Placement to Identity immediately after copying
  from the source. This strips inherited placements from the Base
  object, ensuring the geometry is local before processing.
- Pass the object's placement to processSubShapes. This allows
  additions and subtractions to be correctly localized to the
  component's local origin.
- Replaces direct Shape assignment with self.applyShape(). This fixes
  area calculations by ensuring the AreaCalculator receives the
  correct placement context, and enables automatic geometry
  spreading via the Axis property.

Fixes: https://github.com/FreeCAD/FreeCAD/issues/24580

* BIM: Refine base validation in ArchComponent to prevent stale shapes

Updates the validation logic in ArchComponent.execute() to correctly
handle the removal of a base object.

Changes:
- The check on self.ensureBase(obj) now explicitly looks for
  False. Because ensureBase returns None when no base is present,
  the previous logic would return early and leave the old shape
  behind.
- This change allows the method to fall through to the shape-clearing
  logic, ensuring that unlinking a base object correctly removes its
  geometry from the 3D view.
- Added a TODO note to ensureBase() regarding its undocumented
  triple-state return (True, False, None) for future cleanup.
2026-02-15 17:35:26 +01:00
Kacper Donat fae6cda1d7 Merge pull request #26938 from chennes/macroPathToDefault
Gui: Don't record macro path if default
2026-02-14 20:24:31 +01:00
Chris Hennes 45598fa319 Merge pull request #27552 from hyarion/fix-schema-issues
Base: Fix schema issues
2026-02-14 12:17:51 -06:00
Loke Strøm cbdb615141 Measurement: Fix: Implicit C-string to QString conversions causing build failure (#27580)
* Measurement: Fix: missing tr() wrapping causing build failure

* Swapped tr() with QLatin1String()

* [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>
2026-02-14 09:49:34 +01:00
Chris Hennes 3fecf957cb Points: Switch to modern libE57 types 2026-02-13 23:33:24 +01:00
Chris Hennes 0cacc9bd34 Merge pull request #27363 from 3x380V/import
Import fixes
2026-02-13 15:43:45 -06:00
theo-vt 9cbef0c5ce Sketcher.scale: scale constraint with the right index (#27188) 2026-02-13 15:34:46 -06:00
chris jones @ipatch 4938a6f75b material: fixes #25817 prevent unecessary save over dialogue 2026-02-13 15:32:46 -06:00
PaddleStroke 885b8cf1de Sketcher : SketchObject::getHigherElements fix (#27560) 2026-02-13 15:32:26 -06:00
Pieter Hijma 1bfaa81d77 FEM: Reenable toggling visibility
This reenables visibility toggling for Analysis and Solver objects.
2026-02-13 22:16:03 +01:00
Pieter Hijma 7586620d41 Revert [Core] Remove various DisplayModes from FEM
This reverts commit 5915575f19.
2026-02-13 21:54:02 +01:00
Loke Strøm 5d81f8ac16 Sketcher: Fix: Arc of ellipse when first and second X coordinates are the same (#27327) 2026-02-13 11:57:27 -06:00
Syres916 ba030237b7 [Gui] Ensure Read Only Booleans in PropertyEditor are shown using Disabled Text Color (#27429)
* Ensure read only Booleans are shown using Disabled Text color
* Make the disabled text color a more significant contrast to enabled
* Ensure correct contrasting color for Axis letters versus background color for both Light and Dark themes
2026-02-13 11:56:20 -06:00
Frank David Martínez M f1366e8a75 Base: Remove assertion on isForceXML() (#27491)
This fixes a difference between Main code and LS3 Code ported during TNP big merge. The Issue generates a crash if FreeCAD is compiled in Debug Mode: #27489.
2026-02-13 11:51:52 -06:00
Chris e595cc49f2 FEM: Update netgenplugin src files to fix builds with netgen >= 6.2.2601 (#27508) 2026-02-13 11:50:04 -06:00
chris jones @ipatch 9289e27230 gui: preferences fixes #27379 2026-02-13 11:48:48 -06:00
Roy-043 a8757f7947 Draft: fix depency of patharray normal on view direction
Change normal calculation to use get_shape_normal
2026-02-13 11:47:44 -06:00
Chris Hennes 9e042ff480 PD: Improve error handling for RevolMethod::ToFirst 2026-02-13 17:48:13 +01:00
wandererfan 6d73f9173c [TD]use BRepAlgoAPI_Cut instead of FCBRepAlgoAPI_Cut 2026-02-13 10:29:46 -05:00
wandererfan 36ddfdc7b9 [TD]fix crash on failed cut
- wrong result and warning on first time through.  Fixes itself after
  next execute().
- https://github.com/FreeCAD/FreeCAD/issues/27414
2026-02-13 10:29:46 -05:00
Paweł Biegun 1752fd59f9 Measurement: Add on the fly measurement unit change (#27462)
Enables the user to change the unit of the measurement temporarily to convert to a different unit. This is useful when the user sometimes needs to get a dimension of the model in a different unit than the one it was designed in.
2026-02-12 14:35:54 +00:00
Benjamin Nauck d94269f85f Base: Add sweep round-trip tests for all unit schemas
Sweep tests parse a string and translate it back, verifying identical
output. Values cover every threshold band at 10x increments plus a
scientific-notation value in each default band. Tests all 10 schemas.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-12 14:26:46 +01:00
Benjamin Nauck bb977afe55 Base: Fix floating point issue in schema threshold comparison
When a parsed value lands exactly at a threshold boundary (e.g. "1 S/m"
= 1e-9 at threshold 1e-9), floating point rounding could cause the
wrong unit to be selected. Shrink thresholds by a relative epsilon so
boundary values fall through to the next (more natural) unit.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-12 14:26:45 +01:00
Benjamin Nauck 3f17f2f01f Base: Fix schema translation data
Corrects 12 bugs across Internal and MKS schemas where factors were
wrong, units were assigned to the wrong threshold positions, or
thresholds didn't align with natural unit boundaries.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-12 14:26:45 +01:00
Roy-043 7912f84136 BIM+Draft: fix Placement task panel issue for Arch_SectionPlane and Draft_WorkingPlaneProxy (#27101)
* BIM+Draft: fix Placement Task Panel issue for Arch_SectionPlane and Draft_WorkingPlaneProxy

* BIM+Draft: fix Placement Task Panel issue for Arch_SectionPlane and Draft_WorkingPlaneProxy
2026-02-12 12:39:46 +00:00
Roy-043 db5fff6ccc BIM: fix BuildingPart issues with Arch_Reference 2026-02-12 11:35:55 +00:00
PaddleStroke 6abb2b447f Assembly: Isolate grounded objects on selection (#24952)
* Assembly: Isolate grounded objects on selection

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

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

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

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

* Update ViewProviderAssembly.cpp

* Update ViewProviderAssembly.cpp

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Chris Hennes <chennes@pioneerlibrarysystem.org>
2026-02-12 09:43:46 +01:00
marioalexis ba174bdad5 Fem: Remove unnecessary code from Z88 preference page 2026-02-12 09:38:33 +01:00
marioalexis ea27d96374 Fem: Remove unnecessary code from import/export INP preference page 2026-02-12 09:38:33 +01:00
marioalexis 1fcbe6095c Fem: Remove unnecessary code from CalculiX preference page 2026-02-12 09:38:33 +01:00
JIJINBEI 379179ce2b README: Update compiling section to recommend pixi (#27501) 2026-02-11 21:36:18 +00:00
Chris Hennes 076c5916b5 Sketcher: Remove unneeded parameters from seekConstraintPosition 2026-02-11 19:49:31 +01:00
Yash Suthar 3d14203fa4 Draft: fix Draft_Label MaxChars property (#27478)
* Draft: fix Draft_Label MaxChars property

Signed-off-by: Yash Suthar <yashsuthar983@gmail.com>

* Minor tweak: moved/replaced call to self.onChanged

---------

Signed-off-by: Yash Suthar <yashsuthar983@gmail.com>
Co-authored-by: Roy-043 <70520633+Roy-043@users.noreply.github.com>
2026-02-11 17:58:42 +00:00
Chris Hennes ec18d4e250 Tests/Sketcher: Eliminate unused variables 2026-02-11 17:03:18 +01:00
Chris Hennes ecbe21ca03 Sketcher: Annotate unused parameter 2026-02-10 19:10:36 +01:00
Roy-043 54c0c2f83c Draft: fix ghost preview of Draft_Labels
Draft_Labels have a unique Placement implementation. A ghost preview therefore cannot be generated in the standard manner. This was missed in #18795 (my bad).
2026-02-10 11:43:22 -06:00
Chris 47aa61bd94 CI: allow libpack builds to be triggered via githubs workflow_dispatch (#26742) 2026-02-10 11:42:23 -06:00
Yash Suthar 2cd45b07f7 Sketcher: Fix snap while drag and fix drag for arc
Signed-off-by: Yash Suthar <yashsuthar983@gmail.com>
2026-02-10 10:20:11 -06:00
Roy-043 0eaf14373f BIM: fix case of some titles (#27474) 2026-02-10 15:41:05 +00:00
dependabot[bot] ff377e031f Bump jwlawson/actions-setup-cmake from 2.0.2 to 2.1.1
Bumps [jwlawson/actions-setup-cmake](https://github.com/jwlawson/actions-setup-cmake) from 2.0.2 to 2.1.1.
- [Release notes](https://github.com/jwlawson/actions-setup-cmake/releases)
- [Commits](https://github.com/jwlawson/actions-setup-cmake/compare/802fa1a2c4e212495c05bf94dba2704a92a472be...3a6cbe35ba64df7ca70c51365c4aff65db9a9037)

---
updated-dependencies:
- dependency-name: jwlawson/actions-setup-cmake
  dependency-version: 2.1.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-02-10 09:12:33 -06:00
PaddleStroke 3d0df45cd4 Assembly: BOM: take mirrored state of links in account. (#26113) 2026-02-10 09:10:03 -06:00
wmayer be3acac53a Import: Fix import/export of STEP file
For the import/export use the transparency value of the material property.
Since v1.0 the alpha channel of the diffuse color is used for this but
when changing the transparency in the user interface this alpha channel
won't be adjusted and thus leads to unexpected results.

This fixes issue 18569
2026-02-10 11:03:27 +01:00
wmayer 1412cad2ec Import: Use ImportGui module for IGES import & export
Fixes issue 10701
2026-02-10 11:03:27 +01:00
Caio Venâncio do Rosário bf51a00dfd Draft: Fix switchUi method bug (#27422)
* Draft: Fix switchUi method bug

* [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>
2026-02-10 10:33:35 +01:00
Christoph Niethammer 1046c3682a Fix typos (#26576)
* Fix typos in code documentation

Signed-off-by: Christoph Niethammer <christoph.niethammer@gmail.com>

* Update tool tip for links 'copyOnChange' property

The tool tip for the copyOnChange property was missing the "tracking"
option and had some typos. For details see the wiki documentation at
https://wiki.freecad.org/Std_LinkMake and commit
d1b6bb78d1.

Signed-off-by: Christoph Niethammer <christoph.niethammer@gmail.com>

---------

Signed-off-by: Christoph Niethammer <christoph.niethammer@gmail.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Chris Hennes <chennes@pioneerlibrarysystem.org>
2026-02-09 19:15:50 -06:00
sliptonic 4497ce0146 Merge pull request #22204 from jffmichi/camsim
CAM: integrate new simulator as MDI widget into main window
2026-02-09 11:40:06 -06:00
tarman3 353459f1fe CAM: Profile - fix _getCutAreaCrossSection() 2026-02-09 11:12:11 -06:00
drwho495 72b1076788 Remove hasher check and migrate CAM files 2026-02-09 11:00:23 -06:00
Chris Hennes 6a1da227cd Merge pull request #27346 from TomPcz/sketcher-label-offset
Sketcher: Fix dimension label alignment and inactive strikethrough
2026-02-09 10:58:39 -06:00
Billy Huddleston 6e34b79da4 CAM: Update SVG annotation IDs for tool shapes
Renamed several SVG text element IDs in tool shape files that did not
match the expected naming conventions used. This ensures that the tool
parameters are correctly recognized and utilized by the Tool library
editor.

src/Mod/CAM/Tools/Shape/bullnose.svg:
- Changed text element id from "torus_radius" to "corner_radius"

src/Mod/CAM/Tools/Shape/radius.svg:
- Changed text element id from "cutting_edge_height-7" to
"cutting_radius"
- Changed text element id from "diameter-9" to "tip_diameter"

src/Mod/CAM/Tools/Shape/svg_source/bullnose.svg:
- Changed text element id from "torus_radius" to "corner_radius"

src/Mod/CAM/Tools/Shape/svg_source/radius.svg:
- Changed text element id from "cutting_edge_height-7" to
"cutting_radius"
- Changed text element id from "diameter-9" to "tip_diameter"
2026-02-09 10:55:53 -06:00
Neale Swinnerton e38c831970 feat(Gui): set client name to FreeCAD when connecting to spacenav
This enables per-application configuration in spacenavd for FreeCAD.
2026-02-09 10:55:23 -06:00
sliptonic 3f84746a5c Merge pull request #27247 from Daniel-Khodabakhsh/fix-0-step-down
CAM: Fix case when CAM operation `Start depth` equal to `Final depth` and `Step down` is zero
2026-02-09 10:06:04 -06:00
dependabot[bot] 94b147fcad Bump step-security/harden-runner from 2.14.1 to 2.14.2
Bumps [step-security/harden-runner](https://github.com/step-security/harden-runner) from 2.14.1 to 2.14.2.
- [Release notes](https://github.com/step-security/harden-runner/releases)
- [Commits](https://github.com/step-security/harden-runner/compare/e3f713f2d8f53843e71c69a996d56f51aa9adfb9...5ef0c079ce82195b2a36a210272d6b661572d83e)

---
updated-dependencies:
- dependency-name: step-security/harden-runner
  dependency-version: 2.14.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-02-09 10:01:10 -06:00
chris jones @ipatch c4317f88f8 sketcher: fixes #27281 fix access out of bounds crash with "remove axes alignment" 2026-02-09 09:52:02 -06:00
dependabot[bot] c8c764e215 Bump prefix-dev/setup-pixi from 0.9.3 to 0.9.4
Bumps [prefix-dev/setup-pixi](https://github.com/prefix-dev/setup-pixi) from 0.9.3 to 0.9.4.
- [Release notes](https://github.com/prefix-dev/setup-pixi/releases)
- [Commits](https://github.com/prefix-dev/setup-pixi/compare/82d477f15f3a381dbcc8adc1206ce643fe110fb7...a0af7a228712d6121d37aba47adf55c1332c9c2e)

---
updated-dependencies:
- dependency-name: prefix-dev/setup-pixi
  dependency-version: 0.9.4
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-02-09 08:53:31 -06:00
freecad-gh-actions-translation-bot e5d0e5316d Update translations from Crowdin 2026-02-09 05:39:43 +01:00
Kacper Donat 1cc53d911a Gui: Add element-wise tuple arithmetic to StyleParameters
Add arithmetic operators (+, -, *, /, unary -) to Value, enabling
element-wise operations on tuples and scalar broadcast with numerics.
Tuple addition/subtraction uses union semantics: named elements match
by name, unnamed elements match positionally, and unmatched elements
pass through. BinaryOp and UnaryOp now delegate to these Value operators.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 00:33:00 +01:00
Kacper Donat 7bf2050865 Gui: Add dot syntax for tuple member access in StyleParameters
Add MemberAccess AST node and postfix `.member` parsing to support
extracting individual elements from tuple-valued parameters, e.g.
`@ButtonBorderThickness.left` or `@Grays.0`.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 00:33:00 +01:00
Kacper Donat b7b3187e1d Gui: Split Value types out of ParameterManager into Value.h/.cpp
Move Numeric, Tuple, Value, valueTypeName, ArgumentParser, and ParamDef
into their own Value.h/.cpp files. ParameterManager.h now includes
Value.h and keeps only parameter sources and the manager itself.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 00:33:00 +01:00
Kacper Donat 9e0538abc8 Gui: Add ArgumentParser for named/positional function arguments
Adds ArgumentParser class that resolves mixed positional and named
arguments against a declared function signature (Python-style).
Includes Tuple::get<T>(name) for type-checked access with
user-friendly error messages. Refactors lighten/darken/blend to use it.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 00:33:00 +01:00
Kacper Donat a64a43b9ca Gui: Refactor function arguments to use TupleLiteral
Replace the separate argument parsing in parseFunctionCall() with a
call to parseTuple(), unifying the two comma-separated-expression
parsing paths. FunctionCall now stores a TupleLiteral instead of
a vector of expressions, and evaluates it into a Tuple value that
functions access via at()/find().

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 00:33:00 +01:00
Kacper Donat 7c813a6f5a Gui: Add tests for StyleParameters tuple support
Test cases cover unnamed, named, and mixed tuples, single named
elements, nested tuples, expressions and mixed types in elements,
toString roundtrip, Value::holds/get accessors, Tuple::at/find/size,
error handling, and backward compatibility of grouped expressions.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 00:33:00 +01:00
Kacper Donat 884baf2cb8 Gui: Add tuple parsing to StyleParameters parser
Add TupleLiteral AST node and parser support for tuple syntax using
parentheses with comma-separated elements: (val1, val2) for unnamed
tuples, (name: val1, val2) for named elements.

Disambiguation with grouped expressions in parseFactor():
- `(identifier:` lookahead → tuple
- expression followed by `,` → tuple
- expression followed by `)` → grouped expression (backward compatible)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 00:33:00 +01:00
Daniel Khodabakhsh 8d3c786656 Fix case when CAM operation start = stop and step down is zero. 2026-02-08 15:30:19 -08:00
Kacper Donat 0f4ad868f7 Gui: Add Tuple type to StyleParameters
Add a tuple value type to the StyleParameters system, allowing related
values to be grouped into a single parameter with optional named fields.

Tuple is stored inline in the Value variant. The circular dependency
(Value contains Tuple, Tuple elements contain Value) is broken by
storing element values as shared_ptr<const Value> inside Tuple::Element.

Generic holds<T>() and get<T>() template methods are added to Value
for uniform type-checked access to all variant alternatives.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 00:29:03 +01:00
Captain 3237a21580 PartDesign: add interactive gizmos for box, cylinder and sphere operations (#23700) 2026-02-08 14:36:04 -06:00
Joe a79a22185d Materials: Add Copper Alloys to Material-Metals (#25832)
* Add Copper Alloys to Material-Metals

Added a set of Copper Alloys presented in Application Data Sheet
'cda144-8-mechanical-low-temperature.pdf, Nov1974'
Permission and Credit to the 'Copper Distributor's Association (CDA)'
These cards follow values for 295°K

Colours approximate values found by general search of images and
descriptions found on the internet and use FreeCAD's appearances.

* Add Copper Alloy general/generic information

This additional information appears as general info not affected by
anneal or cold drawn or aging factors.
Information found from pages C10200, C12200, C15000, C22000, C23000,
C44300, C46400, C51000, C61400, C64700, C65500, C70600, C71500, C95500

Also followed suggestions of adding tagging and description mentioned
in pull request.

* Add Copper Alloy source URL

Added the URL for the source Application Data Sheet
'cda144-8-mechanical-low-temperature.pdf, Nov1974'
This pdf is hosted by the 'Copper Distributor's Association (CDA)'

Here is the source URL for this pull request in case it's needed:
https://github.com/FreeCAD/FreeCAD/pull/25832

* Add Copper Alloy UltimateStrain for 102,122a,122b at 295°K

102=2.8%, 122a=39.7%, 122b=1.46%

* Add Copper Alloy UltimateStrain for remaining cards 150...955 at 295°K

105=4.13%, 220=41.5%, 230=40.4%, 443=82%, 464=31.8%, 510=3.6%, 614=27%
647=9.9%, 655=10.4%, 706=28.4%, 715=39.9%, 955=10.6%.

Removed spaces between IACS = nn%, so that it all stays on same line.

Added C95500 compressive MPa.
Added C64700 Si and IACS ranges.

Also looked at 'KindOfMaterial' for Steel and made similar edits based
on Table 2 info shown in brackets () to try keep a bit of consistency.

* Fix Ultimate Strain Description and Units

Ultimate Strain is the maximum stretch you can do to a material before it
gives up. This is associated with Ultimate Tensile Strength, which is the
maximum stress you can apply before the material starts to fail, elongate
and eventually fracture.

Units are of the type ΔL/L, such as, stretched 0.10in per 1.0in (10%), or
stretched 0.15mm per 1.0mm (15%). To avoid confusion, use 0.1 or 0.15 and
avoid using 10 as for 10% or 15 as with 15%, and just call it a fraction.

* Add Copper Alloy Elongation, Reduction of Area, Yield Strain, Toughness

Impact Charpy and Notch Tensile Strength are both considered as Toughness
There is currently no use for these in FreeCAD, but maybe a future use as
these are part of the Table 2 and better to add them now vs forget adding
them later. The Charpy test is a fast cost-effective standardized method,
and there are other more sophisticated impact tests that can be "better".
There are other tests than the notch tensile strength test, but it's also
a simple, fast, cost-effective method to create fracture toughness data.

While adding 'Elongation' and 'Reduction of Area' both these are referred
to as percentages (preferred over fraction), it seemed best to change the
'Ultimate Strain' to percentages too for consistency even though this has
was referred to as fraction or percentage when searching for definitions.

Added Yield Strain, probably not important now because the elastic region
is pretty small, but with smart metals that can do up to 5% bends then it
seems something worth adding it for that category of future metal alloys.

* Add Copper Alloy Isotropic, Linear, Toughness Temperature Arrays

* Add Copper Alloy Elastic & Toughness arrays and reduce model wordiness

Reduced wordiness of array models by cutting-out Metal and Temperature
as these are somewhat redundant words.

Added remaining ElasticProperties and PlasticTriaxialProperties.

* Add Copper Alloy Linear Elastic Temperature Arrays

Moved Elongation and ReductionOfArea after YieldStrain/Strength and added
FractureStrength so these are grouped together on the cards since they're
all related (Note: Material viewer resorts these alphabetically).

Linear Elastic arrays are set in the order of strain/strength for Tensile
then strain/strength for Yield, and then Elongation/FractureStrength, and
then ReductionOfArea.

Reviewed pdf again and corrected a few errors missed/made earlier.
2026-02-08 12:04:28 -06:00
William Skellenger 5f952812c3 Fix tooltips on mirror checkboxes in sketcher (#27131) 2026-02-08 10:03:37 +00:00
Chris Hennes 0f23770ad7 Merge pull request #27064 from ScholliYT/addObjectNameTo3mfExport
Mesh: Add object name attribute to 3MF export
2026-02-08 03:22:56 -06:00
Kacper Donat 9dbf5ae94b Part: Refactor TopoShape::splitWires (#23096)
This refactors TopoShape::splitWires method to be easier to follow and
use variable names that better describe the intent.
2026-02-07 23:24:47 -06:00
mosfet80 fa97300ec6 Remove unused files
removed unnecessary doxygen files
2026-02-07 23:14:25 -06:00
ᴩʜᴏɴᴇᴅʀᴏɪᴅ 8af563804c SPDX [ 49 ][ Src / Mod / PartDesign ] (#26715) 2026-02-07 22:53:31 -06:00
PhoneDroid 0d4d884a59 [ Doc ]: Rework 3rd party library overview 2026-02-07 22:51:05 -06:00
William Skellenger f2a392c8f1 make the filename tooltip show the actual filename 2026-02-07 22:40:15 -06:00
wandererfan 0745d40f86 [TD]fix fail on single edge cutting profile 2026-02-07 21:47:00 -06:00
Roy-043 105543bf17 BIM: fix regression caused by Link Hosts handling (#27406) 2026-02-07 21:43:30 -06:00
Chris Hennes 5b27deb4f0 Gui: Migrate old macro dir if needed 2026-02-07 20:36:43 -06:00
Chris Hennes f008c80030 Gui: Don't record macro path if default 2026-02-07 20:35:32 -06:00
TomPcz b441a3b6c1 Assembly: Fix help text height in CreateBom 2026-02-07 18:38:37 +01:00
sliptonic f36c9a8580 Merge pull request #27114 from petterreinholdtsen/cam-toolbit-m10-m8-taps
CAM: Added M8x1.25 (aka M8 coarse) thread tapping bit.
2026-02-07 09:06:12 -06:00
jffmichi 184c977677 CAM: show new cam simulator in main window 2026-02-07 11:03:23 +01:00
timpieces adf15a401d ExpressionParser: Add more tests for expression parsing (#27098)
- I'm not familiar with absolutely all usages of expressions - this is
  intended more as a starting point to make it easy to add more
- The test captures *current* behaviour, please don't assume that
  everything it tests is *correct* behaviour
2026-02-07 11:23:13 +08:00
timpieces 1de8cd5e36 ExpressionParser: Make cosmetic test changes before adding more tests (#27098)
Fix some weird quirks before adding new tests:
- The whole file has clang format off, this feels unnecessary, localize
  it to where it's important
- Put the code inside a nested test namespace within the production
  namespace, this is generally good practice rather than putting it in
  the global namespace, and it means we don't have to explicitly namespace
  methods that are directly under test
- Rename variables to camelCase, which afaict is closer to 'normal' in
  freecad cpp
- Remove the usage of arrays. Maintaining manual array sizes is
  annoying. Just use initializer lists here as they are all constants.
- I have *not* renamed the snake_case methods, as I feel that it
  destroys too much of the git history for too little benefit
2026-02-07 11:23:13 +08:00
timpieces daceb8afe4 ExpressionParser: Return unique_ptr from simplified (#27098)
- Removes many/most of the copy().release() from the last commit
- Still some .release() in the simplify functions now
- It doesn't work to rename simplify and turn it into a protected
  method, because it's called recursively within the tree
2026-02-07 11:23:13 +08:00
timpieces 8dad760db4 ExpressionParser: Return unique_ptr from copy (#27098)
- We need copy().release() on many of these calls because nodes in the
  tree call 'copy' explicitly. It's not really different to the code
  that's there now, but it's not pretty either. Some of these will go
  away in the upcoming commit
2026-02-07 11:23:13 +08:00
timpieces 1455321ace ExpressionParser: Return unique_ptr from eval (#27098)
- Most of the usages of 'release' are temporary here, but a few will
  likely need to stay. In these cases, the existing behaviour is
  retained. To fix all usages, smart pointers would need to be used all
  throughout the tree
- The freecad_cast looks awkward now. I haven't added a new version that
  works with smart pointers because it's not clear what the right
  ownership semantics would be. Make the caller be explicit for now.
2026-02-07 11:23:13 +08:00
timpieces 47d02c0618 ExpressionParser: Return unique_ptr from parse (#27098)
- Start at ScanResult, as starting higher makes it easy to have memory
  issues.
- There are multiple memory leaks (at least in tests, but possibly in
  production code too) from using raw pointers in the public interface
  here. Fix these before adding more tests.
- Starts at ScanResult
- The bison changes were applied manually, as I don't think that it's
  pixified and running my local version showed many changes.
- I've chosen not to pimplify Expression, but only because it would be
  such a significant change for not so much value.
2026-02-07 11:23:09 +08:00
jffmichi 61de0ffa8f CAM: use QOpenGLWidget for new simulator 2026-02-07 00:38:07 +01:00
tarman3 53bb61da00 CAM: Fix calculation arc move time 2026-02-06 22:25:39 +02:00
tarman3 dd3c12758f CAM: Fix calculation arc move length 2026-02-06 21:46:57 +02:00
Petter Reinholdtsen dfdabbfc87 CAM: Reintroduce matching pre-/postamble and help text for dynapath_4060_post.py
This change was introduced in 80a35a8765 (#24617) and
reverted without explanation in 21a597a85e (#27202).
I assume it was reverted by mistake.

Note that for dynapath_4060_post.py, the original help text did not match the postamble,
illustrating the need to ensure the actual value matches the help text.
2026-02-06 19:44:40 +01:00
Kristian Rekstad 2db8942fa9 Web: improve docs by explaining purpose and use
Also remove python example in AppWeb.cpp because it is duplicated by
web.dox
2026-02-06 11:49:51 -06:00
dependabot[bot] 71e4b4f564 Bump actions/setup-python from 6.1.0 to 6.2.0
Bumps [actions/setup-python](https://github.com/actions/setup-python) from 6.1.0 to 6.2.0.
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](https://github.com/actions/setup-python/compare/83679a892e2d95755f2dac6acb0bfd1e9ac5d548...a309ff8b426b58ec0e2a45f0f869d46889d02405)

---
updated-dependencies:
- dependency-name: actions/setup-python
  dependency-version: 6.2.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-02-06 11:43:33 -06:00
dependabot[bot] 6a349de3e3 Bump step-security/harden-runner from 2.13.3 to 2.14.1
Bumps [step-security/harden-runner](https://github.com/step-security/harden-runner) from 2.13.3 to 2.14.1.
- [Release notes](https://github.com/step-security/harden-runner/releases)
- [Commits](https://github.com/step-security/harden-runner/compare/df199fb7be9f65074067a9eb93f12bb4c5547cf2...e3f713f2d8f53843e71c69a996d56f51aa9adfb9)

---
updated-dependencies:
- dependency-name: step-security/harden-runner
  dependency-version: 2.14.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-02-06 11:43:23 -06:00
dependabot[bot] cc665f1070 Bump peter-evans/create-pull-request from 7.0.11 to 8.1.0
Bumps [peter-evans/create-pull-request](https://github.com/peter-evans/create-pull-request) from 7.0.11 to 8.1.0.
- [Release notes](https://github.com/peter-evans/create-pull-request/releases)
- [Commits](https://github.com/peter-evans/create-pull-request/compare/22a9089034f40e5a961c8808d113e2c98fb63676...c0f553fe549906ede9cf27b5156039d195d2ece0)

---
updated-dependencies:
- dependency-name: peter-evans/create-pull-request
  dependency-version: 8.1.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-02-06 11:43:12 -06:00
Petter Reinholdtsen 626c510177 CAM: Added M8x1.25 (aka M8 coarse) thread tapping bit.
This provide a metric thread tap example alongside the
imperial 3/8"-16 tap example.
2026-02-06 06:29:12 +01:00
Krish Sharma 24f0c8e2c3 Update src/Gui/PreferencePages/DlgSettingsSelection.ui
Co-authored-by: Furgo <148809153+furgo16@users.noreply.github.com>
2026-02-05 21:46:40 +01:00
Krrish777 4768f20d89 Update tooltip for auto-switch to 3D view preference to match Std_TreeSyncView behavior 2026-02-05 21:46:40 +01:00
Krrish777 13909dbb00 Remove duplicate/old tooltips 2026-02-05 21:46:40 +01:00
Krrish777 ed2471e835 Gui: Add informative tooltips to Tree Selection Behavior 2026-02-05 21:46:40 +01:00
Krrish777 afd998541d Gui: Add tooltips to Selection preference page 2026-02-05 21:46:40 +01:00
Benjamin Nauck 74e1d71c65 Merge pull request #27355 from 3x380V/app
App: Random fixes 2
2026-02-05 20:22:43 +01:00
dependabot[bot] 1d11f05560 Bump actions/checkout from 4 to 6
Bumps [actions/checkout](https://github.com/actions/checkout) from 4 to 6.
- [Release notes](https://github.com/actions/checkout/releases)
- [Commits](https://github.com/actions/checkout/compare/v4...v6)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-02-05 08:48:07 -06:00
paul 45a8650b7d [BimWall] Fix Regression check ArchSketchLock (#27324)
* [BimWall] Fix Regression check ArchSketchLock

Github Discussion / Fix Regression:
Fix #24595
(https://github.com/FreeCAD/FreeCAD/pull/24595#issuecomment-3763092751)
(and incorporate comments in previous PR, to be abandoned, https://github.com/FreeCAD/FreeCAD/pull/26985)

Regression and Fix:
-  When external SketchArch Add-on is installed, and ArchSketchLock is False (not pressed), the BimWall.Arch_Wall() tool with BaseLine select 'Sketch' return error
-  This PR fix the said regression

* [BimWall] Fix Regression check ArchSketchLock (rev. 1)
(Update following comment at - https://github.com/FreeCAD/FreeCAD/pull/27324#pullrequestreview-3750099100)

Github Discussion / Fix Regression:

- Fix https://github.com/FreeCAD/FreeCAD/pull/24595#issuecomment-3763092751
- (and incorporate comments in previous PR, to be abandoned, https://github.com/FreeCAD/FreeCAD/pull/26985

Regression and Fix:

- When external SketchArch Add-on is installed, and ArchSketchLock is False (not pressed), the BimWall.Arch_Wall() tool with BaseLine select 'Sketch' return error
-  This PR fix the said regression

* [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>
2026-02-05 12:36:16 +01:00
wmayer cda2b8cbdb Use Application::getExecutableName() instead of Config()["ExeName"] 2026-02-05 10:59:52 +01:00
wmayer 4f116d8de3 App: Move Python functions from Application to ApplicationPy
This reduces build time when adding new Python functions because
only one file must be compiled.
2026-02-05 10:59:52 +01:00
wmayer c97f6e5b3f App: Improve Document::writeObjects
Do not directly pass getNameInDocument() to the ostream as this will
set the badbit in case it returns nullptr. As a result no further
output is written to the stream and leads to loss of data.

Instead the returned C string is stored in a local variable and in case
it's nullptr an empty string is passed to the ostream.

At the end of the function writeObjects() it's checked whether the
failbit or badbit is set. If yes an error message is printed and the
failbit or badbit are cleared.

This is supposed to fix the issue 18044.

In case this fix is not sufficient it can be also check for every
object inside writeObjectData()
2026-02-05 10:59:50 +01:00
wmayer 2c3d9e2bb7 Base: Add C++ iostate methods to Writer class 2026-02-05 10:58:12 +01:00
wmayer 2c2cdbfe7f App: Refactor Document::writeObjects 2026-02-05 10:47:49 +01:00
wmayer 6c9ad95a70 App: Improve handling with freeze status
* Do not raise an exception when saving a document and an object has
  'freeze' status because this breaks the project file and may lead
  to loss of data.
* Make 'freeze' state persistent
* When toggling 'freeze' status only work directly on the selection.
  Do not use in-list or out-list of an object because this makes it
  quite inflexible and leads to unpredictable behaviour.

This fixes issue with saving frozen files described in 18806.
2026-02-05 10:04:46 +01:00
Tomáš Pikálek 41e3cdb9a5 Sketcher: Reimplement strikethrough of inactive constraint labels 2026-02-04 21:04:06 +01:00
Chris Hennes 27587b9cd2 Packaging: Fix typo in end-of-line format 2026-02-04 20:46:02 +01:00
Tomáš Pikálek 77e5645af0 Sketcher: Vertical centering of constraint labels 2026-02-04 19:44:21 +01:00
Jacob Oursland 9440749423 CI: pin swig on release builds. 2026-02-04 18:51:14 +01:00
Chris Hennes 6f60022a35 Package: Make Windows uninstaller preferences language clearer 2026-02-04 06:37:22 +01:00
PaddleStroke 8a6872e69d Merge pull request #25848 from PaddleStroke/sk_scale_distances
Sketcher: Distance constraints: scale label distance on creation.
2026-02-03 16:34:53 -06:00
Chris Hennes ed6c0c8111 Merge pull request #25990 from Lgt2x/find-netgen-fix
CMake: require Netgen when BUILD_FEM_NETGEN is ON, don't fail silently
2026-02-03 23:10:38 +01:00
xtemp09 0b5a0a6abb [GUI] Handle Enter and Escape in the search box in Preferences. 2026-02-03 21:57:29 +01:00
Pieter Hijma 6d3f786b38 Doc: Improve layout doxygen output 2026-02-03 21:07:13 +01:00
Pieter Hijma 1eb6968265 Doc: Comment out doxygen javascript
This commit comments out javascript for doxygen that does not work
anymore or is unneeded in newer versions.  The code is left in for later
attempts to revitalize this functionality, most notable the search
function.
2026-02-03 21:07:13 +01:00
Chris Hennes 6ada8e2cef Merge pull request #25199 from pieterhijma/doc-element-mapping
Doc: Improve the documentation of element mapping
2026-02-03 21:06:53 +01:00
Chris Hennes f3b4aa6b8c Merge pull request #25198 from pieterhijma/doc-expressions
Doc: Improve the documentation of expressions
2026-02-03 21:06:13 +01:00
Chris Hennes eb42b77285 Merge pull request #25143 from furgo16/issue_24571
App: cherry-pick - Implement Save() & Restore() for int/float constraint properties
2026-02-03 21:04:50 +01:00
Roy-043 8657d0a377 BIM: fix BuildingPart area calculation for indirect children (#24848)
* BIM: fix BuildingPart area calculation for indirect children

Fixes #24667.
2026-02-03 13:23:59 -06:00
Steven James c07d248bc3 Make Subclasses of Part::Feature objects repr as their derived Type (#24429) 2026-02-03 11:03:29 -06:00
Roy-043 dafed93c63 BIM: support relative path for hybrid IFC file (#24190) 2026-02-03 10:16:10 -06:00
Ladislav Michl e7bcb2c15e Gui: cleanup includes in *PyImp.cpp
Sort includes and implicitely add missing ones. While there
consistently explain where generated files some from.
2026-02-03 16:56:45 +01:00
Roy-043 f9ab227459 Draft: title in default task panel in title case
See #27314.
2026-02-03 12:09:08 +01:00
Roy-043 e6808b6f2e BIM: titles in default task panel in title case
This task panel appears when no command is active. There are 2 versions. One appears if there is a selection, the other if there is none.
2026-02-03 11:05:29 +01:00
captain0xff 79632dd3c6 App: handle symlinks in Application::processFiles & DocInfo::getDocPath 2026-02-02 19:50:36 +01:00
Chris Hennes a4a1ef7294 App: Get Addon name from Metadata 2026-02-02 19:50:16 +01:00
Yash Suthar 8f2a3a4d7d Draft : Added knots support for snapping (#26571)
* Draft : Added knots support for snapping

Signed-off-by: Yash Suthar <yashsuthar983@gmail.com>

* Use Special snap for knots and rename snapToBSpline to snapToBSplineKnots

---------

Signed-off-by: Yash Suthar <yashsuthar983@gmail.com>
Co-authored-by: Roy-043 <70520633+Roy-043@users.noreply.github.com>
2026-02-02 17:11:20 +00:00
Dan Henderson 21a597a85e CAM: Post Processor Dyna_4060_Post - various bug fixes and updates (#27202)
* various bug fixes and updates

* [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>
2026-02-02 18:07:31 +01:00
Daniel-Khodabakhsh 1c90c1ec44 CAM: Fix case when CAM operation Safe height, Start depth, and Final depth are the same value. (#27258)
Co-authored-by: Daniel Khodabakhsh <d@niel.khodabakh.sh>
2026-02-02 18:03:59 +01:00
Roy-043 30ea676367 BIM: add processSubShapes to ArchSpace.py
Fixes #24579.
2026-02-02 18:03:08 +01:00
Roy-043 ed104dd2c1 BIM: remove LibraryWebSearch option from BIM_Library as it required the Web WB (#27048)
* BIM: remove LibraryWebSearch option from BIM_Library as it required the Web WB

Removed the 'checkWebSearch' checkbox and updated tooltip text formatting.

* BIM: remove LibraryWebSearch option from BIM_Library as it required the Web WB

* Restore tooltip
2026-02-02 17:59:40 +01:00
PaddleStroke a3486b4dd2 Assembly: Insert flexible assembly grounds the correct part (#27206)
* Assembly: Insert flexible assembly grounds the correct part

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

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

* Assembly: Migrate ObjectToGround to PropertyLinkGlobal to support assembly links

* Update JointObject.py

* Assembly: ViewProviderAssembly fix assembly link deletion issue

* Assembly: ViewProviderAssembly: make sure no duplicates in canDelete

* Assembly CommandInsertLink fix typo

* [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>
2026-02-02 17:43:45 +01:00
PaddleStroke 212e4f07af Assembly: Fix isolate not working on sub assembly components 2026-02-02 17:41:41 +01:00
Kacper Donat 92dbaad9db Merge pull request #27243 from 3x380V/app
App: Random fixes 1
2026-02-02 17:40:40 +01:00
David Kaufman 388c66b41e move max-arc-radius test from AlmostALine to CheckForArc 2026-02-02 10:46:00 -05:00
Furgo 125ff0dcea BIM: add task panel box for wall options (#26758)
* BIM: add Wall options task box to ArchWall's edit task panel

* BIM: update Align property live on the task box

* BIM: make wall options cancellable

* BIM: make the Component task box actions reversible, in particular debasing a wall

* BIM: implement baseless walls creation (#24595)

* BIM: Implement smart base removal for Walls

Previously, removing the Base object from an Arch Wall would cause the
wall to reset its position to the document origin and could lead to
unintended geometric changes for complex walls.

This commit introduces a "smart debasing" mechanism integrated into the
Component Task Panel's "Remove" button:

- For walls based on a single straight line, the operation now preserves
  the wall's global position and parametric `Length`, making it an
  independent object.
- For walls with complex bases (multi-segment, curved), a warning dialog
  is now presented to the user, explaining the consequences (shape
  alteration and position reset) before allowing the operation to
  proceed.

This is supported by new API functions `Arch.is_debasable()` and
`Arch.debaseWall()`, which contain the core logic for the feature.

Fixes: https://github.com/FreeCAD/FreeCAD/issues/24453

* BIM: Move wall debasing logic into ArchWall proxy

The logic for handling the removal of a wall's base object was previously
implemented directly within the generic `ComponentTaskPanel` in
`ArchComponent.py`. This created a tight coupling, forcing the generic
component UI to have specific knowledge about the `ArchWall` type.

This commit refactors the implementation to follow a more object-oriented
and polymorphic design:

1.  A new overridable method, `handleComponentRemoval(subobject)`, has been
    added to the base `ArchComponent` proxy class. Its default implementation
    maintains the standard removal behavior.

2.  The `_Wall` proxy class in `ArchWall.py` now overrides this method. All
    wall-specific debasing logic, including the eligibility check and the
    user-facing warning dialog, now resides entirely within this override.

3.  The `ComponentTaskPanel.removeElement` method has been simplified. It is
    now a generic dispatcher that calls `handleComponentRemoval` on the
    proxy of the object being edited, with no specific knowledge of object types.

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

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

* BIM: Add interactive creation of baseless walls

Introduce a new workflow for creating Arch Walls without a dependency on
a baseline object (e.g., a Draft Line).

- The `Arch_Wall` command is enhanced with a "No baseline" mode, controlled
  by a new "Walls baseline" preference, allowing users to create
  placement-driven walls directly in the 3D view.
- The existing `debaseWall` function has been refactored for correctness
  and consistency with the new baseless wall geometry.

Co-authored-by: Yorik van Havre <yorik@uncreated.net>

* BIM: Refactor structure of the Arch Wall command

Refactor the `Arch_Wall` GUI command (`BimWall.py`) for improved
readability, maintainability, and architectural clarity.

- A `WallBaselineMode` Enum is introduced to replace the original
  integer values, making the code self-documenting.
- The monolithic `create_wall` method is broken down into smaller,
  single-responsibility helper functions for each creation mode.
- The `addDefault` method has been removed, with its logic
  integrated into the new structure.

* BIM: Add Draft Stretch support for baseless walls

This commit makes the new baseless Arch Walls graphically editable using
the `Draft_Stretch` tool.

- An API for stretching (`calc_endpoints` and `set_from_endpoints`)
  has been added to the `ArchWall` proxy.
- The `Draft_Stretch` tool is now aware of baseless walls and calls this
  new proxy API to perform the stretch operation, enabling users to
  stretch them.

Co-authored-by: Yorik van Havre <yorik@uncreated.net>

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

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

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

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

* BIM: address CodeQL warnings

* BIM: Fix wall alignment for GUI creation of baseless walls

Fixes an issue whereby creating a baseless wall from the GUI would
ignore the selected `Align` property, always resulting in a
center-aligned wall.

- The underlying geometry generation for baseless walls now correctly
  honors the `Align` property passed by the GUI and API.
- To ensure predictable behavior, the implementation uses the same
  geometric convention as walls built from a base object, making the
  `Align` property work uniformly for all wall types.
- This also corrects the behavior of the `Arch.makeWall` function for
  baseless walls.
- Update unit tests to test wall alignment.

* BIM: Refactor wall geometry generation for improved clarity and maintainability

Improves the internal logic for wall geometry creation, addressing CodeQL warnings and enhancing overall maintainability without changing external behavior.

- The `build_base_from_scratch` method is refactored to unify the separate logic paths for single- and multi-layer walls, reducing code duplication.
- A local helper function is introduced to create face geometry, for better modularity and readability.
- In the `_Wall.execute` method, the control flow that relied on implicit type checking is replaced with an explicit strategy pattern for fusing solids, making the logic more robust.
- Variable names are made more descriptive.
- A NumPy-style docstring is added to better document the function.

* Draft: fix stretching of rotated baseless walls

* BIM: add unit test for stretching baseless walls

* BIM: add regression tests for working-plane-relative coordinates and reuse of base sketches

* BIM: Fix baseless wall creation to respect the working plane

Corrects an issue where baseless walls were created using global
coordinates instead of being relative to the active Draft working plane.

The calculated local placement of the wall is now correctly transformed
into the global coordinate system by multiplying it with the working
plane's placement.

* BIM: Ensure unique baselines for subsequent wall creation

Fixes a bug where creating multiple walls with baselines would
incorrectly reuse the same underlying Sketch or Draft Line object.

The object retrieval logic after the `doCommand` call now correctly uses
`ActiveObject` to get a reliable reference to the new object instead of
relying on a hardcoded name.

* BIM: Make the wall's base object label translatable

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

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

* BIM: use singular for consistency with other labels

Co-authored-by: Roy-043 <70520633+Roy-043@users.noreply.github.com>

* Fix typo

* BIM: address reviewer's comments about improving object reference passing between Python and FreeCAD contexts, and functions

* BIM: remove defensive programming: the callback is only executed as a result of a user's GUI action

* BIM: use the params API to define WallBaseline parameter

* BIM: add Arch Wall tests for joining wall logic

* BIM: add joining logic

* BIM: re-add ArchSketch support

* BIM: re-add multimaterial support on wall creation

* BIM: address CodeQL warning, remove module duplication

* BIM: fix check for SketchArch module when creating sketch-based walls

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Yorik van Havre <yorik@uncreated.net>
Co-authored-by: Roy-043 <70520633+Roy-043@users.noreply.github.com>

* CI: upgrade Ubuntu native build to 24.04

* CI: reenable Ubuntu native build

* CI: abandon PySide6 pip approach, try KDE Neon repos

* BIM: fix mistake in casting return value

* BIM: add wall label to better identify transaction in the Undo stack

* BIM: remove superfluous statement

* BIM: add explanatory comment about additional transaction  pending flag

* BIM: Refactor Wall transaction logic to use explicit argument passing

This replaces the `Proxy.InTransaction` flag mechanism with a cleaner
transaction architecture based on explicit argument passing.

The motivation for managing the transaction mechanism is that
previously, removing a Wall's base object via the Task Panel triggered
`debaseWall`, which opened and committed its own transaction
immediately. This nested commit finalized the document state
prematurely, rendering the Task Panel's "Cancel" button ineffective.

The Task Panel now owns the transaction lifecycle for the editing
session. It propagates a `manage_transaction=False` flag down to the
logic layer, preventing nested transactions from committing prematurely.

Key changes:
- Arch.py: `debaseWall` now accepts `manage_transaction` (default True).
  Setting it to False allows the Task Panel to disable the nested
  transaction and include the debasing operation into its own
  transaction context instead.
- ArchComponent.py:
  - `ComponentTaskPanel` now manages the transaction lifecycle (Open in
    init, Commit in accept, Abort in reject).
  - `ComponentTaskPanel.removeElement` now passes
    `manage_transaction=False` when calling the object's
    `handleComponentRemoval` proxy method.
  - Updated `Component.handleComponentRemoval` signature to accept the
    `manage_transaction` argument.
- ArchWall.py:
  - Updated `_Wall.handleComponentRemoval` to pass the
    `manage_transaction` flag to `debaseWall`.
  - Cleaned up `WallTaskPanel` by removing the deprecated
    `InTransaction` logic and redundant overrides.

* BIM: provide immediate visual feedback on additions and subtractions

* BIM: remove low-level API transaction management

* BIM: Refactor transaction management in ComponentTaskPanel

The C++ GUI layer implicitly manages the transaction lifecycle when
entering and exiting edit mode.

Explicitly opening a transaction in init and committing in accept() is
redundant, as the backend establishes the transaction name and performs
the final commit during the resetEdit() cleanup phase.

The reject() method retains an explicit abortTransaction() call to
signal a rollback, which prevents the backend from committing session
changes by default.

Docstrings are added to clarify this implicit interaction between the
Python UI and the C++ document management logic.

* Wall Options in title case

* QtGui.QApplication.translate -> translate

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Yorik van Havre <yorik@uncreated.net>
Co-authored-by: Roy-043 <70520633+Roy-043@users.noreply.github.com>
2026-02-02 15:39:20 +00:00
Roy-043 ca923d089f BIM: some improvements for ArchProfile.py (#27118) 2026-02-02 16:04:13 +01:00
Roy-043 7ad0b16d02 BIM: add test for horizontal area of tilted cylinders (#27108)
* BIM: add test for horizontal area of tilted cylinders

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

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

* Fix typos and use makeComponent instead of makeStructure

* Change makeComponent back to makeStructure

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2026-02-02 16:03:50 +01:00
Furgo 36c0eaf44b BIM: Prevent incorrect assembly icon for baseless parametric walls (#27277)
The icon logic in _ViewProviderWall.getIcon previously switched to the
assembly icon for any wall without a Base that contained Additions. This
caused an unexpected icon change when a wall was debased, as it still
retains a parametric body defined by its Length property.

Update the logic to only show the assembly icon if the wall has no Base,
has Additions, and its Length is zero. This ensures that baseless walls
driven by their own dimensions maintain the standard wall icon.
2026-02-02 15:56:08 +01:00
freecad-gh-actions-translation-bot 0b7da82433 Update translations from Crowdin 2026-02-02 11:49:57 +01:00
PaddleStroke 3d7cc53317 Measure: fix new measure marked as recompute (#27235) 2026-02-01 14:45:04 +01:00
nishi 1818911c5f Measure: corrected angle measurements bug (#27254) 2026-02-01 14:43:10 +01:00
xtemp09 ce3fdd6e4b Add an icon to "Clear Recent Files List" action 2026-02-01 12:31:09 +01:00
Billy Huddleston c98d077d91 Revert "CAM: Add threshold for treating large-radius arcs as linear in simulator"
This reverts commit 0b35385f4a9416c58bda2353e912bf2539d21c6d.
2026-02-01 09:02:17 +01:00
Kacper Donat bf83b9bfde Base: Add TimeTracker (#26305)
* Base: Add TimeTracker

This adds TimeTracker utility that can be used to orchestrate code
with time measurements in an easy way and detect performance issues.

* Update src/Base/TimeInfo.h

Co-authored-by: Chris Hennes <chennes@pioneerlibrarysystem.org>

---------

Co-authored-by: Chris Hennes <chennes@pioneerlibrarysystem.org>
2026-01-31 20:00:40 +01:00
Furgo 2a103cf08e Gui: Unify Python exception reporting in command handlers
Replace custom exception formatting with PyException::reportException()
for consistent output that includes previously missing exception types.
2026-01-31 19:59:42 +01:00
Pieter Hijma 1d51b8e5e5 Doc: Improve the Expression Framework topic 2026-01-31 19:52:33 +01:00
Pieter Hijma befd4a23ee Doc: Improve App::PropertyExpressionEngine docs 2026-01-31 19:52:33 +01:00
Pieter Hijma ee538f707f Doc: Move doc comments in PropertyExpressionEngine
Several doc comments in App/PropertyExpressionEngine.cpp are moved to
header files.
2026-01-31 19:52:33 +01:00
Pieter Hijma f113e775a1 Doc: Improve the App::Expression documentation 2026-01-31 19:52:33 +01:00
Pieter Hijma 063f03c764 Doc: Move doc comments in App::Expression
Several doc comments in App/Expression.cpp are moved to header files.
2026-01-31 19:52:33 +01:00
Chris Hennes bbd0ba7626 Merge pull request #25197 from pieterhijma/doc-link
Doc: Improve the documentation of Link
2026-01-31 19:52:19 +01:00
mosfet80 af4a989dc1 Build: Fix CMake deprecation warning in FastSignals (#26819) 2026-01-31 15:59:49 +01:00
PaddleStroke 964e7387e3 Assembly: Explode temporarily (#25456) 2026-01-31 15:57:22 +01:00
Grzegorz Kwacz cd8fd9ace5 Spreadsheet: Update row/column context menu 2026-01-31 15:36:55 +01:00
PaddleStroke fb4721bcb2 Assembly: Remove solver msg when file is closed (#27210) 2026-01-31 15:19:36 +01:00
Louis Gombert 2dcc351532 TechDraw: fix Qt5 compatibility
emplace_back was added in Qt6, replace by append which does the same thing.
2026-01-31 12:51:11 +01:00
Arusekk c497a583ca BIM: Fix ArchBuildingPart not moving child object base (#27237)
When a child (e.g. a Wall) of an ArchBuildingPart (e.g. of a Level)
had both 'Move With Host' and 'Move Base' enabled, it failed to move
the base (e.g. Line) of the child, and only displaced the child
itself (effectively ignoring the 'Move Base' setting).

Example project structure:

Level
|
+- Wall ('Move With Host' = true, 'Move Base' = true)
   |
   +- (base of Wall) Line
2026-01-31 11:50:51 +01:00
Chris Hennes 0a585dc3bb Base: Add tests for escapeXml 2026-01-31 09:09:27 +01:00
Tom Stein 49c80ebe5c Mesh: Add object name attribute to 3MF export
Export mesh object names as 'name' attribute in 3MF files according to
the 3MF specification. This allows downstream tools to identify objects
by their original FreeCAD names.

Changes:
- Moved Exporter::xmlEscape() to Base XMLTools::escapeXml() for shared XML entity escaping
- Update Writer3MF::AddMesh() to accept and output object names with default "" where no attribute will be added
- Updated all codepaths leading to 3mf exports to include the object name
2026-01-31 09:09:27 +01:00
kkocdko 44fd6754d8 Pixi: Fix qt6-wayland dep
add qt6-wayland into `./package/rattler-build/recipe.yaml` in `run` section, and run `pixi lock`
2026-01-31 09:05:03 +01:00
Ladislav Michl 0831f7e392 App: Avoid C string compare
Since we are linking to boost anyway, use boost function for case
insensitive string compare. While there, make affected methods accept
std::string arguments, which simplifies code a bit.
2026-01-30 10:58:09 +01:00
wmayer 1886bcda00 App: Fix crash in Transaction::addObjectChange
It can happen that TransactionFactory::createTransaction() fails to create a transaction object because an unsuitable type is passed
(like BadType) and returns a null pointer.

The calling instances (Transaction::addObjectChange, Transaction::addObjectDel, Transaction::addObjectNew, Transaction::addOrRemoveProperty)
do not check for a null pointer and thus cause a segmentation fault by dereferencing it.

To fix the issue change the above methods to explicitly handle a null pointer.

This fixes issue 21095.

Note: In this case it's caused by the class ViewProviderFace which on purpose isn't added to the type system so that its type will be BadType.
2026-01-30 10:58:09 +01:00
wmayer 60b0221402 App: Optimize PropertyMaterialList::getDiffuseColors()/getTransparencies() 2026-01-30 10:58:09 +01:00
wmayer 8062fadbd4 App: Replace C macros with lambda expression 2026-01-30 10:58:09 +01:00
wmayer 93ee3a3475 App: Remove assert() from PropertyXLink::Restore
If the property is added to a view provider then in debug mode this will
cause a crash while in release mode this will cause undefined behaviour
because of a static_cast.

To fix crashes remove the assert() and replace the static_cast with
freecad_cast.
2026-01-30 10:58:09 +01:00
wmayer dace71205f App: In ProjectFile::loadDocument() check for parse errors
In case a parse error occurred then return with false and do not set the DOMDocument
2026-01-30 10:56:05 +01:00
wmayer 56e687d9cc App: Refactor PropertyExpressionEngine::afterRestore()
Put the reading of each expression of an object into a try/catch block. This is to avoid that all expressions of an object may be lost.

This mitigates the issue 19866
2026-01-30 10:56:05 +01:00
wmayer 3fba587044 App: In ExpressionParser::parse add the failing expression text to the error message 2026-01-30 10:56:05 +01:00
wmayer 2799aa2700 App: Simplify and fix code for ifcopenshell version check 2026-01-30 10:56:05 +01:00
Leandro Heck 2c25b65b92 Fix warning of widgets with the same name. 2026-01-29 20:20:46 +01:00
Chase Naples b182ebdfd6 Docs: update Link copyOnChange tooltip (#26603) 2026-01-29 17:46:32 +00:00
Yash Suthar b47bb64398 Core: redirect to toolbar creation if user tries to add function when there is nothing in Tree
Signed-off-by: Yash Suthar <yashsuthar983@gmail.com>
2026-01-29 16:09:48 +01:00
Roy-043 0f2bdf280f Draft: fix autogroup behavior if active group is a layer (#27102) 2026-01-29 15:38:55 +01:00
PaddleStroke 00c3422c1f Sketcher: Tooltip when hovering expression driven constraint (#25954) 2026-01-29 15:04:40 +01:00
timpieces ad6c6bc8fd Gui: Default load/save img to working directory (#26182)
- FileOptionsDialog is only used in the 'save screenshot / save image'
  codepath, and currently it doesn't set a directory to it defaults to
  process CWD, which is surely not what the user wants.
- The load image codepath uses a custom QFileDialog instead of the
  helper code in FileDialog, there doesn't seem to be a great reason for
  this, although the helper doesn't have support for mime types it seems.
- I haven't changed the dialogs to 'set/store' the working directory. I'm
  not sure this is desired as this isn't a 'normal' save/load operation.
- It would be ideal to remove the FileOptionsDialog in future. The
  extended functionality could be turned into a separate dialog which
  opens before or after the file chooser. This would allow native dialogs
  to be used and would unify the code paths for file selection.
- Further, it would be nice to just merge at least the load image into
  the existing import/open option, and to put 'save image' next to
  'export', but those changes may be much more time consuming.

For now I've kept it simple. Let's see what others think.
2026-01-29 14:08:48 +01:00
Krrish777 32ee950210 Improve UX for Rename Property Group with tooltip 2026-01-29 14:07:28 +01:00
phaseloop 32e47bdda6 increase max line size to 120 in pylintrc 2026-01-29 14:04:36 +01:00
Roy-043 c2504d2639 BIM: fix typos in #27213 (#27225) 2026-01-29 13:04:19 +00:00
Roy-043 4f7b473a4a TechDraw update some GUI texts (Title Case mod) (#26849)
* Menu text "Align Horizontal/Vertical Chain Dimensions" to match "Align Oblique Chain Dimensions"

* Menu text "Centerline Between 2 Faces" is not correct.

* Update button text "Replace References With Current Selection" to title case

* Change task panel title from 'Add offset vertex' to 'Offset Vertex'

* Correct text casing for 'Pick points' button

* Correct text casing for 'Pick points' and 'Edit points'

* Fix capitalization of task panel section title

* Correct text case for 'Escape Picking' button

* Update texts for centerline buttons to match menu texts
2026-01-29 14:01:56 +01:00
sliptonic 63dba7bb64 Merge pull request #26951 from chennes/libe57formatTo330
LibE57format to v3.3.0
2026-01-29 06:33:59 -06:00
Chris Hennes a00db89f57 Merge pull request #25196 from pieterhijma/doc-application
Doc: Improve the documentation of Application
2026-01-29 13:31:09 +01:00
Chris Hennes c74ac37488 Merge pull request #25195 from pieterhijma/doc-document
Doc: Improve the documentation of Document
2026-01-29 13:29:43 +01:00
sliptonic 836c0c0d2e Merge pull request #25534 from chennes/msvcBlanketWarningDisabling
Build: Remove blanket disabling of deprecation warnings
2026-01-29 06:27:19 -06:00
PaddleStroke a0847c22c7 Sketcher: fix logic flaw in ConstraintLineByAngle 2026-01-29 13:15:42 +01:00
Chris Hennes 96e4071e2d Merge pull request #27134 from WandererFan/CosCircleLineStyle2
TechDraw: Fix circle centerline default line style
2026-01-29 13:14:39 +01:00
Chris Hennes 63e0c0ff49 Merge pull request #27094 from WandererFan/ProjGroupDragGoesToOrigin4
TechDraw: Projection Group jumps to origin
2026-01-29 12:52:59 +01:00
Kacper Donat 4dda92e599 Part: Fix regressions in MultiCommon boolean operation
This commit addresses two regressions in the MultiCommon feature:

1. Computation Logic: Fixed an issue where the common operation was
   calculated as the intersection of the first shape with the union of
   the rest (the default behavior of makeElementBoolean). It now
   correctly computes the intersection of all shapes sequentially.

2. Compound Handling: Added logic to expand a single compound input
   into its constituent shapes. Previously, a compound was treated
   as a single entity, leading to incorrect intersection results.

To maintain backward compatibility, a hidden 'Behavior' property is
introduced. This ensures that documents created in FreeCAD 1.0, which
rely on the previous behavior, continue to render as originally
intended while new objects use the corrected logic.
2026-01-29 12:40:20 +01:00
Vassily Checkin d3d6459484 Sketcher: fix intermittent crash on sketch exit 2026-01-29 11:42:04 +01:00
Timothy Miller 9eed3a8d77 Part: Fix mirror() regression with non-identity Placement (#26963)
* Part: Fix mirror() regression with non-identity Placement

The makeElementMirror() function incorrectly extracted and pre-multiplied
the shape's Location with the mirror transform. Since BRepBuilderAPI_Transform
already handles shapes with Location correctly, this resulted in the placement
being applied twice, producing incorrect results for shapes with non-identity
Placement.

Fixes #20834

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Part: Add regression test for mirror() with Placement

Adds testTopoShapeMirrorWithPlacement to verify that mirror() produces
identical results regardless of whether the shape is positioned via
direct coordinates or via Placement.

This test would have caught the bug fixed in the previous commit where
shapes with non-identity Placement produced incorrect mirror results.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Fix regression test for mirror with Placement

The test was incorrectly trying to create equivalent boxes using
different methods that don't actually produce the same geometry.
Part.makeBox with a direction vector is not equivalent to setting
a Placement with rotation.

Fixed to use the correct approach that demonstrates the actual bug:
- Method 1: Box with geometry at (0,30,0), identity Placement
- Method 2: Box with geometry at origin, moved via Placement

Both should produce identical mirror results, which they now do
with the makeElementMirror() fix.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

---------

Co-authored-by: Timothy Miller <theosib@zeromark.com>
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 11:05:35 +01:00
Jacob Oursland 5f0d6b4aef Pixi: pin xcb-util-cursor==0.1.5 to address cursor bug. 2026-01-29 10:07:35 +01:00
Furgo d77e77f9f4 App: Replace getAttributeAs{Integer,Float} with templated getAttribute
Template was introduced in https://github.com/FreeCAD/FreeCAD/pull/19907
2026-01-29 08:44:25 +01:00
wwmayer 2c221883c1 Test: Add test case for issue 24571 2026-01-29 08:44:25 +01:00
wwmayer 2de933793d App: Implement Save() & Restore() for int/float constraint properties
Implement the methods Save() and Restore() for PropertyIntegerConstraint and PropertyFloatConstraint. Handle also the case of a user-defined ranges.

This fixes https://github.com/FreeCAD/FreeCAD/issues/24571.

Hint: For PropertyQuantityConstraint this is not doable because it doesn't support user-defined ranges
2026-01-29 08:44:25 +01:00
graelo b0a9c6ea4b Fix quicklook appex build (#27144) 2026-01-29 08:23:04 +01:00
Roy-043 104089179c BIM: fix title case of GUI texts (#27213) 2026-01-28 21:08:27 +01:00
Alfredo Monclus 928e5e0fbb PD: preview substractive feature check for removed volume 2026-01-28 11:03:30 -03:00
Alfredo Monclus 603fc4b341 PD: hole speficify the tolerance in the boolean op
this fixes issues in which the helix is the only thing being cut and the revolve is ignored
2026-01-28 11:03:30 -03:00
Alfredo Monclus 70b9305f2e PD: hole use a compound instead of a fuse for threads 2026-01-28 11:03:30 -03:00
PaddleStroke 7bcaa766de Sketcher: Fix arc angle dragging distance 2026-01-27 16:33:30 +01:00
David Kaufman 8e04386c67 use CArea::get_accuracy instead of Point::arc_tolerance 2026-01-26 16:27:19 -05:00
PaddleStroke caff52b1ed Assembly: fix sub assembly joint bug (#27172) 2026-01-26 19:23:07 +01:00
sliptonic 1446a91bdc Merge pull request #26534 from alfrix/wayland_fix
Gui: fix skip grabMouse on Wayland
2026-01-26 11:03:58 -06:00
sliptonic bf92b99dad Merge pull request #27137 from Lgt2x/speedup-expression-completer
Expression Completer: speedup property completion
2026-01-26 11:01:30 -06:00
sliptonic 32bb7d94eb Merge pull request #27084 from chennes/catchOSErrOnBadDrive
App: Catch `OSError` during initialization with bad library dir
2026-01-26 10:52:58 -06:00
sliptonic 533b1be963 Merge pull request #27107 from PaddleStroke/asm_3patches
Assembly: Fix Assembly activation issues.
2026-01-26 10:51:28 -06:00
sliptonic ad23c0de17 Merge pull request #27116 from chennes/updateCopyrightYear
Core: Update copyright year to 2026
2026-01-26 10:49:40 -06:00
Chris 3f49793794 cam: attempt to fix issue #26652 ie. fix issue with state of recompute button for tool bit (#26884)
* cam: attempt to fix issue #26652 ie. fix issue with state of recompute button for tool bit

* add unit test for issue #26652

* run precommit

* relocate `purgeTouched()` call to end of `_update_visual_representation` function
2026-01-26 10:42:20 -06:00
David Kaufman cdce2f0ffd [CAM] separate tolerance variable used for arc fitting from tolerance used for section height offsets 2026-01-26 10:35:23 -05:00
PaddleStroke 9b6de80231 Update UtilsAssembly.py 2026-01-26 11:35:38 +01:00
freecad-gh-actions-translation-bot d574623a2e Update translations from Crowdin 2026-01-26 10:11:06 +01:00
PaddleStroke b4025abab6 Assembly: Change Joint References to remove cyclic dependency. (#25513)
* Assembly: Change Joint References to remove cyclic dependency.

* Update JointObject.py

* Update TestCore.py

* Update JointObject.py

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

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

* Update AssemblyUtils.cpp

* Update UtilsAssembly.py

* Update JointObject.py

* small fix for link groups

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2026-01-26 09:44:59 +01:00
Chris Hennes 4db0eaf171 Base: Auto-inject copyright year 2026-01-26 09:44:57 +01:00
captain0xff 11d22e326c Gui: Prevent the editing root from getting clipped 2026-01-25 10:46:36 +01:00
Captain 6aee8b81c9 PartDesign: Added interactive gizmo for draft operation (#27111)
* PartDesign: Add interactive gizmo for draft operation

* [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>
2026-01-25 00:00:07 +01:00
pre-commit-ci[bot] 78f38d5c15 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2026-01-24 21:23:51 +00:00
Louis Gombert d10bd05689 Expression Completer: speedup property completion using cache
Cache object property list in expression completer, so it is not rebuilt for every requested index. This helps with performance when an object has a large number of properties.
2026-01-24 22:11:18 +01:00
sliptonic 1a956b0f01 Merge pull request #24617 from petterreinholdtsen/cam-pre-post-dedup
CAM: Ensure pre-/postamble help text matches active values by avoiding duplication.
2026-01-24 12:03:38 -06:00
Morten Vajhøj 356fe85d01 Measurement: Added support for cylindrical surfaces (#27044)
* Added support for cylindrical surfaces

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

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

* Removed unnessecary sign

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

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

* Reverted change

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2026-01-24 17:12:16 +01:00
wandererfan b8f09bd758 [TD]clang warnings 2026-01-24 08:40:51 -05:00
wandererfan 29066c1a53 [TD]fix circle centerlines line style 2026-01-24 08:40:46 -05:00
tarman3 6a66c233f1 CAM: Profile - Start point in the middle of edges 2026-01-24 00:38:52 +02:00
PaddleStroke c9041132f9 Sketcher: add switch between radius and diameter (#26794) 2026-01-23 21:39:46 +00:00
Chris Hennes f0280bffad Core: Update copyright year to 2026 2026-01-23 14:35:00 -06:00
Petter Reinholdtsen 80a35a8765 CAM: Ensure pre-/postamble help text matches active values by avoiding duplication
Make sure to use the active default values for preamble and postamble in the help text,
and provide the current default values as the default in the add_argument().

The only exception is uccnc_post.py, where the real default value depend on the use of
--no-comments, and sending the default argument to add_argument() would change behaviour.

This change was inspired by the changes done to fix (#20792) in
d84d9c9bd1.
2026-01-23 19:43:16 +01:00
sliptonic 6c66564062 Merge pull request #21220 from dbtayl/fix_adaptive_bspline
CAM: Adaptive: Fix bspline processing
2026-01-23 12:17:51 -06:00
sliptonic fef12ad011 Merge pull request #26426 from davidgilkaufman/adaptive_fix_small_loops
CAM: Adaptive fix small loops
2026-01-23 12:17:14 -06:00
sliptonic acda0ac0ba Merge pull request #23242 from tarman3/boundary-g0
CAM: DressupBoundary - Fix G0
2026-01-23 12:11:10 -06:00
pre-commit-ci[bot] 31abd38514 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2026-01-23 16:42:54 +00:00
PaddleStroke dfada102f7 Update Document.h 2026-01-23 17:42:12 +01:00
PaddleStroke 9c6ea80757 Update ViewProviderAssembly.cpp 2026-01-23 17:40:01 +01:00
PaddleStroke 44d383b5f2 Update Document.h 2026-01-23 17:39:17 +01:00
PaddleStroke 5e882f1773 Update ActiveObjectList.cpp 2026-01-23 17:38:46 +01:00
pre-commit-ci[bot] b87899f4ca [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2026-01-23 15:19:27 +00:00
paddle 62cbaf7336 Assembly: Fix "deactivated by activating a App::Part, assembly stay in edit"
Fix "Activating a body in a part in an assembly deactivates the assembly and activate the part"
Fix "A manually deactivated assembly is still restoring later"
2026-01-23 16:09:43 +01:00
PaddleStroke abc5f90466 Assembly: prevent assembly collapse when editing sketch. (#26956)
* Gui: View provider: isAutoCollapseOnDeactivation

* Update ViewProvider.h

* Update ActiveObjectList.cpp

* Update ViewProviderAssembly.cpp

* Update ActiveObjectList.cpp
2026-01-23 16:01:06 +01:00
Amon Sha 6a0d59b0c1 Merge pull request #27077 from amon-sha/fix_sketcher_autoscale_segfault
Sketcher: fix segfault during autoscale
2026-01-23 15:18:25 +01:00
Furgo 14aca4f9f2 BIM: add regression and functional test for ArchWall's MakeBlock feature (#27002)
Co-authored-by: Roy-043 <70520633+Roy-043@users.noreply.github.com>
2026-01-23 11:37:36 +01:00
wandererfan ea58456534 [TD]avoid crash on missing ViewProviderPage 2026-01-22 19:29:08 -05:00
wandererfan bef6aafa73 [TD]handle AutoDistribute property toggle 2026-01-22 16:14:39 -05:00
wandererfan 3fca5d99ee [TD]fix secondary view drag goes to origin 2026-01-22 16:14:07 -05:00
wandererfan fd014445fb [TD]make QGIProjGroup methods public
- also adds a convenience method to return all the views in the group
2026-01-22 16:13:11 -05:00
wandererfan 5d4495785b [TD]more reliable test for DrawProjGroupItem 2026-01-22 16:11:14 -05:00
PaddleStroke e9c5feb40d Core: Overlay: Improve AutoTask mode (#26768) 2026-01-22 20:24:29 +01:00
Kacper Donat 3fdf405ce8 Merge pull request #24951 from PaddleStroke/asm_jointhighlight
Assembly: Highlight joint elements on joint selection
2026-01-22 20:16:56 +01:00
PaddleStroke bb6832897a Assembly: Solver messages (#24623)
* Assembly: Solver messages

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

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

* Update ViewProviderAssembly.cpp

* Update src/Mod/Assembly/App/AssemblyUtils.cpp

Co-authored-by: Kacper Donat <kadet1090@gmail.com>

* Update src/Mod/Assembly/App/AssemblyUtils.cpp

Co-authored-by: Kacper Donat <kadet1090@gmail.com>

* Update src/Mod/Assembly/App/AssemblyUtils.cpp

Co-authored-by: Kacper Donat <kadet1090@gmail.com>

* Update src/Mod/Assembly/Gui/Commands.cpp

Co-authored-by: Kacper Donat <kadet1090@gmail.com>

* Update ViewProviderAssembly.cpp

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

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

* Update src/Mod/Assembly/Gui/TaskAssemblyMessages.cpp

Co-authored-by: Kacper Donat <kadet1090@gmail.com>

* Update AssemblyObject.h

* Update AssemblyObject.cpp

* Update Commands.cpp

* Update ViewProviderAssembly.cpp

* Update AssemblyObject.cpp

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

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

* Thank you

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Kacper Donat <kadet1090@gmail.com>
2026-01-22 15:21:13 +01:00
Chris Hennes 9919f77642 App: Handle OSError for library directory 2026-01-22 07:46:46 -06:00
PaddleStroke 54d235f8a5 Sketcher: Show constraint type in the list 2026-01-22 10:36:35 +01:00
Roy-043 27cb425156 BIM: fix variable name error in ArchWall.py (#26991) 2026-01-22 10:22:14 +01:00
PaddleStroke 93abfc4fa4 Sketch: Forward non-default edit mode to base class. (#27063)
Ported from Codeberg commit 66dbf277

Co-authored-by: wwmayer <wmayer@freecad.org>
2026-01-21 22:41:44 +01:00
Chris Hennes 29df72c1a7 Merge pull request #25239 from graelo/quicklook-clean-pixi
feat(macos): add quicklook extensions
2026-01-21 15:27:22 -06:00
Roy-043 457a2eb300 BIM: fix Array Tools dropdown (#27060) 2026-01-21 14:49:08 +01:00
chris 1f213dd498 cmake: fix issue #25048 have cmake fail when pivy and swig use different API versions, update status messages 2026-01-20 19:08:18 -06:00
Yash Suthar 9beca4363a Sketcher: Switch to perpendicular based instead of "de la Hire" in setting minor axis of ellipse
Signed-off-by: Yash Suthar <yashsuthar983@gmail.com>
2026-01-20 22:54:07 +01:00
PaddleStroke dee4ab6dbd Gui: Fix property checkbox regression (#27049)
* Gui: Fix property checkbox regression

* Update PropertyItemDelegate.cpp

* Gui: property checkbox: toggle with enter when it has focus

* [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>
2026-01-20 20:22:29 +00:00
Roy-043 fbf5cb7e11 Draft: fix snapping to geometry on image
Fixes #26965

`self.snapObjectIndex` should be increased if the object under the cursor is not 'snappable'. This is the same principle as is used in the `cycleSnapObject` function.
2026-01-20 20:54:34 +01:00
wandererfan 396d8c503d [TD]fix vertex display in manual frame mode 2026-01-20 20:05:05 +01:00
Dimitris75 1800ef0f10 CAM Waterline OCL Adaptive
Add - Optimize Linear Paths
Remove - Unecessary BoundBox selection
2026-01-20 04:35:32 +02:00
Max Wilfinger 98c042a587 Recalculate example files 2026-01-19 22:34:15 +01:00
sliptonic cd389c6284 Merge pull request #26988 from Connor9220/AddTaperedBallNose
CAM: Add tapered ball nose toolbit/shape asset
2026-01-19 15:30:29 -06:00
Dan Taylor 4f9ef13571 CAM: Adaptive: Fix handling of BSplines (though TechDraw still has some failures that cascade) 2026-01-19 13:38:33 -06:00
PaddleStroke a49edadde2 PropertyEditor: Fix tab toggling bool (#26955) 2026-01-19 11:10:11 -06:00
Roy-043 0a8392e995 BIM: fix ArchReference Placement if whole file is used 2026-01-19 17:02:56 +00:00
Roy-043 23ce17f4d0 Draft: fix DiscretizeEllipses preference inconsistency (#26953) 2026-01-19 10:51:19 -06:00
PaddleStroke 17ac7dab3d PartDesign: allow makeShellFromUpToFace to update extrusion direction
Updated makeShellFromUpToShape to accept the direction vector by reference.
This allows the method to reverse the direction internally if required
to successfully reach the target face, fixing cases where the extrusion
would otherwise fail or go the wrong way.

Note: While passing the direction as a non-const reference is a quick
fix for this regression, it is acknowledged as non-ideal and should
be considered for future refactoring.
2026-01-19 10:39:31 -06:00
Zheng, Lei 72971d48e5 Part: Do not recompute visuals if shape did not change
This commit registers last rendered shape within the ViewProvider for
Part objects and short-circuits the visuals recomputed if shape did not
change.

Co-Authored-By: Kacper Donat <kadet1090@gmail.com>
2026-01-19 10:39:05 -06:00
Roy-043 c858e09ca5 BIM: fix placement issue in BIM_View (#27015)
* BIM: fix placement issue in BIM_View

* BIM: fix placement issue in BIM_View
2026-01-19 16:30:04 +00:00
PaddleStroke 443b71d96e PartDesign: enable LCS in 'Move after feature' 2026-01-19 16:21:50 +01:00
PaddleStroke af053f19f5 Sketcher: Fix box selection regressions. And make addSelections Print to python (#26869) 2026-01-19 09:19:38 -06:00
Furgo 2d75d1ee8c BIM: add vertical area tests (#26874)
* BIM: Add tests for ArchComponent.AreaCalculator.isFaceVertical

* BIM: test new area calculation fallback case

* BIM: add test for composite complex surface vertical area calculation
2026-01-19 15:12:18 +01:00
freecad-gh-actions-translation-bot 10a540b1bf Update translations from Crowdin 2026-01-19 08:10:24 +01:00
Max Wilfinger ea2c1b0c75 GitHub: Dispatch the diff-link updater immediately after the weekly release is created 2026-01-19 00:09:53 +01:00
Petter Reinholdtsen 78b017130a Base: Removed unused private variable decimals to avoid lint issue.
The linter report 'private field 'decimals' is not used'.  The
getDecimals() method return pack.defDecimals, which was also
used to set the value of the decimals variable in the initializer,
so the decimals variable is redundant.
2026-01-18 20:29:51 +01:00
Syres916 0a45527b8b [Sketcher] Fix serious integer typo 2026-01-18 13:59:12 +01:00
PaddleStroke c5e9e602d1 Assembly: fix crash when measure active 2026-01-18 11:04:46 +01:00
Yash Suthar 7aafb105f7 App: Prevent addObjects from extracting children of nested groups (#26846)
* App: Prevent from extracting children of nested groups

Signed-off-by: Yash Suthar <yashsuthar983@gmail.com>

* Update src/App/GeoFeatureGroupExtension.cpp

---------

Signed-off-by: Yash Suthar <yashsuthar983@gmail.com>
Co-authored-by: Kacper Donat <kadet1090@gmail.com>
2026-01-18 02:05:43 +00:00
Yash Suthar cf93c33359 Sketcher: Fix external geometry creation from LCS (#26946)
* Sketcher: Fix external geometry creation from LCS

Signed-off-by: Yash Suthar <yashsuthar983@gmail.com>

* Sketcher : Refactor used freecad_cast

Signed-off-by: Yash Suthar <yashsuthar983@gmail.com>

---------

Signed-off-by: Yash Suthar <yashsuthar983@gmail.com>
2026-01-18 00:21:45 +01:00
Billy Huddleston 51ea541969 CAM: Add tapered ball nose toolbit/shape asset
Introduced new toolbit and shape models for tapered ball nose tools,
including schema, summary, and integration into CMake and module
imports. Added corresponding SVG and FCStd files to resources.

Updated SVGs so end markers (arrows) render correctly in Qt by
converting markers to paths. Kept a source SVG with markers as
strokes (not paths) for future editing and updates.

Reworked the ToolBitEditor UI to display the toolbit to the right of the
toolbit properties, improving usability. Shrunk the overall height of
the editor window to better fit typical screen sizes.

src/Mod/CAM/CMakeLists.txt:
- Registered new taperedballnose toolbit and shape models and resources
- Added updated SVGs and source SVGs for marker compatibility

src/Mod/CAM/Path/Tool/shape/__init__.py:
- Imported ToolBitShapeTaperedBallNose and added to __all__

src/Mod/CAM/Path/Tool/shape/models/taperedballnose.py:
- Added ToolBitShapeTaperedBallNose class with schema and label

src/Mod/CAM/Path/Tool/toolbit/__init__.py:
- Imported ToolBitTaperedBallNose and added to __all__

src/Mod/CAM/Path/Tool/toolbit/models/taperedballnose.py:
- Added ToolBitTaperedBallNose class with summary and integration

Tools/Shape/taperedballnose.svg, Tools/Shape/taperedballnose.fcstd:
- Added new SVG and FCStd for tapered ball nose
- Updated SVGs for correct marker rendering in Qt
- Kept editable source SVGs with markers as strokes for future updates
2026-01-17 17:33:03 -05:00
graelo 237b0a64b7 fix(macos): check quicklook registration state before registering 2026-01-16 22:25:55 +01:00
Syres916 c14d6f8848 [Sketcher] set vertex size for new sketches to preference otherwise … (#26908)
* [Sketcher] set vertex size for new sketches to preference otherwise set to 4px

---------

Co-authored-by: Chris Hennes <chennes@gmail.com>
2026-01-16 17:52:27 +00:00
graelo 0307de98d4 chore(clean): remove support for Qt5 in src/MacAppBundle/CmakeLists.txt 2026-01-16 16:10:02 +01:00
Chris Hennes 3a553dc4f9 3rdParty/libE57Format: Update subtree to v3.3.0
Merge commit '30858e0f2b6cc88cde5635f1383bc70e40458c78' into libe57formatTo330
2026-01-15 20:30:58 -06:00
Chris Hennes 30858e0f2b Squashed 'src/3rdParty/libE57Format/' changes from d51a32d6ab7..d885ae35147
d885ae35147 {doc} Update CHANGELOG for 3.3.0
9e7c0a25e4c {cmake} Update version to 3.3.0
8b668f19380 {doc} Update CHANGELOG
dcdda358b0f {doc} Add MicMac to README
5fb956155c7 Replace codecvt_utf8_utf16(deprecatred in C++17) with WIN32 API if C++>=17
a99cbb9ac82 {ci} Update actions/checkout to v5
23a37530095 {ci} Fix CI warnings
04a913cc35e {ci, doc} Fix clang -documentation warnings (#327)
7e3079b9a35 {ci} Make Windows CI working again (#325)
bab1d8b2350 {doc} Update CHANGELOG

git-subtree-dir: src/3rdParty/libE57Format
git-subtree-split: d885ae35147dabd0ad9f6a85e46538b27b1b701c
2026-01-15 20:30:58 -06:00
Frank Martinez 3d9f640300 Remove unnecessary warnings during Mod scanning. 2026-01-15 11:06:26 -06:00
Max Wilfinger a141f8a061 Merge pull request #25825 from Lgt2x/vtk-compatibility
SMESH: Patch for VTK 9.6 compatibility
2026-01-15 10:01:38 +01:00
graelo b2e9d87971 chore(sign): update macos signing script 2026-01-15 08:57:47 +01:00
pre-commit-ci[bot] ee29d8c915 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2026-01-15 08:57:47 +01:00
graelo c83d117386 feat(macos): add quicklook extensions 2026-01-15 08:57:47 +01:00
Louis Gombert 261ca3905b Smesh: patch other VTK UG deprecations 2026-01-15 08:55:18 +01:00
Louis Gombert 3a68d91ae3 smesh: update for VTK 9.6 Types array
UG::Types is now a vtkDataArray, that should be accessed through GetCellType
2026-01-15 08:55:18 +01:00
Louis Gombert ff3e419d2e smesh: update for VTK 9.4 polyhedron rework
Implement new compactGrid method based on the upstream smesh version. The compatibility layer was removed for VTK 9.6.
2026-01-15 08:55:18 +01:00
Louis Gombert 6d4ce9e9b8 Remove usages of non thread-safe vtkUnstructuredGrid::GetFaceStream
This overload was deprecated in VTK 9.4 and removed in VTK 9.6. Replace with with the thread-safe version, that was already present in VTK 9.1
2026-01-15 08:55:18 +01:00
Louis Gombert c9acda2a65 Standardize VTK version check pre-processing directives
Check for the build date of the exact introduction of the feature instead of the next tagged version
2026-01-15 08:55:18 +01:00
Louis Gombert bd90728f88 Smesh: Remove the VTK_CELL_ARRAY_V2 compatibility define
This define was introduced in 9.0 for compatiblity with vtk 8.X, and removed for VTK 9.6. As we now support VTK>=9.1, it is not necessary to keep it.
2026-01-15 08:55:18 +01:00
Billy Huddleston c25a8fe75e CAM: Fix Path.Machine.ui/editor install and packaging
Corrected CMakeLists.txt to ensure Path/Machine/ui/editor Python files
are installed and packaged properly. The previous variable name typo
prevented these files from being included in AppImage and install
targets, though local builds worked due to build directory copying.
This resolves missing module errors on some systems and in AppImage.

src/Mod/CAM/CMakeLists.txt:
- Fixed INSTALL command to use the correct
PathPythonMachineUiEditor_SRCS variable for Path/Machine/ui/editor
- Ensured all relevant Python files are included in both build and
install steps
2026-01-15 06:15:18 +01:00
tarman3 d6e9726786 CAM: Drilling - Fix regression after #26584 (#26827)
* CAM: Drilling - Fix regression after #26584

* CAM: Linking generator - Fix machinestate handling

Fix linking generator for drilling

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

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

* Add remaining logic to terminate canned cycles appropriately (#2)

* sorted heights

* Refactor buildPostList

Introduces early tool prep to the buildpostables.
Allows emitting a T command early to give tool changer
time to index the tool before the M6 tool change command is emitted.

updates unit testing for this use case

Not implemented in postprocessors yet.

fix

* Helper and tests for terminating canned cycles

fix cycle termination

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

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

* CAM: setFeedRate now aware of drilling semantics (#3)

Remove retract plane property
machinestate properly handling z position

* next bugs (#4)

* setFeedRate now aware of drilling semantics
Remove retract plane property
machinestate properly handling z position

* unnecessary import.
Improved linking

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

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

* Fix rendering of canned cycles in G99 mode (#5)

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

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

* fix for collision  (#6)

* collision bug fix

* fix local variable

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

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

---------

Co-authored-by: sliptonic <shopinthewoods@gmail.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2026-01-15 06:13:58 +01:00
Chris Hennes 19708d4dc1 Merge pull request #26894 from furgo16/ci-ubuntu2404-with-kde-neon-qt6
CI: re-enable and upgrade native Ubuntu build to 24.04
2026-01-14 13:06:59 -06:00
paul d002e0cf46 [ArchWall] Fix: Better Info 0 Width Or 0 Height (#25878)
* [ArchWall] Fix: Better Info 0 Width Or 0 Height

Fix #25338

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

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

* [ArchWall] (Update) Fix: Better Info 0 Width Or 0 Height

Update - Following discussion at https://github.com/FreeCAD/FreeCAD/pull/25878

Fix #25338

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

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

* [ArchWall] (Update 2) Fix: Better Info 0 Width Or 0 Height

Update - Following discussion at #25878
Update 2 - Add translation

Fix #25338

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

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

* [ArchWall] (Update 3) Fix: Better Info 0 Width Or 0 Height
Update - Following discussion at #25878
Update 2 - Add translation
Update 3 - Follow comment on https://github.com/FreeCAD/FreeCAD/pull/25878#issuecomment-3724698834
         - Test of shape further relocated to after self.applyShape()

Fix #25338

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

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

* Improve warning message for ArchWall object

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Roy-043 <70520633+Roy-043@users.noreply.github.com>
2026-01-14 18:22:47 +00:00
Furgo 944188790d CI: abandon PySide6 pip approach, try KDE Neon repos 2026-01-14 16:53:15 +01:00
Furgo b7a4df9bf2 CI: reenable Ubuntu native build 2026-01-14 16:53:15 +01:00
Furgo d3629472d6 CI: upgrade Ubuntu native build to 24.04 2026-01-14 16:53:15 +01:00
Roy-043 e4eebe50d0 Add AutoColor handling for sketches in gui_setstyle.py (#25781) 2026-01-14 15:53:31 +01:00
Furgo eef47d9a66 BIM: fix ArchWallGui tests (#26904) 2026-01-14 15:46:53 +01:00
Furgo b842f0e635 BIM: provide better user information when a face horizontality or verticality cannot be determined (#26231)
* BIM: pinpoint failing face for ArchComponent.isVertical()

* BIM: pass face index when checking for verticality

* BIM: keep old comment

Co-authored-by: Roy-043 <70520633+Roy-043@users.noreply.github.com>

---------

Co-authored-by: Roy-043 <70520633+Roy-043@users.noreply.github.com>
2026-01-14 15:42:05 +01:00
PaddleStroke 4cc0a1b718 Assembly: Fix error on open doc in insert tool 2026-01-13 23:48:50 +01:00
Chris Hennes cd6aa97485 Merge pull request #26886 from AjinkyaDahale/sk-fix-symmetric-after-refactor-stage-5
Sketcher: fix `addSymmetric` after refactor stage 5
2026-01-13 15:23:43 -06:00
chris 9f9dc75627 core: qt layout ui: ux/ui: fixes #26048 keep workbench selector visible 2026-01-13 13:51:47 -06:00
PaddleStroke fc82d71c15 Sketcher: Fix symmetry of slot redundancy false positive (#26604)
* Sketcher: Fix symmetry of slot redundancy false positive

Perturb symmetric geometries when using the 'create symmetric constraints' option to avoid numerical singularities in the solver (Jacobian Rank).
If geometry is "perfect", the solver cannot distinguish between the derivative of a Symmetry constraint and an Equal constraint, flagging one as redundant.
2026-01-13 13:48:41 -06:00
Furgo 6812de49a3 BIM: implement baseless walls creation (#24595)
* BIM: Implement smart base removal for Walls

Previously, removing the Base object from an Arch Wall would cause the
wall to reset its position to the document origin and could lead to
unintended geometric changes for complex walls.

This commit introduces a "smart debasing" mechanism integrated into the
Component Task Panel's "Remove" button:

- For walls based on a single straight line, the operation now preserves
  the wall's global position and parametric `Length`, making it an
  independent object.
- For walls with complex bases (multi-segment, curved), a warning dialog
  is now presented to the user, explaining the consequences (shape
  alteration and position reset) before allowing the operation to
  proceed.

This is supported by new API functions `Arch.is_debasable()` and
`Arch.debaseWall()`, which contain the core logic for the feature.

Fixes: https://github.com/FreeCAD/FreeCAD/issues/24453

* BIM: Move wall debasing logic into ArchWall proxy

The logic for handling the removal of a wall's base object was previously
implemented directly within the generic `ComponentTaskPanel` in
`ArchComponent.py`. This created a tight coupling, forcing the generic
component UI to have specific knowledge about the `ArchWall` type.

This commit refactors the implementation to follow a more object-oriented
and polymorphic design:

1.  A new overridable method, `handleComponentRemoval(subobject)`, has been
    added to the base `ArchComponent` proxy class. Its default implementation
    maintains the standard removal behavior.

2.  The `_Wall` proxy class in `ArchWall.py` now overrides this method. All
    wall-specific debasing logic, including the eligibility check and the
    user-facing warning dialog, now resides entirely within this override.

3.  The `ComponentTaskPanel.removeElement` method has been simplified. It is
    now a generic dispatcher that calls `handleComponentRemoval` on the
    proxy of the object being edited, with no specific knowledge of object types.

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

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

* BIM: Add interactive creation of baseless walls

Introduce a new workflow for creating Arch Walls without a dependency on
a baseline object (e.g., a Draft Line).

- The `Arch_Wall` command is enhanced with a "No baseline" mode, controlled
  by a new "Walls baseline" preference, allowing users to create
  placement-driven walls directly in the 3D view.
- The existing `debaseWall` function has been refactored for correctness
  and consistency with the new baseless wall geometry.

Co-authored-by: Yorik van Havre <yorik@uncreated.net>

* BIM: Refactor structure of the Arch Wall command

Refactor the `Arch_Wall` GUI command (`BimWall.py`) for improved
readability, maintainability, and architectural clarity.

- A `WallBaselineMode` Enum is introduced to replace the original
  integer values, making the code self-documenting.
- The monolithic `create_wall` method is broken down into smaller,
  single-responsibility helper functions for each creation mode.
- The `addDefault` method has been removed, with its logic
  integrated into the new structure.

* BIM: Add Draft Stretch support for baseless walls

This commit makes the new baseless Arch Walls graphically editable using
the `Draft_Stretch` tool.

- An API for stretching (`calc_endpoints` and `set_from_endpoints`)
  has been added to the `ArchWall` proxy.
- The `Draft_Stretch` tool is now aware of baseless walls and calls this
  new proxy API to perform the stretch operation, enabling users to
  stretch them.

Co-authored-by: Yorik van Havre <yorik@uncreated.net>

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

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

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

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

* BIM: address CodeQL warnings

* BIM: Fix wall alignment for GUI creation of baseless walls

Fixes an issue whereby creating a baseless wall from the GUI would
ignore the selected `Align` property, always resulting in a
center-aligned wall.

- The underlying geometry generation for baseless walls now correctly
  honors the `Align` property passed by the GUI and API.
- To ensure predictable behavior, the implementation uses the same
  geometric convention as walls built from a base object, making the
  `Align` property work uniformly for all wall types.
- This also corrects the behavior of the `Arch.makeWall` function for
  baseless walls.
- Update unit tests to test wall alignment.

* BIM: Refactor wall geometry generation for improved clarity and maintainability

Improves the internal logic for wall geometry creation, addressing CodeQL warnings and enhancing overall maintainability without changing external behavior.

- The `build_base_from_scratch` method is refactored to unify the separate logic paths for single- and multi-layer walls, reducing code duplication.
- A local helper function is introduced to create face geometry, for better modularity and readability.
- In the `_Wall.execute` method, the control flow that relied on implicit type checking is replaced with an explicit strategy pattern for fusing solids, making the logic more robust.
- Variable names are made more descriptive.
- A NumPy-style docstring is added to better document the function.

* Draft: fix stretching of rotated baseless walls

* BIM: add unit test for stretching baseless walls

* BIM: add regression tests for working-plane-relative coordinates and reuse of base sketches

* BIM: Fix baseless wall creation to respect the working plane

Corrects an issue where baseless walls were created using global
coordinates instead of being relative to the active Draft working plane.

The calculated local placement of the wall is now correctly transformed
into the global coordinate system by multiplying it with the working
plane's placement.

* BIM: Ensure unique baselines for subsequent wall creation

Fixes a bug where creating multiple walls with baselines would
incorrectly reuse the same underlying Sketch or Draft Line object.

The object retrieval logic after the `doCommand` call now correctly uses
`ActiveObject` to get a reliable reference to the new object instead of
relying on a hardcoded name.

* BIM: Make the wall's base object label translatable

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

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

* BIM: use singular for consistency with other labels

Co-authored-by: Roy-043 <70520633+Roy-043@users.noreply.github.com>

* Fix typo

* BIM: address reviewer's comments about improving object reference passing between Python and FreeCAD contexts, and functions

* BIM: remove defensive programming: the callback is only executed as a result of a user's GUI action

* BIM: use the params API to define WallBaseline parameter

* BIM: add Arch Wall tests for joining wall logic

* BIM: add joining logic

* BIM: re-add ArchSketch support

* BIM: re-add multimaterial support on wall creation

* BIM: address CodeQL warning, remove module duplication

* BIM: fix check for SketchArch module when creating sketch-based walls

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Yorik van Havre <yorik@uncreated.net>
Co-authored-by: Roy-043 <70520633+Roy-043@users.noreply.github.com>
2026-01-13 09:30:37 +01:00
tetektoza bb48de8265 Part: Fix Part_Extrude taper angle regression for internal faces (#26781)
* Part: Fix Part_Extrude taper angle regression for internal faces

The taper angle for holes (inner wires) in `Part_Extrude` was not being
negated after the toponaming refactor, causing internal faces to taper
in the wrong direction compared to v0.21.2.

The original makeDraft function correctly handled inner wires by:
- Negating taper for all inner wires in Part_Extrude
- Negating taper only for multi-edge inner wires in PartDesign
This logic was controlled via an isPartDesign function parameter.

When makeElementDraft was introduced for toponaming support, it was
designed to use innerTaperAngleFwd/innerTaperAngleRev fields that were
never ported from realthunder's branch. The cleanup (commit c31ebeeee6)
removed references to these non-existent fields, leaving makeElementDraft
with no inner wire taper handling at all.

So, this fix ports the makeDraft inner wire logic to makeElementDraft by
adding the flag, and counting wires and then triggering proper angle
flip depending on the flag/wire situation.

---------

Co-authored-by: Chris Hennes <chennes@pioneerlibrarysystem.org>
2026-01-13 05:52:43 +00:00
PaddleStroke 5792b1173c Gui: Fix broken build in DlgAddProperty.cpp (#26877)
* Gui: Fix broken build in DlgAddProperty.cpp

---------

Co-authored-by: Chris Hennes <chennes@pioneerlibrarysystem.org>
2026-01-13 00:01:17 +00:00
PaddleStroke 168cebd41f PartDesign: Extrude: Fix upToShape document not recomputing correctly (#26696)
* PartDesign: Extrude: Fix dir for upToShape

* Update FeatureExtrude.h

* Update FeatureExtrude.h

* Update FeatureExtrude.cpp

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

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

* Update FeatureExtrude.cpp

* Update FeatureExtrude.h

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2026-01-12 23:07:47 +00:00
Ajinkya Dahale 14280cdbf7 Sketcher: Add new constraints after running addSymmetric
Missed during refactor
2026-01-13 03:32:15 +05:30
Ajinkya Dahale e1a431d5ee Sketcher: Use new constraint element access in add/getSymmetric 2026-01-13 03:32:15 +05:30
dependabot[bot] 08a738a195 Bump github/issue-metrics from 3.25.4 to 3.25.5
Bumps [github/issue-metrics](https://github.com/github/issue-metrics) from 3.25.4 to 3.25.5.
- [Release notes](https://github.com/github/issue-metrics/releases)
- [Commits](https://github.com/github/issue-metrics/compare/55bb0b704982057a101ab7515fb72b2293927c8a...67526e7bd8100b870f10b1c120780a8375777b43)

---
updated-dependencies:
- dependency-name: github/issue-metrics
  dependency-version: 3.25.5
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-01-12 21:27:08 +01:00
Billy Huddleston 650ebf693e CAM: Add threshold for treating large-radius arcs as linear in simulator
Arc segments with extremely large radius compared to chord length can
cause floating-point precision issues in simulation. This change
introduces ARC_LINEARIZATION_THRESHOLD to treat such arcs as linear,
improving numerical stability in the simulator.

The following g-code was causing erractic behavior in the simulator due
to large-radius arcs:
```
G2 I88775.835760 J-1936991.545892 K0.000000 X102.063107 Y100.102815 Z12.700001
```

src/Mod/CAM/PathSimulator/AppGL/MillPathSegment.cpp:
- Added ARC_LINEARIZATION_THRESHOLD constant
- Updated arc motion detection to treat large-radius arcs as linear
- Improved handling of arc vs. linear segment classification
2026-01-12 10:52:06 -06:00
Gaël Écorchard 9aa1eb2b0c pixi: Add qt6-wayland dependency on Linux
Signed-off-by: Gaël Écorchard <gael@km-robotics.cz>
2026-01-12 10:50:19 -06:00
Roy-043 2019ff051e Draft: fix constrain error if there is no new point (#26868)
* Add None check before constraining new_point

* [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>
2026-01-12 16:12:13 +01:00
Yash Suthar 2a3dd9cfd6 BIM : Preserve Spreadsheet structure (#26736)
Signed-off-by: Yash Suthar <yashsuthar983@gmail.com>
2026-01-12 16:09:56 +01:00
Pieter Hijma 0537bd6c36 Doc: Add a topic for element mapping 2026-01-12 10:36:11 +01:00
Pieter Hijma 171a14f542 Doc: Improve documentation element mapping 2026-01-12 10:36:09 +01:00
Pieter Hijma 88c2e9122e Doc: Improve the Expression Framework topic 2026-01-12 10:11:54 +01:00
Pieter Hijma 817c8e9dd3 Doc: Improve App::PropertyExpressionEngine docs 2026-01-12 10:11:54 +01:00
Pieter Hijma 8f110b59e7 Doc: Move doc comments in PropertyExpressionEngine
Several doc comments in App/PropertyExpressionEngine.cpp are moved to
header files.
2026-01-12 10:11:54 +01:00
Pieter Hijma 6afb6f7071 Doc: Improve the App::Expression documentation 2026-01-12 10:11:54 +01:00
Pieter Hijma 250b3790dd Doc: Move doc comments in App::Expression
Several doc comments in App/Expression.cpp are moved to header files.
2026-01-12 10:11:53 +01:00
Pieter Hijma fac384d677 Doc: Add a topic for App::link 2026-01-12 10:01:45 +01:00
Pieter Hijma 401400cbcd Doc: Apply cog to Link.h and Link.cpp
Cog is reapplied to create improved documentation for LinkParams.  See
LinkParams.py
2026-01-12 10:01:45 +01:00
Pieter Hijma 16592cae48 Doc: Improve the App::Link documentation 2026-01-12 10:01:43 +01:00
Pieter Hijma 393434026a Doc: Add a topic for App::Application 2026-01-12 09:38:45 +01:00
Pieter Hijma d4a115df06 [Doc] Improve the App::Application documentation 2026-01-12 09:38:42 +01:00
Pieter Hijma df85b59de9 Doc: Improve the topic for App::Document 2026-01-12 09:19:05 +01:00
Pieter Hijma bd3a7c1368 Doc: Improve App::Document documentation 2026-01-12 09:19:03 +01:00
Pieter Hijma c093fd484c Doc: Add a topic for App::DocumentObject 2026-01-12 08:39:53 +01:00
Pieter Hijma 788fe423e8 Doc: Improve App::DocumentObject documentation
It also improves documentation from other files for relevant dependent
functions.
2026-01-12 08:39:48 +01:00
Pieter Hijma d0b1191b2d Doc: Move App::DocumentObject documentation
App::DocumentObject had docstrings both in the cpp file and in the
header file.  All documentation has been moved to the header file. In
cases where documentation existed in both the header and cpp file, the
documentation has been reconciled.
2026-01-12 08:27:51 +01:00
Kacper Donat 47bd6ac99e PartDesign: Recompute preview only if enabled (#26805)
Co-authored-by: Chris Hennes <chennes@pioneerlibrarysystem.org>
2026-01-12 07:20:57 +00:00
Pieter Hijma b173365653 Gui: Add common types to Add Property dialog (#26765)
* Gui: Add common types to Add Property dialog

Add a preselection of commonly used types in the Add Property dialog.
The dialog supports now all properties that have an editor.  This
doesn't necessarily mean that the editor is shown in the Add Property
dialog; some properties should not show their editor in the Add Property
dialog, such as vector and placement.

* Gui: Make Add Property dialog Qt 6 compatible

This change stops using a Qt 6.10 feature and makes it compatible with
all of Qt 6.

* Update src/Gui/Dialogs/DlgAddProperty.cpp

---------

Co-authored-by: Chris Hennes <chennes@pioneerlibrarysystem.org>
2026-01-12 07:02:11 +00:00
Rahul Paul a628391406 Test: Add copy button (#25979)
* added a copy button which copies all the errors and traceback to clipboard

* removed unused variable

* removed space at end of Copy string

* copied text notification in status bar

* removed unwanted header

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

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

* Test: Address review comments

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Chris Hennes <chennes@pioneerlibrarysystem.org>
2026-01-12 06:35:23 +00:00
Roy-043 95b2a41e78 BIM: fix crazy edge issue with area calculation
Fixes #26777.

The code uses a TechDraw function that considers overly long edges (> ca. 10m) 'crazy'. We need to temporarily change a parameter.
2026-01-11 22:27:11 -06:00
dependabot[bot] 06d490fa4d Bump actions/setup-python from 6.0.0 to 6.1.0
Bumps [actions/setup-python](https://github.com/actions/setup-python) from 6.0.0 to 6.1.0.
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](https://github.com/actions/setup-python/compare/e797f83bcb11b83ae66e0230d6156d7c80228e7c...83679a892e2d95755f2dac6acb0bfd1e9ac5d548)

---
updated-dependencies:
- dependency-name: actions/setup-python
  dependency-version: 6.1.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-01-11 22:12:14 -06:00
Kacper Donat 4fae2b83f8 PartDesign: Apply pattern transform in Feature not VP
This is followup for https://github.com/FreeCAD/FreeCAD/pull/26563 which
fixed previews for a given file but broke it for others.

This approach should be more robust as it is applied in the Feature
itself and not on view provider level which should give us more precise
control and per feature transform ability.
2026-01-11 20:45:03 -06:00
Kacper Donat 800990bacd Part: Introduce PreviewUpdateScheduler
This commit introduces PreviewUpdateScheduler class that is responsible
to schedule the true recompute of the preview. View Providers (or other
components) can use this service to ask for the preview recompute to
happend at a time that is convinent for a program and that won't impact
performance.

The provided implementation uses Queued Connections in Qt to calculate
preview essentially on next run of the event loop. It allows business
logic in FreeCAD (like property propagation) to execute fully and then
recompute preview once. This greately reduces number of recompute calls
for previews.
2026-01-11 20:32:50 -06:00
Chris 12d1dba109 Build: cmake: fixes #26247 update cmake to work with new required dep lark for BIM (#26407) 2026-01-11 19:55:38 -06:00
Fabio Rossi 419e1822b8 fix hdf5 detection
avoid side-effects of reusing cached variables (defined PCHDF5_FOUND for
pkgconfig and HDF5_HEAD_FOUND for hdf5.h detections)
2026-01-11 19:50:59 -06:00
freecad-gh-actions-translation-bot 7ddee25ec9 Update translations from Crowdin 2026-01-11 19:42:50 -06:00
timpieces 50c22e10ce Macro: Fix shortcuts in macro editor #26807
- The initial commit to block shortcuts in text edit fields
  (particularly for MacOS, where those shortcuts would activate FreeCAD
  functionality rather than text edit functionality) made a wrong
  assumption.
- It assumed that there were no text edit fields where we would want to
  actually use application shortcuts. In retrospect, this was very
  wrong, and I completely missed the macro editor.
- For now, it should be fine to change the field to only cover
  'LineEdit'. I cannot imagine a case where you'd want to (e.g.) save
  text/document from a LineEdit, but if anyone knows of one then please
  let me know.
- This does mean there are some quirks. For example in the materials
  editor, the description is a TextEdit field. Some text editing
  shortcuts won't work in here now (similar to how they didn't before
  the original commit that I made).
- I've since learned that freecad also has a text editor functionality,
  I've tested that now Cmd+S works for save as it should.
2026-01-11 09:52:06 -06:00
luzpaz bfb911792e CAM: fix typo in Path/Main/Gui/Job.py
Fixes source comment typo
2026-01-11 16:22:05 +01:00
Billy Huddleston f071c5950c CAM: Remove file added by accident.
generate_machine_box.py was added to a PR by mistake.  This PR removes it.
2026-01-11 07:10:23 +01:00
sliptonic b5c289eff0 Merge pull request #26533 from Connor9220/Machine
CAM: Add Machine Library and Editor
2026-01-10 14:33:54 -06:00
Roy-043 bfb72a6925 Add files via upload 2026-01-10 12:30:35 +01:00
tarman3 eec27888bc CAM: Boundary Dressup Fix G0 2026-01-10 12:48:03 +02:00
tarman3 bc81a16eb4 CAM: Engrave - Fix regression in Task panel after #22304 2026-01-10 10:04:39 +02:00
Chris Hennes e8af1e42d1 Merge pull request #26811 from kadet1090/ci-fixes
CI: Disalbe ubuntu run temporarily
2026-01-10 00:16:21 -06:00
Billy Huddleston 7094424820 CAM: Refactor Machine Editor UI, replace QToolBox with tabs
Major refactor of the Machine Editor to use QTabWidget for section
navigation. Added tabbed spindle management with add/remove
functionality, split machine configuration into Output Options, G-Code
Blocks, and Processing Options tabs. Updated preferences UI to use tabs
instead of QToolBox.

src/Mod/CAM/Gui/Resources/preferences/PathJob.ui:
- Replace QToolBox with QTabWidget for preferences tabs

src/Mod/CAM/Path/Dressup/Gui/Preferences.py:
- Use QWidget with vertical layout instead of QToolBox for dressup
preferences

src/Mod/CAM/Path/Machine/ui/editor/machine_editor.py:
- Refactor to use QTabWidget for editor sections
- Implement tabbed spindle management with add/remove
- Split configuration into Output Options, G-Code Blocks, and Processing
 Options tabs
- Update post processor selection logic

src/Mod/CAM/Path/Main/Gui/PreferencesJob.py:
- Update to use tabWidget instead of toolBox

src/Mod/CAM/Path/Tool/assets/ui/preferences.py:
- Use QWidget and direct layout instead of QToolBox for asset
preferences
2026-01-09 22:13:16 -05:00
Roy-043 fe86abea92 TechDraw: fix-wrong sWhatsThis for align-commands
sWhatsThis should match the command name.
2026-01-10 00:48:40 +01:00
Kacper Donat ca1c5eb322 CI: Disable ubuntu run temporarily 2026-01-10 00:17:39 +01:00
Kacper Donat 77ee600544 CI: Change github.ref into github.head_ref
This actually allows us to check source branch
2026-01-10 00:13:02 +01:00
Louis Gombert c1b40e3dfc PartDesign: remove preview update on property changed (#26803)
This recompute seemed unnecessary, and caused slowdowns when opening the file and recomputing. This decreases the time necessary to both open and recompute files that use boolean operations, and should not change anything regarding preview computation when the dialog is open.
2026-01-09 23:05:23 +00:00
sliptonic af2d178e57 CAM: Adding retract annotation to drilling commands (#26584)
* Adding retract annotation to drilling commands

checkpoint

* [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>
2026-01-09 19:11:00 +01:00
Roy-043 1eb3742dc7 BIM: Improve ArchStairs Landings code
See https://github.com/FreeCAD/FreeCAD/pull/25278#discussion_r2531791450
2026-01-09 18:46:56 +01:00
sliptonic e9227a6c8a Merge pull request #23980 from davidgilkaufman/adaptive_auto_helix
[CAM] Adaptive automatically pick diameter of helix entrance
2026-01-09 11:46:27 -06:00
sliptonic e45ea4ed13 Merge pull request #25697 from tarman3/profile_numpasses
CAM: Profile - Limit value NumPasses
2026-01-09 11:45:15 -06:00
Louis Gombert 193a789354 CMake: only find Netgen when using internal smesh 2026-01-09 18:42:25 +01:00
Louis Gombert 96f8b3a43b CMake: require Netgen when BUILD_FEM_NETGEN is ON, don't fail silently 2026-01-09 18:42:25 +01:00
sliptonic b27eaa5387 Merge pull request #25842 from tarman3/slot_clearance
CAM: Slot - Remove duplication move to clearance height in the end
2026-01-09 11:42:15 -06:00
sliptonic 4b3353bcb9 Merge pull request #26127 from tarman3/tag_tol
CAM: Tag Dressup - Tolerance
2026-01-09 11:36:09 -06:00
sliptonic 1427969fbc Merge pull request #26128 from tarman3/engrave_tol
CAM: EngraveBase - Tolerance
2026-01-09 11:35:51 -06:00
sliptonic 4e008d04e5 Merge pull request #26321 from tarman3/job_setCenterOfRotation
CAM: Job - Fix setCenterOfRotation()
2026-01-09 11:34:49 -06:00
wmayer b180728b9d Assembly: Improve const correctness 2026-01-09 18:09:48 +01:00
wmayer 70d8187964 Assembly: Minor refactor in ViewProviderAssembly::findDragMode
Co-Developed-by: PaddleStroke <pierrelouis.boyer@gmail.com>
2026-01-09 18:09:48 +01:00
sliptonic d2d0e7e3e9 Merge pull request #26658 from Dimitris75/CAM---Experimental-Waterline-Minor-Fixs
CAM - Experimental Waterline Minor Fix
2026-01-09 10:49:41 -06:00
sliptonic 36349357ff Merge pull request #26695 from tarman3/rampentry_zmin
CAM: RampEntryDressup - Fix findMinZ()
2026-01-09 10:45:37 -06:00
sliptonic af1742c0db Merge pull request #26553 from Dimitris75/3D-Surface-Rotational-Scan
CAM: Fix 3D Surface Rotational Scan
2026-01-09 10:43:08 -06:00
petterreinholdtsen dd2ab0e9a1 CAM: Dropped trailing percent from fanuc post processor output. (#26617)
* CAM: Dropped trailing percent from fanuc post processor output.

A trailing percent cause one Fanuc controller to hang when the program
is completed when drip feeding G code, and the minicom ascii upload
was unable to complete the upload.

Had to use emergecy stop to get the machine out of the hang.

* CAM: Adjust Fanuc post processor test to no longer expect trailing percent.
2026-01-09 10:40:02 -06:00
Stanislav a5f66f7240 Draft Workbench: Patch for import DXF without CODE30 (Z for POINT) (#26778)
* Patch for DXF without CODE30 (Z for POINT)

Time to time I use DXF file from measurement microscope without Z for POINT.
This patch help me for download this files without errors.

* [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>
2026-01-09 11:00:36 +01:00
PaddleStroke 5339f415be Assembly: Explode radially: prevent click on item 2026-01-08 20:42:12 -06:00
sliptonic 67d280508b more machine cleanup 2026-01-08 19:26:26 -05:00
pre-commit-ci[bot] ef3bbfdc93 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2026-01-08 19:26:25 -05:00
sliptonic 7eb849f4c6 Revise machine 2026-01-08 19:26:25 -05:00
sliptonic 14c23be550 Code cleanup. 2026-01-08 19:26:25 -05:00
sliptonic 8653c25853 Rearranged some properties.
added back bcnc comment output
2026-01-08 19:26:25 -05:00
Billy Huddleston a2e2f5b518 CAM: Remove colons from labels, fix lint, and update imports
Removed explicit colons from all form labels.
Fixed lint warnings and replaced wildcard imports with explicit
imports for clarity and maintainability.

src/Mod/CAM/Path/Machine/ui/editor/machine_editor.py:
- Removed ':' from all form labels
- Fixed lint warnings (missing docstrings, empty except, etc.)
- Replaced wildcard imports with explicit imports

src/Mod/CAM/Path/Machine/models/__init__.py:
- Updated __all__ and imports for explicit API

src/Mod/CAM/Path/Tool/assets/ui/preferences.py:
- Updated imports to use package-level import

src/Mod/CAM/Path/Machine/models/machine.py:
- Added explanatory comments to empty except blocks
- Fixed duplicate variable assignment
- Added missing class docstrings

src/Mod/CAM/CAMTests/TestMachine.py:
- Fixed unused variable warning by using returned filepath
2026-01-08 19:26:25 -05:00
Billy Huddleston 9a23768983 CAM: Add Machine Library and Editor
This PR introduces a machine object and a machine library, along with a
new machine editor dialog for creating and editing *.fcm machine asset
files. The editor is integrated into the CAM preferences panel, with new
Python modules for the dialog and minimal model validation. Machine
management (add, edit, delete) is now available in the CAM asset
preferences panel.

Key Features:
- Machines now have a type and units property. The machine type can be
used to distinguish between different classes of machines (e.g., mill,
lathe, laser).
- Machine units are stored internally and in the .fcm JSON file as
metric. Note: This differs from how toolbits work (which store units in
their native units)
- Support for 2-5 axis machines.
- Support for multiple spindles (up to 9)
- Processor defaults
- JSON Text Editor with basic validation and line numbers.
2026-01-08 19:26:25 -05:00
Max Wilfinger 5fbd150b18 Part: Fix orientation of internal shells of a solid (#26717)
* Part: Fix orientation of internal shells of a solid

If a solid consists of multiple shells then it can happen that the
internal shells have incorrect orientation that leads to a broken solid.

This fixes issue https://github.com/FreeCAD/FreeCAD/issues/24994

* Part: Add method Feature::fixSolids

This method explicitly checks for solids with the error
'BRepCheck_EnclosedRegion' that means that internal shells of a solid
are wrong.

Using ShapeFix_Solid fixes the solid.

---------

Co-authored-by: wwmayer <wmayer@freecad.org>
2026-01-08 10:35:26 -06:00
Max Wilfinger 3616611ea3 Gui: Handle exception in showValidExpression (#26721)
* Gui: Handle exception in showValidExpression

If an exception is raised inside showValidExpression() because the
expression cannot be evaluated then handle the exception and show it as
invalid expression.

This fixes issue: https://github.com/FreeCAD/FreeCAD/issues/26501
---------

Co-authored-by: wwmayer <wmayer@freecad.org>
2026-01-08 10:34:12 -06:00
Max Wilfinger b0331ed979 PD: Handle reference edge in PolarPattern::getTransformations (#26722)
This fixes issue https://github.com/FreeCAD/FreeCAD/issues/24700

---------

Co-authored-by: wwmayer <wmayer@freecad.org>
2026-01-08 10:31:42 -06:00
Max Wilfinger 78dba6c4a9 Adds an automatic compare link to the weekly release notes. 2026-01-08 10:20:11 -06:00
tetektoza 887c8d3bdf Sketcher: Fix crash when applying constraints during selection batching
Currently, the selection batching optimization introduced in #26663
stores ElementItem/ConstraintItem pointers in a buffer to be processed
on the next event loop cycle via `QTimer::singleShot`.

When a constraint is applied,
`slotElementsChanged()/slotConstraintsChanged()`
rebuilds the list widget, destroying all items. However, the selection
buffer was not cleared, leaving dangling pointers. When
`processSelectionBuffer()`
executed, it attempted to call `QListWidget::row()` on deleted items,
causing a segmentation fault.

So, this patch fixes it by clearing `selectionBuffer` when the list is
rebuilt, since the buffered pointers are invalidated anyway.
2026-01-08 10:17:35 -06:00
PaddleStroke 830329f0fc Add files via upload 2026-01-08 14:46:06 +01:00
tetektoza 0baf444c3e Revert "PartDesign: Bake in geometry transform after boolean"
This reverts commit 527b2de560.

The `bakeInTransform()` call uses `transformGeometry()` which converts
planar faces to BSplineSurfaces. This prevents the refine algorithm
(BRepBuilderAPI_RefineModel) from detecting and merging coplanar faces,
breaking the Refine option for Boolean operations.

This matches Part WB's Boolean behavior which does not use
`bakeInTransform()` and has working refine functionality.
2026-01-08 13:40:52 +01:00
Kacper Donat 8dffa07978 Merge pull request #19132 from tritao/base-remove-boost-signals
Base: Remove Boost-based signals and switch to `FastSignals`.
2026-01-08 12:41:29 +01:00
Saksham Malhotra db8c90b788 Fix sketch redundancy warning (#26064) 2026-01-08 07:53:26 +00:00
PaddleStroke 73a021ca1a Assembly: Ground joint tooltip update (#25852) 2026-01-08 03:52:41 +00:00
tritao 69058376e6 Base: Remove Boost-based signals and switch to FastSignals. 2026-01-07 21:16:16 +00:00
PaddleStroke 11c709d4df Merge pull request #26720 from PaddleStroke/patch-971612
Measure: Fix build failure of new MeasureDiameter
2026-01-07 18:49:39 +00:00
Joao Matos 4ed69332c5 FastSignals: Remove custom C++17 and libc++ build flags. 2026-01-07 15:22:40 +00:00
Joao Matos dc16fe1163 FastSignals: Fix Clang Tidy issues. 2026-01-07 15:22:40 +00:00
Joao Matos d11beca852 FastSignals: Replace ATOMIC_VAR_INIT usages with C++ 20 brace init.
Fixes the following issue:

```
Warning:
/Users/runner/work/FreeCAD/FreeCAD/src/3rdParty/FastSignals/libfastsignals/include/fastsignals/connection.h:76:32:
warning: macro 'ATOMIC_VAR_INIT' has been marked as deprecated
[-Wdeprecated-pragma]
   76 |         std::atomic<bool> m_blocked = ATOMIC_VAR_INIT(false);
      |                                       ^
```
2026-01-07 15:22:40 +00:00
Joao Matos cb69623d1f FastSignals: Fix stress tests. 2026-01-07 15:22:40 +00:00
Joao Matos 9d9b17f972 FastSignals: Build as static library by default. 2026-01-07 15:22:40 +00:00
Joao Matos 95009abb1a FastSignals: Silence warning. 2026-01-07 15:22:40 +00:00
Joao Matos 3e9dbad671 FastSignals: Remove MSVC autolinking. 2026-01-07 15:22:40 +00:00
Joao Matos 4dbc9a8247 FastSignals: Normalize namespace to fastsignals. 2026-01-07 15:22:40 +00:00
Joao Matos 2e8ba02295 FastSignals: Update Catch2 to latest v2 version. 2026-01-07 15:22:40 +00:00
Joao Matos f09bf67217 FastSignals: Add missing <cstdef> include. 2026-01-07 15:22:40 +00:00
Joao Matos 158cf6616e FastSignals: Reorganize include and src folder. 2026-01-07 15:22:40 +00:00
Joao Matos dd24bd47e2 FastSignals: Normalize CMake files. 2026-01-07 15:22:40 +00:00
Joao Matos c045cd68c9 FastSignals: Remove unused build files. 2026-01-07 15:22:40 +00:00
Joao Matos af30d785bd 3rdParty: Add FastSignals library. 2026-01-07 15:22:40 +00:00
wmayer f9cbeb91b1 Simplify code using xerces namespace 2026-01-07 14:37:59 +01:00
Kacper Donat ad0ad85b77 CI: Limit backports to pixi only 2026-01-07 07:11:30 -06:00
jffmichi ae8412468a CAM: fix Radius Mill TipDiameter resetting 2026-01-07 11:53:35 +01:00
Krrish777 123a142292 Improve error message for empty transformed features 2026-01-07 10:20:24 +01:00
xtemp09 58b5820731 Merge pull request #23743 from xtemp09/fem-fix
[FEM] Modernize `QObject::connect` with the new syntax in FEM
2026-01-07 10:18:14 +01:00
aditya dubey a84c748b32 Merge pull request #26057 from TONY8779/fix-fem-existance-typo
Fix typo in FEM module: 'existance' -> 'existence'
2026-01-07 10:17:09 +01:00
Max Wilfinger 3cdc42fd58 Merge pull request #25897 from marioalexis84/fem-magnetic_flux_density 2026-01-07 10:15:20 +01:00
Louis Gombert ec7bbbfdd4 TechDraw: improve draw performance
call 'boundingRect' only after all items have been drawn, using a custom 'addToGroup' function that does not trigger an update.
2026-01-07 09:28:08 +01:00
Krish Sharma 850ad9e0fc Gui: Reorder Add Property dialog fields to Name-Value-Group-Type (#26567)
* Gui: Move Tooltip field after Value field in Add Property dialog

* Gui: Reorder Add Property dialog fields to Group-Type-Name-Value-Tooltip
2026-01-07 09:24:16 +01:00
Leandro Heck d0c7ab7d62 Sketcher: Support Bezier and Offset curves as external geometry (#25144)
* Sketcher: Support Bezier and Offset curves as external geometry

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

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

* Sketcher: Fix adding projection of external arc of circle

In processEdge() it's checked if first and last point of the projected arc of circle are almost equal. If yes then a full circle
is assumed but this conclusion is not necessarily correct because it's still possible that the external arc of circle is very
short. The better criterion is to check the parameter range of the arc of circle.

See also: https://github.com/FreeCAD/FreeCAD/pull/25144#issuecomment-3502916685

---------

Co-authored-by: wwmayer <wmayer@freecad.org>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2026-01-07 09:23:28 +01:00
Max Wilfinger e9a66713ef Merge pull request #22951 from AjinkyaDahale/sk-refactor-stage-5
[Sketcher] Stage 5 of refactors
2026-01-07 09:23:10 +01:00
mac-the-bike f548697603 FEM: Addition of "half cycle" animation (#24129)
* Animation of Results - addition of half cycle

* Delete src/Mod/Fem/Gui/Resources/ui/ResultShow.ui

* Delete src/Mod/Fem/femtaskpanels/task_result_mechanical.py

* Delete src/Mod/Fem/femviewprovider/view_result_mechanical.py

* Add files via upload

* Add files via upload

* Add files via upload

* Update view_result_mechanical.py

* Update task_result_mechanical.py

* Update task_result_mechanical.py

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

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

* Delete user_guide_animate.txt

* Delete results.png

---------

Co-authored-by: mac-the-bike <mac-the-bike@users.noreply.github.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2026-01-07 09:22:07 +01:00
PaddleStroke 8bfbeac40f PartDesign: Enable drag and drop of shapeBinders (#25264)
* PartDesign: Enable drag and drop of shapeBinders

* [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>
2026-01-07 09:21:58 +01:00
Kavin Teenakul 5e482a8310 [Std_Measure] Add diameter measurement (#24853)
* Add diameter measurement support

* change author name and change icon

* correct svg size to 64x64

* Update src/Mod/Measure/App/MeasureDiameter.cpp

Co-authored-by: Kacper Donat <kadet1090@gmail.com>

* somehow to icon color is undefine in inkscape, change to black

* Revert "somehow to icon color is undefine in inkscape, change to black"

This reverts commit 2277c1b9f4a7ab7519856986e2d6aec6e37ebf3e.

	modified:   src/Mod/Measure/Gui/Resources/icons/Measurement-Diameter.svg

* fix black color icon

---------

Co-authored-by: Kacper Donat <kadet1090@gmail.com>
2026-01-07 09:16:24 +01:00
Kacper Donat 77a43c55ef Merge pull request #26703 from tetektoza/fix/25840_draw_parts_of_constraints_ontop_of_others
Gui: Render constraint text, arrowheads and constraint icons above geometry lines
2026-01-07 05:39:05 +01:00
tetektoza b1fdf659d8 Sketcher: Disable depth testing for constraint icons
Add `SoDepthBuffer` nodes around the constraint group to disable depth
testing for constraint icons. This ensures icons render on top of
geometry lines regardless of Z position, improving visibility and
selectability.
2026-01-06 20:08:35 +01:00
tetektoza 4aa4f2663e Gui: Render constraint text and arrowheads above geometry lines
Add Z offset for arrowheads and explicitly enable depth testing for
constraint lines in SoDatumLabel. This ensures constraint lines render
below geometry (respecting zConstr level) while text and arrowheads
render on top for better visibility and selection.
2026-01-06 20:07:25 +01:00
drwho495 9b64da827a TopoNaming: Improve ElementMapVersion definition. (#26691)
This change makes the program only mark an object's ElementMapVersion with the "1" prefix if the object has a hasher AND an element map.
2026-01-06 15:36:19 +00:00
tarman3 22f40741ee CAM: LeadInOut - ArcZ following profile 2026-01-06 14:59:25 +02:00
tarman3 2d33855432 CAM: RampEntryDressup - Fix findMinZ() 2026-01-06 10:11:40 +02:00
pre-commit-ci[bot] c19eb5c0e0 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2026-01-06 01:40:39 +00:00
Ajinkya Dahale 9791d3f6d5 Sketcher: Override clang-format for some readability
See https://github.com/FreeCAD/FreeCAD/pull/22951#discussion_r2314544159.
2026-01-06 07:08:17 +05:30
Ajinkya Dahale 9000dc3c70 Sketcher: Add test stubs for SketchObject::addCopy() 2026-01-06 05:59:10 +05:30
Ajinkya Dahale e9469d93cc [Sketcher] Use replaceGeometries() in join() 2026-01-06 05:59:10 +05:30
Ajinkya Dahale 50a091c0ca [Sketcher] Use auto where possible 2026-01-06 05:59:10 +05:30
Ajinkya Dahale c02969da9c [Sketcher] Refactor SketchObject::updateGeometryRefs() 2026-01-06 05:59:10 +05:30
Ajinkya Dahale 9993cc123c [Sketcher] Refactor SketchObject::onChanged()
Break into pieces depending on which property has been passed.
2026-01-06 05:59:10 +05:30
Ajinkya Dahale e34d6604d7 [Sketcher] Refactor removeAxesAlignment()
Use switch case for more readability, and move some if and for indentations
2026-01-06 05:59:10 +05:30
Ajinkya Dahale abc3c74abd [Sketcher] Refactor SketchObject::validateExpression() 2026-01-06 05:59:10 +05:30
Ajinkya Dahale 585ce5ec03 [Sketcher] Refactor SketchObject::migrateSketch()
Manipulate some if-else statements, for loops, and possibly replace them with
std algorithms.
2026-01-06 05:59:10 +05:30
Ajinkya Dahale 169a10c7d2 [Sketcher] Refactor some if-else statements in SketchObject 2026-01-06 05:59:10 +05:30
Ajinkya Dahale 0c2f4df8d5 [Sketcher] Refactor addSymmetric and getSymmetric
Rearrange some if-else and use `std::find_if` instead of looping.

[Sketcher][WIP] Refactor `getSymmetric` and `addSymmetric`
2026-01-06 05:59:10 +05:30
Ajinkya Dahale 78cdd8d59d [Sketcher] Refactor delExternalPrivate() 2026-01-06 05:59:10 +05:30
Ajinkya Dahale bf51899580 Sketcher: [test] Add test for addExternal and delExternal 2026-01-06 05:59:10 +05:30
Ajinkya Dahale 0ea4c7c280 [Sketcher] Move some checks to Constraint 2026-01-06 05:59:10 +05:30
Ajinkya Dahale 38a0443195 [Sketcher] Use range-for loop where straightforward 2026-01-06 05:59:04 +05:30
Ajinkya Dahale db5ffb4769 [Sketcher] Refactor SketchObject::addCopy()
if and for rearrangement for readability.
2026-01-06 05:42:44 +05:30
Ajinkya Dahale 43a257a1cb [Sketcher] Refactor SketchObject some more 2026-01-06 05:42:44 +05:30
Ajinkya Dahale 8e46e74ee5 [Sketcher] Refactor based on loops and extraction into functions
May contain some untested changes
2026-01-06 05:42:44 +05:30
Ajinkya Dahale a16be08159 [Sketcher] Refactor some loops for understandability
Changes include:
1. Modernize `for` loops with range whenever possible.
2. Flip `if` statements for a "flatter" flow.
3. Use internal functions for repeated identical tasks.
2026-01-06 05:42:44 +05:30
Ajinkya Dahale ca97889e47 [Sketcher] Refactor SketchObject:validateExternalLinks() 2026-01-06 05:42:44 +05:30
Ajinkya Dahale 9c87e26280 [Sketcher][test] Add tests for replaceGeometries() 2026-01-06 05:42:44 +05:30
Ajinkya Dahale 404482f48e [Sketcher] Fix issue in replaceGeometries when more old than new 2026-01-06 05:42:44 +05:30
Adrian Insaurralde Avalos ede7013f55 set BUILD_DYNAMIC_LINK_PYTHON=OFF for mac and linux release builds
fix regresion #25098
2026-01-05 15:59:05 -06:00
WandererFan cc707c98eb TechDraw: Axo Dimension Fixes (#26445)
* [TD]fix dim text on wrong side of dim line

- this fixes the problem when the dimension line is +/- vertical

* [TD]Avoid use of CosmeticVertex for Axo Dimension

* [TD]fix CI warnings re unused variable

* Update DrawViewPyImp.cpp per review comments.
2026-01-05 19:31:17 +00:00
Chris Hennes a985f63e25 Merge pull request #26554 from PaddleStroke/patch-106258
Sketcher: Reverse #25478 and #26033 and fix #13852
2026-01-05 08:50:47 -09:00
PaddleStroke 0fa707c523 Sketcher: Speed up large bulk Selection in edit (#26663)
* Sketcher: Speed up large bulk Selection in edit

* Update ViewProviderSketch.cpp

* Update src/Mod/Sketcher/Gui/TaskSketcherConstraints.cpp

---------

Co-authored-by: Kacper Donat <kadet1090@gmail.com>
2026-01-05 17:41:45 +00:00
wandererfan f64408de2e [TD]prevent frames on exported/printed page 2026-01-05 17:28:04 +00:00
wandererfan fa8e81f0d6 [TD]restore view frame toggle in context menu
#This is the commit message #2:
2026-01-05 17:28:04 +00:00
wandererfan c95ce2c06d [TD]remove obsolete preference 2026-01-05 17:28:04 +00:00
Ryan Kembrey bfd3fc7268 TechDraw: Implemented View Frame Mode preference 2026-01-05 17:28:04 +00:00
PaddleStroke 21f0d44320 Sketcher: Fix selection & zoom lag in large sketches (#26671)
* Sketcher: Fix selection & zoom lag in large sketches

* Update src/Mod/Sketcher/Gui/EditModeConstraintCoinManager.cpp

Co-authored-by: Kacper Donat <kadet1090@gmail.com>

---------

Co-authored-by: Kacper Donat <kadet1090@gmail.com>
2026-01-05 17:22:10 +00:00
sliptonic 962db90dc7 Merge pull request #26647 from Connor9220/FixToolbitLabelAndControllerNaming
CAM: Fix duplicate label issues with toolbits
2026-01-05 11:15:02 -06:00
Roy-043 530aba61db BIM: remove v1.1 Sill Height code (#26641) 2026-01-05 18:09:49 +01:00
Yash Suthar 9e22524e11 Core: Fix premature merge of property in debug mode
Signed-off-by: Yash Suthar <yashsuthar983@gmail.com>
2026-01-05 17:51:47 +01:00
wandererfan dc0901839e [TD]prevent crash on cosmetic element delete 2026-01-05 07:43:55 -09:00
Kacper Donat 2682d68809 Sketcher: Use correct namespace for tr functions in DSH
The `lupdate` tool from Qt used to extract translations from files was
not in sync with what the macros defined in the code. The mismatch came
from two places:

1. The DrawSketchHandeler used non fully-qualified name for the
   context whereas lupdate assumed the FQN.
2. Deriving DrawSketchHandlers did not override the translate method
   context to their own class names while lupdate assumed that they do.

While it's not fully clear if what `lupdate` does here is correct
(it's a lot of assumptions) it's way easier to fix our metadata than
fight with lupdate.
2026-01-05 07:42:59 -09:00
WandererFan 7abdbe0ce0 Surface: Provide geometry to Measure module (#26479)
* [Surf]provide geometry to Measure

* [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>
2026-01-05 17:39:06 +01:00
PaddleStroke dfbdb2005c Update CommandCreateJoint.py 2026-01-05 16:25:50 +01:00
PaddleStroke ae075c1a73 Assembly: RackPinion tooltip fix 2026-01-05 16:25:50 +01:00
PaddleStroke 450789e77b Sketcher: Fix text sometimes reversed when switching from one sketch edit to another.
Sometimes when user would switch from editing one sketch to edit to another sketch by double clicking on the new sketch, without living the previous sketch, it would then render the text of constraints backward. This was happening because the unsetEdit of the previous sketch was clearing the selection and adding the old sketch as selected. Then the new setEdit was failing to find the correct editing placement resulting in backward text.
2026-01-05 16:17:04 +01:00
PaddleStroke 26723cf209 Sketcher: Reverse #25478 and #26033 2026-01-05 16:17:04 +01:00
luzpaz 9fde6cbac0 BIM: Fix tooltip string in dialogLibrary.ui
Removes ellipsis from tooltip.  
Not eligible for backport.

Fixes https://github.com/FreeCAD/FreeCAD-translations/issues/344
2026-01-05 13:25:13 +01:00
Captain 2b97d553f9 PD: fix gizmo direction when the calculated point lies outside the face (#26616)
* PD: fix gizmo direction when the calculated point lies outside the face

* [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>
2026-01-05 12:44:01 +01:00
marioalexis 92529da3fc Fem: Add support for 2D geometries to SectionPrint 2026-01-05 08:57:07 +01:00
freecad-gh-actions-translation-bot 2592406b35 Update translations from Crowdin 2026-01-05 08:47:20 +01:00
luzpaz 1559e8a9cf BIM: Fix typo in ArchComponent.py documentation
Removes ellipsis to avoid confusion for translators.

Fixes https://github.com/FreeCAD/FreeCAD-translations/issues/341
2026-01-05 07:10:10 +01:00
luzpaz 0cf92f28c7 CAM: Fix typo in tooltip for ToolBitLibraryEdit.ui
Modifies 'tool bit' to 'toolbit'.

Fixes https://github.com/FreeCAD/FreeCAD-translations/issues/339
2026-01-05 07:08:39 +01:00
luzpaz cd221ba09d BIM: Update tooltips for row-related actions
Modifies tooltips that mention 'line(s)' and swaps them for the correct nomenclature, 'row(s)' 

Fixes https://github.com/FreeCAD/FreeCAD-translations/issues/343

cc @chennes
2026-01-05 07:08:19 +01:00
pre-commit-ci[bot] 60f76ede3e [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2026-01-05 00:46:36 +00:00
Dimitris75 af55805030 CAM - Experimental Waterline Minor Fix
- Offset and None cut Pattern error
-  Ensure the tool is directly above the entry point before plunging,
- Retract to SafeHeight instead of ClearanceHeight between transitions
2026-01-05 02:26:56 +02:00
PaddleStroke c8106982de Sketcher: Use DenseQR for small sketches to avoid SparseQR rank issues (#26559) 2026-01-04 14:57:13 -06:00
Chris Hennes 212350acb8 Merge pull request #26577 from Roy-043/Draft-fix-regression-in-Pattern-display
Draft: fix regression in Pattern display
2026-01-04 10:44:41 -09:00
Billy Huddleston a7c9cbee9e CAM: Add 0.05 um to V-bit tip diameter to prevent invalid sketch constraints
This commit applies a simple fix to the V-bit tool definition, adding a
small offset (+0.05 um) to the tip diameter. This prevents the sketch
from generating invalid constraints due to a zero or near-zero tip size.

src/Mod/CAM/Path/Op/SurfaceSupport.py:
- Add +0.05 um to tip diameter calculation to avoid constraint errors in
sketches
2026-01-04 10:42:06 -09:00
Chris Hennes 239567c03c Merge pull request #25009 from tetektoza/fix/24290_respect_selectable_option_if_nested_objs
Gui: Respect Selectable property for objects inside Part containers
2026-01-04 10:37:04 -09:00
Kacper Donat c938645843 Gui: Migrate to new styles
Since some time we have new stylesheets based on style parameters. For
compatibility reasons however old stylesheets were left in the project -
this commit removes them by reapplying the theme if old stylesheet is
detected.
2026-01-04 10:33:40 -09:00
Kacper Donat f819011d81 PartDesign: Fix misplaced preview for patterns
Previous solution did not take into account supporting shape transform
which should now be handled correctly.
2026-01-04 10:31:46 -09:00
Billy Huddleston 2a24a539e6 CAM: Fix duplicate label issues with toolbits
Addresses problems caused by the "Allow duplicate object labels in one
document" option. Toolbit sub-objects now always get unique labels by
temporarily disabling this option during copy, preventing expression and
property binding errors. Also ensures tool controllers always use the
"TC: " prefix for consistency.

src/Mod/CAM/Path/Tool/shape/models/base.py:
- Temporarily disable DuplicateLabels during shape copy to enforce
unique labels

src/Mod/CAM/Path/Main/Gui/Job.py:
- Add "TC: " prefix to tool controller names when adding from the Job
panel
2026-01-04 13:39:20 -05:00
tetektoza 3f49f3f059 Gui: Add hidden anchor object to root for transparency (#26590)
* Gui: Add hidden anchor object to the root for transparency

Image planes with transparency failed to render correctly in empty scenes
because OpenInventor's two-pass transparency rendering requires at least
one opaque object to properly initialize the depth buffer.

The fix adds a zero-scaled cube with no material node (making it use
OpenGL's default opaque material) to each image plane's scene graph.
This hidden object:
- Acts as a depth buffer anchor for transparent rendering
- Is invisible (scaled to 0,0,0)
- Has negligible performance impact

This matches the workaround already used in the rotation center indicator
and resolves the issue where image transparency only worked when the
rotation center, grid, or other opaque objects were visible.

* Gui: Exclude hidden anchor from bounding box calculations

Prevents the hidden anchor from affecting "fit all" and other bounding box
operations by wrapping it in `SoSkipBoundingGroup`.
2026-01-03 04:06:26 +00:00
Krrish777 d944df04e1 Fix: Update PartDesign Boolean dropdown immediately before recomputation 2026-01-03 02:41:28 +01:00
PaddleStroke 07756cc838 Part: Toposhape: fix regressions due to changes in getElementTypeAndIndex (#26596)
* Part: Toposhape: fix regressions due to changes in getElementTypeAndIndex

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

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

* Update TopoShape.cpp

* Update TopoShape.cpp

* Update TopoShape.cpp

* Update TopoShape.h

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2026-01-02 19:37:09 +01:00
chris 6df651b5c8 partdesign: fix issue #25811 while not breaking #14720 topo naming 2026-01-02 18:52:30 +01:00
PaddleStroke 9f2b0f910b Sketcher: Fix snap to axis not working (#26558)
When snapping to an axis, snapToObject returns false because we should also be able to snap to grid at the same time. Recent changes made the end return to be the initial unmodified position. Breaking snap to axis
2026-01-02 18:10:50 +01:00
Kacper Donat 1dc611fcc1 Gui: Prevent whole-object highlight when picked list is enabled (#26589)
* Gui: Prevent whole-object highlight when picked list is enabled

Removed the logic that forced `onTop=1` when `needPickedList()` is true
in View3DInventorSelection. This was causing the entire object to be
highlighted instead of just the selected sub-element when the "Picked
object list" option was enabled.

* Part: Remove `needPickedList` mat override to prevent rendering artifact

The `needPickedList` check in `SoBrepFaceSet` was triggering
unnecessary material override processing that caused face clipping
artifacts when the "Picked object list" option was enabled in Selection
View. This check has been removed as the picked list functionality works
independently of the rendering path.
2026-01-02 18:09:04 +01:00
PaddleStroke be6be63764 Sketcher: Fix large sketch being laggy (#26598)
* Sketcher: Remove old constraint positioning logic that was making sketcher laggy

* [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>
2026-01-02 16:36:49 +01:00
Roy-043 8e47327323 Part: update some GUI texts (title case mod) (#26591) 2026-01-02 08:25:37 +01:00
tetektoza c66aa58a60 Part: Remove needPickedList mat override to prevent rendering artifact
The `needPickedList` check in `SoBrepFaceSet` was triggering
unnecessary material override processing that caused face clipping
artifacts when the "Picked object list" option was enabled in Selection
View. This check has been removed as the picked list functionality works
independently of the rendering path.
2026-01-01 21:21:03 +01:00
tetektoza 4dcef14bd8 Gui: Prevent whole-object highlight when picked list is enabled
Removed the logic that forced `onTop=1` when `needPickedList()` is true
in View3DInventorSelection. This was causing the entire object to be
highlighted instead of just the selected sub-element when the "Picked
object list" option was enabled.
2026-01-01 21:20:55 +01:00
Roy-043 34441b8101 Draft: fix regression in Pattern display (Refactor texture handling in view_base.py) 2026-01-01 14:04:27 +01:00
Roy-043 21e7fa1e8b Draft: fix regression in Pattern display (add find_coin_node_by_name function)
Adapted existing code attribution and added a new function to find a node by name.
2026-01-01 14:01:34 +01:00
pre-commit-ci[bot] 61e053ffb9 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2025-12-31 02:40:09 +00:00
Dimitris75 5883bad32b Fix 3D Surface Rotational Scan
Retract to Clearance Height Before Transition Between Passes
2025-12-31 04:29:42 +02:00
Kacper Donat f5759e580b Merge pull request #26495 from tetektoza/fix/26441_fix_exported_html_file_is_not_valid
Gui: Fix XHTML and X3D export validation and rendering issues
2025-12-30 18:40:39 +01:00
tetektoza df25bd3cdb Part: Preserve child visibility when deleting compound copies (#26509)
* Part: Preserve child visibility when deleting compound copies

Currently, if we have a FC document two compounds, when one of them is a
copy of the other containing same children and we delete the copy
compound to keep the children, their visibility state changes.

The cause of that was a part of code in `onDelete()` method, which was
unconditionally calling `showViewProvider()` on every child object,
without checking if other compounds still claim those children or what
the current visibility should be.

So this patch adds parent-checking logic before changing visibility. The
visibility is only updated if the child is truly orphaned. So in the
scenario where we have the children referenced STILL by some compounds,
the visibility remains unchanged. It only changes when child has truly
no parents.

* Part: Use std::ranges::find for finding parent
2025-12-30 17:22:37 +00:00
tetektoza 80532b78e1 Gui: Add Selectable property to Part containers
Change `ViewProviderPart` to inherit from `ViewProviderGeometryObject`,
giving Part containers the Selectable property. This allows recursive
selectability checks to respect the entire container hierarchy.
2025-12-30 18:12:13 +01:00
tetektoza 57dd04f214 Gui: Use encodeAttribute when escaping XML attributes for XHTML 2025-12-30 17:22:00 +01:00
drwho495 e9ea3d0d25 TopoNaming: Enable migration code for 1.0.X -> 1.1 (#26538) 2025-12-30 13:24:09 +01:00
Roy-043 0ced25c6dc BIM: fix component VerticalArea calculation (#26254) 2025-12-30 09:02:30 +01:00
Alfredo Monclus ab29644276 Gui: fix skip wayland grabMouse since isn't supported 2025-12-29 18:10:28 -03:00
theo-vt cc60502708 Sketcher.scale: Scale label of modified constraints (#26442)
* Sketcher.scale: Scale label of modified constraints

* Sketcher.scale: Narrowing conversion on constraint index
2025-12-29 21:38:12 +01:00
Adrian Insaurralde Avalos 3dce4c831d FEM: sanitize NAN format on frd import
depending on c runtime lib and possibly locale calculix may format NAN differently so we need to sanitize when importing the results
2025-12-29 18:19:57 +01:00
Chris Hennes bb8d4a8095 CI: Update backport Action to use new secret token
When using the default GitHub token, no further Actions are triggered, which means a backport PR is not checked against the normal CI runs, and it should be. This switches to using a token generated by the freecad-ci-runner GitHub account.
2025-12-29 17:59:05 +01:00
Christoph Moench-Tegeder 57b970f795 add pybind11 include path in MeshPart CMakeLists
This could be a return of parts of commit d4feb51402
Without these, the rc1 build fails on FreeBSD with "pybind11/eigen.h not
found" - the layout of the pybind11 directories on the BSDs may differ
somewhat from your typical Linux distribution. But then, on Linux, this
additional include path will just point to an already-known location.
2025-12-29 17:56:31 +01:00
Chris Hennes e858a13a5f Gui: Add explicit find_package for Qt6::GuiPrivate 2025-12-29 17:51:47 +01:00
Roy-043 2292316f22 BIM: prevent crash when switching BIM_View Render Mode
Fixes #24929.

Disabled animations in viewer to prevent crashes.
2025-12-29 17:45:04 +01:00
Chris Hennes 8b9048a784 PD: Add case for when scripts set Midplane=False 2025-12-29 17:42:13 +01:00
Alfredo Monclus 24b9cdb4f9 PartDesign: fix transform removal causing an invalid base feature on the next solid if it was broken itself 2025-12-29 17:41:36 +01:00
Yash Suthar ee7d84bb03 Fix : added empty link check to prevent null entry in document link map (#26406)
Signed-off-by: Yash Suthar <yashsuthar983@gmail.com>
2025-12-29 17:35:01 +01:00
Rahul Paul 1002bcb398 [MOD] Fix premature evaluation and recursive updates in Image Plane Settings (#26390)
* Fixed image editor

* decoupled the chnage height and width fns

* final fixes
2025-12-29 17:34:29 +01:00
PaddleStroke 20e45231c5 PartDesign: Fix upToFace not working with non-ASCII filenames (#26514)
* PartDesign: Fix upToFace not working with non-ASCII filenames

* Update TaskExtrudeParameters.cpp
2025-12-29 17:33:19 +01:00
freecad-gh-actions-translation-bot 7fe10f7436 Update translations from Crowdin 2025-12-29 11:31:39 +01:00
Roy-043 776b2f2d5a BIM: fix transparency of curtain walls in BIMExample.FCStd
Curtain walls in the BIM example file did not have transparent glass panels.
2025-12-28 07:53:28 +01:00
tetektoza 38bb34ab85 Gui: Clean up XHTML meta tags per Nu validator feedback
- Change http-equiv="Content-Type" to simpler charset="utf-8"
- Remove unnecessary type="text/javascript" from script tag
2025-12-27 19:38:34 +01:00
tetektoza 2ae054e470 Gui: DOCTYPE and structure improvements
Fix X3D standalone export (.x3d):
- Use proper X3D 3.3 DOCTYPE instead of XHTML DOCTYPE
- Remove problematic default namespace declaration
- Use xsd:noNamespaceSchemaLocation for better parser compatibility
- Remove invalid width/height attributes

Fix XHTML/X3DOM export (.xhtml):
- Wrap navigation buttons in <div> (required by XHTML Strict)
- Keep X3D elements unprefixed for X3DOM compatibility
- Add proper XHTML structure with XML declaration
2025-12-27 19:22:28 +01:00
tarman3 39eec0cfff CAM: Slot - Remove duplication move to clearance height in the end 2025-12-27 20:05:10 +02:00
tetektoza fe7bceeb79 Gui: Escape XML special characters in attributes for XHTML
Add escapeXmlAttribute() helper function to properly escape special
characters in XML attribute values:
- Double quotes (") --> &quot;
- Ampersands (&) --> &amp;
- Less-than (<) --> &lt;
- Greater-than (>) --> &gt;
- Single quotes (') --> &apos;
2025-12-27 18:51:52 +01:00
tetektoza 679d4c2397 Gui: Fix XHTML doc structure
- Add missing <title> element in <head> (required by XHTML Strict)
- Add <body> wrapper around content (required by XHTML)
- Add Content-Type meta tag for proper character encoding
- Fix indentation of buttons to be inside body element
2025-12-27 18:48:22 +01:00
sliptonic c5ce65cfb8 Merge pull request #25398 from tarman3/migrateRampDressups
CAM: _migrateRampDressups - fix #25391
2025-12-27 11:31:07 -06:00
Chris Hennes 51d2c88b02 PD: For Body get the color from the tip
Mostly affects STEP export.
2025-12-27 18:29:41 +01:00
Chris Hennes 7da646754a Import: Revert recent STEP file object naming work
After discussion in several recent PR review meetings the Maintainer
team has decided to roll back some recent work on object naming in STEP
files. Inadequate automated testing has led to a situation where every
change made to address one bug introduces another someplace else. It
is difficult to determine which, if any, of these fixes represent an
appropriate path forward, versus fixing a symptom rather than the
underlying problem.

---

Revert "[pre-commit.ci] auto fixes from pre-commit.com hooks"
This reverts commit 59715114f5.

Revert "core: fix various issues exporting step files, ie. #25540 #24962 #25567"
This reverts commit e226e9b06e.

Revert "export: step file preserve last feature when exporting step file, fix issue #25567"
This reverts commit 9c48c9a3e3.

Revert "core: preserve body name in step file when exporting part that contains body with feature, fixes #24962"
This reverts commit 246218b28b.

Revert "Import: STEP export preserve body names (#25042)"
This reverts commit f218c5f25c.

Revert "Import: Export tip when body is selected (#24678)"
This reverts commit 6fd6558040.
2025-12-27 18:29:41 +01:00
Chris Hennes a4bff812d7 PD: Modify tests to use SideType instead of Midplane 2025-12-27 18:28:01 +01:00
sliptonic 92d2e669f2 Merge pull request #26324 from tarman3/array_refactor_PathArray
CAM: Array - Refactor class PathArray
2025-12-27 11:26:48 -06:00
sliptonic 96bec2fd4d Merge pull request #26322 from tarman3/utils_splitArcs_deflection
CAM: Path.Post.Utils.splitArcs() - Fix zero deflection
2025-12-27 11:22:48 -06:00
sliptonic 83f74f32c2 Merge pull request #26422 from Dimitris75/CAM-Fix-Waterline-OCL-Adaptive
CAM: Waterline OCL Adaptive - Fix Linear and Angular Deflection Values
2025-12-27 11:22:21 -06:00
sliptonic ebeb7b50c3 Merge pull request #25841 from tarman3/slot_clearPath
CAM: Slot - Clear path if can not create slot
2025-12-27 11:21:40 -06:00
sliptonic 798ba4d9aa Merge pull request #25374 from tarman3/engrave_baseobject
CAM: Engrave - Remove useless property BaseObject
2025-12-27 11:21:23 -06:00
sliptonic 2d00530225 Merge pull request #22484 from tarman3/ramp
CAM: RampEntry Dressup - Remove X0Y0 from beginning
2025-12-27 11:20:06 -06:00
horseDeveloper 4892154faf Fixing Leftover references from migration from freecadweb.org (#26163) 2025-12-26 11:11:12 -06:00
tetektoza b44d75454f Gui: Respect parent container selectability in nested selections 2025-12-26 13:55:02 +01:00
tetektoza 17543ea69e Gui: Respect Selectable property for objects inside Part containers
Currently if user selects object with `Selectable=false` property which
is nested inside a Part container, for example `Part->Body->Pad`, parent
Part container will get highlighted in the 3D view, even though the user
clicked on a non-selectable child object.

Cause of that is that tree view's `getTopParent()` function resolves
nested objects selections to their top-level container. When a Pad
inside Part is selected, `SoFCUnifiedSelection` was only checking Part's
`isSelectable()` status, even though the target is `Pad`.

So the fix is to resolve subname to get the final target object and
checks its `isSelectable()` status before checking for highlighting.
2025-12-26 12:46:07 +01:00
David Kaufman cab487c27c Document derivation of the new value for MIN_STEP_CLIPPER 2025-12-25 23:41:16 -05:00
David Kaufman 11752b8280 fix warning that breaks the pixi build 2025-12-25 19:19:27 -05:00
ᴩʜᴏɴᴇᴅʀᴏɪᴅ f253f453d6 [ Show ]: Update SPDX License Identifiers 2025-12-25 12:07:49 -06:00
Chris Hennes 2fbc36d472 Tools: Add Surface to translations 2025-12-25 19:06:55 +01:00
PhoneDroid a7012e7bc4 [ Sandbox ]: Update SPDX License Identifiers 2025-12-25 12:02:25 -06:00
PhoneDroid 4d0348dd0f [ Robot ]: Update SPDX License Identifiers 2025-12-25 12:01:29 -06:00
ᴩʜᴏɴᴇᴅʀᴏɪᴅ 670da3d796 SPDX [ 41 ][ Src / Mod / Sketcher ] (#25135) 2025-12-25 12:00:22 -06:00
PhoneDroid 8abd25c999 [ App ]: Update SPDX License Identifiers 2025-12-25 11:55:37 -06:00
PhoneDroid f6acaa8d4c [ Build ]: Update SPDX License Identifiers 2025-12-25 11:51:30 -06:00
PhoneDroid eeda64c87b [ TemplatePyMod ]: Update SPDX License Identifiers 2025-12-25 11:49:35 -06:00
marioalexis 2d531cc21b Fem: Allow clipping plane in edit mode 2025-12-25 09:19:45 +01:00
marioalexis f44af0929f Fem: Add electrostatic concentrated load 2025-12-25 09:18:57 +01:00
Krzysztof 47d1913544 Core: Extend completer popup list in 'Expression editor', fix size and position adjustment (#25242)
* Core: Fix completer popup adjustment after 'Tab' pressing
Completer popup in Expression Editor is now positioned and sized after pressing 'Tab'. This was missing when feature was added.

* Core: Extend completer popup list to up 20 elements or up to screen edge
Completer popup will now show up to 20 elements or will be limited to screen edge; if limited < 3 rows, popup will be displayed over cursor.

* Core: Fix completer wrapping on secondary screens

* Core: Fix completer positioning when includes long entries

* Core: Fix linter complaints
2025-12-25 09:11:00 +01:00
captain0xff 5cc05a1ab2 Gui: fix linear dragger increments when the multFactor is set 2025-12-25 09:10:27 +01:00
PhoneDroid 86e38348fd [ Dialogs ]: Update SPDX License Identifiers 2025-12-24 22:07:01 -06:00
PhoneDroid 55452aa2ae [ Language ]: Update SPDX License Identifiers 2025-12-24 22:05:23 -06:00
PhoneDroid ca9d9a7a3d [ Inventor ]: Update SPDX License Identifiers 2025-12-24 22:05:07 -06:00
Dimitris75 99a4a98cb3 Fix Linear and Angular Deflection Values
Fix Linear and Angular Deflection Values
2025-12-25 00:16:21 +02:00
Roy-043 4fe0dff1bc Draft: array task panels: add workaround for Building US unit system
Fixes #26276.
2025-12-23 22:01:11 -06:00
Roy-043 5297493a65 BIM: fix AttributeError when snapping for window placement 2025-12-23 21:44:07 -06:00
Rodrigo Olaya Moreno 345a656125 Fix RGB rounding bug in material appearance editor (#26134)
* Fix RGB rounding bug in material appearance editor
* Update code to use color
* getColorHash no longer needs range
2025-12-23 20:20:16 -06:00
Chris eb61ee36a6 sketcher: fix issue #25992 keep snapped position when releasing mosue for updated sketch points (#26102)
* sketcher: fix issue #25992 keep snapped position when releasing mosue for updated sketch points

* Update src/Mod/Sketcher/Gui/ViewProviderSketch.cpp

Co-authored-by: Chris Hennes <chennes@pioneerlibrarysystem.org>

---------

Co-authored-by: Chris Hennes <chennes@pioneerlibrarysystem.org>
2025-12-23 20:06:51 -06:00
David Kaufman dc7f2c7bfd fix code accidentally reintroduced 2025-12-23 17:14:19 -05:00
David Kaufman 78254763c0 Remove debug code 2025-12-23 17:05:10 -05:00
David Kaufman c5dcacb6bc delete unused code to calculate cut area with clipper 2025-12-23 15:48:51 -05:00
David Kaufman 25ed8965ee clean up code 2025-12-23 15:46:05 -05:00
sliptonic 065fea473f CAM: Fix pure vertical linking move (#26195) 2025-12-23 12:19:32 -06:00
sliptonic a139cef80f Merge pull request #26316 from tarman3/millfacing_icon
CAM: MillFacing - Fix icon active state
2025-12-23 10:58:30 -06:00
sliptonic 2a6e3f8fbe Merge pull request #26413 from MTronics/issue_#26343_CAM_relation_to_stock_gets_lost
Issue #26343: CAM Tasks panel ignores selected Stock
2025-12-23 10:21:45 -06:00
timpieces a2dabd42e0 MacOS: Disable actions while file dialogs are open (#26169)
- Any action part of the application menu will trigger based on shortcut
  when a native file dialog is open
- Another way to fix this is to switch out the application menu, but
  afaict it requires writing native objective-c code. I think that's too
  much complexity just to get cmd+c/cmd+v in these file dialogs
- For now, just disable the actions so that select-all, rotate-left, etc
  don't trigger when pressed in these dialogs
- I've implemented an RAII wrapper to disable this. It should take
  pointers which should be fine because all of these dialog calls are
  blocking (so in principle nothing can change underneath).

I'm quite sure this won't have any adverse effects on other platforms,
but will need help from other developers to test in case.
2025-12-23 09:18:08 -06:00
sliptonic 5124ee33c6 CAM: fix tolerance issue with hole detection (#26404) 2025-12-23 09:12:52 -06:00
sliptonic 2d37220efb Merge pull request #26409 from Connor9220/ToolbitsUnitsMigration
CAM: Add migration for Toolbit Units property
2025-12-23 09:08:06 -06:00
Roy-043 d93da36b41 BIM: ifc_tools.py fix handling of IfcGridAxis
Fix errors found after this linter warning:
https://github.com/FreeCAD/FreeCAD/pull/26219/changes#diff-2f58fe8ffd31a6d9302296668f6280d27d696e1507b259cc42fde224ef10da0eL759
2025-12-23 14:04:46 +00:00
pre-commit-ci[bot] 1763f46abf [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2025-12-23 12:07:53 +00:00
MTronics 3a7177764e Issue #26343: CAM Tasks panel ignores selected Stock
The current code in \src\Mod\CAM\Path\Main\Gui\Job.py (line 719) ignores selected stock selections. In case of e.g. cloned stock objects it defaults to the first item in the combolist, showing a wrong stock selection.

The cause lies in comparing different strings to find a label match, but one string object is generic (short name) while the other one has a suffix created during the clone process. The strings never match and the ridgid string comparison fails. I recommend using a partial (needle in haystack) string comparison.
2025-12-23 12:48:14 +01:00
Billy Huddleston 88a28f64c5 CAM: Add migration for Toolbit Units property
This PR adds migration for toolbit units by automatically infering the
Units (Metric/Imperial) from toolbit parameter strings and sets the
Units property if missing. It adds a utility function to detect units
from JSON. This is done at the JSON level during migration to ensure
that all toolbits have the correct Units property set.

src/Mod/CAM/Path/Tool/toolbit/migration.py:
- Infer Units from parameter strings if not set during migration
- Set Units property and log inference
- Refactor migration logic for clarity and reliability

src/Mod/CAM/Path/Tool/toolbit/models/base.py:
- Use Path.Log.debug instead of print when adding Units property

src/Mod/CAM/Path/Tool/toolbit/util.py:
- Add units_from_json() to infer Metric/Imperial from parameter strings
2025-12-23 00:32:47 -05:00
PaddleStroke d15347d2ad Assembly: Fix deletion of joint references to bodies 2025-12-22 22:08:07 -06:00
timpieces 4567d04547 MacOS: Block shortcuts from overriding text input (#14869)
- It seems that on MacOS (vs other platforms), shortcuts for items in
  the application menu are given 'ultimate' priority, and will even take
  precedence over text inputs
- There is a mechanism in QT (I believe designed with mac in mind) to
  try to 'block' these shortcuts and send it to the focus instead. It's
  'Shortcut Override': https://wiki.qt.io/ShortcutOverride
- Initially I was going to only apply this check when it's a Command
  that overrides a known line-editing shortcut, but I figure it's
  simpler to just always apply it when editing text. I can't really
  imagine a user wanting to use an application shortcut while editing
  text, but if there's some compelling use-case for this then let me know
  and I'll add a further filter.

I'm quite optimistic that this won't have any ill-effects on other
platforms, but I'll need help from others to test this.
2025-12-22 21:39:00 -06:00
sliptonic d2daf0fc20 Merge pull request #22304 from tarman3/taskpanel
CAM: Task panel - Select shapes from several objects
2025-12-22 17:07:37 -06:00
sliptonic 8845c1e256 Merge pull request #23149 from Dimitris75/OCL-Adaptive
CAM: Add OCL Adaptive Algorithm to Waterline Operation
2025-12-22 16:47:54 -06:00
sliptonic 9b570424d1 Merge pull request #25049 from phaseloop/v-routing
CAM: improved VCarve routing using "virtual edge backtracking"
2025-12-22 16:44:13 -06:00
sliptonic 4a1b74cf86 Merge pull request #24819 from tarman3/copyOp
CAM: OperationCopy - Allow for all and Recursive copy Dressup
2025-12-22 16:41:36 -06:00
sliptonic 326d423501 Merge pull request #24872 from tarman3/toggle_operation
CAM: ToggleOperation - Allow for Job and Operations group
2025-12-22 16:41:05 -06:00
wandererfan 35d4a849ef [TD]fix handling of non-standard page sizes 2025-12-22 18:46:32 +01:00
marbocub 244282f855 Fix rotation expression errors in handleLegacyTangentPlaneOrientation() (#26058)
* Fix rotation expression handling

- Make added rotation angle unit the same as the original expression unit
- Keep rotated angle expressions within the accepted [-180, +180] range
2025-12-22 11:18:00 -06:00
Kacper Donat 8c399e1fd0 PartDesign: Revolution - add FuseOrder
In older versions of FreeCAD the boolean order was base + result. After
TNP mitigation the order was changed to be result + base. For the
resulting shape that does not matter, but order of edges can differ if
arguments are in a different order.

This can impact refine algorithm which may pick other face as the base
one and result in a differnt shape after refining. This commit restores
previous order. For most files it should not make any difference, but it
may fix some older files.

To support all cases we introduce FuseOrder compatibility property that
will be set to FeatureFirst for files saved with 1.0 to preserve
behavior.
2025-12-22 11:17:27 -06:00
wandererfan 04e2d631bb [TD]fix tearing of page edges 2025-12-22 11:16:15 -06:00
Roy-043 3a5f5d70ee Part: fix Part_EditAttachment unitless input error (#25923) 2025-12-22 11:12:46 -06:00
Florian Foinant-Willig 7b315e80a7 fix %r format spec 2025-12-22 11:04:47 -06:00
Kacper Donat febfd65e59 Gui: Ensure that QuantitySpiBox handles expression properly 2025-12-22 11:00:07 -06:00
Yash Suthar 60bd277d7a UI: Fix select all instances of an object in the tree
Signed-off-by: Yash Suthar <yashsuthar983@gmail.com>
2025-12-22 15:01:24 +01:00
marbocub 176ef6da4e Sketcher: add reverse mapping correction to Carbon Copy (#25745)
* Sketcher: add reverse mapping correction to Carbon Copy

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

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

* Replace M_PI with std::numbers::pi

* Replace vector initialization with Base::Vector3d::UnitX/UnitY, apply suggestions from code review

Co-authored-by: Kacper Donat <kadet1090@gmail.com>

* Fix guard clause logic, apply suggestions from code review

* Replace std::numbers::pi with pi via `using std::numbers`

* Fix issues reported by the linter

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Kacper Donat <kadet1090@gmail.com>
2025-12-22 15:00:49 +01:00
chris 46066e1cca partdesign: pd: fix for issue #25794 2025-12-22 14:58:07 +01:00
Chris 452f9b2087 Part Design: Add sketch sub element names for refs in revolutions (#26227)
* part design: partdesign: pd: fix regression issue #26223 add sketch sub element names for refs in revolutions

* refractor code to remove else blocks as every condition has a return statement, make lsp happy
2025-12-22 14:56:53 +01:00
Alfredo Monclus d9e0fd6251 PartDesign: fix hole clearance not appearing in the taskpanel when switching type 2025-12-22 14:56:09 +01:00
Alfredo Monclus 6729540a78 PartDesign: fix thread depth not shown in taskpanel 2025-12-22 14:55:45 +01:00
Chris Hennes 76bd68e672 PD: Fix missing silent mode check in GetTopoShapeVerifiedFace
Also ensure that all calls to this method actually verify the result.
2025-12-22 14:34:25 +01:00
Furgo 7665675de9 BIM: incremental UX improvements, iteration 1 (#25147) 2025-12-22 13:34:56 +01:00
Kacper Donat 78a6891dae Gui: Remove shortcuts for overlay toggles
Using these commands by mistake can result in broken interface and the
shortcuts are way too easy to hit by mistake. The feature is rarely (if
at all) used - so there is no need to have easy to hit shortcuts.
2025-12-22 13:09:15 +01:00
Kacper Donat 4d712f44c2 PartDesign: Chamfer - migrate Size and Size2 for older files (#26137)
* PartDesign: Chamfer - migrate Size and Size2 for older files

* Apply suggestions from code review

Co-authored-by: Chris Hennes <chennes@pioneerlibrarysystem.org>

---------

Co-authored-by: Chris Hennes <chennes@pioneerlibrarysystem.org>
2025-12-22 11:52:55 +00:00
freecad-gh-actions-translation-bot 8b7ec488f0 Update translations from Crowdin 2025-12-22 12:40:21 +01:00
Louis Gombert 3601161d80 Part: clean mesh before adding triangulation in setupCoinGeometry
Calling BRepMesh_IncrementalMesh repeatedly would accumulate BRep_CurveRepresentation instances attached to the BRep_TEdges of the shape. We now clean added triangulations before adding a new one, which improves performance in the long run.

Co-authored-by: Kacper Donat <kadet1090@gmail.com>
2025-12-22 12:01:18 +01:00
Roy-043 0af22943b2 BIM: fix deletion of BuildingPart in strict IFC mode (#26219)
* BIM: fix deletion of BuildingPart in strict IFC mode

Add `sg = FreeCADGui.ActiveDocument.ActiveView.getSceneGraph()` to `onDelete`.

* BIM: fix deletion of BuildingPart in strict IFC mode

Explicitly call `obj.ViewObject.Proxy.attach(obj.ViewObject)`.

* BIM: fix deletion of BuildingPart in strict IFC mode

In `ifc_vp_buildingpart` call `attach` from `ArchBuildingPart.ViewProviderBuildingPart`.
2025-12-21 20:16:17 -06:00
Chris 4cd81136b6 Sketcher: Allow live preview of sketch placement (#26033)
along with unit tests
2025-12-21 17:34:30 +01:00
Furgo 0193b1776d BIM: Initialize SketchArch variable before use (#26336) 2025-12-21 10:36:35 +01:00
Furgo 69de78e22d BIM: fix lock removal of Sill property 2025-12-21 10:27:12 +01:00
Furgo bdea3d105f BIM: rename ArchWindow's Sill property to SillHeight and handle one-w… (#26277)
* BIM: rename ArchWindow's Sill property to SillHeight and handle one-way migration

* BIM: properly remove the locked "Sill" property
2025-12-20 22:26:52 +01:00
Louis Gombert cead907a57 SVG export: improve performance (#26149)
* SVG export: use a set to match edges instead of a list

Lookup in edge list becomes O(1), significantly improving SVG export speed

* [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-12-20 22:23:55 +01:00
tarman3 df3f311813 CAM: Array - Refactor class PathArray 2025-12-20 21:03:06 +02:00
tarman3 4f8ed3b1a0 CAM: Path.Post.Utils.splitArcs() - Fix zero deflection 2025-12-20 20:02:29 +02:00
tarman3 daf9b60f27 CAM: Job - Fix setCenterOfRotation() 2025-12-20 19:56:00 +02:00
sliptonic 1b4026ebf0 Merge pull request #26217 from tarman3/array_icon
CAM: Array - Fix ViewProviderArray and icons
2025-12-20 10:11:02 -06:00
tarman3 59aa295ec6 CAM: Array - Fix ViewProviderArray and icon 2025-12-20 10:45:20 +02:00
tarman3 efdabea4e0 CAM: MillFacing - Fix icon active state 2025-12-20 10:17:56 +02:00
Chris Hennes c423e8de08 Addon Manager: Update to 2025.12.19
Minor bug fixes and translation update.
2025-12-20 06:58:03 +01:00
Christoph Moench-Tegeder 4f4f4425aa Include sys/sysctl.h on FreeBSD when using sysctl()
The ApplicationDirectories::findHomePath() on BSD uses sysctl()
to find the path to the running executable. On FreeBSD, we need
to include sys/sysctl.h for that - and as it is not included anywhere
else, add it to the includes directly in front of this function,
with a suitable ifdef.
2025-12-19 20:55:52 -06:00
Roy-043 348eef644b Part: fix Part_EditAttachment nesting handling (#26298)
* Part: fix Part_EditAttachment nesting handling

Fixes #26264.

The previous 'fix' (#25887) did not consider that the object to-be-attached may not be in the global space.

The code in this PR has been tested on the forum:
https://forum.freecad.org/viewtopic.php?p=862968#p862968

* [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-12-19 20:40:37 -06:00
David Kaufman d32c14d1c5 WIP
- starts finishing pass farther down, to avoid looping back for it

This now has all the features to address #19768, but I think I want to
pick out just what is required for that PR
2025-12-19 20:28:20 -05:00
VM4Dim 7cd88534b5 Gui: Fix non-Latin groupName (#26285) 2025-12-19 18:53:16 -06:00
David Kaufman a2d4c7e494 WIP
- rewrote area calculation using floats; it works (compared against
  Clipper as ground truth)
- rewrote boundary approach code
- rewrote min cut/min engage code
2025-12-19 16:40:09 -05:00
Kacper Donat 87b257546f Gui: Wrap strings with QStringLiteral 2025-12-19 13:14:25 -06:00
chris 22552848fd sketcher: fixes issue #26167 no polygon distort when repositioning / constraining 2025-12-19 11:22:20 +01:00
Yash Suthar dbd2bade1e Part: added floating point fallback in PropertyLinks::_updateElementReference
Signed-off-by: Yash Suthar <yashsuthar983@gmail.com>
2025-12-19 10:52:26 +01:00
sliptonic d48073fbbf Merge pull request #26260 from Connor9220/UpdateTSPSolver
CAM: Add open-route optimizations to point-based TSP solver
2025-12-18 16:11:32 -06:00
Syres916 26cc33ecfb [Core] Fix macro path append to sys.path 2025-12-18 13:19:21 -06:00
Kacper Donat b5d60baa68 Stylesheets: Fix separators appearance 2025-12-18 19:47:51 +01:00
Billy Huddleston a7b6078b1d CAM: Add open-route optimizations to point-based TSP solver
Improves the point-based TSP solver to match tunnel solver behavior
for open routes (no endpoint constraint). Now applies 2-opt and
relocation optimizations that allow reversing or relocating segments
to the end of the route, resulting in better path optimization when
the ending point is flexible. Now links tsp_solver with
Python3::Python and uses add_library for compatibility with FreeCAD
and Fedora packaging.

src/Mod/CAM/App/tsp_solver.cpp:
- Add optimization limit variables for controlled iteration
- Add 2-opt and relocation optimizations for open routes
- Use Base::Precision::Confusion() for epsilon values
- Track last improvement step for efficient loop control

src/Mod/CAM/App/CMakeLists.txt:
- Switch tsp_solver from pybind11_add_module to add_library
- Link tsp_solver with pybind11::module and Python3::Python
- Update include directories for consistency
2025-12-18 12:15:22 -05:00
PaddleStroke 0c1ef0c77f Measure: getPlacement const (#26216)
* Measure: getPlacement const

* Update MeasureBase.h

* Update MeasureBase.cpp

* Update MeasureArea.h

* Update MeasureArea.cpp

* Update MeasureLength.h

* Update MeasurePosition.cpp

* Update MeasureLength.cpp

* Update MeasureRadius.cpp

* Update MeasurePosition.cpp

* Update MeasurePosition.h

* Update MeasureRadius.h

* Update MeasurePosition.h
2025-12-18 14:04:32 +01:00
Kacper Donat fe3dc9f06a Compiler warning cleanup (#26229)
* App: Compiler warning cleanup

* Gui: Compiler warning cleanup

* Assembly: Compiler warning cleanup

* Measure: Compiler warning cleanup

* Sketcher: Compiler warning cleanup

* TechDraw: Compiler warning cleanup

* PartDesign: Compiler warning cleanup
2025-12-18 07:50:26 +01:00
freecad-gh-actions-translation-bot 6c6cff7322 Update translations from Crowdin 2025-12-17 21:10:10 -06:00
Chris Hennes 0ba75a7573 PartDesign: Compiler warning cleanup 2025-12-17 11:08:38 -06:00
Chris Hennes c7c4c6f0cc TechDraw: Compiler warning cleanup 2025-12-17 11:08:38 -06:00
Chris Hennes 50f029edd4 Sketcher: Compiler warning cleanup 2025-12-17 11:08:34 -06:00
Chris Hennes 36332bf9ca Measure: Compiler warning cleanup 2025-12-17 11:08:22 -06:00
Chris Hennes 04a9c1e7b0 Assembly: Compiler warning cleanup 2025-12-17 11:08:12 -06:00
Chris Hennes 0416a5bc0b Gui: Compiler warning cleanup 2025-12-17 11:07:55 -06:00
Chris Hennes 55a55725eb App: Compiler warning cleanup 2025-12-17 10:41:27 -06:00
Furgo e147e5a260 Refactor problem report template for improved previews
Reorder fields so that the problem description will be rendered first in previews.
2025-12-17 11:01:02 +01:00
pre-commit-ci[bot] be6c633d62 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2025-12-16 20:57:34 +00:00
Dimitris75 a840988ddb Refactor bounding box and tool path limit calculations
Refactor bounding box calculations for OCL Adaptive algorithm to improve clarity and maintainability.
2025-12-16 22:55:22 +02:00
pre-commit-ci[bot] 5b0cdb2b6d [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2025-12-16 20:23:12 +00:00
Dimitris75 93410b264a Override deflection values for OCL Adaptive algorithm
Added logic to override deflection values for OCL Adaptive algorithm to improve topology stability.
2025-12-16 22:18:47 +02:00
PaddleStroke 8fd81d4109 Assembly: Ball drag mode. (#26222) 2025-12-16 19:08:50 +01:00
marioalexis 0f148f6e63 Base: Add millitesla unit 2025-12-16 14:26:31 -03:00
marioalexis bfb0efd5f9 Base: Insert SPDX specifier in parser script 2025-12-16 14:26:31 -03:00
marioalexis e5e1729c35 Fem: Add magnetic shielding example 2025-12-16 14:26:31 -03:00
marioalexis ac878c5eeb Fem: Add magnetic flux density boundary condition 2025-12-16 14:26:31 -03:00
pre-commit-ci[bot] f9bb30217b [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2025-12-16 15:39:06 +00:00
Dimitris75 67df5bd709 Use dynamic LinearDeflection and AngularDeflection values
Remove Temporary values from Mesh
2025-12-16 17:37:04 +02:00
sliptonic a13502dccb Merge pull request #26205 from Connor9220/PreserveTSPTunnelExtraData
CAM: Update TSP tunnel solver
2025-12-16 09:31:14 -06:00
Dimitris75 b2ff8c5edc Merge branch 'OCL-Adaptive' of https://github.com/Dimitris75/FreeCAD into OCL-Adaptive 2025-12-16 14:27:21 +02:00
Dimitris75 a6bc504a2a Add OCL Adaptive in Tooltip
Add OCL Adaptive algorithm in UI Tooltip
2025-12-16 14:27:15 +02:00
Saksham Malhotra b7735044c4 PartDesign: move AllowCompound to Base property group (#26180) 2025-12-15 21:45:29 -06:00
Kacper Donat 68f2c6f864 chore: Add code quality problem report form 2025-12-15 21:18:34 -06:00
Kacper Donat a0356796ac Gui: Fix segfault in Safe Mode
This fixes segfault that was caused by changing settings in
FirstStartWidget that triggered change event on not fully intialized
StartView.

It is quick and dirty fix that just disables handling of the event
causing segfault until widget is fully ready. The correct solution would
be to remove the logic that changes settings from the widget (as it
should not be there) and instad move it to another place in pipeline.
This would be however much more work and segfault should be fixed ASAP.
2025-12-15 21:06:51 -06:00
Billy Huddleston 646b0f4492 CAM: Update TSP tunnel solver
Update TSP tunnel solver to match revised Pythonlogic, including
improved early exit, open-ended route handling, and performance tweaks.
Also ensure extra data in tunnel dictionaries is preserved through the
C++/Python interface and add a test for passthrough of extra keys.

src/Mod/CAM/App/tsp_solver.cpp:
- Refactor optimization loop to use lastImprovementAtStep and limit
variables
- Add special handling for open-ended routes (no end point)
- Change epsilon to 10e-6 for consistency with Python
- Cache distance calculations for relocation step

src/Mod/CAM/App/tsp_solver_pybind.cpp:
- Preserve extra keys from input tunnel dicts in output
- Set tunnel index for passthrough

src/Mod/CAM/CAMTests/TestTSPSolver.py:
- Add test to verify extra data in tunnel dicts is preserved through
TSP solver
- Print extra data for debugging
2025-12-15 21:50:51 -05:00
pre-commit-ci[bot] ccf0bdbce0 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2025-12-15 23:59:54 +00:00
Dimitris75 96c23f1968 Simplify code and UI
Simplify code and UI
2025-12-16 01:57:45 +02:00
Billy Huddleston 04df03cea1 CAM: Preserve extra tunnel data through TSP solver
Ensures that all extra keys in tunnel dictionaries are preserved after
TSP solving by copying the original input dict and updating solver
results. Adds a dedicated test to verify passthrough of extra data and
prints extra keys for debugging.

src/Mod/CAM/App/tsp_solver_pybind.cpp:
- Copy original tunnel dict and update with solver results to preserve extra keys

src/Mod/CAM/CAMTests/TestTSPSolver.py:
- Add test_09_tunnels_extra_data_passthrough to verify extra data preservation
- Print extra tunnel data in print_tunnels for easier debugging
2025-12-15 16:32:03 -05:00
sliptonic d116764dc3 CAM: Avoid bosses when pocketing. (#24723) 2025-12-15 12:29:28 -06:00
tarman3 3426672ccd CAM: Slot - Clear path if can not create slot 2025-12-15 20:21:16 +02:00
sliptonic 12355f37e9 Merge pull request #25826 from tarman3/pathcommands_qtcore
CAM: PathCommands - Remove unused import QtCore
2025-12-15 11:59:37 -06:00
sliptonic e1e8323dc1 Merge pull request #25839 from tarman3/slot_remove_0
CAM: Slot - Remove .0
2025-12-15 11:58:59 -06:00
sliptonic 44a5960d57 Merge pull request #26123 from Connor9220/AddCommandAnnotationsTests
CAM: Add comprehensive tests for Command constructor annotations
2025-12-15 11:57:28 -06:00
sliptonic bf3a471948 Merge pull request #24726 from Connor9220/TwoOptTSPSolver
CAM: 2-Opt TSP solver
2025-12-15 11:55:20 -06:00
Chris Hennes 10ed34bd4c Gui: Correct UTF-8 support for property names 2025-12-15 18:26:51 +01:00
Roy-043 2efd63614f BIM: ArchReference: fix coin node handling
Fixes #25772.
2025-12-15 17:24:00 +00:00
Chris Hennes 3208b6de5f PD: Don't warn about Midplane on document load 2025-12-15 18:22:31 +01:00
Roy-043 1c8df498f3 BIM: ArchReference: handle transparency-alpha switch
The 'old' DiffuseColor comes in 2 flavors. In v0.21.2 it stores transparency values. In v1.0.2 and v1.1 it stores alpha values. The ArchReference code should handle both. DiffuseColor is still used by BuildingParts in v1.0.2 and v1.1.

The solution is a bit hacky: if 100% transparency occurs we assume we are actually dealing with alpha values.
2025-12-15 17:21:29 +00:00
Chris Hennes 5ba7f207ab PD: Correct is-datum-in-body check 2025-12-15 18:20:04 +01:00
Roy-043 15bb0ee896 BIM: use optimalBoundingBox in getCutVolume 2025-12-15 17:19:56 +00:00
drwho495 88b5cde45f Implement Fix
Switch from checking child tag to checking the materTag
2025-12-15 11:17:42 -06:00
Roy-043 e6e285315c Draft: make Draft_AnnotationStyleEditor dialog wider
Increase AnnotationStyleEditorWidth from 450 to 600 to mitigate #25983.
2025-12-15 11:16:28 -06:00
Kacper Donat aefd2592a8 Gui: Respect both content size and minimum width for buttons
This is a hacky fix for https://github.com/FreeCAD/FreeCAD/issues/23607

Basically after widget is shown or polished we enforce it's minimum size to at
least cover the minimum size hint - something that QSS ignores if min-width is
specified.
2025-12-15 10:17:34 -06:00
Chris Hennes 16032ae34c Merge pull request #25914 from AjinkyaDahale/sk-fix-25281
Sketcher: Handle angle constraint on sketchobject changes
2025-12-15 10:15:13 -06:00
theo-vt 29eeab3624 Sketcher: Do not autoscale if there are blocked geometries 2025-12-15 09:20:20 -06:00
Kacper Donat fc93004c89 Gui: Improve transform UI responsivness
This introduces much faster CenterOfMassProvider#supports method that
can be used as cheap pre-check to see if the object supplied could have
the center of mass and so delay the domputation to a moment where it is
actually needed.
2025-12-15 09:18:27 -06:00
tarman3 7c941987a4 CAM: Profile - Limit value NumPasses 2025-12-15 14:41:22 +02:00
Billy Huddleston 095cdb14a7 CAM: Add comprehensive TSP tunnel solver tests and wrapper function
Added extensive test coverage for the TSP tunnel solver including linear
 tunnels, pentagram diagonals, and complex wire geometries with various
 constraint combinations. Introduced a Python wrapper function for
 tunnel sorting that integrates with the C++ solver.

src/Mod/CAM/CAMTests/TestTSPSolver.py:
- Renumbered existing tests to run in sequential order
(test_01_simple_tsp, test_02_start_point, etc.)
- Added print_tunnels() helper function for displaying tunnel
information with original indices
- Added test_06_tunnels_tsp: Tests 7 linear tunnels with varying
lengths, connectivity, and flipping behavior
- Added test_07_pentagram_tunnels_tsp: Tests pentagram diagonal tunnels
 with no constraints, start+end constraints, and start-only constraints
- Added test_08_open_wire_end_only: Tests end-only constraint on complex
 wire with 8 tunnels including crossings and diagonals

src/Mod/CAM/PathScripts/PathUtils.py:
- Added sort_tunnels_tsp() wrapper function that interfaces with the C++
tsp_solver.solveTunnels()
- Supports allowFlipping, routeStartPoint, and routeEndPoint parameters
2025-12-14 16:45:51 -05:00
chris 3476562dd7 fem: attempt to resolve issue #19798 2025-12-14 12:15:35 -06:00
Yash Suthar 8413922e52 Core: fix "Save Image" giving dark area as compare to viewport
Signed-off-by: Yash Suthar <yashsuthar983@gmail.com>
2025-12-14 14:49:58 +01:00
Kacper Donat bf697ca710 Gui: Use largest possible marker if needed
This is a quick and dirty fix for https://github.com/FreeCAD/FreeCAD/issues/22010

Basically if we want to use a bigger marker size than available, we use the biggest one
available. This is not a good way to fix the issue - we should ensure that the marker
size that the user requests is actually available - this, however, requires more
significant changes to the code.
2025-12-13 16:23:59 -06:00
David Kaufman 20842778aa Revert "cleanup"
This reverts commit 62caf967c7.
2025-12-13 11:03:22 -05:00
Billy Huddleston d940c499b7 CAM: Add TSP tunnel solver with flipping and Python bindings
Introduce TSPTunnel struct and implement TSPSolver::solveTunnels
for optimizing tunnel order with support for flipping and start/end points.
Expose the new functionality to Python via pybind11, returning tunnel
dictionaries with flipped status.

src/Mod/CAM/App/tsp_solver.cpp:
- Add solveTunnels implementation for tunnel TSP with flipping and route endpoints

src/Mod/CAM/App/tsp_solver.h:
- Define TSPTunnel struct
- Declare solveTunnels static method in TSPSolver

src/Mod/CAM/App/tsp_solver_pybind.cpp:
- Add Python wrapper for solveTunnels
- Expose solveTunnels to Python with argument parsing and result conversion
2025-12-13 10:59:47 -05:00
xtemp09 df6d148a85 [GUI] Rename Cancel ‘Close’ in Add Property dialog 2025-12-13 15:19:41 +01:00
Furgo d55d8d1dac BIM: Report command MVP (#24078)
* BIM: BIM Report MVP

* BIM: add Arch.selectObjects() API call and tests

* BIM: adopted ArchSchedule spreadsheet update and linking patterns

* BIM: SELECT with dynamic headers and dynamic data population

* BIM: fix deletion, dependencies, and serialization issues

* BIM: transition from individual query to multiple-query statements

* BIM: Mostly fix serialization issues

* BIM: Report editor UI/UX improvements

- Make edits directly on table (Description field only, for now)
- Sync table edits with query editor (Description field only, for now)
- Fix Property group name for spreadsheet object
- Add tooltips for all task panel widgets
- Put Description input and label on the same row
- Edit statement is now a static title
- Open report editor upon creation
- Remove overview table's redundant edit button
- Put report query options in a box
- Open spreadsheet after accepting report changes

* BIM: Aggregarion and grouping - implement GROUP BY with COUNT(*)

* BIM: Aggregation and grouping - implement SUM, MIN, MAX functions

* BIM: Aggregation and grouping - implement validation

* BIM: add reporting presets support

* BIM: align description and query preset inputs vertically

* BIM: write units on their own spreadsheet cell

* BIM: update test suite to new SQL engine behaviour

* BIM: fix various bugs: return values should not be stringized, non-grouped query with mixed extractors, handle nested properties

* BIM: expand Report test suite, fix property count vs count all bug

* BIM: add report engine SQL's IN clause support

* BIM: enable running Report presets tests from the build directory

* BIM: make spreadsheet more useful for analysis, units on headers

* BIM: update BIM Report icons

* BIM: Add key option columns to report overview table

* BIM: add syntax highlighting support to report query editor

* BIM: Add lark build dependency for SQL parser generator

* BIM: Install the generated parser

* BIM: implement TYPE() function

* BIM: simplify function registry, make it OOP

* BIM: add CHILDREN function

* BIM: improve SQL engine error descriptions

* BIM: Implement ORDER BY clause

* BIM: Implement column aliasing (AS...)

* BIM: improve error reporting to pinpoint exact token names

* BIM: implement CONCAT, LOWER, UPPER functions. Improve exception handling

* BIM: refactor to improve initialization readability and maintenance

* BIM: Improve query editor syntax highlighting

* BIM: Address CodeQL warnings

* BIM: Enable scalar functions in WHERE clause and refactor transformer

- Enable the use of scalar functions (e.g., `LOWER`, `TYPE`) in `WHERE` clause comparisons.
- Refactor the Lark transformer to correctly handle `NUMBER`, `NULL`, and `ASTERISK` terminals using dedicated methods.
- Refactor error handling to raise a custom `BimSqlSyntaxError` exception instead of returning values on failure.
- Improve syntax error messages to be more specific and user-friendly by inspecting the failing token.
- Fix regressions in `AggregateFunction` and `TypeFunction` handling that were introduced during the refactoring.
- Update the test suite to assert for specific exceptions, aligning with the new error handling API.

* BIM: Implement arithmetic operations in SELECT clause

- Update grammar with `expr`, `term`, and `factor` rules to support operator precedence.
- Introduce `ArithmeticOperation` class to represent calculations as a recursive tree.
- Add transformer methods to build the calculation tree from the grammar rules.
- Implement recursive evaluation that correctly normalizes `Quantity` and `float` types before calculation.

* BIM: Add CONVERT() function for unit conversions

- Implement a new ConvertFunction class to handle unit conversions in the SELECT clause.
- Leverage the core Quantity.getValueAs() FreeCAD API method to perform the conversion logic.
- Add a unit test to verify both successful conversions and graceful failure on incompatible units.

* BIM: add self-documenting supported SQL syntax helper

* BIM: document internal and external API functions

* BIM: Finalize and rename public ArchSql API, update all consumers

- Rename public API functions for clarity and consistency
  (run_query_for_objects -> select, get_sql_keywords -> getSqlKeywords,
  etc.).
- Establish Arch.py as the official API facade by exposing all public
  SQL functions and exceptions via a safe wildcard import from ArchSql,
  governed by __all__.
- Refactor all consumers (ArchReport.py, bimtests/TestArchReport.py) to
  use the new function names and access the API exclusively through the
  Arch facade (e.g., Arch.select).
- Finalize the error handling architecture:
  - Arch.select now logs and re-raises exceptions for consumers to
    handle.
  - Arch.count remains "safe," catching exceptions and returning an
    error tuple for the UI.
- Refactor the test suite to correctly assert the behavior of the new
  "unsafe" (select) and "safe" (count) APIs, including verifying
  specific exception messages.

* BIM: add results preview on demand on the query editor

* BIM: add documentation quick reference button

* BIM: Handle query errors gracefully in Report preview UI

Refactor the SQL engine's error handling to improve the Report preview
UI. Invalid queries from the "Preview Results" button no longer print
tracebacks to the console. Instead, errors are now caught and displayed
contextually within the preview table, providing clear feedback without
console noise.

- `ArchSql.select()` no longer logs errors to the console; it now only
  raises a specific exception on failure, delegating handling to the
  caller.
- The `ReportTaskPanel`'s preview button handler now wraps its call to
  `Arch.select()` in a `try...except` block.
- Caught exceptions are formatted and displayed in the preview table
  widget.
- Add new unit test

* BIM: consolidate internal API into a more semantically and functionally meaningful function

* BIM: Implement two-phase execution for SQL engine performance

Refactors the ArchSql engine to improve performance and internal API
semantics. The `Arch.count()` function, used for UI validation, now
executes faster by avoiding unnecessary data extraction.

This is achieved by splitting query execution into two phases. The first
phase performs fast filtering and grouping (`FROM`/`WHERE`/`GROUP BY`).
The second, slower phase processes the `SELECT` columns. The
`Arch.count()` function now only runs the first phase, while
`Arch.select()` runs both.

- Introduces `_run_query(query_string, mode)` as the mode-driven
  internal entry point for the SQL engine
- The `SelectStatement` class is refactored with new internal methods:
  `_get_grouped_data()` (Phase 1) and `_process_select_columns()`
  (Phase 2).
- `Arch.count()` now uses a fast path that includes a "sample execution"
  on a single object to correctly validate the full query without
  performance loss.
- The internal `execute()` method of `SelectStatement` is now a
  coordinator for the two-phase process.

* BIM: Implement autocompletion in Report SQL editor

Introduces an autocompletion feature for the SQL query editor in the BIM
Report task panel. The completer suggests SQL keywords, functions, and
property names to improve query writing speed and accuracy.

- Adds a custom `SqlQueryEditor` subclass that manages all
  autocompletion logic within its `keyPressEvent`.
- The completion model is populated with static SQL keywords and
  functions, plus all unique top-level property names dynamically
  scanned from every object in the document.
- A blocklist is used to filter out common non-queryable properties
  (e.g., `Visibility`, `Proxy`) from the suggestions.
- The editor manually calculates the completer popup's width based on
  content (`sizeHintForColumn`) to resolve a Qt rendering issue and
  ensure suggestions are always visible.
- The first suggestion is now pre-selected, allowing a single `Tab`
  press to accept the completion.

* BIM: remove unused import

* BIM: support SQL comments in queries

* BIM: support non-ASCII characters in queries

* BIM: Allow ORDER BY to accept a comma-separated list of columns for multi-level sorting.

* BIM: fix two-way overview/editor sync

* BIM: refactor to simplify editor modification events

* BIM: add tooltips to overview table

* BIM: add tooltips to query editor, enrich syntax data with signature and snippets

* BIM: implement PARENT function

* BIM: Enable property access on SQL function results

Previously, the SQL engine could only access properties directly from
the main object in a given row. This made it impossible to query
attributes of objects returned by functions, such as getting the name of
a parent with PARENT(*). This commit evolves the SQL grammar to handle
chained member access (.) with correct operator precedence. The parser's
transformer and execution logic were updated to recursively resolve
these chains, enabling more intuitive queries like SELECT
PARENT(*).Label and standard nested property access like Shape.Volume.

* BIM: refactor function registration, internationalize API metadata

* BIM: remove outdated Report alias

* BIM: refactor selectObjects to use latest API, move implementation to ArchSql

* BIM: improve friendly token names for error reporting

* BIM: implement chained functions e.g. PARENT(*).PARENT(*)

* BIM: add further tests for property access, fix bug with non-literal AS clause argument

* BIM: Implement full expression support for GROUP BY

The SQL engine's GROUP BY clause was previously limited to simple
property names, failing on queries that used functions (e.g., `GROUP BY
TYPE(*)`). This has been fixed by allowing the SQL transformer and
validator to correctly process function expressions.

The `SelectStatement.validate()` method now uses a canonical signature
to compare SELECT columns against GROUP BY expressions, ensuring
correctness for both simple properties and complex functions.

New regression tests have also been added to validate `GROUP BY`
functionality with chained functions (PPA) and multiple columns.

* BIM: Make arithmetic engine robust against missing properties

Previously, a query containing an arithmetic expression in the `WHERE`
clause would cause a fatal error if it processed an object that was
missing one of the properties used in the calculation.

This has been fixed by making the `ArithmeticOperation` class NULL-safe.
The engine now correctly handles `None` values returned by property
lookups, propagating them through the calculation as per standard SQL
behavior.

As a result, the engine no longer crashes on such queries. It now
gracefully evaluates all objects, simply filtering out those for which
the arithmetic expression cannot be resolved to a valid number. This
significantly improves the robustness of the query engine.

* BIM: Finalize ORDER BY logic and fix query regressions

- The `ORDER BY` clause is now governed by a single, predictable rule:
  it can only refer to column names or aliases that exist in the final
  `SELECT` list. The engine's transformer and execution logic have been
  updated to enforce and correctly implement this, fixing several test
  failures related to sorting by aliases and expressions.
- Updated test suite to align with the new engine rules. Add new
  dedicated unit tests that explicitly document the supported (aliased
  expression) and unsupported (raw expression) syntax for the `ORDER BY`
  clause.

* BIM: Implement backend for pipelined report execution

Adds the backend architecture for multi-step, pipelined queries. The
core SQL engine can now execute a statement against the results of a
previous one, enabling complex sequential filtering.

- The internal `_run_query` function was refactored to be
  pipeline-aware, allowing it to operate on a pre-filtered list of
  source objects.
- A new `execute_pipeline` orchestrator was added to manage the data
  flow between statements, controlled by a new `is_pipelined` flag in
  the `ReportStatement` data model.
- The public API was extended with `selectObjectsFromPipeline` for
  scripting, and `count()` was enhanced to support contextual validation
  for the UI.

Pipelines phase 2

Pipelines phase 3

* BIM: refactor to avoid circular imports

* BIM: Address key CodeQl check errors/notes

* BIM: Refactor Task Panel UI/UX with explicit editing workflow

Refactor the report editor UI to improve usability and prevent data
loss. Editing a statement is now an explicit action, triggered by a new
"Edit Selected" button. This prevents accidental changes and enables a
new transactional workflow with "Save" and "Discard" buttons for each
edit session. A checkbox for "Apply & Next" has been added to streamline
editing multiple statements.

The results preview feature has been redesigned into a self-contained,
closable pane controlled by a "Show Preview" toggle. This pane includes
its own contextual "Refresh" button, reducing UI clutter. All action
button groups have been consistently right-aligned to improve layout and
workflow.

* BIM: Integrate pipeline execution and stabilize UI workflow

Completes the implementation of the pipelined statements feature by
integrating the new backend orchestrator with the ArchReport object. It
also includes a series of critical bug fixes that were discovered during
end-to-end testing, resulting in a more stable user experience.

The primary feature integration consists of refactoring the
_ArchReport.execute method. It now uses the ArchSql.execute_pipeline
generator, enabling the report to correctly process multi-step pipelines
and honor the user-configured data flow.

Severalbugs and regressions were fixed:

- Backend: A major flaw was fixed where FROM-clause functions (like
  CHILDREN) were not pipeline-aware. The engine's GROUP BY validator was
  also corrected to enforce its original, safer design of not supporting
  aliases.
- UI Workflow: A feedback loop that caused the editor cursor to reset
  was resolved. The transactional logic for the Save, Discard, and "Save
  & Add New" actions was corrected to prevent data loss and ensure
  predictable behavior. The Add and Duplicate actions no longer auto-open
  the editor, creating a more consistent workflow.
- UI State: Fixed regressions related to the explicit editing model,
  including incorrect statement loading (Edit Selected) and state
  management when a report is reloaded from a file.

* BIM: add presets manager

* BIM: Fix 'still touched after recompute' bug in some of the tests

* BIM: cleanup tests, fixed presets tests to new presets locations

* BIM: Move test model to its own module for reusability

* BIM: Move GUI tests to their own module

- Disable two of the tests: they pass, but cause a segmentation fault on
  teardown. They need to be investigated before enabling them on CI.

* BIM: fix bug in interpreting CONVERT string from GROUP BY

* BIM: Migrate signal connections from lambdas to Qt slots

Refactors all signal connections in the `ReportTaskPanel` to use the
`@QtCore.Slot()` decorator instead of lambda wrappers.

- Resolves CodeQL warning "Unnecessary lambda".
- Adheres to PySide/Qt best practices for signal/slot handling.
- Improves code clarity by using explicit, named methods for
  connections.
- Prevents potential runtime `TypeError` exceptions by correctly
  managing slot signatures for signals that emit arguments (e.g.,
  `clicked(bool)`).
- Introduces simple slot wrappers where necessary to cleanly separate UI
  event handling from core logic.

* BIM: Address CodeQl warnings

* BIM: Add CHILDREN_RECURSIVE(subquery, max_depth) SQL function to find all descendants of an object set.

- Create internal _get_bim_type and _is_bim_group helpers to remove all Draft module dependencies from the SQL engine.
- Implement a new _traverse_architectural_hierarchy function using a deque-based BFS algorithm to prevent infinite loops.
- The CHILDREN and CHILDREN_RECURSIVE functions now use the new traversal engine.
- The traversal engine now transparently navigates generic groups but excludes them from the results.
- Correct ParentFunction logic to validate containment by checking the parent's .Group list instead of the child's .InList.
- Add unit tests for recursive traversal, depth limiting, and transparent group handling.
- Update test_group_by_multiple_mixed_columns to match the corrected behavior of the TYPE(*) function.

* BIM: Add __repr__ and __str__ for the ArchReport proxy

* BIM: Align report quantity headers with internal units

- Change default `Quantity` headers to use the property's internal unit
  (e.g., `mm`) instead of the user's global preferred unit (e.g., `m`).
- Fixes inconsistency where the header unit (e.g., `m²`) did not match
  the raw data's unit (e.g., `mm²`), making the default behavior
  predictable.
- Implement by parsing `str(Quantity)` as a workaround for the C++
  `Unit::getString()` method not being exposed to the Python API.
- Add a unit test that temporarily changes the global schema to verify
  the fix is independent of user preferences.

* BIM: remove dual import ArchSql and from ArchSql import

* BIM: Fix IfcRole => IfcType

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

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

* CI: add Lark as a build dependency

* BIM: Replace QRegExp with QRegularExpression for regex patterns

QRegExp is no longer available in PySide6. Make the code compatible with
both PySide2/Qt5 and PySide6/Qt6.

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

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

* CI: move lark dependency to pixi's requirements.host

* BIM: Correct numeric comparisons in SQL WHERE clause

Refactor the `BooleanComparison.evaluate` method to handle numeric and
string-based comparisons separately. Previously, all comparisons were
being performed on string-converted values, causing numerically
incorrect results for `Quantity` objects formatted with "smart" units
(e.g., `"10.0 m"` was incorrectly evaluated as less than `"8000"`).

- The `evaluate` method now normalizes `Quantity` objects to their raw
  `.Value` first.
- If both operands are numeric, a direct numerical comparison is
  performed for all operators (`=`, `!=`, `>`, `<`, `>=`, `<=`).
- String-based comparisons (for `like`, or as a fallback for other
  types) are handled in a separate path.
- Add unit test to lock down this behavior.

* BIM: autocompleter improvements

- Add a trailing space when autocompleting the keywords that need it
- Autocomplete multi-word keywords as a unit

* BIM: Improve live validation user experience

- Do not throw syntax error when in the middle of autocompleting a
  keyword
- Introduce typing state and show incomplete query status

* BIM: change double-click action to edit in statements overview

Also allow quick editing the statement description with F2

* BIM: Improve user strings for consistency

* BIM: show count of returned objects in statements table

* BIM: disable preview on invalid queries

* BIM: define slot so that tests can run headless

* BIM: Update unit test to adapt to new behaviour

* [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-12-13 13:02:13 +00:00
tarman3 cd8ebe10bf CAM: EngraveBase - Tolerance 2025-12-13 10:25:17 +02:00
tarman3 ea7ef0b132 CAM: Tag Dressup - Tolerance 2025-12-13 09:49:31 +02:00
Billy Huddleston b2b9f03086 CAM: Add comprehensive tests for Command constructor annotations
Add detailed test coverage for the new Command constructor that accepts
annotations parameter, including positional and keyword arguments,
string and numeric annotations, empty annotations, and backward
compatibility. Split existing save/restore tests for better granularity.

src/Mod/CAM/CAMTests/TestPathCommandAnnotations.py:
- Added test14-test20 for Command constructor with annotations
- Split test12 into test12 (empty annotations) and test13
(complex annotations) for focused testing
2025-12-12 20:45:02 -05:00
Billy Huddleston 005cbb937d Rewrite TSP solver for improved path optimization and clarity
- Completely re-implemented the TSP algorithm in C++ for better path quality
- Added detailed comments and documentation to clarify each step
- Improved nearest neighbor, 2-opt, and relocation logic
- Enhanced handling of start/end point constraints
- Updated PathUtils.py docstring to accurately describe start point behavior
2025-12-12 19:39:29 -05:00
Billy Huddleston 428948699a Add startPoint and endPoint support to TSP solver and Python wrapper; add tests
- Enhanced the C++ TSP solver to accept optional start and end points, so the route can begin and/or end at the closest point to specified coordinates.
- Updated the Python pybind11 wrapper and PathUtils.sort_locations_tsp to support startPoint and endPoint as named parameters.
- Added a new Python test suite (TestTSPSolver.py) to verify correct handling of start/end points and integration with PathUtils.
- Registered the new test in TestCAMApp.py and CMakeLists.txt for automatic test discovery.
2025-12-12 19:39:28 -05:00
Billy Huddleston f9347c781b Add 2-Opt TSP solver
This update introduces a new C++ 2-Opt TSP solver with Python bindings.

src/Mod/CAM/App/CMakeLists.txt:
- Add build and install rules for the new pybind11-based tsp_solver Python module

src/Mod/CAM/App/tsp_solver.cpp:
- Add new C++ implementation of a 2-Opt TSP solver with nearest-neighbor initialization

src/Mod/CAM/App/tsp_solver.h:
- Add TSPPoint struct and TSPSolver class with 2-Opt solve method

src/Mod/CAM/App/tsp_solver_pybind.cpp:
- Add pybind11 wrapper exposing the TSP solver to Python as tsp_solver.solve

src/Mod/CAM/PathScripts/PathUtils.py:
- Add sort_locations_tsp Python wrapper for the C++ TSP solver
- Use tsp_solver.solve for TSP-based
2025-12-12 19:39:28 -05:00
David Kaufman 5c3e32a42c also use the % symbol for step over percent 2025-12-12 15:38:14 -05:00
David Kaufman f6daab5ed8 use % symbol in min/max helix diameter input fields, instead of the word 'percent' in the label 2025-12-12 15:33:00 -05:00
David Kaufman 5d877d1cc3 extract 'helix' header from property labels and make it the frame header 2025-12-12 15:33:00 -05:00
David Kaufman 07ed72fe16 rename HelixIdealDiameter to HelixMaxDiameter and update documentation 2025-12-12 15:33:00 -05:00
tarman3 ef0782c518 CAM: ToggleOperation - Allow for Job and Operations group 2025-12-12 21:07:53 +02:00
tarman3 fba419f6cb CAM: OperationCopy improve 2025-12-12 21:07:39 +02:00
sliptonic 442a36bea6 Merge pull request #25285 from tarman3/profile_restore
CAM: Profile - clean areaOpOnDocumentRestored()
2025-12-12 12:59:55 -06:00
sliptonic 293038762c Merge pull request #25960 from Connor9220/FixBoundaryDressup
CAM: Refactor stock used as boundary to be distinct from regular stock
2025-12-12 12:39:16 -06:00
tarman3 8fcecc97cb CAM: PathCommands - Remove unused import QtCore 2025-12-12 20:32:23 +02:00
sliptonic 7a0b613561 Merge pull request #25218 from tarman3/geom_tol
CAM: Path.Geom.cmdsForEdge() - add tolerance
2025-12-12 12:29:04 -06:00
sliptonic 0135bba534 Merge pull request #24297 from tarman3/simplecopy
CAM: SimpleCopy - Allow multiple selection
2025-12-12 12:23:35 -06:00
sliptonic b5185a0a22 Merge pull request #25827 from tarman3/pathcommands_looperror
CAM: PathCommands - Remove pop message about loop error
2025-12-12 12:19:38 -06:00
sliptonic 72bc4ef1bd Merge pull request #25938 from Connor9220/AddAnnotationsToCommand
CAM: Add annotations support to Command constructor and Python bindings
2025-12-12 12:17:09 -06:00
sliptonic c495890491 Merge pull request #25786 from Connor9220/FixLinuxCNCPostprocesor
CAM: Add rigid Tapping back to legacy LinuxCNC postprocessor
2025-12-12 11:44:36 -06:00
sliptonic 45386cdcb7 Merge pull request #25783 from Connor9220/AddUnitsPerToolbit
CAM: Add Units (Metric/Imperial) property to ToolBit
2025-12-12 10:46:42 -06:00
sliptonic 96d1084484 Merge pull request #25850 from petterreinholdtsen/cam-fanuc-post-fixes
CAM: Get Fanuc post processor working and implement several improvements
2025-12-12 10:41:51 -06:00
sliptonic 78102d294d Merge pull request #26008 from tarman3/editor_setText
CAM: CodeEditor - stub for setText()
2025-12-12 10:34:17 -06:00
luzpaz 5c0ff4bd8a Fix typos
Fixes various documentation/source-comment typos
2025-12-12 13:59:38 +01:00
PaddleStroke 893a9d19b6 Core: move getPlacementProperty to be more accessible (#26088)
* Core: move getPlacementProperty to be more accessible

* Update DocumentObject.h

* Update DocumentObject.cpp

* Update ViewProviderDragger.h

* Update ViewProviderDragger.cpp

* Update DocumentObject.h

* Update DocumentObject.cpp

* Update ViewProviderLink.cpp

* Update DocumentObject.h

* Update DocumentObject.cpp

* Update DocumentObject.h
2025-12-12 11:59:03 +00:00
Ajinkya Dahale 0800791a0f Sketcher: Only transfer angle to relevant segment on trim etc. 2025-12-12 11:23:00 +05:30
Ajinkya Dahale 78e5729520 Sketcher: Handle angle constraint on sketchobject changes
Primarily trim, but also expected to affect split, extend etc.
2025-12-12 09:17:05 +05:30
PaddleStroke 9625a71d8d Assembly: joint task: fix delete impossible of non-valid refs 2025-12-11 19:04:27 -06:00
Chris Hennes bb25a4efbc Merge pull request #26089 from Roy-043/Draft-fix-lag-when-snapping-to-face-intersections
Draft: fix lag when snapping to face intersections
2025-12-11 19:01:22 -06:00
Alfredo Monclus f92c8e126c PardDesign: fix hole task thread combos not translating 2025-12-11 18:56:10 -06:00
Kacper Donat c10f5d74d3 PartDesign: Recompute preview after forced recompute
This fixes some cases where Preview was stale and not recomputed after
changes done via code.
2025-12-11 18:55:10 -06:00
Roy-043 4b379c8e51 Draft: fix lag when snapping to face intersections
Fixes #25924.

The `snapToIntersection` function has been changed to an if-elif structure, and in case of face-edge intersection snap, only two sublements are checked. This ensures a reasonable speed, even if objects have many edges and faces. The change does mean you have to move the mouse over the correct face for it to be processed. But since face-edge intersection snap is new anyway, this is acceptable I think.
2025-12-11 17:32:44 +01:00
Roy-043 e1d77cc771 Remove maxSnapFaces parameter from params.py
Removed 'maxSnapFaces' parameter from settings.
2025-12-11 17:22:30 +01:00
timpieces de2f8a58a3 Add proper tooltips for Material properties #24434 (#25509) 2025-12-11 14:56:26 +00:00
tarman3 b567525768 CAM: RampEntry Dressup - Remove X0Y0 from beginning 2025-12-11 08:22:35 +02:00
Petter Reinholdtsen 9c78ced00c CAM: Made Fanuc post processor compatible with FreeCAD 1.1.
Use setPlainText() if available, otherwise use setText().
Workaround for a regression from #23862.
2025-12-11 00:57:21 +01:00
Petter Reinholdtsen 8386f1394e CAM: Adjusted Fanuc post processor to move Z to tool change position before M6
A "G28 G91 Z0" is needed according to testing and page 195 (6-1-2 Procedure for ATC operation) in
<URL: https://www.milco.bg/source/Technical%20Service/Documentation%20Dahlih/MCV%20510_1250B%20Operation%20and%20maintenance%20manual%20V2_2.pdf >
to get the spindle into the correct position for a tool change.
2025-12-11 00:57:21 +01:00
Petter Reinholdtsen e6c95dbb91 CAM: Added test of Fanuc post processor
Used TestMach3Mach4LegacyPost.py as the starting point with input from
other test scripts too.

The test demonstrate a fix for #25723, as the Fanuc post processor has not been not updated to the latest changes in
the Path module.

This is related to #24676, where thread tapping was added to LinuxCNC, but the equivalent code in the Fanuc
postprocessor were not adjusted to cope, and #25677 where it was observed that the Fanuc postprocessor was
broken in versions 0.20 and 1.0.

Added MockTool class to provide ShapeName to fanuc_post.py, used to
convert drill cycles to threading cycles if the tool has shapeid "tap".
2025-12-11 00:57:21 +01:00
Petter Reinholdtsen 38c3eebd7a CAM: Made Fanuc post processor compatible with FreeCAD 1.0.
Several methods introduced 2025-05-04 are preferred, but the methods
available in version 1.0 are used as fallback sources
for active status and coolent enabled.
2025-12-11 00:57:21 +01:00
Petter Reinholdtsen 34a5301862 CAM: Switched Fanuc post processor to end program with M30, not M2.
The difference according to the documentation is that M30 will rewind
the paper tape while M2 will not.  The effect on a CNC from 1994 is
that M30 turn on the indicator light marking that the program has
completed, while M2 do not, and the light is wanted to know when
the machine is done.
2025-12-11 00:57:21 +01:00
Petter Reinholdtsen 8b500ca9a3 CAM: Adjusted Fanuc post processor to use M05 consistently everywhere. 2025-12-11 00:57:21 +01:00
Petter Reinholdtsen 4c18ac6c54 CAM: Provide correct and more relevant header from Fanuc post processor
Fanuc only understand upper case letters, no point in providing the
file name in lower case letters.  The provided file name is always "-",
so drop it completely. The first comment is presented in the Fanuc user
interface, it should get more relevant content.

Dropped useless semicolon.
2025-12-11 00:57:21 +01:00
Petter Reinholdtsen e4862572ae CAM: Avoid Z overtravel error on Fanuc tool changes
Enabling tool height compensation will cause the axis to move up
the length of the tool, which will cause a Z overtravel error when
the tool change take place close to the top of the machine.  To
counter this move, ask the machine to move its commanded position
down the length of the tool height, which in effect causes no upward
movement after the tool change.  The #4120 variable contain the
current tool number, and #2000 - #20XX contain the tool heights.
2025-12-11 00:57:21 +01:00
Petter Reinholdtsen bcb569977d CAM: Avoid adding trailing space to all M6 lines.
The Fanuc post processor add a trailing space to all M6 lines.
This make it problematic to write test for the generated output,
when compiled with the automatic policy enforcer on github
removing trialing space from the expected output.  Avoid the
problem by removing the trailing space from the generated
output.
2025-12-11 00:57:21 +01:00
Petter Reinholdtsen 3c5f39c0ca CAM: Corrected Fanuc post processor M3 handling
The thread tapping implementation in the Fanuc post processor change
behaviour of M3, G81 and G82 when the tool ShapeID matches "tap".
but the code not not expect that the parse() method will be
called with two different classes as arguments.

Rewrite the M3 handling to handle ToolController arguments
instead of crashing with an AttributeError.

Issues:

Fixes #14016
Fixes #25723
2025-12-11 00:57:21 +01:00
Petter Reinholdtsen 06fe4b37ba CAM: Switch Fanuc post processor default for M6T0 to disable by default. 2025-12-11 00:57:21 +01:00
Petter Reinholdtsen 87185c8135 CAM: Made empty spindle at the end optional in Fanuc CAM post processing script
Some Fanuc machines do not understand the 'M6 T0' instructions in the
preamble.  Move it out of the preamble and controlled by a new
command line argument --no-end-spindle-empty for the machines
where running to cause a "Tool Number Alarm" and the program to crash
as tool zero is not a valid tool.

Fixes: #25677
2025-12-11 00:57:21 +01:00
Petter Reinholdtsen 0cdf9abc4b CAM: Adjusted Fanuc post processing script to always start with a percent
The percent signal to the machine that a program follows, and is not
part of the header but a required part when uploading programs into
the machine.
2025-12-11 00:57:21 +01:00
Petter Reinholdtsen ef794c31bd CAM: Adjusted Fanuc post processing script to not inherit behaviour between calls
Reset line number when using --line-numbers.  Restore all default values when a
command line argument is not used.

This helps the test scripts ensure that the arguments passed during one test is the only
one taking effect during this test.
2025-12-11 00:57:21 +01:00
Petter Reinholdtsen 533e957f80 CAM: Print "Show editor" status boolean as string, not integer
This get rid of a Python style warning and make the output easier
to understand.
2025-12-11 00:57:20 +01:00
PaddleStroke 7a8135d863 Core: Add getPlacementOf replacing previous getGlobalPlacement logic. (#26059)
* Core: Add getPlacementOf replacing previous getGlobalPlacement logic.

* Update src/App/DocumentObject.cpp

Co-authored-by: Kacper Donat <kadet1090@gmail.com>

* Update DocumentObject.cpp

* Fix error when called from python with targetObj == None

---------

Co-authored-by: Kacper Donat <kadet1090@gmail.com>
2025-12-10 22:47:20 +01:00
Billy Huddleston 5085a286bd CAM: Add Units (Metric/Imperial) property to ToolBit
This PR allows each Toolbit to have its own Units property (Metric/Imperial) for better unit management.

Short Summary:
- Adds a Units property (Metric/Imperial) to ToolBit objects for better unit management.
- Ensures ToolBit schema is set and restored properly in the editor and utilities.
- Updates formatting and property handling to respect the selected units.
- Improves the ToolBit editor widget to refresh and sync schema/UI when units change.
- Uses FreeCAD.Units.setSchema and getSchema to switch between unit schemas.

NOTE: Toolbit dimensions are read from JSON in their native units  (as specified by the Units property),
converted to metric for all internal calculations, and displayed in the UI using the
toolbit's selected units. This ensures both accurate internal computation and user-friendly
display, while storing the correct units in the JSON. This can cause some rounding differences
when switching units. Example: 2 mm becomes 0.0787 inches. If you save that as imperial and then
switch back to metric, it will show 1.9999 mm

src/Mod/CAM/Path/Tool/toolbit/models/base.py:
- Add Units property to ToolBit and ensure it's set and synced with toolbit shape parameters.
- Update property creation and value formatting to use Units.

src/Mod/CAM/Path/Tool/toolbit/ui/editor.py:
- Use setToolBitSchema to set schema based on toolbit units.
- Add logic to refresh property editor widget when units change.
- Restore original schema on close.
- Improve docstrings and signal handling.

src/Mod/CAM/Path/Tool/toolbit/util.py:
- Add setToolBitSchema function for robust schema switching.
- Update format_value to use schema and units.
- Add docstrings and clarify formatting logic.

src/Mod/CAM/Path/Tool/library/ui/browser.py:
- Restore original schema after editing toolbit.

src/Mod/CAM/Path/Tool/library/ui/editor.py:
- Ensure correct schema is set for new toolbits.
2025-12-10 14:57:33 -05:00
Kacper Donat c12ca7b3ba Stylesheets: Fix toolbar button size change 2025-12-10 20:15:34 +01:00
Yash Suthar aed9b770f3 Link: Fixed Scale property behaviour when the object is moved
Signed-off-by: Yash Suthar <yashsuthar983@gmail.com>
2025-12-10 20:13:56 +01:00
Chris Hennes 67948d60a2 PD: Add deprecation warning if Midplane is set 2025-12-10 12:42:13 +01:00
sliptonic 5ad6a1ba58 Merge pull request #26038 from jffmichi/cam_viewprovider_accidental_change
CAM: revert accidental icon name change from #25440
2025-12-09 07:53:17 -06:00
jffmichi 8058f824e2 CAM: revert accidental icon name change from #25440 2025-12-09 05:53:05 +01:00
freecad-gh-actions-translation-bot f7483a08b4 Update translations from Crowdin 2025-12-08 22:31:48 -06:00
Max Wilfinger ff36528155 Update stale issue and PR settings in workflow 2025-12-08 11:34:50 -06:00
PaddleStroke 3608c9f8c4 Part: TopoShape make getElementTypeAndIndex more robust (#25913)
* Part: TopoShape make getElementTypeAndIndex more robust
* Part: Add unit tests for new regex

---------

Co-authored-by: Chris Hennes <chennes@gmail.com>
2025-12-08 11:24:13 -06:00
Chris Hennes 6f511f7911 Merge pull request #25903 from WandererFan/CosVertexCrashInScript
TechDraw: Prevent crash on adding cosmetic feature before geometry created
2025-12-08 11:22:21 -06:00
Syres916 9375f579f0 Merge pull request #25809 from Syres916/HotFix_For_Win_and_Wayland_For_First_Run
[Gui] Hotfix for correcting main window position on first run and Safe Mode on Windows and Wayland
2025-12-08 11:18:58 -06:00
dependabot[bot] 7a493002ac Bump peter-evans/create-pull-request from 7.0.9 to 7.0.11
Bumps [peter-evans/create-pull-request](https://github.com/peter-evans/create-pull-request) from 7.0.9 to 7.0.11.
- [Release notes](https://github.com/peter-evans/create-pull-request/releases)
- [Commits](https://github.com/peter-evans/create-pull-request/compare/84ae59a2cdc2258d6fa0732dd66352dddae2a412...22a9089034f40e5a961c8808d113e2c98fb63676)

---
updated-dependencies:
- dependency-name: peter-evans/create-pull-request
  dependency-version: 7.0.11
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-12-08 09:25:28 -06:00
tarman3 76d939c21f CAM: CodeEditor - stub for setText() 2025-12-07 20:23:14 +02:00
tetektoza 915b6f9901 Gui: Fix preferences search popup positioning on Wayland (#25675)
* Gui: Fix preferences search popup positioning on Wayland

Change window flag from `Qt::Tool` to `Qt::ToolTip` to fix popup
appearing in center of screen and closing immediately on Wayland desktop
envs. `Qt::ToolTip` uses xdg_popup protocol which provides proper
positioning relative to parent window on Wayland.

* Gui: Initialize ok check flag to default in prefs

* Gui: Use ranged for loop where possible in prefs

* Gui: Remove unused variable in preferences controller

* Gui: Use const where possible in prefs search dialog

* Gui: Use static where possible in search prefs dialog

* Gui: Use braced initializer list when returning type in search prefs

* Gui: Use auto in search prefs dialog where possible

* Gui: Do not use else if after return in search prefs dialog

* [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-12-07 11:43:09 +01:00
wandererfan b1cbcbd238 [TD]fix CI fail on Win 2025-12-05 18:33:16 -05:00
wandererfan 3f10abe11b [TD]fix CosmeticVertex fail in script 2025-12-05 18:33:16 -05:00
Chris Hennes 6ec9870d54 Merge pull request #25853 from 3x380V/reimplement_24749
TechDraw: Fix dimension formatter
2025-12-05 16:07:14 -06:00
Frank David Martínez M a70ec178b8 Gui: Fix 25974 freecad.gui alias regression (#25975) 2025-12-05 19:03:40 +00:00
Adrian Insaurralde Avalos fbb65a34fe Plot: protect matplotlib.pyplot import form PyQt6 too and remove lingering debug print 2025-12-05 10:15:02 -06:00
PaddleStroke a49d106807 Sketcher: Fix errors message when selecting circle seam point. (#25953) 2025-12-05 07:17:30 +00:00
Sebastian 945ba15e18 Match the string that gets sent to setCommand (#25964)
* Match the string that gets sent to setCommand

Correction of a not matching string that gets sent to setCommand. This results in a not translated menu item in the Sketcher menu.

* [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-12-05 06:38:17 +01:00
PaddleStroke 67234e98b7 Sketcher: Offset: Fix failure if 2+ closed wires with different orientations (#25941) 2025-12-04 23:06:01 -06:00
marioalexis 9d5f6c82be Fem: Fix undefined variable 2025-12-04 22:51:33 -06:00
Billy Huddleston 8e2dc8cd19 CAM: Refactor stock used as boundary to be distinct from regular stock
This commit makes boundary stock objects distinct from regular stock by
setting a boundary flag and label, and prevents editing of boundary
objects in the job view provider.

src/Mod/CAM/Path/Dressup/Boundary.py:
- Add promoteStockToBoundary method, set boundary properties, handle
missing stock/shape

src/Mod/CAM/Path/Main/Gui/Job.py:
- Block editing for objects flagged as boundary stock
2025-12-04 12:43:43 -05:00
Frank David Martínez M d7a7416398 [Core] FreeCADInit and FreeCADGuiInit refactoring (#23413) 2025-12-04 11:10:53 -06:00
Adrian Insaurralde Avalos af48da0dbf WindowsInstaller: more robust automatic version info from freecadcmd
otherwise it broke if freecad had other unrelated output
2025-12-03 15:24:55 -06:00
Billy Huddleston 047cd38c24 CAM: Add annotations support to Command constructor and Python bindings
This commit introduces support for passing an 'annotations' dictionary
to the Command class constructor and its Python bindings. The annotations
dictionary can contain string or numeric values for each key, allowing for
richer metadata on CAM commands. Each annotation must be provided as a
key-value pair within a dictionary.

Examples:

cmd = Command("G1", {"X": 10.0, "Y": 5.0}, {"note": "Rapid move"})

cmd = Command("G2", {"X": 20.0, "Y": 15.0}, {"priority": 1})

cmd = Command("G3", {"X": 30.0, "Y": 25.0}, {"note": "Arc move", "speed": 1500})

cmd = Command("G0", {"X": 0.0, "Y": 0.0}, {})

cmd = Command("G0", {"X": 0.0, "Y": 0.0})

cmd = Command("G1", {"X": 10.0, "Y": 5.0}, annotations={"note": "Rapid move"})

src/Mod/CAM/App/Command.cpp:
- Added new Command constructor accepting annotations

src/Mod/CAM/App/Command.h:
- Declared new Command constructor with annotations parameter

src/Mod/CAM/App/Command.pyi:
- Updated docstring to describe annotations argument

src/Mod/CAM/App/CommandPyImp.cpp:
- Extended Python init to parse and set annotations dictionary
2025-12-03 15:44:18 -05:00
Chris Hennes ee394d2e58 Merge pull request #25920 from PaddleStroke/patch-840798
Sketcher: Fix warning when using dimension tool
2025-12-03 13:09:40 -06:00
PaddleStroke 5f70c4390d Part: revert changes to ViewProviderExt::getDetails (#25912) 2025-12-03 12:12:27 -06:00
sliptonic 2b22873d66 Merge pull request #25908 from Connor9220/FixJobAssignment
CAM: Fix job assignment and model/stock initialization in ObjectOp
2025-12-03 11:57:49 -06:00
Ladislav Michl 90086d3e31 Revert "[Base]retrieve unit text"
This reverts both pointless and broken commit c9fffa6789.
2025-12-03 17:43:53 +01:00
Ladislav Michl 3252aaf618 TechDraw: Refactor use of Unit Schema values
Quantity's getUserString already returns both factor and unitText.
2025-12-03 17:43:53 +01:00
Ladislav Michl a509bc2ee9 TechDraw: Fix MultiValueSchema formatting
Multi Value schemas cannot be forced to use Format::FORMATTED.
2025-12-03 17:17:58 +01:00
PaddleStroke 0c34c93fe4 Sketcher: dimension tool, use VPSketch version of addSelection 2025-12-03 15:30:44 +01:00
PaddleStroke 1784be046f Sketcher: Make VPSketch::addSelection public 2025-12-03 15:29:01 +01:00
Billy Huddleston ab817f8dc5 CAM: Fix job assignment and model/stock initialization in ObjectOp
This PR fixes a bug introduced with PR #25800
It updates the ObjectOp class to correctly assign the job, model,
and stock properties from the parentJob object. Previously, only
PathUtils.addToJob was called, which did not set these attributes directly.

This change ensures that when creating a new operation, the job, model,
and stock fields are properly initialized from the parent job. This
fixes issues where operations did not inherit the correct job context,
leading to missing or incorrect references to the model and stock, and
potential errors in downstream processing.
2025-12-03 00:23:23 -05:00
Roy-043 4f4db09572 Part: make Part_EditAttachment nesting aware (#25887) 2025-12-02 22:44:55 -06:00
PaddleStroke 7c2dac1278 GUI: Fix broken build - splitbutton (#25892) 2025-12-02 20:24:57 -06:00
dependabot[bot] 280382ad3e Bump step-security/harden-runner from 2.13.2 to 2.13.3
Bumps [step-security/harden-runner](https://github.com/step-security/harden-runner) from 2.13.2 to 2.13.3.
- [Release notes](https://github.com/step-security/harden-runner/releases)
- [Commits](https://github.com/step-security/harden-runner/compare/95d9a5deda9de15063e7595e9719c11c38c90ae2...df199fb7be9f65074067a9eb93f12bb4c5547cf2)

---
updated-dependencies:
- dependency-name: step-security/harden-runner
  dependency-version: 2.13.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-12-02 12:24:11 -06:00
sliptonic 20c2eee9db CAM: Suppress rendering of first rapids (#25440) 2025-12-02 12:20:07 -06:00
dependabot[bot] a0c9b2ecb9 Bump github/issue-metrics from 3.25.3 to 3.25.4
Bumps [github/issue-metrics](https://github.com/github/issue-metrics) from 3.25.3 to 3.25.4.
- [Release notes](https://github.com/github/issue-metrics/releases)
- [Commits](https://github.com/github/issue-metrics/compare/78b1d469a1b1c94945b15bd71dedcb1928667f49...55bb0b704982057a101ab7515fb72b2293927c8a)

---
updated-dependencies:
- dependency-name: github/issue-metrics
  dependency-version: 3.25.4
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-12-02 19:11:16 +01:00
PaddleStroke ac0685b841 Assembly CommandInsertNewPart : Make sure assembly file is saved (#25730)
Co-authored-by: Chris Hennes <chennes@pioneerlibrarysystem.org>
2025-12-02 04:30:20 +00:00
PaddleStroke 6ddb0165ff Sketcher: fix new external always construction (#25733) 2025-12-01 21:49:24 -06:00
Frank Martinez c057d0293a Build: Fix some trivial warnings 2025-12-01 20:57:09 -06:00
Billy Huddleston b5d97057be CAM: Introduce unified ToolBit parameter migration logic for Bullnose tools
- Added new migration system to handle legacy parameter conversion for ToolBit assets and objects.
- Implemented ParameterAccessor abstraction for consistent access to dicts and FreeCAD objects.
- Centralized migration logic for CornerRadius from TorusRadius or FlatRadius/Diameter, restricted to Bullnose shape-type.
- Updated asset and object initialization to use migration logic and filter Bullnose parameters.

src/Mod/CAM/Path/Tool/camassets.py:
- Integrate new migration logic for ToolBit assets using ParameterAccessor and migrate_parameters.
- Ensure shape-type is set before parameter migration; only write changes if migration occurred.

src/Mod/CAM/Path/Tool/toolbit/migration.py:
- Add ParameterAccessor class and migrate_parameters function for unified migration.
- Handle legacy parameter conversion for Bullnose tools.

src/Mod/CAM/Path/Tool/toolbit/models/base.py:
- Apply migration logic to ToolBit objects on restore.
- Filter Bullnose parameters to remove FlatRadius after migration.

src/Mod/CAM/Path/Tool/shape/models/bullnose.py:
- Add filter_parameters method to remove FlatRadius for Bullnose.

src/Mod/CAM/Path/Op/SurfaceSupport.py:
- Derive FlatRadius from CornerRadius and Diameter if both are present.

src/Mod/CAM/Path/Op/Surface.py:
- Remove obsolete setOclCutter method.
2025-12-01 11:30:00 -06:00
Chris Hennes 1b886ef961 Revert "GUI: fix "select all instances" (#25503)"
This reverts commit 6b60867368.
2025-12-01 18:24:25 +01:00
Chris Hennes f366b0e2a7 Utils: Don't save location of Python executable 2025-12-01 17:03:46 +00:00
Roy-043 4eb110e861 Draft: fix X-axis reference for Draft_Arc_3Points 2025-12-01 17:01:31 +00:00
PaddleStroke b603630d1f Assembly: Fix selection during joint edition (#25687) 2025-12-01 17:01:19 +00:00
Garfieldcmix 3aedb58e4b Fix Export/Save Mesh incorrect error message 2025-12-01 11:00:40 -06:00
sliptonic db65e44bca CAM: fixes bug with op creation/cancelation (#25800) 2025-12-01 10:59:49 -06:00
Syres916 cb9c0ccd7f [TechDraw] QCheckBox fix compiling warning of stateChanged deprecation 2025-12-01 10:59:25 -06:00
Roy-043 5e90dc86fb BIM: BIM_Material: only assign material object to component (#25823)
* Add MoveWithHost check for material assignment

* [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-12-01 16:59:13 +00:00
Roy-043 41c0621abb BIM: add parameter for BIM_Sketch view props (#25778)
* Add BIM parameters to param_dict

Add BIM parameters to param_dict for future use.

* BIM: add parameter for BIMSketch view props
2025-12-01 16:58:43 +00:00
Roy-043 5155906848 BIM: fix Arch_Reference update on doc restored (#25777)
* BIM: fix Arch_Reference update on doc restored

Fixes: #24943

* [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-12-01 16:58:01 +00:00
tetektoza 5f4fe75f5f Sketcher: Use constraint index instead of geoId as key in expr storage
`SketcherTransformationExpressionHelper` was using `geoId` as the map
key for storing expressions during geometry transformations. This is
incorrect since single geometry may have multiple constraints with
different expressions.

So, using `geoId` as the key causes `std::map` overwrites, resulting in
only the last expression being preserved per geometry.

So this patch changes key to be a constraint index, and adds
`ConstraintExpressionInfo` struct to store both expression and `geoId`.

Co-authored-by: PaddleStroke <pierrelouis.boyer@gmail.com>
2025-12-01 10:57:40 -06:00
Billy Huddleston 708717cee2 CAM: Turn off debugging in CAM Preferences
Debugging was left on by mistake. Also 'Setting asset path' log message was at info level. Changed to debug level.
2025-12-01 10:53:02 -06:00
Chris Hennes cbd9414684 Merge pull request #25713 from kadet1090/split-button
Gui: Use SplitButton for config migration modal
2025-12-01 10:52:19 -06:00
Roy-043 6a65b45242 Convert asset path to string in filePath function 2025-12-01 10:51:16 -06:00
marbocub 8ea5075385 Sketcher: Fix error when first constraint is DistanceX/DistanceY to vertex (#25813) 2025-12-01 10:50:31 -06:00
Syres916 15c99ecdb2 [TechDraw] Fixes for TaskFillTemplateFields finding Draft/Arch/Image views and keeping message boxes and dialogs on top (#25342)
* [TechDraw] fix dialog to be ontop, clear the keyLst and save mouse movement between messagebox and dialog

* [TechDraw] change from setWindowFlags to setWindowFlag

* [TechDraw] handle BIM and Draft as first available views...

.... also increase the possible scale values such as 5 : 2 or 7 : 3

* [TechDraw] fix 1:1 scale regression

* [TechDraw] remove unnecessary line of code

* TD: Simplify code

Address comments from review.

Co-authored-by: WandererFan <wandererfan@gmail.com>

* [TechDraw] enable use of Fraction for scale...

... conversion

---------

Co-authored-by: Chris Hennes <chennes@pioneerlibrarysystem.org>
Co-authored-by: WandererFan <wandererfan@gmail.com>
2025-12-01 10:45:02 -06:00
Syres916 2be7bbf141 [Gui] Fix AxisLetterColor on opening Preferences and correct LightSources parameter group
Also remove workaround as stated in the comments just before 1.1.0 Release.
2025-12-01 17:34:44 +01:00
Roy-043 b865c4625d BIM: Fix duplicate vertices in Wavefront OBJ export
Fixes: #13151.

The vertices derived from a face's outerwire could contain duplicates.

Fixed by switching to:
`f.OuterWire.OrderedVertexes`
2025-12-01 16:28:14 +00:00
PaddleStroke 6d48c51f4d Part: Fix addSelection failing for links to body. (#25702) 2025-12-01 09:34:08 -06:00
tarman3 eb703bfde7 CAM: Slot - Remove .0 2025-12-01 09:32:01 +02:00
PaddleStroke b249b9daeb Core: Close partially opened document when doc is closed. (#25659) 2025-11-30 23:33:43 -06:00
Captain a371231aea PartDesign: fix symmetric mode of draggers in revolution/groove (#25656) 2025-11-30 23:03:31 -06:00
sliptonic 98a2cb52c3 Merge pull request #25273 from Thom-de-Jong/main
CAM: Exporting G-code can be canceled from the editor dialog
2025-11-30 14:04:22 -06:00
tarman3 b6ae98fa0a CAM: PathCommands - Remove pop message about loop error 2025-11-30 20:08:12 +02:00
tarman3 0e85c53cfe CAM: Path.Geom.cmdsForEdge() - add tolerance 2025-11-30 18:19:17 +02:00
sliptonic 46f9cb0ac5 Merge pull request #25253 from tarman3/geom_usehelixforbspline
CAM: Path.Geom.cmdsForEdge() - remove useless 'useHelixForBSpline'
2025-11-30 09:59:03 -06:00
Thom de Jong bbb3bdd839 Merge remote-tracking branch 'upstream/HEAD' 2025-11-30 12:43:31 +01:00
Frank Martinez a8c7968c92 CAM: Fix pyi signature to match c++ 2025-11-30 00:56:44 -06:00
Chris Hennes dfb9baf678 Merge pull request #24262 from mnesarco/pyi-fixes-1 2025-11-29 20:23:37 -06:00
Frank Martinez be7c10aea4 [bindings] Added generic twin pointer accessor 2025-11-29 20:22:38 -06:00
sliptonic 28b9fa0151 Merge pull request #25553 from tarman3/leadinout_overtravel6
CAM: LeadInOut - Fix regression after #24829
2025-11-29 12:34:37 -06:00
Chris Hennes 6ad6a98881 Merge pull request #25674 from WandererFan/DimensionColorSizeOldDocuments2
TechDraw: fix handling of alpha channel in old documents
2025-11-28 18:04:30 -06:00
Billy Huddleston f3f601105e CAM: Add rigid Tapping back to legacy LinuxCNC postprocessor
This PR adds rigid tapping back to the legacy LinuxCNC postprocessor, which
was removed in commit cd1c29e3f23fde0a90980ffcf3e70406769f2d43 in PR 24771.

The changes include:
- Modifying the linuxcnc_legacy_post.py script to include logic for Rigid tapping
- Updating comments and documentation to reflect the addition of Rigid tapping
2025-11-28 18:30:28 -05:00
sliptonic eb8b2ddad2 [CAM] Reimplemented Mill facing operation (#24367) 2025-11-28 23:26:36 +00:00
tarman3 91fd699f2d CAM: Path.Geom.cmdsForEdge() - remove useless 'useHelixForBSpline' 2025-11-28 20:13:24 +02:00
sliptonic f18842114f Merge pull request #25205 from tarman3/isVertical
CAM: Path.Geom.isVertical() for BSpineSurface (simple face after scale)
2025-11-28 12:08:10 -06:00
sliptonic effe043019 Merge pull request #25635 from tarman3/oputil_1_linter
CAM: OpUtil - Fix linter errors
2025-11-28 12:03:06 -06:00
sliptonic 1ff6d15b64 Merge pull request #25023 from sebastianohl/main
CAM: fixing drill handling, as KinetiNC does not implement G81 etc. correctly
2025-11-28 11:54:08 -06:00
sliptonic c3068b2b66 Merge pull request #25022 from s-ohl-ostfalia-de/main
CAM: adding cooling feature to Kinetic post processor
2025-11-28 11:52:29 -06:00
sliptonic 83fc0385a3 Merge pull request #24807 from tarman3/inspect
CAM: Line numbers in Inspect window
2025-11-28 11:48:24 -06:00
sliptonic e20fd153ed Merge pull request #23862 from tarman3/gcode_editor_dialog
CAM: Show line numbers in export gcode dialog
2025-11-28 11:47:01 -06:00
sliptonic a2dc485c2b Merge pull request #23251 from sliptonic/adr-expand-command-semantics
[CAM] ADR on Path Command annotation semantics
2025-11-28 11:07:26 -06:00
sliptonic 0e1d87852e Merge pull request #25365 from sliptonic/adr-heights
CAM: ADR for normalizing Heights and depths terminology
2025-11-28 11:03:15 -06:00
sliptonic 57ba779ec8 Merge pull request #25732 from sliptonic/adr-material-allowance
CAM: ADR for "Stock to Leave" terminology
2025-11-28 10:50:58 -06:00
PaddleStroke 79f66b75f3 Datums: Prevent 'doesn't contain feature with role' error on load 2025-11-28 12:08:38 +01:00
Kacper Donat 0de9ffc439 Gui: Use SplitButton for config migration modal 2025-11-28 10:15:04 +01:00
Kacper Donat c500408a6d Gui: Add SplitButton widget
This adds SplitButton widget that has one primary action and possibly
more secondary ones accessible via menu.
2025-11-28 10:15:04 +01:00
Chris Hennes 4e74031e06 Build: Fix punctuation in Windows installer (English only) 2025-11-28 06:39:06 +01:00
PaddleStroke 5ae67ee2f9 PartDesign: Polar pattern: Accept negative angles (#25621) 2025-11-27 18:08:01 -06:00
PaddleStroke eaee0f759a TechDraw: DrawViewSpreadsheet do not create cyclic dependency 2025-11-27 18:07:03 -06:00
pre-commit-ci[bot] bdc3781b88 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2025-11-27 16:43:24 +00:00
sliptonic 03e7200f68 revise feed definition 2025-11-27 10:40:13 -06:00
pre-commit-ci[bot] 6cb1e8a9ce [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2025-11-27 16:18:33 +00:00
tarman3 dd3898aa39 CAM: Task panel - Shapes selection from several objects 2025-11-27 12:48:37 +02:00
PaddleStroke da717d4ca0 Assembly: Enable negative distance for rackpinion and screw 2025-11-26 23:53:11 +01:00
PaddleStroke cf40007bd0 Assembly: CommandInsertLink: handle manual deletions (#25651) 2025-11-26 16:22:12 -06:00
Pieter Hijma 63f739b2e4 Gui: Fix refresh on boolean property toggle 2025-11-26 14:42:38 -06:00
Chris Hennes 8604c26ce3 Merge pull request #25580 from kadet1090/fix-boolean-position
PartDesign: Fix boolean positioning
2025-11-26 14:22:59 -06:00
Chris 6b60867368 GUI: fix "select all instances" (#25503) 2025-11-26 14:20:23 -06:00
PaddleStroke 46a847c857 Gui: Do not lose thumbnail when saving partially loaded doc (#25458) 2025-11-26 13:53:11 -06:00
PaddleStroke 8533d23b07 DlgSettingsDocument : fix tooltip 2025-11-26 16:55:18 +01:00
Chris 5382ca4bbb PartDesign: Use c++ exception to prevent crash (#25671)
* part design: fix issue #25639 use c++ exception to prevent crash

* [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-11-26 15:43:47 +01:00
Eugene Zhukov e270d63e5c Change params variable to uppercase PARAMS (#25663)
Addresses #25565
2025-11-26 13:25:20 +00:00
github-actions 68cb0a3270 Update translations from Crowdin 2025-11-25 21:20:42 -06:00
wandererfan 475d46c3d0 [TD]guard against font size zero 2025-11-25 19:59:59 -05:00
wandererfan e2c5c643d8 [TD]convert transparency to alpha channel 2025-11-25 19:59:53 -05:00
wandererfan 64f2c5388b [TD]add preference re alpha/transparency conversion 2025-11-25 19:59:40 -05:00
Adrian Insaurralde Avalos de230cfaa7 fix broken copr config in fedora-daily action 2025-11-25 21:30:17 -03:00
Thom de Jong dc4f9c694d Change button text and disable OK when text unchanged 2025-11-25 22:10:32 +01:00
Chris Hennes 1f582e2504 Merge pull request #25655 from mnesarco/fix-pylint-py-version
Build: Update pylint minimum python version to 3.10
2025-11-25 10:48:23 -06:00
Frank Martinez 863d77562d Build: Remove deprecated pylint option 2025-11-25 10:41:29 -05:00
sliptonic 85ef37d606 Merge pull request #25638 from LarryWoestman/linuxcnc_preamble
CAM:  fix for linuxcnc ignoring --preamble argument, with test
2025-11-25 09:03:09 -06:00
dependabot[bot] 50f68f3bc9 Bump github/issue-metrics from 3.25.2 to 3.25.3
Bumps [github/issue-metrics](https://github.com/github/issue-metrics) from 3.25.2 to 3.25.3.
- [Release notes](https://github.com/github/issue-metrics/releases)
- [Commits](https://github.com/github/issue-metrics/compare/637a24e71b78bc10881e61972b19ea9ff736e14a...78b1d469a1b1c94945b15bd71dedcb1928667f49)

---
updated-dependencies:
- dependency-name: github/issue-metrics
  dependency-version: 3.25.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-25 15:06:09 +01:00
tetektoza b27c9640c8 Gui: Support searching for tooltips, comboboxes and groups in Prefs
As the title says. This patch adds support for finding tooltip text,
also extends widget types to QSpinBoxes/QDoubleSpinBoxes and also adds
support for finding combobox items from QComboBox dropdown. Also adds
support for QGroupBox titles.
2025-11-25 13:49:17 +01:00
Frank Martinez 2ef70f6094 Build: Update pylint minimum python version to 3.10 2025-11-25 07:34:03 -05:00
Louis Gombert 0fca304912 CMake: fix parsing error in Sandbox/Gui
Introduced by commit 755229d
2025-11-25 05:53:44 -06:00
Max Wilfinger 972ade948c Gui: Add command to create an AnnotationLabel (#23673)
* Gui: Add command to create an AnnotationLabel

* Update src/Gui/CommandStd.cpp

Co-authored-by: Kacper Donat <kadet1090@gmail.com>

* Update src/Gui/CommandStd.cpp

Co-authored-by: Florian Foinant-Willig <FlachyJoe@users.noreply.github.com>

---------

Co-authored-by: Kacper Donat <kadet1090@gmail.com>
Co-authored-by: Florian Foinant-Willig <FlachyJoe@users.noreply.github.com>
2025-11-25 11:47:05 +01:00
Max Wilfinger e70c516774 Gui: Add icon to Clarify Selection tool (#24844) 2025-11-25 11:35:28 +01:00
PaddleStroke 59f672eb94 Assembly: Bom: replace QtWidget by QtGui for Qt6 2025-11-24 21:18:16 -06:00
pre-commit-ci[bot] 6da7cb2f9f [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2025-11-24 23:12:28 +00:00
Lawrence Woestman f349336fc8 CAM: fix for linuxcnc ignoring --preamble argument, with test 2025-11-24 14:40:16 -08:00
FEA-eng d2f082c7bc FEM: add new cyclic symm centrif example 2025-11-24 22:55:38 +01:00
tarman3 06bc4f61e0 CAM: OpUtil - Fix linter errors 2025-11-24 23:21:36 +02:00
Billy Huddleston 9cab1f8f52 CAM: Make CAM tests and serialization robust to locale-dependent decimal separators
Updated CAM unit tests and LinuxCNC serializer to handle decimal separators consistently, ensuring tests pass regardless of system locale. Assertions now compare FreeCAD.Units.Quantity objects directly or normalize decimal separators in strings. LinuxCNC serializer output is forced to use periods for decimals.

src/Mod/CAM/CAMTests/TestPathToolBitListWidget.py:
- Normalize decimal separators in tool description assertions for locale robustness.

src/Mod/CAM/CAMTests/TestPathToolBitPropertyEditorWidget.py:
- Use FreeCAD.Units.Quantity for direct quantity comparisons in property editor tests.

src/Mod/CAM/CAMTests/TestPathToolBitSerializer.py:
- Compare deserialized and serialized quantities using FreeCAD.Units.Quantity for consistency.

src/Mod/CAM/CAMTests/TestPathToolShapeClasses.py:
- Compare parameter values and units directly instead of relying on string formatting.

src/Mod/CAM/Path/Tool/library/serializers/linuxcnc.py:
- Force period as decimal separator in LinuxCNC serializer output to avoid locale issues.
2025-11-24 18:53:32 +01:00
Chris Hennes e937063e41 Merge pull request #25555 from furgo16/assembly-exploded-points-equal-fix
Assembly: exploded points equal fix
2025-11-24 11:52:51 -06:00
PaddleStroke 8b1dce3437 Assembly: Joint task: Fix sel gate not being cleared if doc closed 2025-11-24 18:28:46 +01:00
Chris Hennes 56884b4c41 Merge pull request #25548 from Rexbas/fix-gesture-contextmenu-segfault
Gui: Fix Gesture style context menu segfault
2025-11-24 11:13:14 -06:00
PaddleStroke 629eff4a26 Assembly: Joint task: fix spinbox not being populated 2025-11-24 11:11:15 -06:00
Chris Hennes 54ba0a8a29 CI: Update GitHub Actions for Crowdin translation sync
Ensure the clone is also using the freecad-gh-actions-translation-bot account so that if it force-pushes to an existing PR, the CI will run.
2025-11-24 17:10:19 +00:00
Chris Hennes 4536a54f8f Gui: Switch to defusedxml for document recovery 2025-11-24 17:07:39 +00:00
Ajinkya Dahale bb0cd704fb Merge pull request #25536 from AjinkyaDahale/patch-8
Sketcher: Only draw finite conics
2025-11-24 11:03:08 -06:00
paul bcc30869b7 [ArchWall] Fix Bug: Center-Align with Centered Multi-Material (#25572)
* [ArchWall] Fix Bug: Center-Align with Centered Multi-Material

Fix #25485

* [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-11-24 18:01:38 +01:00
Chris Hennes 6b59672689 Merge pull request #25507 from adrianinsaval/ci-release
CI: improve release workflow
2025-11-24 10:59:58 -06:00
Chris Hennes 9e35172bea Measure: Translate measurement types 2025-11-24 16:51:35 +00:00
Kacper Donat 88543612e4 PartDesign: Use true tool positions for boolean preview
This fixes positioning of some previews for booleans that were misplaced
after #24750 was merged. It restores previous code that was correct for
most cases. The reason for some previews being misaligned is described
in the #25578 - the preview actually shows how the result should be but
due to some shortcuts taken in code the result is incorrect.
2025-11-24 10:48:32 -06:00
Chris Hennes 8acccf3194 Merge pull request #25526 from Syres916/Fix_Two_StyleSheet_Issues
[Gui] increase contrast of menu separators and down arrows in comboboxes
2025-11-24 10:48:12 -06:00
PaddleStroke 74aafcee75 Sketcher: External Face: decide between defining and construction (#25390) 2025-11-24 10:47:12 -06:00
Chris Hennes febcff1777 Merge pull request #25530 from ipatch/ipatch.tshoot.24962-preserve-body-name-in-part
core: preserve body name in step file when exporting part that contains body with feature, fixes #24962
2025-11-24 10:43:00 -06:00
chris 0fc96a1a6f part design: reimp feature to move datum objects using modal / dialogue box from right click menu in model tab 2025-11-24 10:39:13 -06:00
Max Wilfinger 53042a5c38 GitHub: Update issue template 2025-11-24 10:37:02 -06:00
marioalexis 2457715d84 Fem: Improve VTK import/export preference page 2025-11-24 16:34:48 +00:00
pre-commit-ci[bot] ada21269aa [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2025-11-24 16:34:48 +00:00
Chris Hennes 128dec534a FEM: Add missing translation in InOutVTK 2025-11-24 16:34:48 +00:00
marioalexis 7d218b3f9b Fem: Improve Gmsh preference page implementation 2025-11-24 16:33:39 +00:00
Chris Hennes 16eb18abb2 FEM: Translate log verbosity settings 2025-11-24 16:33:39 +00:00
Kacper Donat 3e356491e2 Attacher: Reduce unnecessary rotation around normal for midpoint 2025-11-24 10:33:02 -06:00
PaddleStroke e38154474a Sketcher: Prevent bad coincidences (#25304) 2025-11-24 10:32:22 -06:00
Furgo 2763bb962f Assembly: Prevent zero-length line creation in ExplodedView
Safeguards the generation of explosion trail lines to avoid creating
invalid geometry.

Previously, if a part displacement was zero (or effectively zero),
`Part.LineSegment` would attempt to create a line with identical start
and end points, causing OpenCascade to throw a `Part.OCCError`. This
resulted in failures during document restoration and recomputes.

This commit introduces a `_createSafeLine` helper method that checks the
distance against a `1e-7` (near-zero) tolerance before attempting to
generate the shape.
2025-11-24 17:26:46 +01:00
Furgo b571889ab5 App: Handle uncleared Python exceptions during object restoration
When a Python-based object throws an exception during the restoration
process (e.g. inside `onDocumentRestored`), the error is caught by a
generic `catch(...)` block in `Document::afterRestore`.

Previously, this block swallowed the C++ exception wrapper but failed to
clear the underlying Python error state. Leaving the interpreter in this
"dirty" state caused a segmentation fault or `SystemError` later in the
loading process when C++ attempted to interact with the Python API
(specifically in `App::Application::setActiveDocument`).

This commit adds a check for `PyErr_Occurred()` inside the catch block.
If an error is detected, the traceback is printed to the console for
debugging, and `PyErr_Clear()` is called to reset the interpreter state,
allowing the application to continue loading the document without
crashing.
2025-11-24 17:26:46 +01:00
pjcreath efb10e1b28 Sketcher: prevent undo/redo crash when selected geometry goes away.
Fixes #25497
2025-11-24 08:56:48 -06:00
pjcreath 16aff10544 Sketcher: prevent crash on undo/redo while dragging.
Fixes #25500
2025-11-24 08:54:50 -06:00
xtemp09 eb0c980c1d [GUI] Handle ampersand in windowTitle 2025-11-24 08:18:28 -06:00
Chris Hennes 93eb02b09f Merge pull request #25604 from FreeCAD/dependabot/github_actions/peter-evans/create-pull-request-7.0.9
Bump peter-evans/create-pull-request from 7.0.8 to 7.0.9
2025-11-24 08:10:45 -06:00
dependabot[bot] 890ce2bb29 Bump peter-evans/create-pull-request from 7.0.8 to 7.0.9
Bumps [peter-evans/create-pull-request](https://github.com/peter-evans/create-pull-request) from 7.0.8 to 7.0.9.
- [Release notes](https://github.com/peter-evans/create-pull-request/releases)
- [Commits](https://github.com/peter-evans/create-pull-request/compare/271a8d0340265f705b14b6d32b9829c1cb33d45e...84ae59a2cdc2258d6fa0732dd66352dddae2a412)

---
updated-dependencies:
- dependency-name: peter-evans/create-pull-request
  dependency-version: 7.0.9
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-24 11:59:57 +00:00
Chris Hennes 748fe5121e Merge pull request #25479 from Syres916/Fix_DlgPropertyLink_Utf8_DocumentName
[Gui] Fix string encoding for document, object and subobject names in PropertyLink, SelectionSearch, PD Sketch Based Tasks, Part Primitives and Document handling.
2025-11-23 23:32:20 -06:00
PaddleStroke 1d30d079b0 Sketcher: Rotate: Fix line length ignored (#25434) 2025-11-23 22:40:04 -06:00
Roy-043 98240a6de5 Draft: fix number_length for imperial dimensions (#25369)
* The number_length function did not take imperial dimensions into account. For `9" + 7/8"` it would return 1.
* In ArchRoof reference number_length function from DraftGui.py to avoid duplicate code.
2025-11-23 22:30:09 -06:00
FEA-eng 44bf1c35d6 FEM: Add Thick Pipe Internal Pressure 2D example (#25191)
Co-authored-by: Kacper Donat <kadet1090@gmail.com>
2025-11-23 22:22:27 -06:00
PaddleStroke 40e4eb8770 Assembly: BOM: fix subassembly 2025-11-23 22:20:11 -06:00
Chris 72d021108f Sketcher: allow grid snapping while hovering mouse over axis (#25226) 2025-11-23 21:50:35 -06:00
pre-commit-ci[bot] 59715114f5 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2025-11-23 23:52:14 +00:00
chris e226e9b06e core: fix various issues exporting step files, ie. #25540 #24962 #25567 2025-11-23 17:50:04 -06:00
chris d806b4e5f3 sketcher: fix issue #13852 resolve issue with state not updating constraint text 2025-11-23 23:28:51 +01:00
Kacper Donat 527b2de560 PartDesign: Bake in geometry transform after boolean
This bakes in transform into geometry after boolean to ensure that
regardless of parameters the result of boolean operation is the same.
2025-11-23 23:10:25 +01:00
Kacper Donat 4cbf10f045 Part: Add bakeInTransform method for TopoShape
This method can be used to bake in transform directly into geometry.
Normally the setTransform or setPlacement methods only store additional
positional data within the shape without changing the actual geometry.
So if we have some geometry placed at 0,0,0 and we want to have few
copies of that shape the goemetry stays intact but additional transform
is stored. This method can be used to alter the gometry and reset the
transform to identity. It helps with model stability, as not every
method correctly handles that additional transform metadata.
2025-11-23 23:10:25 +01:00
Kacper Donat 1555f65075 PartDesign: Simplify FeatureBoolean
This commit removes a ton of dead code from FeatureBoolean. It might
been ported here from the Link branch but it is not used and it is
confusing. The reason for having that code here is also not really
obvious so there is no reason to keep it.
2025-11-23 23:10:25 +01:00
chris 9c48c9a3e3 export: step file preserve last feature when exporting step file, fix issue #25567 2025-11-23 15:26:57 -06:00
chris 246218b28b core: preserve body name in step file when exporting part that contains body with feature, fixes #24962 2025-11-23 15:26:31 -06:00
tarman3 94328259ee CAM: Engrave - Remove useless property BaseObject 2025-11-23 21:33:05 +02:00
sliptonic ebbddc97e2 Merge pull request #25570 from Connor9220/FixChipLoad
CAM: Ensure Chipload is restored and displayed with user-preferred units
2025-11-23 12:42:24 -06:00
sliptonic 42e6af4237 Merge pull request #25106 from davidgilkaufman/tool_migrations_custom_dir
[CAM] Offer automatic migration of tools in (old) custom working directory to the new tool system
2025-11-23 12:28:17 -06:00
sliptonic 971fd31068 Merge pull request #22738 from tarman3/bsplinesurface
CAM: Pocket BSplineSurface
2025-11-23 11:49:52 -06:00
sliptonic e9c3b13c04 Merge pull request #25372 from tarman3/engrave_fix22380
CAM: Engrave - Fix #22380 - duplicates
2025-11-23 11:41:03 -06:00
Billy Huddleston 4432575243 CAM: Ensure Chipload is restored and displayed with user-preferred units
Fixes an issue where Chipload and similar mixin-defined properties were added to
the schema but not reliably restored, because parameter restoration did not always
apply them to the toolbit object. This change ensures Chipload is restored from saved
data and displayed using the user's preferred unit schema, even when no document
is open. This update also ensures the toolbit editor respects the user’s unit schema
preference during editing, even outside an open document.

src/Mod/CAM/Path/Tool/toolbit/models/base.py:
- Restore Chipload (and other parameters) to toolbit.obj if the property exists.

src/Mod/CAM/Path/Tool/toolbit/ui/editor.py:
- Set units schema to user preference when opening the toolbit editor, so Chipload and other values display correctly.
2025-11-23 11:45:47 -05:00
Adrian Insaurralde Avalos 46f3cf2f19 CI: improve release workflow
adapt weekly build workflow to do normal releases too, rename accordingly
skip macos singning setup if certificate not available (useful to run on forks)
add missing dmgbuild dependency for badge icons on macos
build windows installer in workflow, add needed dependencies to pixi.toml
reorganize packaging scripts that can be useful outside rattler-build too
do some cleanup
add .gitignore to rattler-build
Properly configure appimage updating depending on release type and upload zsync file
2025-11-23 10:54:51 -03:00
Bas Ruigrok 6e5a318ceb Gui: Simplify QObject::connect in openPopupMenu
Co-authored-by: xtemp09 <9303235+xtemp09@users.noreply.github.com>
2025-11-23 14:30:51 +01:00
Andrew Burks bad2989b7b #25474 Added read-only warnings when saving documents (#25532)
* #25474 Added read-only warnings when saving documents

Block saving a file and notify user if windows is unable to save to the file for any reason, or the read-only attribute is checked. Also check std::filesystem::perms for write permission and other checks in FileInfo::isWritable(), although it doesn't seem to matter on windows.

Co-authored-by: Chris Hennes <chennes@pioneerlibrarysystem.org>
2025-11-23 05:09:32 +00:00
Adrián Insaurralde Avalos d466ba037b WindowsInstaller: multiple improvements and fixes
move windowsinstaller to /package
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

WindowsInstaller: use --safe-mode in freecadcmd commands [skip ci]

WindowsInstaller: make windows 8 the minimum version [skip ci]

WindowsInstaller: allow configuring some values via command line

windows installer update for qt6 build
2025-11-22 23:46:11 -03:00
Bas Ruigrok dec0ea238a Gui: Fix Gesture style context menu segfault 2025-11-22 15:39:32 +01:00
Chris Hennes e01063b3c4 Build: Remove blanket disabling of deprecation warnings
Also document other disabled warnings.
2025-11-21 17:02:11 -06:00
Adrian Insaurralde Avalos 3ab8dbe194 pixi: enable building reverse engineering 2025-11-21 16:35:53 -06:00
tarman3 a0876f8060 CAM: LeadInOut - Fix regression after #24829 2025-11-21 23:00:37 +02:00
Syres916 fc6a39658a [Gui] Reduce separator from 2px to 1px 2025-11-21 19:10:20 +00:00
sliptonic 17d27780ac Fixes #24959 Introduces ADR for "Stock to Leave" 2025-11-21 12:06:23 -06:00
sliptonic b254aa9815 Draft ADR-008 for normalizing Heights and depths terminology 2025-11-21 11:27:37 -06:00
Syres916 cda9a107aa [Gui] increase contrast of menu separators and down arrows in comboboxes 2025-11-21 17:07:03 +00:00
Roy-043 63c9b176e2 BIM: fix handling of BIM_Sketch view properties (#25339)
* BIM: fix handling of BIM_Sketch view properties

The handling of the sketch view properties was not correct:
* AutoColor was not set to `False`.
* PointSize was missing.
* PointColor was not set to the DefaultShapeVertexColor preference.
* Grid values were never applied. Sketches do not have a GridSnap property and gridSize is not the correct Draft preference.
* Sketch grid snap is a global setting that affects all sketches, the code should not change that setting IMO.

* Remove trailing white space
2025-11-21 10:12:33 +00:00
Logstor e802aa1821 Removed sys in 'from os import sys, path' 2025-11-20 20:13:16 -06:00
Adrian Insaurralde Avalos a847a794c4 CI: specify environment for fedora-daily workflow
otherwise it doesn't have access to the secrets it needs
2025-11-20 23:03:30 -03:00
Jacob Oursland f48db1f855 Enable Reverse Engineering WB.
The Reverse Engineering WB was temporarily disabled as it didn't support Qt6.As it now supports Qt6,
it is time to re-enable the WB.
2025-11-20 17:39:49 -06:00
Chris Hennes a0419f3874 CI: Remove labels from Crowdin update workflow
Adding labels requires admin privileges, which we don't want this account to have.
2025-11-21 00:20:07 +01:00
Syres916 a10fbf2e8c [Gui] Fix string coding on selection changed 2025-11-20 21:37:05 +00:00
Syres916 76071ffbeb [Part] Fix string encoding for document name and object name 2025-11-20 20:04:48 +00:00
Syres916 83c01fae68 [Gui] Fix string encoding for document name 2025-11-20 20:02:21 +00:00
pre-commit-ci[bot] 6d8c5bd2f9 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2025-11-20 19:55:20 +00:00
Syres916 eb08fe2a78 [Gui] Fix string encoding for preselect, select and deselect 2025-11-20 19:52:12 +00:00
pre-commit-ci[bot] 23df7e4cad [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2025-11-20 19:22:23 +00:00
Syres916 d19ab48231 [Gui] Fix string encoding for document, object and subojects 2025-11-20 19:19:45 +00:00
pre-commit-ci[bot] 78bb40c419 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2025-11-20 19:04:34 +00:00
Syres916 1e30362dd4 [PartDesign] Fix string encoding for document name and face reference 2025-11-20 19:02:25 +00:00
Syres916 61db439744 [Gui] Fix string encoding for document name 2025-11-20 18:37:50 +00:00
pre-commit-ci[bot] 4c8d140373 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2025-11-20 16:31:00 +00:00
Syres916 fcd487e0ad [Gui] Fix string encoding document name and object name 2025-11-20 16:28:04 +00:00
Syres916 093a070439 [Gui] Fix incorrect document name when updating PropertyLink 2025-11-19 23:43:52 +00:00
Chris Hennes deab0abf8e Gui: Translate 'Don't show me again' 2025-11-20 00:28:17 +01:00
PaddleStroke 2266a42009 Assembly: Make the 'ground first part' dialog closable 2025-11-20 00:27:06 +01:00
Kacper Donat 8995f43a15 Gui: Fix stylesheet loading order
For some platforms due to event loop and timer triggering being not
deterministic stylesheets could be loaded before style parameters were
fully loaded. This caused warnings about style parameters to appear
potentially confusing users.

This commit changes the stylesheet loading to happen much earlier in the
process so the stylesheet is applied before theme preselection has
chance to happen.
2025-11-19 13:00:14 -06:00
Kacper Donat d1a8f99509 Gui: Save defaults layout after first launch 2025-11-19 10:27:20 -06:00
PaddleStroke 1cf6f5f3a6 Assembly: Fix joint on Body-LCS not working 2025-11-19 12:23:59 +01:00
PaddleStroke 5009a4ddaf SoBrepEdgeSet : Fix color override crash 2025-11-19 12:22:59 +01:00
PaddleStroke be7d41dea7 Assembly/TechDraw: Fix exploded view views (#25426) 2025-11-18 15:54:51 -06:00
PaddleStroke 2a8d648ad3 Assembly: Fix crash on moving unconnected parts 2025-11-18 13:06:33 -06:00
Chris Hennes b2a1e2a6e1 Gui: Update About banner for 1.2-dev 2025-11-18 19:58:03 +01:00
tarman3 6ecc6f780c CAM: Remove dependency Path.Main.Job from Path.Dressup.Utils 2025-11-18 20:46:34 +02:00
Chris 3f42824ffa Part: fix splitting of a split that is a container / group (#25293) 2025-11-18 11:48:40 -06:00
Chris Hennes 4fa7dd76f0 Merge pull request #25244 from tetektoza/fix/25232_exp_editor_regressions
Gui: Differentiate completion activation modes in Expression Editor
2025-11-18 10:10:00 -06:00
PaddleStroke 6f90c5ea61 Sketcher: ConstraintList: prevent N transaction on box selection (#25254) 2025-11-18 09:15:03 -06:00
captain0xff 5d387ae014 PartDesign: fix the interactive controls for revolution/groove 2025-11-18 15:39:42 +01:00
Roy-043 45866b5f41 PartDesign: Update TaskFeaturePick.cpp text (Title Case mod) 2025-11-18 15:35:12 +01:00
Furgo 0b0d1ccc12 BIM: Smart removal of wall bases (#24550)
* BIM: Implement smart base removal for Walls

Previously, removing the Base object from an Arch Wall would cause the
wall to reset its position to the document origin and could lead to
unintended geometric changes for complex walls.

This commit introduces a "smart debasing" mechanism integrated into the
Component Task Panel's "Remove" button:

- For walls based on a single straight line, the operation now preserves
  the wall's global position and parametric `Length`, making it an
  independent object.
- For walls with complex bases (multi-segment, curved), a warning dialog
  is now presented to the user, explaining the consequences (shape
  alteration and position reset) before allowing the operation to
  proceed.

This is supported by new API functions `Arch.is_debasable()` and
`Arch.debaseWall()`, which contain the core logic for the feature.

Fixes: https://github.com/FreeCAD/FreeCAD/issues/24453

* BIM: Move wall debasing logic into ArchWall proxy

The logic for handling the removal of a wall's base object was previously
implemented directly within the generic `ComponentTaskPanel` in
`ArchComponent.py`. This created a tight coupling, forcing the generic
component UI to have specific knowledge about the `ArchWall` type.

This commit refactors the implementation to follow a more object-oriented
and polymorphic design:

1.  A new overridable method, `handleComponentRemoval(subobject)`, has been
    added to the base `ArchComponent` proxy class. Its default implementation
    maintains the standard removal behavior.

2.  The `_Wall` proxy class in `ArchWall.py` now overrides this method. All
    wall-specific debasing logic, including the eligibility check and the
    user-facing warning dialog, now resides entirely within this override.

3.  The `ComponentTaskPanel.removeElement` method has been simplified. It is
    now a generic dispatcher that calls `handleComponentRemoval` on the
    proxy of the object being edited, with no specific knowledge of object types.

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

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

* BIM: Correct user warning

The operation can indeed be undone.

Co-authored-by: Roy-043 <70520633+Roy-043@users.noreply.github.com>

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Roy-043 <70520633+Roy-043@users.noreply.github.com>
2025-11-18 13:58:59 +00:00
Chris Hennes 7980d82207 Merge pull request #25044 from WandererFan/CenterMarksNotShown3
TechDraw: Vertex creation, display and selection issues
2025-11-18 05:43:49 -06:00
pre-commit-ci[bot] 151e3a987e chore: Fix formatting for missing file 2025-11-18 03:15:09 -06:00
pre-commit-ci[bot] 0f4be480b1 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2025-11-18 04:30:12 +00:00
wandererfan 484c89818c [TD]enforce center mark print rule on print preview 2025-11-17 22:28:07 -06:00
wandererfan cf656ba77e [TD]fix center mark preferences not honored 2025-11-17 22:28:07 -06:00
wandererfan 110b4b0d95 [TD]fix lost mouse event in Projection Group 2025-11-17 22:28:07 -06:00
wandererfan 66a2dd984e [TD]fix cosmetic vertex outside frameRect is not selectable
- attempting to select a vertex outside the frameRect/boundingRect
  triggers hoverLeave event which hides the vertex.
2025-11-17 22:28:07 -06:00
wandererfan f6c75c7838 [TD]fix no vertex select in front view of projection group 2025-11-17 22:28:07 -06:00
wandererfan 2161e31328 [TD]fix fail to clear frame on selection change 2025-11-17 22:28:06 -06:00
wandererfan 73e4b296b1 [TD]fix fail to create vertex outside frame 2025-11-17 22:28:06 -06:00
wandererfan f0da095cf8 [TD]fix center marks not shown 2025-11-17 22:28:06 -06:00
wandererfan b918cac67a [TD]fix giant vertex from tracker 2025-11-17 22:28:06 -06:00
wandererfan d2bbd78c67 [TD]clear selection affects vertex display
- clearing the selection here causes the new vertex to not be displayed
2025-11-17 22:28:06 -06:00
wandererfan 4bb8f7e8eb [TD]add getExportingAny() 2025-11-17 22:28:06 -06:00
wandererfan 23290b8050 [TD]add preference methods for center marks 2025-11-17 22:28:06 -06:00
Chris f218c5f25c Import: STEP export preserve body names (#25042) 2025-11-17 22:23:21 -06:00
Chris Hennes 0a73f53990 Gui: Add translation to 'No style sheet' 2025-11-17 23:15:58 +01:00
pre-commit-ci[bot] 13adb1fb5c [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2025-11-17 19:16:28 +00:00
David Kaufman ad3119306b fix rebase error 2025-11-17 14:06:08 -05:00
David Kaufman f869295d03 update UI to label helix diameter as a percentage, reorganize 2025-11-17 14:06:08 -05:00
David Kaufman a6c7d7c0e7 fix units bug 2025-11-17 14:06:08 -05:00
David Kaufman b19eaff00e fix rebase errors 2025-11-17 14:06:08 -05:00
David Kaufman 09e984d1ce fix github warning 2025-11-17 14:06:08 -05:00
David Kaufman 9e830949a8 [CAM] add helix max stepdown parameter 2025-11-17 14:06:08 -05:00
David Kaufman 80d78efc6b [CAM] update/fix adaptive UI panel and parameter limits 2025-11-17 14:06:08 -05:00
David Kaufman 8aa7117af7 [CAM] initial implementation of automatic helix size selection for adaptive 2025-11-17 14:06:06 -05:00
tarman3 8cb87df0f2 CAM: _migrateRampDressups - fix #25391 2025-11-17 19:56:35 +02:00
tarman3 dc776de547 CAM: Line numbers in Inspect window 2025-11-17 19:55:54 +02:00
tarman3 0e0f948d71 CAM: Show line numbers in export gcode dialog 2025-11-17 19:55:15 +02:00
tarman3 889dc7059c CAM: Pocket BSplineSurface 2025-11-17 19:53:47 +02:00
pre-commit-ci[bot] c1b58d1e91 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2025-11-17 17:42:43 +00:00
tarman3 5dd3d3d8b1 CAM: Engrave - Fix #22380 - duplicates 2025-11-17 19:40:05 +02:00
sliptonic 8c8b26ee4b Merge pull request #25371 from tarman3/engrave_fix9114
CAM: Engrave - Fix #9114 - Unable to engrave an arc
2025-11-17 11:19:23 -06:00
sliptonic eb4231266e Merge pull request #25376 from chennes/translationStringContext
Gui: Fix context of translation strings
2025-11-17 11:15:57 -06:00
Gaël Écorchard c77e1d840c Remove functions that require Kuka files (#24984) 2025-11-17 11:15:18 -06:00
Billy Huddleston 900d5ae255 CAM: Fix crash when Path panel widgets are deleted
Prevent RuntimeError by safely handling missing or deleted geometry import
widgets in Path operation panels. This ensures the UI update code does not
fail if the underlying C++ objects are destroyed, improving stability when
panels are closed or the UI changes.

src/Mod/CAM/Path/Op/Base.py:
- Wrap geometry import widget access in try/except to avoid crashes
- Add error handling for panel widget deletion scenarios
2025-11-17 11:11:24 -06:00
Chris Hennes e0c5c89bd9 Build: Add network-failure fault tolerance to macOS signing (#25265) 2025-11-17 14:01:54 -03:00
PaddleStroke 551ab85076 Assembly: Sub-assembly: fix support for Part-wb objects (#25279)
* Assembly: Sub-assembly: fix support for Part-wb objects

* [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-11-17 17:59:40 +01:00
PaddleStroke 10cc4dea16 Assembly: Insert link: Handle partially loaded documents (#25275) 2025-11-17 10:55:48 -06:00
PaddleStroke 33d1d80555 Sketcher: Remove transaction from TaskSketcherConstraints::doSetVisible (#25255)
* Sketcher: Remove transaction from TaskSketcherConstraints::doSetVisible

* [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-11-17 17:54:55 +01:00
chris 1ec1f1506e sketcher wb: fix issue #25076, resolve grid snapping placement 2025-11-17 10:51:28 -06:00
tarman3 2e3a4d541c CAM: LeadInOut - Fix overtravel 2025-11-17 10:45:08 -06:00
David Carter f4e78e3163 Materials: Assigning material without appearance
Assigning a material without an appearance reset the appearance to the
default appearance.

There were two main problems. One was the comparison function for
App::Material objects. It would return false when the UUID or MatType
values were different although there are many circumstances where this
could be true and the appearance be the same. It also incorrectly
compared the imagePath.

The second problem was the logic for detecting if an object has already
been assigned an appearance by assigning a material or manually setting
the appearance. If assigned a material, the appearance should update but
not if it has been set manually. This logic has been corrected.
2025-11-17 17:43:14 +01:00
Chris Hennes 50392855bf CI: Update macOS Intel target version in workflow
GitHub is deprecating macOS 13 runners -- the only remaining Intel runner is now macOS 15, and it is scheduled for retirement in 2027, at which point we will no longer be able to provide Intel weeklies.
2025-11-17 17:33:25 +01:00
Chris Hennes 4d0c35dd2d Core: Convert transparency to alpha (#24891)
* Core: Convert transparency to alpha

Create new `Base::getVersion()` function for extracting a program
version enumeration given a version string.

Convert transparency to alpha value for old project files.

* Base/App: Address review comments

---------

Co-authored-by: wmayer <wmayer@freecad.org>
2025-11-17 17:15:19 +01:00
David Kaufman 767ee484ba Hopefully placate CodeQL 2025-11-17 09:18:30 -05:00
Connor9220 11eba3f25c Fix carriage returns in the Migrator Dialog Title. (#25379) 2025-11-16 22:48:09 -06:00
Jiří Pinkava 5fc650b2ff Tests: Fix value for Imperial pressure tests
The decimal was (wrongly) cahnged in 5379378626
2025-11-16 22:45:52 -06:00
Chris Hennes 0aec9c3b21 Gui: Fix context of translation strings 2025-11-16 17:12:57 -06:00
Florian Foinant-Willig 526f7f2550 TechDraw: fix "%.0w" format spec (#25367) 2025-11-16 18:51:28 +00:00
tarman3 a514cfdf4b CAM: Engrave - Fix #9114 - Unable to engrave an arc 2025-11-16 20:47:21 +02:00
Aqeel Labash a77f96ea86 Fix wording for On-view-parameters tool tip. (#24773)
* switch wording in tooltip-swap-wording

* switch wording in tooltip for On-View-Paramter
2025-11-15 19:27:03 +01:00
phaseloop ec3c8cf2bc Merge branch 'main' into v-routing 2025-11-15 17:24:45 +01:00
Phaseloop 33edb3812c Merge branch 'v-routing' of github.com:phaseloop/FreeCAD into v-routing 2025-11-15 17:23:10 +01:00
Phaseloop b7cf22c44f fix broken backtrack edge generation 2025-11-15 17:22:26 +01:00
PaddleStroke 5da1e3d899 TaskAttacher: Remove 'reset edit' causing trouble to assembly (#25277) 2025-11-15 10:13:56 -06:00
theo-vt 15d9e14851 Sketcher: Proceed to chamfer/fillet on a vertex if there are more than 2 lines but only two non-construction lines 2025-11-15 10:08:22 -06:00
theo-vt d4bfa82161 Sketcher.planegcs: solve reference constraints with lower priority (#25318) 2025-11-15 09:54:56 -06:00
sliptonic bb172e4a6b CAM: Renaming of postprocessors and cleanup (#24771)
* Post Processor cleanup and rename

remove unused files
Basic implementation of generic post
add blending mode support for linuxcnc
add mocking for postprocessor tests
Add tests for generic post
linuxcnc test only tests linuxcnc specific functionality

minor improvements
add arc splitting to refactored post processors
Refactor smoothie post
move posts to legacy.  Remove 'refactored'
lint cleanup
fixes #19417

* [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-11-15 09:46:34 -06:00
mosfet80 f8afa5ac72 Update CONTRIBUTORS
Adds my name to the CONTRIBUTORS file
2025-11-15 12:55:49 +01:00
paul 29d2285ed7 [ArchStairs] Fix Landing property disable At-Each-Corner (#25278)
* [ArchStairs] Fix Landing property disable At-Each-Corner

Fix #24384

* Update src/Mod/BIM/ArchStairs.py

Co-authored-by: Roy-043 <70520633+Roy-043@users.noreply.github.com>

* Update ArchStairs.py - Typo

---------

Co-authored-by: Roy-043 <70520633+Roy-043@users.noreply.github.com>
2025-11-15 09:17:35 +00:00
tarman3 00a4de14e7 CAM: Slot operation - Tooltip - single slot (#25087)
* CAM: Slot tooltip

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

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

---------

Co-authored-by: sliptonic <shopinthewoods@gmail.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-11-14 23:25:14 +00:00
tarman3 0abfdf237a CAM: Profile - clean areaOpOnDocumentRestored() 2025-11-15 00:07:26 +02:00
tarman3 1ed08a2e43 CAM: Geom - isVertical for BSpineSurface 2025-11-14 23:22:09 +02:00
David Kaufman f22d0e2292 migrate silently, no prompts 2025-11-14 14:37:05 -05:00
Roy-043 c422404020 Core: workaround for Building US unit system bug (#25288)
* Core: workaround for Building US unit system bug

Fixes #11345

This workaround should hopefully fix the Building US unit system bug at the level of the InputField code. This is the most feasible solution given that we are currently in the v1.1 feature freeze.

I use the word "hopefully" because I have not compiled and tested the code. But replacing `+` with `--` works in Python examples.

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

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

* Fix typo in comment

* [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-11-14 12:58:24 -06:00
Pieter Hijma 0083364dbe Doc: Improve the documentation of transactions (#21494) 2025-11-14 12:52:13 -06:00
dependabot[bot] 4fd6dc5120 Bump actions/dependency-review-action from 4.8.0 to 4.8.2
Bumps [actions/dependency-review-action](https://github.com/actions/dependency-review-action) from 4.8.0 to 4.8.2.
- [Release notes](https://github.com/actions/dependency-review-action/releases)
- [Commits](https://github.com/actions/dependency-review-action/compare/56339e523c0409420f6c2c9a2f4292bbb3c07dd3...3c4e3dcb1aa7874d2c16be7d79418e9b7efd6261)

---
updated-dependencies:
- dependency-name: actions/dependency-review-action
  dependency-version: 4.8.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-14 12:48:30 -06:00
dependabot[bot] ccc4e084aa Bump actions/download-artifact from 5.0.0 to 6.0.0
Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 5.0.0 to 6.0.0.
- [Release notes](https://github.com/actions/download-artifact/releases)
- [Commits](https://github.com/actions/download-artifact/compare/634f93cb2916e3fdff6788551b99b062d0335ce0...018cc2cf5baa6db3ef3c5f8a56943fffe632ef53)

---
updated-dependencies:
- dependency-name: actions/download-artifact
  dependency-version: 6.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-14 12:48:03 -06:00
sliptonic e212f2a175 Merge pull request #25212 from tarman3/geom_segm
CAM: Path.Geom.cmdsForEdge() - remove useless 'segm'
2025-11-14 12:32:38 -06:00
sliptonic df2774ac72 Merge pull request #24185 from tarman3/loop
CAM: SelectLoop improve
2025-11-14 12:26:11 -06:00
sliptonic 011a6d93bd Merge pull request #25215 from tarman3/geom_clean
CAM: Path.Geom - fix linter errors
2025-11-14 12:25:37 -06:00
sliptonic bd844b8273 Merge pull request #24852 from tarman3/inspect_mhs
CAM: Inspect - decrease default Max Highlighter Size
2025-11-14 12:23:27 -06:00
sliptonic f9c05d18af Merge pull request #25074 from tarman3/slot_face
CAM: Slot - Reject incorrect faces selection
2025-11-14 12:15:53 -06:00
sliptonic 86037a1462 Merge pull request #23285 from davidgilkaufman/feed_rate_percentage
[CAM] Feed rate percentage for ramp and lead in/out moves
2025-11-14 12:07:49 -06:00
sliptonic 2a79543c79 Merge pull request #22598 from emmanuel-ferdman/main
CAM: Fix path dressup array test case
2025-11-14 12:05:57 -06:00
Alfred a283855697 Sketcher: Vertical dimension tooltip fix (#24839)
* Corrected all Veritical Dimension Tooltips

* Fixed error in Sketcher_de

* Fixed rest of translation file errors

* Revert "Fixed rest of translation file errors"

This reverts commit 7f3a50ac4f5de9045236668cc669bd26e1206094.

* Revert "Fixed error in Sketcher_de"

This reverts commit 49d617384e2666a245746e5c599d2962abd678d6.

* Revert "Corrected all Veritical Dimension Tooltips"

This reverts commit 4494b18cdc8d6653b441754cbf8a19d0af6ec46d.

* Corrected Vertical Dimension Tooltip
2025-11-14 17:45:16 +00:00
sliptonic c041671a1b Merge pull request #24044 from davidgilkaufman/adaptive_stepover
[CAM] Improve Adaptive operation to successfully generate for small stepover
2025-11-14 11:43:34 -06:00
sliptonic 4dd03be0dc Merge pull request #24676 from Connor9220/TappingWithAnnotations
CAM: Add rigid tapping support to linuxcnc_post.py via Annotations
2025-11-14 11:39:59 -06:00
sliptonic 587bb9179e Merge pull request #24675 from Connor9220/PathCommandAnnotations
CAM: Path command annotations
2025-11-14 11:39:31 -06:00
sliptonic 4005b78e6d Merge pull request #22764 from tarman3/postprocess
CAM: Post Process only selected Operations
2025-11-14 11:35:27 -06:00
Thom de Jong cca733810f Merge branch 'main' into main 2025-11-14 17:52:07 +01:00
sliptonic 5211400cae Merge pull request #25101 from tarman3/array_dressup_translate
CAM: DressupArray - Fix python import
2025-11-14 10:46:18 -06:00
Roy-043 cc7706ec6f Core: 'Stop macro recording' menu text to Title Case (#24302)
* Core: 'Stop-macro-recording' menu text to Title Case

The modified text appears in the menu during a recording session.

* Rebase
2025-11-14 15:33:12 +01:00
Max Wilfinger fd45dc1721 Merge branch 'main' into main 2025-11-14 15:16:11 +01:00
revaarathore11 2903f480ae Fix tooltip text mismatch for 'Dimensions only' in Sketcher Preferences (#24825) 2025-11-14 15:10:03 +01:00
FEA-eng 3aaa225145 Spreadsheet: Update SheetTableView.cpp 2025-11-14 15:03:23 +01:00
Roy-043 dbf1f00c01 GUI: DlgParameterImp.cpp more dialog titles to Title Case (#24258) 2025-11-14 13:07:25 +00:00
Roy-043 84dfab257f GUI: CommandDoc.cpp more dialog titles to Title Case (#24250)
* GUI: CommandDoc.cpp more dialog titles to Title Case

* Rebase
2025-11-14 12:49:01 +00:00
Roy-043 26615ea5d8 GUI: Restore view items and some dialog titles to Title Case (#24222) 2025-11-14 12:31:26 +00:00
Roy-043 4417f501a5 GUI: DrawStyle submenu to Title Case (#24220) 2025-11-14 12:12:41 +00:00
Roy-043 04279e27dd Rebase (#23621) 2025-11-14 11:56:24 +00:00
Furgo 93868d54b7 Define DlgScale task panel's tab order (#25300)
* Define DlgScale task panel's tab order

To improve keyboard navigation.

Fixes: https://github.com/FreeCAD/FreeCAD/issues/23772

* [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-11-14 10:18:29 +00:00
Stephan T. Lavavej 9e6509a3a4 Avoid using non-Standard std::locale::empty() for MSVC 2025-11-14 00:22:18 -06:00
Chris Hennes a19db66c8b CI: Add GitHub token for Crowdin sync 2025-11-14 05:08:23 +01:00
tarman3 b0a79a6f2c CAM: DressupArray - Fix python import 2025-11-14 00:11:44 +02:00
tarman3 0dc28c57d7 CAM: Path.Geom - fix linter errors 2025-11-14 00:07:05 +02:00
tarman3 e4ec4cb0df CAM: Path.Geom.cmdsForEdge() - remove useless 'segm' 2025-11-14 00:06:38 +02:00
tarman3 9d25f6f53d CAM: Inspect - decrease default Max Highlighter Size 2025-11-14 00:02:46 +02:00
tarman3 ec5b9a808d CAM: SelectLoop improve 2025-11-13 23:29:17 +02:00
tarman3 092ba973f2 CAM: Post Process only selected Operations 2025-11-13 23:25:53 +02:00
tarman3 dc2a3d0d60 CAM: SimpleCopy - Allow for all operations 2025-11-13 23:10:35 +02:00
tarman3 c0ebb8e88d CAM: Slot - Reject incorrect faces selection 2025-11-13 23:09:27 +02:00
Chris Hennes cdc798ec12 CI: Update CrowdIn action to use 1.1 release branch 2025-11-13 21:43:30 +01:00
tetektoza ca1528e2a9 Gui: Use UTF-8 string instead of UTF-16 for Reset in Expression Editor
Currently `ExpLineEdit::apply()` passes `QString::constData()` to a
printf-style format string with %s. `QString::constData() returns a
const QChar* (UTF-16, 2 bytes per char), but %s expects a const char*
(UTF-8/ASCII with 1 byte per char).

This results in a string being interpreted as in "Container":
Byte 0: 'C'
Byte 1: 0x00 (high byte of UTF-16 'C', which gets interpreted as null
terminator)

So this patch uses proper conversion to null-terminated C-String before
passing it further.
2025-11-13 21:39:54 +01:00
Rehan Ahmed a704ac301d Fix case inconsistencies (#24812)
* Fix case inconsistency - Input Hints

* Fix case inconsistency - Quick Measure

* Fix case inconsistency - Navigation Indicator

* Fix case inconsistency - BIM Status Widget

* Remove .ts translation file changes

---------

Co-authored-by: Roy-043 <70520633+Roy-043@users.noreply.github.com>
2025-11-13 20:19:19 +00:00
Rahul Paul 888ba973a5 Fix(TechDraw): Capitalize OK button in TemplateFields (#24866) 2025-11-13 20:58:21 +01:00
FEA-eng a18f45914b FEM: Update constraint_tie.py 2025-11-13 20:57:22 +01:00
luzpaz 10709bd467 Fix typos and grammar (#24827)
* Fix typos and grammar
Fixes typos and grammar in several files.

* fix missed typo

* Remove unnecessary line in LeadInOut.py

---------

Co-authored-by: Roy-043 <70520633+Roy-043@users.noreply.github.com>
2025-11-13 19:53:35 +00:00
Chris Hennes e8f826d0ed Build: Bump minor version of main branch from 1.1 to 1.2 (#25274) 2025-11-13 20:35:28 +01:00
ᴩʜᴏɴᴇᴅʀᴏɪᴅ bb37dfda0e [ BIM ]: Refactor - Save Preset Stringify (#25140)
* [ BIM ]: Refactor Save Preset Stringify

* [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-11-13 19:53:54 +01:00
Furgo 9c22fc55f9 BIM: Update search box text for material search (#24754)
* BIM: Update search box text for material search

* BIM: change Material Manager title to title case

* BIM: change Material Manager search placeholder text to sentence case

* BIM: reword reference to tree to avoid confusion with the Tree View

* BIM: Rename button text for creating Multi-Material for consistency
2025-11-13 19:46:38 +01:00
Ryan K 32840628ae BIM: Update sketch command name to be consistent with other workbenches (#24278)
Co-authored-by: Ryan Kembrey <ryan.kembrey@student.uts>
2025-11-13 19:45:05 +01:00
Thom de Jong dc4f2733e6 Keep old buttons for old post processors 2025-11-13 17:38:31 +01:00
Thom de Jong c15faf9918 Initialise editor_result 2025-11-13 15:25:22 +01:00
Thom de Jong 896443a8ec Merge branch 'FreeCAD:main' into main 2025-11-13 15:22:33 +01:00
Thom de Jong 3e2ace89e9 Merge branch 'FreeCAD:main' into main 2025-11-13 13:23:18 +01:00
Thom de Jong d82f09081a Fix editor_result check 2025-11-13 13:22:52 +01:00
Thom de Jong 5e971d1f91 Merge branch 'FreeCAD:main' into main 2025-11-13 12:44:33 +01:00
paddle d3cb7baa3a Assembly: Highlight joint elements on joint selection 2025-11-12 21:41:01 +01:00
David Kaufman 4f33d66fb3 re-fix early exit condition for repeat integer points 2025-11-12 21:36:13 +01:00
David Kaufman f4f8bd2c81 fix cam tests
tbh the test seems kind of unstable
2025-11-12 21:36:13 +01:00
David Kaufman 62caf967c7 cleanup 2025-11-12 21:36:13 +01:00
David Kaufman ad1724550e fix adaptive early exit condition for testing repeat integer points 2025-11-12 21:36:10 +01:00
David Kaufman edce05d992 avoid retrying same integer points in optimization routine 2025-11-12 21:36:10 +01:00
David Kaufman 920a2363a7 rename resolution_factor to min_step_clipper 2025-11-12 21:36:08 +01:00
David Kaufman 183e82607a Fix units/extract RESOLUTION_FACTOR from area constants
Most of the code treats RESOLUTION_FACTOR as "number of clipper units in
a single step" -- a linear distance unit. However, there are a few
locations in which it is treated as unitless, multiplied by area
constants. This commit folds the current value of RESOLUTION_FACTOR into
these other contents in preparation for declaring it to have distance
units and increasing its value.
2025-11-12 21:36:05 +01:00
David Kaufman 2f91f74ac9 refinements 2025-11-12 21:36:02 +01:00
David Kaufman 04a9579561 [CAM] WIP fix adaptive stepover bug, many debug statements remain 2025-11-12 21:36:02 +01:00
Thom de Jong d08659eafc Change G-code editor buttons 2025-11-12 21:11:06 +01:00
tetektoza 3f6a0ee78b Gui: Differentiate completion activation modes in Expression Editor
Currently if user tries to press TAB during Expression Editor, it
inserts both the entry and its first subentry. Also, if user browses the
dropdown with arrows keys, it inserts it's values.

Root cause of that is the regression made in latest changes to chaining
completion logic which is triggered for all completion modes including
TAB, which already has its own refresh mechanism. Also,
ExpressionTextEdit connected both activated (Enter/click) and highlight
signals to the same slot, resulting in arrow key navigation inserting
completions.

So, this adds separate slots for ExpressionTextEdit to differentiate
completion modes. And also updates tab handling to pass
ActivationMode::Highlighted to prevent double chaining.
2025-11-12 00:23:04 +01:00
pre-commit-ci[bot] 5e0dd60ee5 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2025-11-11 19:34:32 +00:00
Frank Martinez 3561d25c2d [License] Fix pyi license headers. 2025-11-11 13:26:18 -05:00
Frank Martinez d026c6f708 [bindings] remove redundant signatures. batch3 2025-11-11 13:26:18 -05:00
Frank Martinez 93e4858b01 [bindings] remove redundant signatures. batch2 2025-11-11 13:23:10 -05:00
Frank Martinez 7fe379e5ea [bindings] remove redundant signatures. batch1 2025-11-11 13:23:10 -05:00
Frank Martinez 73e67fefd1 [bindings] Automatic export of function signatures with annotations to runtime. (PyMethodDef.ml_doc) 2025-11-11 13:23:10 -05:00
Frank Martinez 1cf57d6e11 [bindings] Format with yapf (precommit will reformat) 2025-11-11 13:23:10 -05:00
Frank Martinez 1b0c0399e9 [bindings] Fix overload order 2025-11-11 13:23:10 -05:00
Frank Martinez 2eedbce181 Rebase on main and fix ViewProviderAssembly.pyi 2025-11-11 13:23:10 -05:00
Frank Martinez dd15887568 [bindings] Fix undefined symbols in pti files 2025-11-11 13:23:10 -05:00
Frank Martinez 2ada443c18 Clean unused imports in .pyi files 2025-11-11 13:23:10 -05:00
Frank Martinez a3232103d5 Fixed docstrings 2025-11-11 13:23:10 -05:00
Frank Martinez 39d15c011e black formatting 2025-11-11 13:23:10 -05:00
Frank Martinez 47e3162dcb [bindings] re-shape some keyword-only signatures 2025-11-11 13:23:09 -05:00
Frank Martinez 6b0b15f687 [bindings] Code cleanup 2025-11-11 13:23:09 -05:00
Frank Martinez 0eae00b9a1 [bindings] Code formatting 2025-11-11 13:23:09 -05:00
Frank Martinez 748004b4e4 [bindings] fix signatures in pyi files 2025-11-11 13:16:26 -05:00
Frank Martinez 8c7f381416 [bindings] Document 2025-11-11 13:08:06 -05:00
Frank Martinez 33f605a125 [bindings] ComplexGeoData 2025-11-11 13:08:05 -05:00
Frank Martinez f1248c2418 [bindings] ApplicationDirectories 2025-11-11 13:08:05 -05:00
pre-commit-ci[bot] 801e9fa6e5 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2025-11-10 23:43:54 +00:00
Phaseloop 440fda29e5 fix job editor crashing 2025-11-11 00:42:14 +01:00
Billy Huddleston bbfd84d7b1 Add rigid tapping support to linuxcnc_post.py and annotate tapping commands in Tapping.py
- Added --rigid-tap argument to linuxcnc_post.py to enable G33.1 rigid tapping cycle output.
- Implemented logic to skip G80, G98, G99 commands with tapping annotation when rigid tapping is enabled.
- Enhanced handling of G84/G74 tapping cycles for rigid tapping, including pitch (K), depth (Z), dwell (G04 P), spindle reversal (M3/M4/M5), and reverse-out moves.
- Updated Tapping.py to annotate G98/G99 and G80 commands with {"operation": "tapping"} for improved post processor handling.
2025-11-10 02:48:27 -05:00
David Kaufman e2b4ea58b8 remove unused import 2025-11-07 14:46:02 -05:00
David Kaufman 7fb93c5a50 retrigger tests 2025-11-06 13:59:04 -05:00
pre-commit-ci[bot] 0976fdb0fa [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2025-11-05 23:03:33 +00:00
David Kaufman e7643dc929 fix codeql warning 2025-11-05 17:47:27 -05:00
David Kaufman 114b679f64 fix lint warnings 2025-11-05 17:47:27 -05:00
David Kaufman 6f62d69b9f fix bugs, clean up 2025-11-05 17:47:26 -05:00
David Kaufman e464cdb73d WIP update tool controller UI 2025-11-05 17:46:03 -05:00
David Kaufman d699d080e0 Fix warning about new Profile properties NumPasses and StepOver being created automatically 2025-11-05 17:46:03 -05:00
David Kaufman d1d6846af0 [CAM] migrate ramp and lead in/out feed rates to the tool controller 2025-11-05 17:46:03 -05:00
David Kaufman f7dc85ef29 update lead in/out to use feed rate from tool controller 2025-11-05 17:46:01 -05:00
David Kaufman 093152b1dc [CAM] separate controls for feed rate percent entrance vs exit 2025-11-05 17:41:32 -05:00
David Kaufman 9c5e8f8340 [CAM] Add feed rate percent to lead in/out dressup 2025-11-05 17:23:03 -05:00
David Kaufman 9ad22dcc0e [CAM] Add feed rate percent to ramp dressup 2025-11-05 17:09:40 -05:00
David Kaufman 21319f95d2 automatically offer migration for tool libraries in custom working dir 2025-11-05 15:18:43 -05:00
David Kaufman bb9ae3540e [CAM] bugfix tools not imported properly during library import 2025-11-05 13:29:54 -05:00
pre-commit-ci[bot] d2fd87cecf [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2025-11-05 11:24:52 +00:00
phaseloop 7684f5a97f Merge remote-tracking branch 'refs/remotes/origin/v-routing' into v-routing 2025-11-05 11:22:29 +00:00
phaseloop 61872a9003 fix linting issues 2025-11-05 11:21:34 +00:00
pre-commit-ci[bot] 48964ed4e1 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2025-11-04 16:21:17 +00:00
PhaseLoop 0cca441fba Improve VCarve edge routing speed 2025-11-04 16:18:44 +00:00
pre-commit-ci[bot] 8d0878e34e [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2025-11-03 14:11:42 +00:00
Sebastian Ohl 15e24bb8cc fixing drill handling, as KinetiNC does not implement G81 etc. correctly 2025-11-03 15:02:14 +01:00
pre-commit-ci[bot] 1514e9b32c [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2025-11-03 13:53:32 +00:00
Sebastian Ohl e4b03f69f0 adding cooling feature to Kinetic post processor 2025-11-03 14:45:12 +01:00
Billy Huddleston bcefebca5f CAM: Simplify annotation handling in GCode and improve annotation parsing
src/Mod/CAM/App/Command.cpp:
- Removed requirement for annotations= prefix; now all text after ; is treated as annotation data.
- Updated Command::toGCode to output annotations as key-value pairs in comments.
- Improved setFromGCode to extract annotations from any comment after ;.
- Enhanced annotation parsing to handle quoted strings and floating-point numbers.
- Simplified XML serialization and restoration logic for annotations.

src/Mod/CAM/App/Path.cpp:
- Added addCommandNoRecalc, allowing bulk loading of commands without repeated recalculation.
- Refactored RestoreDocFile to read GCode files line-by-line, parse each command, and call recalculate() only once after all commands are loaded.
- Added explanatory comment above the old implementation.

src/Mod/CAM/App/Path.h:
- Declared addCommandNoRecalc in the Toolpath class.

src/Mod/CAM/CAMTests/TestPathCommandAnnotations.py:
- Adjusted unit test for scientific notation annotation to check only 6 decimal places.
- Adjusted unit test 10 to properly handle assertions with the toGCode method

src/Mod/CAM/PathSimulator/AppGL/GCodeParser.cpp:
- GCodeParser::ParseLine: Truncate at first semicolon (annotations / comment)
2025-10-15 14:43:40 -04:00
Billy Huddleston a970235484 CAM: Enhance Path.Command annotations with variant type, type-safe API, and robust persistence
- Refactored `Annotations` member to use `std::variant<std::string, double>` for type-safe storage of both string and numeric values.
- Implemented C++ methods:
	- `setAnnotation(key, value)`: overloaded for string and double types.
	- `getAnnotation(key)`: returns annotation value as string.
	- `getAnnotationString(key)`: returns string annotation.
	- `getAnnotationDouble(key, fallback)`: returns numeric annotation.
	- `getAnnotationValue(key)`: returns raw variant value.
	- `hasAnnotation(key)`: checks for annotation existence.
	- `setAnnotations(annotationString)`: parses and stores values as double if possible, otherwise as string.
- Improved XML serialization (`Save`) and deserialization (`Restore`) to persist annotation types and values, including annotation count for robust restoration.
- Updated Python bindings:
	- `Annotations` property now supports mixed-type values (str/float).
	- Values are returned as native Python types.
	- Type errors are raised for invalid assignments.
- Expanded tests in `TestPathCommandAnnotations.py`:
	- Added cases for mixed-type annotations, edge cases, and in-memory persistence using `dumpContent`/`restoreContent`.
	- Verified type preservation and correct restoration.
- Ensured backward compatibility for string-only annotations and improved error handling.

**How to use annotations in Python:**

```import Path

c = Path.Command('G1', {'X': 10.0, 'Y': 20.0, 'F': 1000.0})
c.Annotations = {
	'tool_name': '6mm_endmill',      # string
	'spindle_speed': 12000.0,        # float
	'feed_rate': 1500,               # int (stored as float)
	'operation': 'pocket',           # string
	'depth_of_cut': -2.5,            # negative float
}
print(c.Annotations)  # {'tool_name': '6mm_endmill', 'spindle_speed': 12000.0, ...}
print(type(c.Annotations['spindle_speed']))  # <class 'float'>
print(type(c.Annotations['tool_name']))      # <class 'str'>

xml = c.dumpContent()
c2 = Path.Command()
c2.restoreContent(xml)
print(c2.Annotations)  # Restored with correct types

c.addAnnotations('speed:1000 operation:drill')
print(c.Annotations['speed'])        # 1000.0 (float)
print(c.Annotations['operation'])    # 'drill' (str)
```
2025-10-15 14:26:13 -04:00
sliptonic ecd8f6e050 revised with github comments 2025-08-20 14:09:00 -05:00
sliptonic 5a7fbb449a expanding Path semantics 2025-08-19 17:39:02 -05:00
Dimitris75 7704426f54 Merge branch 'OCL-Adaptive' of https://github.com/Dimitris75/FreeCAD into OCL-Adaptive 2025-08-19 23:55:46 +03:00
Dimitris75 9c21769410 Update Waterline.py 2025-08-19 23:55:41 +03:00
pre-commit-ci[bot] c458e54e2c [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2025-08-17 01:57:41 +00:00
Dimitris75 b8216284ba Merge branch 'OCL-Adaptive' of https://github.com/Dimitris75/FreeCAD into OCL-Adaptive 2025-08-17 04:51:51 +03:00
Dimitris75 99a5c03ba7 Correct problems found by Github bot
Delete unused lists
2025-08-17 04:39:56 +03:00
pre-commit-ci[bot] ce13cb0174 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2025-08-16 19:03:29 +00:00
Dimitris75 1e9295fe27 round BoundBox
round xmin, xmax, ymin, ymax
2025-08-16 21:25:06 +03:00
Dimitris75 1a9df4eb80 CAM: Waterline OCL Adaptive
Adding OCL Adaptive Algorithm to Waterline Operation
2025-08-16 19:41:01 +03:00
Emmanuel Ferdman 1bcf0d4996 Fix path dressup array test case
Signed-off-by: Emmanuel Ferdman <emmanuelferdman@gmail.com>
2025-07-19 13:08:36 -07:00
5009 changed files with 696932 additions and 383670 deletions
@@ -0,0 +1,92 @@
name: Report a Problem
description: Have you found something that does not work well, is too hard to do or is missing altogether? Please create a Problem Report.
labels: ["Status: Needs triage","Status: Needs confirmation"]
body:
- type: markdown
attributes:
value: |
Thanks for taking the time to fill out this problem report! Please [search](https://github.com/FreeCAD/FreeCAD/issues) if a similar issue already exists and check out [how to report issues](https://github.com/FreeCAD/FreeCAD?tab=readme-ov-file#reporting-issues). By submitting this issue, you agree to follow our [Code of Conduct](https://github.com/FreeCAD/FreeCAD/blob/main/CODE_OF_CONDUCT.md).
- type: textarea
id: description
attributes:
label: Problem description
description: Describe the problem and how it impacts user experience, workflow, maintainability or performance. You can attach images or log files by clicking this area to highlight it and then dragging files in. To attach a FCStd file, ZIP it first.
placeholder: Describe your problem briefly.
validations:
required: true
- type: dropdown
id: wb
attributes:
label: Workbench affected?
options:
- Assembly
- BIM
- CAM
- Core (App, Gui,...)
- Draft
- FEM
- Material
- Measurement
- Mesh
- Part
- Part Design
- Sketcher
- Spreadsheet
- TechDraw
- Other (specify in description)
- type: textarea
id: steps_to_reproduce
attributes:
label: Steps to reproduce
description: If the problem appears to be a bug with the current functionality, provide a test case or recipe that reliably reproduces the issue. Ideally [record a macro](https://wiki.freecad.org/Std_DlgMacroRecord) and attach it. Please also add an example file as ZIP.
placeholder: |
Drag an example file as ZIP into this textbox to attach it.
Steps to reproduce the behavior:
1. Open my example file
2. Go to '...'
3. Click on '...'
validations:
required: true
- type: textarea
id: expected_behavior
attributes:
label: Expected behavior
description: A clear and concise description of what you expected to happen when following the provided steps above.
placeholder: What is the expected behavior?
validations:
required: true
- type: textarea
id: actual_behavior
attributes:
label: Actual behavior
description: A clear and concise description of what actually happens. If applicable, add screenshots to help explain the problem.
placeholder: What is actually happening? You can add screenshorts or videos by dragging them into this textbox.
validations:
required: true
- type: textarea
id: dev_version
attributes:
label: Development version About Info (in Safe Mode)
description: Download the latest weekly [development release](https://github.com/FreeCAD/FreeCAD/releases) and try reproducing the issue in safe mode (Help → Restart in Safe Mode). Use the [About FreeCAD](https://wiki.freecad.org/About) dialog to copy your full version information and paste it here.
placeholder: |
1. Download the latest weekly development version (link above).
2. Make sure to run in Safe Mode (Help -> Restart in Safe Mode) to exclude interference from 3rd party addons.
3. If the issue is still reproducible, open the About FreeCAD dialog and copy the full version info here.
render: shell
validations:
required: true
- type: textarea
id: good_version
attributes:
label: Last known good version (optional)
description: If this is a regression, paste the [About FreeCAD](https://wiki.freecad.org/About) info from the last known working version.
placeholder: If the problem did not exist in a previous version, paste the About FreeCAD info from that version here.
render: shell
@@ -0,0 +1,103 @@
name: Report a Code Quality Issue
description: Report problems related to code structure, maintainability, performance, correctness, or technical debt that do not directly affect end-user behavior.
labels: ["Status: Needs triage", "Status: Needs confirmation", "Type: Code Quality"]
type: "Code Quality"
body:
- type: markdown
attributes:
value: |
Thanks for taking the time to help improve FreeCAD's code quality!
> [!NOTE]
> This form is intended **only for code quality issues**, such as:
> - Architectural or design problems
> - Maintainability or readability issues
> - Performance or scalability concerns
> - Incorrect abstractions, layering violations, or technical debt
>
> If the issue affects user-visible behavior, workflows, or UI, please use the regular **Report Problem** form instead.
Please [search existing issues](https://github.com/FreeCAD/FreeCAD/issues) before submitting.
By submitting this issue, you agree to follow our [Code of Conduct](https://github.com/FreeCAD/FreeCAD/blob/main/CODE_OF_CONDUCT.md).
- type: dropdown
id: wb
attributes:
label: Area / Workbench affected
description: Select the primary area affected by the code quality issue.
options:
- Assembly
- BIM
- CAM
- Core (App, Gui, Base, ...)
- Draft
- FEM
- Material
- Measurement
- Mesh
- Part
- Part Design
- Sketcher
- Spreadsheet
- TechDraw
- Build system / CI
- Documentation
- Other (specify below)
- type: textarea
id: description
attributes:
label: Problem description
description: |
Describe the code quality issue clearly.
Focus on *why* the current implementation is problematic (e.g. maintainability, performance, correctness, extensibility).
Reference files, classes, functions, or modules where applicable.
placeholder: |
Example:
- Class X violates dependency rules by including Y
- Function Z mixes responsibilities and is hard to reason about
- Algorithm has unnecessary complexity or poor performance characteristics
validations:
required: true
- type: textarea
id: impact
attributes:
label: Impact
description: |
Explain the practical impact of this issue.
For example: increased maintenance cost, higher bug risk, performance degradation, difficulty extending functionality, or CI/build issues.
placeholder: Describe how this affects the codebase long-term.
validations:
required: true
- type: textarea
id: proposed_solution
attributes:
label: Suggested improvement (optional)
description: |
If you have ideas on how to address the issue, outline them here.
This can include refactoring suggestions, alternative designs, or references to best practices.
placeholder: Optional — leave empty if unsure.
- type: textarea
id: references
attributes:
label: References / evidence
description: |
Add relevant references such as:
- File paths or code snippets
- Related issues or pull requests
- Benchmarks, logs, or static analysis results
placeholder: Links, snippets, or related issues.
- type: textarea
id: dev_version
attributes:
label: Development version (if relevant)
description: |
If the issue is version-specific or recently introduced, paste the output from the
**About FreeCAD** dialog of a development build.
Otherwise, this can be left empty.
placeholder: Paste About FreeCAD information here.
render: shell
-73
View File
@@ -1,73 +0,0 @@
name: Report a Problem
description: Have you found something that does not work well, is too hard to do or is missing altogether? Please create a Problem Report.
labels: ["Status: Needs triage","Status: Needs confirmation"]
body:
- type: checkboxes
id: existing_issue
attributes:
label: Is there an existing issue for this?
description: Please [search](https://github.com/FreeCAD/FreeCAD/issues) to see if a similar issue already exists for the problem you encountered.
options:
- label: I have searched the existing issues
required: true
- type: textarea
id: description
attributes:
label: Problem description
description: Describe the problem and how it impacts user experience, workflow, maintainability or speed of the code. If the problem appears to be a bug with the current functionality, provide as test case or recipe that reproduces the error. Ideally record a macro and attach it.
placeholder: Description of the problem
validations:
required: true
- type: textarea
id: full_version
attributes:
label: Full version info
description: Please use the About FreeCAD dialog to copy your full version information and paste it here. Try reproducing the issue by restarting FreeCAD in safe mode too.
render: shell
validations:
required: true
- type: dropdown
id: wb
attributes:
label: Subproject(s) affected?
options:
- Addon Manager
- Assembly
- BIM
- CAM
- Core
- Draft
- Expressions
- FEM
- File formats
- Material
- Measurement
- Mesh
- OpenSCAD
- Part
- PartDesign
- Project Tools & Websites
- Sketcher
- Spreadsheet
- TechDraw
- Other (specify in description)
- type: textarea
id: anything_else
attributes:
label: Anything else?
description: |
Links? References? Anything that will give us more context about the issue you are encountering!
If there is a discussion about the problem on the forum, provide link(s) here.
You can upload or copy your macro here to speed up the diagnosis and debugging.
Tip: You can attach images or log files by clicking this area to highlight it and then dragging files in. To attach a FCStd file, ZIP it first (GitHub won't recognize the extension otherwise).
validations:
required: false
- type: checkboxes
id: terms
attributes:
label: Code of Conduct
description: By submitting this issue, you agree to follow our [Code of Conduct](https://github.com/FreeCAD/FreeCAD/blob/main/CODE_OF_CONDUCT.md)
options:
- label: I agree to follow this project's Code of Conduct
required: true
+2 -2
View File
@@ -58,7 +58,7 @@ jobs:
logdir: /tmp/log/
steps:
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@95d9a5deda9de15063e7595e9719c11c38c90ae2 # v2.13.2
uses: step-security/harden-runner@fa2e9d605c4eeb9fcad4c99c224cee0c6c7f3594 # v2.16.0
with:
egress-policy: audit
@@ -108,7 +108,7 @@ jobs:
done
- name: Upload logs
if: always()
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
with:
name: ${{ github.job }}-Logs
path: |
+12 -2
View File
@@ -26,14 +26,21 @@
name: FreeCAD master CI
on: [workflow_dispatch, push, pull_request, merge_group]
on:
workflow_dispatch: ~
push:
branches:
- main
- releases/**
pull_request: ~
merge_group: ~
concurrency:
group: FC-CI-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
Prepare:
uses: ./.github/workflows/sub_prepare.yml
with:
@@ -47,18 +54,21 @@ jobs:
Ubuntu:
needs: [Prepare]
if: "!startsWith(github.head_ref, 'refs/heads/backport-')"
uses: ./.github/workflows/sub_buildUbuntu.yml
with:
artifactBasename: Ubuntu-${{ github.run_id }}
Windows:
needs: [Prepare]
if: "!startsWith(github.head_ref, 'refs/heads/backport-')"
uses: ./.github/workflows/sub_buildWindows.yml
with:
artifactBasename: Windows-${{ github.run_id }}
Lint:
needs: [Prepare]
if: "!startsWith(github.head_ref, 'refs/heads/backport-')"
uses: ./.github/workflows/sub_lint.yml
with:
artifactBasename: Lint-${{ github.run_id }}
@@ -68,6 +68,12 @@ runs:
testCommand: ${{ inputs.builddir }}/tests/Gui_tests_run --gtest_output=json:${{ inputs.reportdir }}gui_gtest_results.json
testLogFile: ${{ inputs.reportdir }}gui_gtest_test_log.txt
testName: Gui
- name: C++ Qt tests
id: qttests
uses: ./.github/workflows/actions/runCPPTests/runQtTests
with:
builddir: ${{ inputs.builddir }}
testLogFile: ${{ inputs.reportdir }}qt_ctest_log.txt
- name: C++ Material tests
id: material
uses: ./.github/workflows/actions/runCPPTests/runSingleTest
@@ -0,0 +1,55 @@
# SPDX-License-Identifier: LGPL-2.1-or-later
# SPDX-FileNotice: Part of the FreeCAD project.
name: runQtTests
description: "Run all QtTest-based C++ tests (those labelled 'Qt' in CTest), generate log and report"
inputs:
builddir:
description: "Build directory containing CTestTestfile.cmake"
required: true
testLogFile:
description: "Path for the command-line output of the tests"
required: true
outputs:
reportText:
description: "Report text"
value: ${{ steps.report.outputs.reportText }}
runs:
using: "composite"
steps:
- name: Run Qt tests via CTest
shell: bash -l {0}
env:
BUILD_DIR: ${{ inputs.builddir }}
TEST_LOG_FILE: ${{ inputs.testLogFile }}
run: |
set -o pipefail
ctest --test-dir "$BUILD_DIR" -L Qt --output-on-failure | tee -a "$TEST_LOG_FILE"
- name: Parse test results
if: always()
id: report
shell: bash -l {0}
env:
TEST_LOG_FILE: ${{ inputs.testLogFile }}
run: |
result=$(grep -E "(Test #|tests passed|tests failed|Total Test time)" "$TEST_LOG_FILE" || true)
if grep -qE "[1-9][0-9]* tests failed" "$TEST_LOG_FILE"
then
reportText="<details><summary>:fire: QtTest C++ tests failed</summary>\n"
else
reportText="<details><summary>:heavy_check_mark: QtTest C++ tests succeeded</summary>\n"
fi
reportText+="\n"
reportText+="Results\n"
reportText+="\n"
reportText+='```\n'
reportText+="$result\n"
reportText+='```\n'
reportText+="</details>\n"
reportText+="\n"
echo "reportText<<EOD" >> $GITHUB_OUTPUT
echo -e "$reportText" >> $GITHUB_OUTPUT
echo "EOD" >> $GITHUB_OUTPUT
echo -e "$reportText"
@@ -0,0 +1,62 @@
# SPDX-License-Identifier: LGPL-2.1-or-later
# SPDX-FileNotice: Part of the FreeCAD project.
name: runSingleQtTest
description: "Run a single QtTest-based C++ test executable, generate log and report"
inputs:
testCommand:
description: "Test executable path"
required: true
testLogFile:
description: "Path for the command-line output of the tests"
required: true
testName:
description: "A descriptive name for the test suite"
required: true
outputs:
reportText:
description: "Report text"
value: ${{ steps.report.outputs.reportText }}
runs:
using: "composite"
steps:
- name: Run QtTest tests
shell: bash -l {0}
env:
QT_QPA_PLATFORM: offscreen
TEST_COMMAND: ${{ inputs.testCommand }}
TEST_LOG_FILE: ${{ inputs.testLogFile }}
run: |
set -o pipefail
$TEST_COMMAND | tee -a "$TEST_LOG_FILE"
- name: Parse test results
if: always()
id: report
shell: bash -l {0}
env:
TEST_LOG_FILE: ${{ inputs.testLogFile }}
TEST_NAME: ${{ inputs.testName }}
run: |
# This bonkers sed regex is to try to find the start and end of the QtTest output block, which is not really
# designed to be machine-readable. Why did they have to choose asterisks?!?!
result=$(sed -n '/^\*\*\*\*\*\*\*\*\* Start/,/^\*\*\*\*\*\*\*\*\* Finished/p' "$TEST_LOG_FILE" || true)
if grep -qE "^FAIL!" "$TEST_LOG_FILE"
then
reportText="<details><summary>:fire: QtTest C++ test suite '${TEST_NAME}' failed</summary>\n"
else
reportText="<details><summary>:heavy_check_mark: QtTest C++ test suite '${TEST_NAME}' succeeded</summary>\n"
fi
reportText+="\n"
reportText+="Results\n"
reportText+="\n"
reportText+='```\n'
reportText+="$result\n"
reportText+='```\n'
reportText+="</details>\n"
reportText+="\n"
echo "reportText<<EOD" >> $GITHUB_OUTPUT
echo -e "$reportText" >> $GITHUB_OUTPUT
echo "EOD" >> $GITHUB_OUTPUT
echo -e "$reportText"
@@ -21,23 +21,23 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@95d9a5deda9de15063e7595e9719c11c38c90ae2 # v2.13.2
uses: step-security/harden-runner@fa2e9d605c4eeb9fcad4c99c224cee0c6c7f3594 # v2.16.0
with:
egress-policy: audit
- name: '🧹 Tag & close stale unconfirmed bugs'
id: stale_issues
uses: actions/stale@5f858e3efba33a5ca4407a664cc011ad407f2008 # v10.1.0
uses: actions/stale@b5d41d4e1d5dceea10e7104786b73624c18a190f # v10.2.0
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
days-before-issue-stale: 60
days-before-issue-stale: 90
days-before-issue-close: 14
days-before-pr-stale: -1
days-before-pr-close: -1
operations-per-run: 100 # max num of ops per run
operations-per-run: 200 # max num of ops per run
stale-issue-label: 'Status: Stale'
close-issue-label: 'Status: Auto-closing'
exempt-issue-labels: 'Status: Confirmed,Priority: High,Priority: Critical,Blocker,Type: Feature,no-auto-close'
exempt-issue-labels: 'Status: Confirmed,Priority: High,Priority: Critical,Blocker,Type: Feature,no-auto-close,3rd party: OCC'
remove-stale-when-updated: true
ascending: true
stale-issue-message: |
@@ -53,7 +53,7 @@ jobs:
- name: '🧹 Close stale requested feedback issues'
id: awaiting_issues
uses: actions/stale@5f858e3efba33a5ca4407a664cc011ad407f2008 # v10.1.0
uses: actions/stale@b5d41d4e1d5dceea10e7104786b73624c18a190f # v10.2.0
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
days-before-issue-stale: 20
@@ -80,17 +80,17 @@ jobs:
- name: '🧹 Tag & close inactive issues'
id: inactive_issues
uses: actions/stale@5f858e3efba33a5ca4407a664cc011ad407f2008 # v10.1.0
uses: actions/stale@b5d41d4e1d5dceea10e7104786b73624c18a190f # v10.2.0
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
days-before-issue-stale: 190
days-before-issue-close: 60
days-before-pr-stale: -1
days-before-pr-close: -1
operations-per-run: 50 # max num of ops per run
operations-per-run: 100 # max num of ops per run
stale-issue-label: 'Status: Stale'
close-issue-label: 'Status: Auto-closing'
exempt-issue-labels: 'Priority: High,Priority: Critical,Blocker,Type: Feature,no-auto-close'
exempt-issue-labels: 'Priority: High,Priority: Critical,Blocker,Type: Feature,no-auto-close,3rd party: OCC'
remove-stale-when-updated: true
ascending: true
stale-issue-message: |
@@ -110,7 +110,7 @@ jobs:
- name: '🧹 Tag & close inactive PRs'
id: inactive_pr
uses: actions/stale@5f858e3efba33a5ca4407a664cc011ad407f2008 # v10.1.0
uses: actions/stale@b5d41d4e1d5dceea10e7104786b73624c18a190f # v10.2.0
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
days-before-issue-stale: -1
+5 -3
View File
@@ -28,13 +28,15 @@ jobs:
)
steps:
- name: Checkout
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
token: ${{ secrets.GH_TOKEN_FOR_CI_RUNNERS }}
- name: Create backport pull requests
uses: korthout/backport-action@d07416681cab29bf2661702f925f020aaa962997 # v3.4.1
uses: korthout/backport-action@01619ebc9a6e3f6820274221b9956b3e7365000a # v4.1.0
with:
# Inputs documented here: https://github.com/korthout/backport-action?tab=readme-ov-file#inputs
github_token: ${{ github.token }}
github_token: ${{ secrets.GH_TOKEN_FOR_CI_RUNNERS }}
github_workspace: ${{ github.workspace }}
# permit PRs with merge commits to be backported
+112 -19
View File
@@ -8,6 +8,11 @@ on:
permissions:
contents: write
actions: write
concurrency:
group: build-release-${{ github.event_name }}
cancel-in-progress: true
jobs:
upload_src:
@@ -16,19 +21,19 @@ jobs:
build_tag: ${{ steps.get_tag.outputs.build_tag }}
steps:
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@95d9a5deda9de15063e7595e9719c11c38c90ae2 # v2.13.2
uses: step-security/harden-runner@fa2e9d605c4eeb9fcad4c99c224cee0c6c7f3594 # v2.16.0
with:
egress-policy: audit
- name: Checkout Source
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- name: Checkout source
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
ref: ${{ github.sha }}
fetch-depth: 2
fetch-tags: true
submodules: 'recursive'
- name: get tag and create release if weekly
- name: Get tag and create release if weekly
id: get_tag
shell: bash -l {0}
env:
@@ -38,11 +43,38 @@ jobs:
export BUILD_TAG="${{ github.event.release.tag_name }}"
else
export BUILD_TAG=weekly-$(date "+%Y.%m.%d")
gh release create ${BUILD_TAG} --title "Development Build ${BUILD_TAG}" -F .github/workflows/weekly-build-notes.md --prerelease || true
gh release create ${BUILD_TAG} --title "Development Build ${BUILD_TAG}" \
-F .github/workflows/weekly-build-notes.md \
--prerelease || \
gh release view ${BUILD_TAG} > /dev/null # fail if it doesn't exist
fi
echo "BUILD_TAG=${BUILD_TAG}" >> "$GITHUB_ENV"
echo "build_tag=${BUILD_TAG}" >> "$GITHUB_OUTPUT"
- name: Trigger notes updater workflow (only for weekly)
if: startsWith(steps.get_tag.outputs.build_tag, 'weekly-')
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
env:
WEEKLY_TAG: ${{ steps.get_tag.outputs.build_tag }}
with:
script: |
const owner = context.repo.owner;
const repo = context.repo.repo;
// Reusable/dispatchable updater workflow file in .github/workflows/
const workflow_id = 'weekly-compare-link.yml';
// Use the default branch so the workflow file is available
const ref = (context.payload?.repository?.default_branch) || 'main';
const current_tag = process.env.WEEKLY_TAG || '';
await github.rest.actions.createWorkflowDispatch({
owner, repo, workflow_id, ref,
inputs: { current_tag }
});
core.info(`Dispatched ${workflow_id} on ${ref} with current_tag='${current_tag}'.`)
- name: Upload Source
id: upload_source
shell: bash -l {0}
@@ -70,8 +102,9 @@ jobs:
include:
- { target: linux-64, os: ubuntu-22.04 }
- { target: linux-arm64, os: ubuntu-22.04-arm }
- { target: osx-64, os: macos-15-intel }
- { target: osx-arm64, os: macos-latest }
- { target: osx-64, os: macos-15-intel, deploy_target: "10.13" }
- { target: osx-arm64, os: macos-latest, deploy_target: "11.0" }
- { target: osx-arm64, os: macos-latest, deploy_target: "15.0" }
- { target: win-64, os: windows-latest }
fail-fast: false
@@ -79,7 +112,7 @@ jobs:
environment: weekly-build
steps:
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@95d9a5deda9de15063e7595e9719c11c38c90ae2 # v2.13.2
uses: step-security/harden-runner@fa2e9d605c4eeb9fcad4c99c224cee0c6c7f3594 # v2.16.0
with:
egress-policy: audit
@@ -92,7 +125,7 @@ jobs:
remove-android: 'true' # (frees ~9 GB)
remove-cached-tools: 'true' # (frees ~8.3 GB)
- name: Set Platform Environment Variables
- name: Set platform environment variables
shell: bash -l {0}
env:
OPERATING_SYSTEM: ${{ runner.os }}
@@ -102,21 +135,21 @@ jobs:
echo 'RATTLER_CACHE_DIR=D:\rattler' >> "$GITHUB_ENV"
fi
- name: Checkout Source
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- name: Checkout source
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
ref: ${{ github.sha }}
fetch-depth: 2
fetch-tags: true
submodules: 'recursive'
- uses: prefix-dev/setup-pixi@82d477f15f3a381dbcc8adc1206ce643fe110fb7 # v0.9.3
- uses: prefix-dev/setup-pixi@a0af7a228712d6121d37aba47adf55c1332c9c2e # v0.9.4
with:
pixi-version: v0.59.0
cache: false
- name: Install the Apple certificate and provisioning profile
id: get_cert
id: macos_get_cert
if: runner.os == 'macOS'
env:
APP_SPECIFIC_PASSWORD: ${{ secrets.APP_SPECIFIC_PASSWORD }}
@@ -124,7 +157,6 @@ jobs:
BUILD_CERTIFICATE_BASE64: ${{ secrets.BUILD_CERTIFICATE_BASE64 }}
BUILD_PROVISION_PROFILE_BASE64: ${{ secrets.BUILD_PROVISION_PROFILE_BASE64 }}
DEVELOPER_TEAM_ID: ${{ secrets.DEVELOPER_TEAM_ID }}
KEYCHAIN_PASSWORD: ${{ secrets.KEYCHAIN_PASSWORD }}
P12_PASSWORD: ${{ secrets.P12_PASSWORD }}
run: |
if [ -z "$BUILD_CERTIFICATE_BASE64" ]; then
@@ -160,20 +192,81 @@ jobs:
xcrun notarytool store-credentials "FreeCAD" --keychain "$KEYCHAIN_PATH" --apple-id "${APPLE_ID}" --password "${APP_SPECIFIC_PASSWORD}" --team-id "${DEVELOPER_TEAM_ID}"
- name: Build and Release Packages
- name: Setup .NET 10 SDK
if: runner.os == 'Windows'
uses: actions/setup-dotnet@baa11fbfe1d6520db94683bd5c7a3818018e4309 # v5.1.0
with:
dotnet-version: '10.0.103'
- name: Install sign tool
if: runner.os == 'Windows'
run: |
# NOTE: The sign tool is ONLY available as a prerelease package, they never issue real releases.
dotnet tool install --global --prerelease sign
echo "$env:USERPROFILE\.dotnet\tools" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
dotnet --info
sign --version
- name: Build packages
shell: bash
env:
GH_TOKEN: ${{ github.token }}
TARGET_PLATFORM: ${{ matrix.target }}
BUILD_TAG: ${{ needs.upload_src.outputs.build_tag }}
run: |
set -euo pipefail
if [[ "${{ runner.os }}" == "macOS" ]]; then
export MACOS_DEPLOYMENT_TARGET="${{ matrix.deploy_target }}"
fi
python3 package/scripts/write_version_info.py ../freecad_version.txt
cd package/rattler-build
pixi install
- name: Azure login for Windows build code signing
id: azure_login
if: runner.os == 'Windows'
continue-on-error: true
uses: azure/login@a457da9ea143d694b1b9c7c869ebb04ebe844ef5 # v2.3.0
with:
creds: '{"clientId":"${{ secrets.AZURE_CLIENT_ID }}","clientSecret":"${{ secrets.AZURE_CLIENT_SECRET }}","subscriptionId":"${{ secrets.AZURE_SUBSCRIPTION_ID }}","tenantId":"${{ secrets.AZURE_TENANT_ID }}"}'
- name: Release packages with optional code-signing on Windows and macOS
shell: bash
env:
GH_TOKEN: ${{ github.token }}
SIGNING_KEY_ID: ${{ secrets.SIGNING_KEY_ID }}
SIGN_RELEASE: ${{ steps.get_cert.outputs.has_cert }}
TARGET_PLATFORM: ${{ matrix.target }}
MAKE_INSTALLER: "true"
UPLOAD_RELEASE: "true"
BUILD_TAG: ${{ needs.upload_src.outputs.build_tag }}
run: |
python3 package/scripts/write_version_info.py ../freecad_version.txt
set -euo pipefail
export MACOS_SIGN_RELEASE=0
export WINDOWS_SIGN_RELEASE=0
case "${RUNNER_OS}" in
Windows)
export WINDOWS_SIGN_RELEASE="${{ steps.azure_login.outcome }}"
export WINDOWS_AZURE_ENDPOINT="${{ vars.AZURE_TRUSTED_SIGNING_ENDPOINT }}"
export WINDOWS_AZURE_CERTIFICATE_PROFILE="${{ vars.AZURE_TRUSTED_SIGNING_CERTIFICATE_PROFILE }}"
export WINDOWS_AZURE_SIGNING_ACCOUNT="${{ vars.AZURE_TRUSTED_SIGNING_ACCOUNT }}"
# For good measure, normalize the azure_login result to 1 or 0
if [[ "${WINDOWS_SIGN_RELEASE:-}" == "success" ]]; then
export WINDOWS_SIGN_RELEASE=1
else
export WINDOWS_SIGN_RELEASE=0
fi
;;
macOS)
export MACOS_SIGN_RELEASE="${{ steps.macos_get_cert.outputs.has_cert }}"
export MACOS_SIGNING_KEY_ID="${{ secrets.SIGNING_KEY_ID }}"
export MACOS_DEPLOYMENT_TARGET="${{ matrix.deploy_target }}"
;;
esac
cd package/rattler-build
pixi install
pixi run -e package create_bundle
## Needed if running on a self-hosted runner:
+2 -2
View File
@@ -64,12 +64,12 @@ jobs:
# your codebase is analyzed, see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages
steps:
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@95d9a5deda9de15063e7595e9719c11c38c90ae2 # v2.13.2
uses: step-security/harden-runner@fa2e9d605c4eeb9fcad4c99c224cee0c6c7f3594 # v2.16.0
with:
egress-policy: audit
- name: Checkout repository
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 2
submodules: recursive
+3 -3
View File
@@ -68,7 +68,7 @@ jobs:
# your codebase is analyzed, see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages
steps:
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@95d9a5deda9de15063e7595e9719c11c38c90ae2 # v2.13.2
uses: step-security/harden-runner@fa2e9d605c4eeb9fcad4c99c224cee0c6c7f3594 # v2.16.0
with:
egress-policy: audit
@@ -84,7 +84,7 @@ jobs:
remove-docker-images: 'true' # (frees ~3.2 GB)
- name: Checkout repository
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 2
submodules: recursive
@@ -156,7 +156,7 @@ jobs:
sarif_file: sarif-results/cpp.sarif
- name: Upload loc as a Build Artifact
uses: actions/upload-artifact@v5
uses: actions/upload-artifact@v7.0.0
with:
name: sarif-results
path: sarif-results
+3 -3
View File
@@ -17,11 +17,11 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@95d9a5deda9de15063e7595e9719c11c38c90ae2 # v2.13.2
uses: step-security/harden-runner@fa2e9d605c4eeb9fcad4c99c224cee0c6c7f3594 # v2.16.0
with:
egress-policy: audit
- name: 'Checkout Repository'
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: 'Dependency Review'
uses: actions/dependency-review-action@56339e523c0409420f6c2c9a2f4292bbb3c07dd3 # v4
uses: actions/dependency-review-action@05fe4576374b728f0c523d6a13d64c25081e0803 # v4
+10 -2
View File
@@ -10,6 +10,8 @@ jobs:
trigger-copr-build:
environment: fedora-daily
env:
copr_login: ${{ secrets.COPR_LOGIN }}
copr_username: ${{ secrets.COPR_USERNAME }}
copr_token: ${{ secrets.COPR_TOKEN }}
runs-on: ubuntu-latest
container: quay.io/packit/packit
@@ -17,9 +19,15 @@ jobs:
- name: setup copr token
run: |
mkdir -p ~/.config
echo "$copr_token" > ~/.config/copr
echo \
"[copr-cli]
login = $copr_login
username = $copr_username
token = $copr_token
copr_url = https://copr.fedorainfracloud.org
" > ~/.config/copr
- name: checkout sources
uses: actions/checkout@v4
uses: actions/checkout@v6
with:
submodules: recursive
fetch-depth: 500
@@ -10,9 +10,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
with:
fetch-depth: 0
token: ${{ secrets.GH_TOKEN_FOR_CROWDIN_SYNC }}
- name: Install Qt ≥ 6.8
uses: jurplel/install-qt-action@d325aaf2a8baeeda41ad0b5d39f84a6af9bcf005
@@ -24,7 +25,7 @@ jobs:
arch: "linux_gcc_64"
- name: Setup Python & dependencies
uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405
with:
python-version: "3.13"
- name: Install Python packages
@@ -45,8 +46,8 @@ jobs:
- name: Commit changes
run: |
git config --global user.name "github-actions"
git config --global user.email "github-actions@github.com"
git config --global user.name "freecad-gh-actions-translation-bot"
git config --global user.email "freecad-gh-actions-translation-bot@github.com"
git add src
git commit -m "Update translations from Crowdin" || echo "No changes to commit"
@@ -56,12 +57,12 @@ jobs:
git push origin update-crowdin-translations --force
- name: Create Pull Request
uses: peter-evans/create-pull-request@271a8d0340265f705b14b6d32b9829c1cb33d45e
uses: peter-evans/create-pull-request@c0f553fe549906ede9cf27b5156039d195d2ece0
with:
branch: update-crowdin-translations
title: "Update translations from Crowdin"
body: "Automatic Crowdin update."
labels: "translations, automated"
token: ${{ secrets.GH_TOKEN_FOR_CROWDIN_SYNC }}
delete-branch: true
add-paths: |
src
+2 -2
View File
@@ -17,7 +17,7 @@ jobs:
steps:
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@95d9a5deda9de15063e7595e9719c11c38c90ae2 # v2.13.2
uses: step-security/harden-runner@fa2e9d605c4eeb9fcad4c99c224cee0c6c7f3594 # v2.16.0
with:
egress-policy: audit
@@ -35,7 +35,7 @@ jobs:
echo "last_month=$first_day..$last_day" >> "$GITHUB_ENV"
- name: Run issue-metrics tool
uses: github/issue-metrics@637a24e71b78bc10881e61972b19ea9ff736e14a # v3.25.2
uses: github/issue-metrics@6a35322ff89cee3e1a594d282c27eb34bffa9174 # v4.1.1
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SEARCH_QUERY: 'repo:FreeCAD/FreeCAD is:issue created:${{ env.last_month }}'
+1 -1
View File
@@ -21,7 +21,7 @@ jobs:
steps:
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@95d9a5deda9de15063e7595e9719c11c38c90ae2 # v2.13.2
uses: step-security/harden-runner@fa2e9d605c4eeb9fcad4c99c224cee0c6c7f3594 # v2.16.0
with:
egress-policy: audit
@@ -10,9 +10,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
with:
fetch-depth: 0
ref: releases/FreeCAD-1-1
- name: Install Qt ≥ 6.8
uses: jurplel/install-qt-action@d325aaf2a8baeeda41ad0b5d39f84a6af9bcf005
@@ -24,7 +25,7 @@ jobs:
arch: "linux_gcc_64"
- name: Setup Python & dependencies
uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405
with:
python-version: "3.13"
- name: Install Python packages
+3 -3
View File
@@ -36,12 +36,12 @@ jobs:
steps:
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@95d9a5deda9de15063e7595e9719c11c38c90ae2 # v2.13.2
uses: step-security/harden-runner@fa2e9d605c4eeb9fcad4c99c224cee0c6c7f3594 # v2.16.0
with:
egress-policy: audit
- name: "Checkout code"
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
@@ -68,7 +68,7 @@ jobs:
# Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF
# format to the repository Actions tab.
- name: "Upload artifact"
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
with:
name: SARIF file
path: results.sarif
+7 -7
View File
@@ -75,7 +75,7 @@ jobs:
steps:
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@95d9a5deda9de15063e7595e9719c11c38c90ae2 # v2.13.2
uses: step-security/harden-runner@fa2e9d605c4eeb9fcad4c99c224cee0c6c7f3594 # v2.16.0
with:
egress-policy: audit
@@ -91,7 +91,7 @@ jobs:
fi
- name: Checkout
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Add GCC Problem Matcher
if: runner.os == 'Linux'
@@ -116,7 +116,7 @@ jobs:
mkdir -p ${{ env.reportdir }}
echo "reportFile=${{ env.reportfilename }}" >> $GITHUB_OUTPUT
- uses: prefix-dev/setup-pixi@82d477f15f3a381dbcc8adc1206ce643fe110fb7 # v0.9.3
- uses: prefix-dev/setup-pixi@a0af7a228712d6121d37aba47adf55c1332c9c2e # v0.9.4
with:
pixi-version: v0.59.0
cache: false
@@ -124,7 +124,7 @@ jobs:
- name: Restore Compiler Cache
id: cache-restore
if: always()
uses: actions/cache/restore@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
uses: actions/cache/restore@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3
with:
path: ${{ env.CCACHE_DIR }}
key: FC-${{ env.cacheKey }}-${{ github.ref }}-${{ github.run_id }}
@@ -209,14 +209,14 @@ jobs:
- name: Save Compiler Cache
id: cache-save
if: always()
uses: actions/cache/save@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
uses: actions/cache/save@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3
with:
path: ${{ env.CCACHE_DIR }}
key: FC-${{ env.cacheKey }}-${{ github.ref }}-${{ github.run_id }}
- name: Upload logs
if: always()
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
with:
name: ${{ inputs.artifactBasename }}-${{ matrix.os }}-Logs
path: |
@@ -225,7 +225,7 @@ jobs:
- name: Upload report
if: always()
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
with:
name: ${{ env.reportfilename }}
path: |
+11 -11
View File
@@ -22,9 +22,9 @@
# ***************************************************************************
# This is a build and test workflow for CI of FreeCAD.
# This workflow aims at building and testing FreeCAD on Ubuntu 22.04 using GCC.
# This workflow aims at building and testing FreeCAD on Ubuntu 24.04 using GCC.
name: Build Ubuntu 22.04
name: Build Ubuntu 24.04
on:
workflow_call:
@@ -47,7 +47,7 @@ on:
jobs:
Build:
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
continue-on-error: ${{ inputs.allowedToFail }}
env:
CCACHE_COMPILERCHECK: "%compiler% -dumpfullversion -dumpversion" # default:mtime
@@ -77,12 +77,12 @@ jobs:
steps:
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@95d9a5deda9de15063e7595e9719c11c38c90ae2 # v2.13.2
uses: step-security/harden-runner@fa2e9d605c4eeb9fcad4c99c224cee0c6c7f3594 # v2.16.0
with:
egress-policy: audit
- name: Checking out source code
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
submodules: true
@@ -94,7 +94,7 @@ jobs:
sudo apt-get update -y -qq
sudo apt-get install -y -qq python3-pip
python3 -m pip install --upgrade pip
python3 -m pip install ifcopenshell==0.8.2
python3 -m pip install ifcopenshell==0.8.2 --break-system-packages
- name: Make needed directories, files and initializations
id: Init
@@ -116,7 +116,7 @@ jobs:
- name: Restore Compiler Cache
id: cache-restore
if: always()
uses: actions/cache/restore@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
uses: actions/cache/restore@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3
with:
path: ${{ env.CCACHE_DIR }}
key: FC-${{ steps.genCacheKey.outputs.cacheKey }}-${{ github.ref }}-${{ github.run_id }}
@@ -131,7 +131,7 @@ jobs:
ccache -p
- name: Install cmake
uses: jwlawson/actions-setup-cmake@802fa1a2c4e212495c05bf94dba2704a92a472be # v2.0.2
uses: jwlawson/actions-setup-cmake@3a6cbe35ba64df7ca70c51365c4aff65db9a9037 # v2.1.1
with:
cmake-version: '3.31.6'
@@ -216,14 +216,14 @@ jobs:
- name: Save Compiler Cache
id: cache-save
if: always()
uses: actions/cache/save@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
uses: actions/cache/save@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3
with:
path: ${{ env.CCACHE_DIR }}
key: FC-${{ steps.genCacheKey.outputs.cacheKey }}-${{ github.ref }}-${{ github.run_id }}
- name: Upload logs
if: always()
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
with:
name: ${{ inputs.artifactBasename }}-Logs
path: |
@@ -232,7 +232,7 @@ jobs:
- name: Upload report
if: always()
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
with:
name: ${{ env.reportfilename }}
path: |
+20 -8
View File
@@ -24,15 +24,27 @@
name: Build Windows
on:
workflow_dispatch:
inputs:
artifactBasename:
description: "Base name for artifact"
required: false
type: string
default: "FreeCAD"
allowedToFail:
description: "whether a failed build is allowed"
required: false
type: boolean
default: false
workflow_call:
inputs:
artifactBasename:
type: string
required: true
type: string
allowedToFail:
required: false
default: false
type: boolean
required: false
outputs:
reportFile:
value: ${{ jobs.Build.outputs.reportFile }}
@@ -66,12 +78,12 @@ jobs:
steps:
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@95d9a5deda9de15063e7595e9719c11c38c90ae2 # v2.13.2
uses: step-security/harden-runner@fa2e9d605c4eeb9fcad4c99c224cee0c6c7f3594 # v2.16.0
with:
egress-policy: audit
- name: Checking out source code
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
submodules: true
@@ -99,7 +111,7 @@ jobs:
- name: Restore compiler cache
id: cache-restore
if: always()
uses: actions/cache/restore@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
uses: actions/cache/restore@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3
with:
path: ${{ env.CCACHE_DIR }}
key: FC-${{ env.cacheKey }}-${{ github.ref }}-${{ github.run_id }}
@@ -114,7 +126,7 @@ jobs:
. $env:ccachebindir\ccache -p
- name: Install cmake
uses: jwlawson/actions-setup-cmake@802fa1a2c4e212495c05bf94dba2704a92a472be # v2.0.2
uses: jwlawson/actions-setup-cmake@3a6cbe35ba64df7ca70c51365c4aff65db9a9037 # v2.1.1
with:
cmake-version: '3.31.6'
@@ -157,14 +169,14 @@ jobs:
- name: Save Compiler Cache
id: cache-save
if: always()
uses: actions/cache/save@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
uses: actions/cache/save@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3
with:
path: ${{ env.CCACHE_DIR }}
key: FC-${{ env.cacheKey }}-${{ github.ref }}-${{ github.run_id }}
- name: Upload logs
if: always()
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
with:
name: ${{ inputs.artifactBasename }}-Logs
path: |
+4 -4
View File
@@ -198,12 +198,12 @@ jobs:
steps:
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@95d9a5deda9de15063e7595e9719c11c38c90ae2 # v2.13.2
uses: step-security/harden-runner@fa2e9d605c4eeb9fcad4c99c224cee0c6c7f3594 # v2.16.0
with:
egress-policy: audit
- name: Check out code
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
submodules: true
@@ -355,7 +355,7 @@ jobs:
- name: Upload logs and fixes
if: always()
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
with:
name: ${{ inputs.artifactBasename }}-Logs
path: |
@@ -364,7 +364,7 @@ jobs:
- name: Upload report
if: always()
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
with:
name: ${{ env.reportfilename }}
path: |
+4 -4
View File
@@ -81,7 +81,7 @@ jobs:
steps:
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@95d9a5deda9de15063e7595e9719c11c38c90ae2 # v2.13.2
uses: step-security/harden-runner@fa2e9d605c4eeb9fcad4c99c224cee0c6c7f3594 # v2.16.0
with:
egress-policy: audit
@@ -94,7 +94,7 @@ jobs:
touch ${{ env.logdir }}changedFiles.lst ${{ env.logdir }}changedCppFiles.lst ${{ env.logdir }}changedPythonFiles.lst
echo "reportFile=${{ env.reportfilename }}" >> $GITHUB_OUTPUT
- name: Check out code
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
submodules: true
- name: Determine base and head SHA in case of PR
@@ -180,14 +180,14 @@ jobs:
echo "" >> $GITHUB_OUTPUT
- name: Upload logs
if: always()
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
with:
name: ${{ inputs.artifactBasename }}-Logs
path: |
${{ env.logdir }}
- name: Upload report
if: always()
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
with:
name: ${{ env.reportfilename }}
path: |
+3 -3
View File
@@ -54,7 +54,7 @@ jobs:
steps:
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@95d9a5deda9de15063e7595e9719c11c38c90ae2 # v2.13.2
uses: step-security/harden-runner@fa2e9d605c4eeb9fcad4c99c224cee0c6c7f3594 # v2.16.0
with:
egress-policy: audit
@@ -62,7 +62,7 @@ jobs:
run: |
mkdir -p ${{ env.artifactsDownloadDir }}
- name: Download artifacts
uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
path: ${{ env.artifactsDownloadDir }}
- name: Save input data to file
@@ -119,7 +119,7 @@ jobs:
cat report.md >> $GITHUB_STEP_SUMMARY
- name: Delete used artifacts
continue-on-error: true
uses: geekyeggo/delete-artifact@f275313e70c08f6120db482d7a6b98377786765b # v5.1.0
uses: geekyeggo/delete-artifact@176a747ab7e287e3ff4787bf8a148716375ca118 # v6.0.0
with:
name: |
${{ env.usedArtifacts }}
+2 -1
View File
@@ -1,6 +1,7 @@
> [!IMPORTANT]
> Bleeding edge FreeCAD development builds for testing bugfixes, regressions, and recently implemented features. Do not use in a production environment.
**Changes since last weekly:** <!--DIFF_LINK-->
### How-to use
@@ -8,7 +9,7 @@
2. Unpack the bundle to any folder on your system
3. Launch the application
- **Windows**
Run `\bin\FreeCAD.exe` in the extracted directory
Run `\FreeCAD.exe` in the extracted directory
- **macOS**
Launch `/FreeCAD.app` in the extracted directory
- **Linux**
+140
View File
@@ -0,0 +1,140 @@
name: Weekly compare link to release notes
on:
release:
types: [published] # run automatically when a (pre-)release is published
workflow_dispatch: # allow manual runs too
inputs:
current_tag:
description: "Weekly tag (e.g., weekly-2026.01.07). Leave empty to auto-detect latest weekly pre-release."
required: false
dry_run:
description: "Only compute; do not update the release body."
required: false
type: boolean
default: false
permissions:
contents: write # required to PATCH the release body
jobs:
update-notes:
runs-on: ubuntu-latest
steps:
- name: Inject compare link into weekly release notes
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
env:
# Pass manual inputs via env for convenience
CURRENT_TAG: ${{ github.event.inputs.current_tag }}
DRY_RUN: ${{ github.event.inputs.dry_run }}
PLACEHOLDER: "<!--DIFF_LINK-->"
with:
script: |
// Updates the current weekly release notes with a compare link to the previous weekly.
// Works for both release-published events and manual (workflow_dispatch) runs.
const owner = context.repo.owner;
const repo = context.repo.repo;
const rx = /^weekly-(\d{4})\.(\d{2})\.(\d{2})$/;
// Determine currentTag:
// 1) Manual input via workflow_dispatch (env.CURRENT_TAG)
// 2) Tag from release event payload
// 3) Fallback: newest weekly pre-release
let currentTag = process.env.CURRENT_TAG || (context.payload?.release?.tag_name) || null;
async function detectLatestWeeklyTag() {
const releases = await github.paginate(github.rest.repos.listReleases, { owner, repo, per_page: 100 });
const cand = releases.find(r => r.prerelease && typeof r.tag_name === 'string' && rx.test(r.tag_name));
return cand?.tag_name || null;
}
if (!currentTag) {
currentTag = await detectLatestWeeklyTag();
}
if (!currentTag || !rx.test(currentTag)) {
core.info(`No weekly tag detected or tag format mismatch ('${currentTag}'). Skipping.`);
return;
}
// Resolve the current release object
let curRel;
try {
const { data } = await github.rest.repos.getReleaseByTag({ owner, repo, tag: currentTag });
curRel = data;
} catch (e) {
core.setFailed(`No release for tag ${currentTag}: ${e.message}`);
return;
}
// If event is a normal release (not pre-release), skip automatically-run case;
// but allow manual override (manual runs can patch any weekly tag).
const isManual = context.eventName === 'workflow_dispatch';
if (!isManual && !curRel.prerelease) {
core.info('Current release is not a pre-release; skipping (auto run).');
return;
}
// Helpers
const toPrevWeeklyTag = (tag) => {
const [, y, m, d] = tag.match(rx);
const dt = new Date(Date.UTC(+y, +m - 1, +d));
const prev = new Date(dt.getTime() - 7 * 24 * 3600 * 1000); // minus 7 days
const iso = prev.toISOString().slice(0, 10); // YYYY-MM-DD
return `weekly-${iso.replace(/-/g, '.')}`; // weekly-YYYY.MM.DD
};
const ymdKey = (t) => t.replace(rx, '$1$2$3'); // YYYYMMDD
async function tagExists(tag) {
try {
await github.rest.git.getRef({ owner, repo, ref: `tags/${tag}` });
return true;
} catch {
return false;
}
}
// Compute previous weekly deterministically, then fall back if needed
let prevTag = toPrevWeeklyTag(currentTag);
if (!(await tagExists(prevTag))) {
core.info(`Computed previous tag ${prevTag} not found; scanning older weeklies...`);
const releases = await github.paginate(github.rest.repos.listReleases, { owner, repo, per_page: 100 });
const curKey = ymdKey(currentTag);
const older = releases
.filter(r => r.prerelease && typeof r.tag_name === 'string' && rx.test(r.tag_name))
.map(r => ({ tag: r.tag_name, key: ymdKey(r.tag_name) }))
.filter(x => x.key < curKey)
.sort((a, b) => b.key.localeCompare(a.key)); // newest older first
if (!older.length) {
core.info('No older weekly found; nothing to do.');
return;
}
prevTag = older[0].tag;
}
const compareUrl = `https://github.com/${owner}/${repo}/compare/${prevTag}...${currentTag}`;
const head = `**Changes since last weekly (${prevTag} → ${currentTag}):**\n${compareUrl}\n`;
if (process.env.DRY_RUN === 'true') {
core.info(`[DRY RUN] Would update release ${currentTag} with: ${compareUrl}`);
return;
}
// Idempotent body update
let body = curRel.body || '';
if (body.includes(compareUrl)) {
core.info('Compare URL already present; done.');
return;
}
const placeholder = process.env.PLACEHOLDER || '<!--DIFF_LINK-->';
if (body.includes(placeholder)) {
body = body.replace(placeholder, compareUrl);
} else if (/\*\*Changes since last weekly:/i.test(body)) {
body = body.replace(/\*\*Changes since last weekly:[^\n]*\n?/i, head + '\n');
} else {
body += (body.endsWith('\n') ? '\n' : '\n\n') + head;
}
await github.rest.repos.updateRelease({ owner, repo, release_id: curRel.id, body });
core.info(`Release notes updated with compare link: ${compareUrl}`);
+29 -28
View File
@@ -1,59 +1,60 @@
# file types to ignore
.*
!/.packit.yaml
!*.gitattributes
!*.gitignore
!/.clang-format
!/.clang-tidy
!/.git-blame-ignore-revs
!/.gitattributes
!/.github/
!/.gitignore
!/.gitmodules
!/.packit.yaml
!/.pre-commit-config.yaml
!/.pylintrc
!/.github/
!/contrib/.vscode/
!*.gitattributes
!*.gitignore
*.clangd
*.DS_Store
*.pyc
*.obj
*.lib
*.pch
*.vcproj
*.kdev4
*.exp
*.dep
*.exp
*.kdev4
*.lib
*.manifest
*.o
*.obj
*.orig
*.output
*.pch
*.pyc
*.vcproj
# Ignore .db files created by Qt Designer when editing .ui files
*.db
qrc_*.cpp
BuildLog.htm
cmake_install.cmake
*~
CMakeFiles/
*qrc.depends
ui_*.h
moc_*.cpp
Makefile
*~
BuildLog.htm
CMakeCache.txt
CMakeFiles/
CMakeLists.txt.user
Makefile
cmake_install.cmake
config.h
install_manifest.txt
/bin/
moc_*.cpp
qrc_*.cpp
ui_*.h
/.vscode/
/ALL_BUILD.dir/
/doc/
/lib/
/Mod/
/ZERO_CHECK.dir/
/build/
/bin/
/build-*/
/build/
/cmake-build*/
/src/Tools/offlinedoc/localwiki/
/src/Tools/offlinedoc/*.txt
/conda/environment.yml
/.vscode/
/doc/
/lib/
/src/Tools/offlinedoc/*.txt
/src/Tools/offlinedoc/localwiki/
OpenSCAD_rc.py
tags
/CMakeUserPresets.json
@@ -63,10 +64,10 @@ compile_commands.json
*.sublime-workspace
# crowdin file
files_to_translate.txt
src/Tools/freecad.zip
tsupdate_stderr.log
tsupdate_stdout.log
files_to_translate.txt
# pixi environments
.pixi
*.egg-info
.pixi
+1
View File
@@ -46,6 +46,7 @@ exclude: |
src/App/ExpressionParser.tab.h|
src/App/ExpressionParser.y|
src/App/lex.ExpressionParser.c|
src/Doc/ThirdPartyLibraries.html.cmake|
src/Gui/3Dconnexion/navlib|
src/Gui/QSint|
src/Gui/Quarter|
+1 -1
View File
@@ -398,7 +398,7 @@ indent-after-paren=4
indent-string=' '
# Maximum number of characters on a single line.
max-line-length=100
max-line-length=120
# Maximum number of lines in a module.
max-module-lines=1000
+12 -4
View File
@@ -51,10 +51,11 @@ endif()
project(FreeCAD)
set(PACKAGE_VERSION_MAJOR "1")
set(PACKAGE_VERSION_MINOR "1")
set(PACKAGE_VERSION_MINOR "2")
set(PACKAGE_VERSION_PATCH "0") # number of patch release (e.g. "4" for the 0.18.4 release)
set(PACKAGE_VERSION_SUFFIX "rc1") # either "dev" for development snapshot or "" (empty string)
set(PACKAGE_VERSION_SUFFIX "dev") # 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)
string(TIMESTAMP PACKAGE_COPYRIGHT_YEAR "%Y")
set(PACKAGE_VERSION "${PACKAGE_VERSION_MAJOR}.${PACKAGE_VERSION_MINOR}.${PACKAGE_VERSION_PATCH}")
set(PACKAGE_STRING "${PROJECT_NAME} ${PACKAGE_VERSION}")
@@ -94,8 +95,11 @@ if(NOT FREECAD_LIBPACK_USE OR FREECAD_LIBPACK_CHECKFILE_CLBUNDLER OR FREECAD_LIB
endif(BUILD_GUI)
SetupSalomeSMESH()
if (BUILD_FEM_NETGEN)
find_package(NETGEN)
endif(BUILD_FEM_NETGEN)
set(NETGEN_DEFINITIONS -DNO_PARALLEL_THREADS -DOCCGEOMETRY)
if (NOT FREECAD_USE_EXTERNAL_SMESH)
find_package(NETGEN REQUIRED)
endif()
endif()
# not needed at the moment
#find_package(OpenCV REQUIRED)
SetupSwig()
@@ -115,6 +119,10 @@ if(NOT FREECAD_LIBPACK_USE OR FREECAD_LIBPACK_CHECKFILE_CLBUNDLER OR FREECAD_LIB
# SetupCoin3D can overwrite find_package(Boost) output so keep this after.
SetupBoost()
if(BUILD_BIM)
SetupLark()
endif()
endif()
if(BUILD_VR)
+3 -1
View File
@@ -62,7 +62,9 @@ The FreeCAD Contribution Process is expressed here with the following specific g
1. the PR description MUST contain proper attribution as the first line, for example: "This is work of XYZ cherry-picked from <link>";
2. all commits MUST have proper authorship, i.e. be authored by the original author and committed by the author of the PR;
3. if changes to cherry-picked commits are necessary they SHOULD be done as follow-up commits. If it is not possible to do so, then the modified commits MUST contain a `Co-Authored-By` trailer in their commit message.
14. A “Valid PR” is one which satisfies the above requirements.
14. Contributions must meet existing quality standards. Raw AI output is not accepted under any circumstances. AI may be used only as an assistive tool; in all cases, the resulting content must be reviewed, validated, and justifiable by the contributor. The contributor should be able to explain design and code decisions, answer reviewers questions, and ensure that AI use does not waste reviewers time during review. That being said, the use of AI is not recommended under any circumstances or in any manner.
15. The contributor provides reasonable assurance that the contribution does not infringe third-party copyrights or license terms.
16. A “Valid PR” is one which satisfies the above requirements.
## 6. Process
+2 -8
View File
@@ -56,14 +56,8 @@ Other options are described on the [wiki Download page](https://wiki.freecad.org
Compiling
---------
FreeCAD requires several dependencies to correctly compile for development and
production builds. The following pages contain updated build instructions for
their respective platforms:
- [Linux](https://wiki.freecad.org/Compile_on_Linux)
- [Windows](https://wiki.freecad.org/Compile_on_Windows)
- [macOS](https://wiki.freecad.org/Compile_on_MacOS)
- [MinGW](https://wiki.freecad.org/Compile_on_MinGW)
See the [Developers Handbook Getting Started](https://freecad.github.io/DevelopersHandbook/gettingstarted/)
for build instructions.
Reporting Issues
+53
View File
@@ -0,0 +1,53 @@
# - Find the lark library
# This module finds if lark is installed, and sets the following variables
# indicating where it is.
#
# LARK_FOUND - was lark found
# LARK_VERSION - the version of lark found as a string
# LARK_VERSION_MAJOR - the major version number of lark
# LARK_VERSION_MINOR - the minor version number of lark
# LARK_VERSION_PATCH - the patch version number of lark
include(FindPackageHandleStandardArgs)
if(Python3_EXECUTABLE)
message(STATUS "FindLark: Using Python3_EXECUTABLE = ${Python3_EXECUTABLE}")
# try to import lark into Python interpreter
execute_process(
COMMAND "${Python3_EXECUTABLE}" "-c"
"import lark; print(lark.__version__)"
RESULT_VARIABLE _LARK_SEARCH_SUCCESS
OUTPUT_VARIABLE LARK_VERSION
ERROR_VARIABLE _LARK_ERROR_VALUE
OUTPUT_STRIP_TRAILING_WHITESPACE
)
message(DEBUG "FindLark: Result = ${_LARK_SEARCH_SUCCESS}")
message(DEBUG "FindLark: Version = ${LARK_VERSION}")
message(DEBUG "FindLark: Error = ${_LARK_ERROR_VALUE}")
if(_LARK_SEARCH_SUCCESS MATCHES 0)
# extract version components
string(REGEX REPLACE "\\." ";" _LARK_VERSION_LIST ${LARK_VERSION})
list(LENGTH _LARK_VERSION_LIST _LARK_VERSION_LIST_LEN)
if(_LARK_VERSION_LIST_LEN GREATER_EQUAL 1)
list(GET _LARK_VERSION_LIST 0 LARK_VERSION_MAJOR)
endif()
if(_LARK_VERSION_LIST_LEN GREATER_EQUAL 2)
list(GET _LARK_VERSION_LIST 1 LARK_VERSION_MINOR)
endif()
if(_LARK_VERSION_LIST_LEN GREATER_EQUAL 3)
list(GET _LARK_VERSION_LIST 2 LARK_VERSION_PATCH)
endif()
else()
message(STATUS "The BIM workbench requires the lark python package / module to be installed")
endif()
else()
message(STATUS "FindLark: Python3_EXECUTABLE not set")
endif()
find_package_handle_standard_args(LARK
REQUIRED_VARS LARK_VERSION
VERSION_VAR LARK_VERSION
)
+6 -5
View File
@@ -13,19 +13,15 @@
# See also: http://git.salome-platform.org/gitweb/?p=NETGENPLUGIN_SRC.git;a=summary
find_package(Netgen CONFIG)
find_package(Netgen CONFIG QUIET)
IF (Netgen_FOUND)
set(NGLIB_INCLUDE_DIR ${NETGEN_INCLUDE_DIRS})
set(NGLIB_LIBRARIES nglib)
set(NETGEN_DEFINITIONS -DNO_PARALLEL_THREADS -DOCCGEOMETRY)
# for external smesh only the following two variables are needed:
set(NETGEN_FOUND True)
set(NETGEN_INCLUDE_DIRS ${NETGEN_INCLUDE_DIRS})
ELSE ()
SET(NETGEN_DEFINITIONS -DNO_PARALLEL_THREADS -DOCCGEOMETRY)
IF (WIN32)
FIND_PATH(NGLIB_INCLUDE_DIR NAMES nglib.h PATHS ${NETGEN_INCLUDEDIR})
SET(NETGEN_LIBS nglib mesh occ interface)
@@ -147,3 +143,8 @@ IF (Netgen_FOUND)
MESSAGE(STATUS "Found NETGEN version ${NETGEN_VERSION_MAJOR}.${NETGEN_VERSION_MINOR}, calculated: ${NETGEN_VERSION_C}")
LIST(APPEND NETGEN_DEFINITIONS -DNETGEN_VERSION=${NETGEN_VERSION_C})
ENDIF ()
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(NETGEN
REQUIRED_VARS NGLIB_INCLUDE_DIR NGLIB_LIBRARIES NETGEN_INCLUDE_DIRS
VERSION_VAR NETGEN_VERSION)
+41 -9
View File
@@ -1,7 +1,11 @@
# The Qt for Python project officially recommends using pip to install PySide, so we expect to find PySide in the
# site-packages directory. The library will be called "PySide6.abi3.*", and there will be an "include" directory inside
# the site-packages/PySide6. Over time some distros may provide custom versions, so we also support using a more normal
# cMake find_package() call
# The Qt for Python project officially recommends using pip to install PySide,
# so we expect to find PySide in the site-packages directory.
# The library will be called "PySide6.abi3.*", and there will
# be an "include" directory inside the site-packages/PySide6.
# Over time some distros may provide custom versions, so we also support
# using a more normal cMake find_package() call
include(FindPackageHandleStandardArgs)
find_package(PySide6 CONFIG QUIET)
@@ -9,12 +13,40 @@ if(NOT PySide6_FOUND)
find_pip_package(PySide6)
endif()
if(NOT PySide6_INCLUDE_DIRS AND TARGET PySide6::pyside6)
get_property(PySide6_INCLUDE_DIRS TARGET PySide6::pyside6 PROPERTY INTERFACE_INCLUDE_DIRECTORIES)
endif()
if(PySide6_FOUND)
# verify PySide6 version matches Qt6 version (major.minor)
if(PySide6_VERSION AND Qt6_VERSION)
string(REGEX MATCH "^([0-9]+)\\.([0-9]+)" _qt6_major_minor "${Qt6_VERSION}")
string(REGEX MATCH "^([0-9]+)\\.([0-9]+)" _pyside6_major_minor "${PySide6_VERSION}")
# Also provide the old-style variables so we don't have to update everything yet
if (PySide6_FOUND)
message(STATUS "Qt version: ${Qt6_VERSION}")
message(STATUS "PySide version: ${PySide6_VERSION}")
if(NOT _qt6_major_minor STREQUAL _pyside6_major_minor)
message(FATAL_ERROR
" --------------------------------------------------------
Qt/PySide version mismatch!
cmake found Qt: ${Qt6_VERSION}
cmake found PySide: ${PySide6_VERSION}
major.minor versions of Qt and PySide must match to avoid errors.
Ensure CMAKE_PREFIX_PATH points to matching Qt and PySide6 installations.
--------------------------------------------------------"
)
endif()
message(STATUS "PySide/Qt version check passed (${_pyside6_major_minor})")
endif()
if(NOT PySide6_INCLUDE_DIRS AND TARGET PySide6::pyside6)
get_property(PySide6_INCLUDE_DIRS TARGET PySide6::pyside6 PROPERTY INTERFACE_INCLUDE_DIRECTORIES)
endif()
find_package_handle_standard_args(PySide6
REQUIRED_VARS PySide6_INCLUDE_DIRS
VERSION_VAR PySide6_VERSION
)
# Also provide the old-style variables so we don't have to update everything yet
set(PYSIDE_INCLUDE_DIR ${PySide6_INCLUDE_DIRS})
set(PYSIDE_LIBRARY ${PySide6_LIBRARIES})
set(PYSIDE_FOUND TRUE)
+6 -6
View File
@@ -3,11 +3,11 @@
# PYSIDE_RCC_EXECUTABLE - Location of PYSIDE6RCC executable
# PYSIDE_TOOLS_FOUND - PYSIDE6 utilities found.
if (TARGET Qt6::uic)
if(TARGET Qt6::uic)
get_target_property(PYSIDE6_UIC_EXECUTABLE Qt6::uic LOCATION)
set(UICOPTIONS "--generator=python")
endif()
if (TARGET Qt6::rcc)
if(TARGET Qt6::rcc)
get_target_property(PYSIDE6_RCC_EXECUTABLE Qt6::rcc LOCATION)
set(RCCOPTIONS "--generator=python" "--compress-algo=zlib" "--compress=1")
endif()
@@ -18,15 +18,15 @@ set(PySideTools_VERSION 6)
if(PYSIDE_RCC_EXECUTABLE AND PYSIDE_UIC_EXECUTABLE)
set(PYSIDE_TOOLS_FOUND TRUE)
if (NOT PYSIDE6Tools_FIND_QUIETLY)
if(NOT PYSIDE6Tools_FIND_QUIETLY)
message(STATUS "Found PYSIDE6 tools: ${PYSIDE_UIC_EXECUTABLE}, ${PYSIDE_RCC_EXECUTABLE}")
endif ()
endif()
else()
if(PYSIDE6Tools_FIND_REQUIRED)
message(FATAL_ERROR "PYSIDE6 tools could not be found, but are required.")
else()
if (NOT PYSIDE6Tools_FIND_QUIETLY)
if(NOT PYSIDE6Tools_FIND_QUIETLY)
message(STATUS "PYSIDE6 tools: not found.")
endif ()
endif()
endif()
endif()
+2 -2
View File
@@ -10,14 +10,14 @@ if(NOT Shiboken6_FOUND)
endif()
if(NOT Shiboken6_INCLUDE_DIR)
find_pip_package(Shiboken6)
if (Shiboken6_FOUND)
if(Shiboken6_FOUND)
set(SHIBOKEN_LIBRARY ${Shiboken6_LIBRARIES})
set(SHIBOKEN_MAJOR_VERSION 6)
set(SHIBOKEN_FOUND ON)
endif()
# The include directory we actually want is part of shiboken6-generator
find_pip_package(shiboken6_generator)
if (shiboken6_generator_FOUND)
if(shiboken6_generator_FOUND)
set(SHIBOKEN_INCLUDE_DIR ${shiboken6_generator_INCLUDE_DIRS})
endif()
endif()
@@ -221,6 +221,9 @@ macro(PrintFinalReport)
conditional(fmt fmt_FOUND "Sources downloaded to ${fmt_SOURCE_DIR}" "${fmt_VERSION}")
conditional(yaml-cpp yaml-cpp_FOUND "not found" "${yaml-cpp_VERSION}")
conditional(Vtk VTK_FOUND "not found" ${VTK_VERSION})
if(BUILD_BIM)
conditional(Lark LARK_FOUND "not found" "${LARK_VERSION}")
endif()
section_end()
+16
View File
@@ -7,6 +7,22 @@ macro(SetupFreetype)
message("===============================================================\n"
"FreeType2 not found. Part module will lack of makeWireString().\n"
"===============================================================\n")
else()
# find_package(harfbuzz CONFIG) fails on windows
# lets do it the complicated way instead.
find_path(HARFBUZZ_INCLUDE_DIR hb.h PATH_SUFFIXES harfbuzz)
find_library(HARFBUZZ_LIBRARY NAMES harfbuzz)
if(HARFBUZZ_INCLUDE_DIR AND HARFBUZZ_LIBRARY)
if(NOT TARGET harfbuzz::harfbuzz)
add_library(harfbuzz::harfbuzz UNKNOWN IMPORTED)
set_target_properties(harfbuzz::harfbuzz PROPERTIES
IMPORTED_LOCATION "${HARFBUZZ_LIBRARY}"
INTERFACE_INCLUDE_DIRECTORIES "${HARFBUZZ_INCLUDE_DIR}"
)
endif()
else()
message(FATAL_ERROR "HarfBuzz not found")
endif()
endif(NOT FREETYPE_FOUND)
endif(FREECAD_USE_FREETYPE)
+7
View File
@@ -0,0 +1,7 @@
macro(SetupLark)
# ------------------------------ Lark ------------------------------
find_package(LARK MODULE REQUIRED)
message(STATUS "Found Lark: version ${LARK_VERSION}")
endmacro()
+23 -10
View File
@@ -103,20 +103,33 @@ macro(SetupSalomeSMESH)
set(HDF5_VARIANT "hdf5-serial")
else()
message(STATUS "We guess that libmed was built using hdf5-openmpi version")
set(HDF5_VARIANT "hdf5-openmpi")
set(HDF5_VARIANT "hdf5-openmpi;hdf5_openmpi")
set(HDF5_PREFER_PARALLEL TRUE) # if pkg-config fails, find_package(HDF5) needs this
endif()
pkg_search_module(HDF5 ${HDF5_VARIANT})
if(NOT HDF5_FOUND)
pkg_search_module(PCHDF5 ${HDF5_VARIANT})
if(NOT PCHDF5_FOUND)
find_package(HDF5 REQUIRED)
else()
add_compile_options(${HDF5_CFLAGS})
link_directories(${HDF5_LIBRARY_DIRS})
link_libraries(${HDF5_LIBRARIES})
endif()
check_include_file_cxx(hdf5.h HDF5_FOUND)
if(NOT HDF5_FOUND)
message( FATAL_ERROR "hdf5.h was not found.")
add_compile_options(${PCHDF5_CFLAGS})
link_directories(${PCHDF5_LIBRARY_DIRS})
link_libraries(${PCHDF5_LIBRARIES})
# workaround to define include dir from PCHDF5_CFLAGS (pkg-config PCHDF5_INCLUDEDIR is only filled since hdf5 1.14.6)
set(hdf5_include_path "")
foreach(flag IN LISTS PCHDF5_CFLAGS)
if(flag MATCHES "^-I")
string(REGEX REPLACE "^-I[ ]*" "" flag "${flag}")
list(APPEND hdf5_include_path "${flag}")
endif()
endforeach()
set(_save_INC CMAKE_REQUIRED_INCLUDES)
set(CMAKE_REQUIRED_INCLUDES ${hdf5_include_path})
check_include_file_cxx(hdf5.h HDF5_HEAD_FOUND)
set(CMAKE_REQUIRED_INCLUDES ${_save_INC})
if(NOT HDF5_HEAD_FOUND)
message( FATAL_ERROR "hdf5.h was not found (tested pkg-config ${HDF5_VARIANT}, suggested header location was '${hdf5_include_path}').")
endif()
endif()
# Med Fichier can require MPI
@@ -7,7 +7,7 @@ macro(SetupShibokenAndPyside)
if(DEFINED MACPORTS_PREFIX)
find_package(Shiboken REQUIRED HINTS "${PYTHON_LIBRARY_DIR}/cmake")
find_package(PySide REQUIRED HINTS "${PYTHON_LIBRARY_DIR}/cmake")
endif(DEFINED MACPORTS_PREFIX)
endif()
if(FREECAD_QT_MAJOR_VERSION EQUAL 5)
set(SHIBOKEN_MAJOR_VERSION 2)
@@ -21,16 +21,16 @@ macro(SetupShibokenAndPyside)
# Shiboken2Config.cmake may explicitly set CMAKE_BUILD_TYPE to Release which causes
# CMake to fail to create Makefiles for a debug build.
# So as a workaround we save and restore the value after checking for Shiboken2.
set (SAVE_BUILD_TYPE ${CMAKE_BUILD_TYPE})
set(SAVE_BUILD_TYPE ${CMAKE_BUILD_TYPE})
find_package(Shiboken${SHIBOKEN_MAJOR_VERSION} QUIET)
set (CMAKE_BUILD_TYPE ${SAVE_BUILD_TYPE})
if (Shiboken${SHIBOKEN_MAJOR_VERSION}_FOUND)
set(CMAKE_BUILD_TYPE ${SAVE_BUILD_TYPE})
if(Shiboken${SHIBOKEN_MAJOR_VERSION}_FOUND)
# Shiboken config file was found but it may use the wrong Python version
# Try to get the matching config suffix and repeat finding the package
set(SHIBOKEN_PATTERN .cpython-${Python3_VERSION_MAJOR}${Python3_VERSION_MINOR})
file(GLOB SHIBOKEN_CONFIG "${Shiboken${SHIBOKEN_MAJOR_VERSION}_DIR}/Shiboken${SHIBOKEN_MAJOR_VERSION}Config${SHIBOKEN_PATTERN}*.cmake")
if (SHIBOKEN_CONFIG)
if(SHIBOKEN_CONFIG)
get_filename_component(SHIBOKEN_CONFIG_SUFFIX ${SHIBOKEN_CONFIG} NAME)
string(SUBSTRING ${SHIBOKEN_CONFIG_SUFFIX} 15 -1 SHIBOKEN_CONFIG_SUFFIX)
string(REPLACE ".cmake" "" PYTHON_CONFIG_SUFFIX ${SHIBOKEN_CONFIG_SUFFIX})
@@ -47,11 +47,11 @@ macro(SetupShibokenAndPyside)
# to dance to be compatible with the old (<5.12) and the new versions (>=5.12)
if(NOT SHIBOKEN_INCLUDE_DIR AND TARGET Shiboken${SHIBOKEN_MAJOR_VERSION}::libshiboken)
get_property(SHIBOKEN_INCLUDE_DIR TARGET Shiboken${SHIBOKEN_MAJOR_VERSION}::libshiboken PROPERTY INTERFACE_INCLUDE_DIRECTORIES)
endif(NOT SHIBOKEN_INCLUDE_DIR AND TARGET Shiboken${SHIBOKEN_MAJOR_VERSION}::libshiboken)
endif()
if(NOT SHIBOKEN_INCLUDE_DIR)
find_pip_package(Shiboken${SHIBOKEN_MAJOR_VERSION})
if (Shiboken${SHIBOKEN_MAJOR_VERSION}_FOUND)
if(Shiboken${SHIBOKEN_MAJOR_VERSION}_FOUND)
set(SHIBOKEN_INCLUDE_DIR ${Shiboken${SHIBOKEN_MAJOR_VERSION}_INCLUDE_DIRS})
set(SHIBOKEN_LIBRARY ${Shiboken${SHIBOKEN_MAJOR_VERSION}_LIBRARIES})
endif()
@@ -63,11 +63,11 @@ macro(SetupShibokenAndPyside)
# Our internal FindPySide6.cmake file already provides these for PySide6
if(NOT PYSIDE_INCLUDE_DIR AND TARGET PySide${PYSIDE_MAJOR_VERSION}::pyside${PYSIDE_MAJOR_VERSION})
get_property(PYSIDE_INCLUDE_DIR TARGET PySide${PYSIDE_MAJOR_VERSION}::pyside${PYSIDE_MAJOR_VERSION} PROPERTY INTERFACE_INCLUDE_DIRECTORIES)
endif(NOT PYSIDE_INCLUDE_DIR AND TARGET PySide${PYSIDE_MAJOR_VERSION}::pyside${PYSIDE_MAJOR_VERSION})
endif()
if(NOT PYSIDE_INCLUDE_DIR)
find_pip_package(PySide${PYSIDE_MAJOR_VERSION})
if (PySide${PYSIDE_MAJOR_VERSION}_FOUND)
if(PySide${PYSIDE_MAJOR_VERSION}_FOUND)
set(PYSIDE_INCLUDE_DIR ${PySide${PYSIDE_MAJOR_VERSION}_INCLUDE_DIRS})
set(PYSIDE_LIBRARY ${PySide${PYSIDE_MAJOR_VERSION}_LIBRARIES})
endif()
@@ -175,22 +175,22 @@ macro(SetupShibokenAndPyside)
message(STATUS "PySide ${PySide_VERSION} Python module found at ${PRINT_OUTPUT}.\n")
endif()
endmacro(SetupShibokenAndPyside)
endmacro()
MACRO(PYSIDE_WRAP_RC outfiles)
if (NOT PYSIDE_RCC_EXECUTABLE)
macro(PYSIDE_WRAP_RC outfiles)
if(NOT PYSIDE_RCC_EXECUTABLE)
message(FATAL_ERROR "Qt rcc is required for generating ${ARGN}")
endif()
FOREACH(it ${ARGN})
GET_FILENAME_COMPONENT(outfile ${it} NAME_WE)
GET_FILENAME_COMPONENT(infile ${it} ABSOLUTE)
SET(outfile "${CMAKE_CURRENT_BINARY_DIR}/${outfile}_rc.py")
foreach(it ${ARGN})
get_filename_component(outfile ${it} NAME_WE)
get_filename_component(infile ${it} ABSOLUTE)
set(outfile "${CMAKE_CURRENT_BINARY_DIR}/${outfile}_rc.py")
#ADD_CUSTOM_TARGET(${it} ALL
# DEPENDS ${outfile}
#)
if(WIN32 OR APPLE)
ADD_CUSTOM_COMMAND(OUTPUT ${outfile}
add_custom_command(OUTPUT ${outfile}
COMMAND ${PYSIDE_RCC_EXECUTABLE} ${RCCOPTIONS} ${infile} -o ${outfile}
MAIN_DEPENDENCY ${infile}
)
@@ -198,7 +198,7 @@ MACRO(PYSIDE_WRAP_RC outfiles)
# Especially on Open Build Service we don't want changing date like
# pyside-rcc generates in comments at beginning, which is why
# we follow the tool command with in-place sed.
ADD_CUSTOM_COMMAND(OUTPUT "${outfile}"
add_custom_command(OUTPUT "${outfile}"
COMMAND "${PYSIDE_RCC_EXECUTABLE}" ${RCCOPTIONS} "${infile}" ${PY_ATTRIBUTE} -o "${outfile}"
# The line below sometimes catches unwanted lines too - but there is no date in the file
# anymore with Qt5 RCC, so commenting it out for now...
@@ -207,5 +207,5 @@ MACRO(PYSIDE_WRAP_RC outfiles)
)
endif()
list(APPEND ${outfiles} ${outfile})
ENDFOREACH(it)
ENDMACRO (PYSIDE_WRAP_RC)
endforeach()
endmacro()
+156 -8
View File
@@ -1,12 +1,160 @@
macro(SetupSwig)
# -------------------------------- Swig ----------------------------------
find_package(SWIG)
#-------------------------------- Swig ----------------------------------
if (NOT SWIG_FOUND)
message("=====================================================\n"
"SWIG not found, will not build SWIG binding for pivy.\n"
"=====================================================\n")
endif(NOT SWIG_FOUND)
# force cmake to re-search for SWIG when CMAKE_PREFIX_PATH changes
unset(SWIG_EXECUTABLE CACHE)
unset(SWIG_DIR CACHE)
unset(SWIG_VERSION CACHE)
unset(SWIG_FOUND CACHE)
endmacro(SetupSwig)
if(BUILD_SKETCHER)
# SWIG is required for sketcher WB (use QUIET to provide custom error message)
find_package(SWIG QUIET)
if(NOT SWIG_FOUND)
message(FATAL_ERROR
"-----------------------------------------------------\n"
"SWIG not found, swig & pivy required for sketcher WB.\n"
"-----------------------------------------------------\n")
# do not continue with check if swig not found
return()
endif()
# check swig/pivy runtime compatibility
message(STATUS "checking SWIG/Pivy runtime compatibility...")
# get SWIG's runtime version using -external-runtime flag
execute_process(
COMMAND ${SWIG_EXECUTABLE} -python -external-runtime "${CMAKE_BINARY_DIR}/swig_runtime_check.h"
RESULT_VARIABLE SWIG_EXTERNAL_RUNTIME_RESULT
ERROR_VARIABLE SWIG_EXTERNAL_RUNTIME_ERROR
ERROR_QUIET
)
# NOTE: only print the below output if using `cmake --log-level=DEBUG`
message(DEBUG "SWIG external-runtime result: ${SWIG_EXTERNAL_RUNTIME_RESULT}")
message(DEBUG "SWIG external-runtime error: ${SWIG_EXTERNAL_RUNTIME_ERROR}")
message(STATUS "Looking for: ${CMAKE_BINARY_DIR}/swig_runtime_check.h")
if(EXISTS "${CMAKE_BINARY_DIR}/swig_runtime_check.h")
message(STATUS "File exists: YES")
else()
message(STATUS "File exists: NO")
endif()
if(EXISTS "${CMAKE_BINARY_DIR}/swig_runtime_check.h")
file(STRINGS "${CMAKE_BINARY_DIR}/swig_runtime_check.h"
SWIG_RUNTIME_VERSION_LINE
REGEX "^#define SWIG_RUNTIME_VERSION")
message(STATUS "SWIG_RUNTIME_VERSION_LINE: ${SWIG_RUNTIME_VERSION_LINE}")
if(SWIG_RUNTIME_VERSION_LINE)
# extract the version number (it's in quotes: "5")
string(REGEX MATCH "\"([0-9]+)\"" _ "${SWIG_RUNTIME_VERSION_LINE}")
set(SWIG_RUNTIME_VERSION "${CMAKE_MATCH_1}")
message(STATUS "Extracted SWIG_RUNTIME_VERSION: ${SWIG_RUNTIME_VERSION}")
endif()
file(REMOVE "${CMAKE_BINARY_DIR}/swig_runtime_check.h")
else()
message(STATUS "swig_runtime_check.h not found!")
endif()
# extract pivy's SWIG runtime version from the compiled module
# NOTE: python code can not be indented
set(PYTHON_CHECK_PIVY_RUNTIME [=[
import sys
import os
import re
try:
import pivy
pivy_dir = os.path.dirname(pivy.__file__)
print(f'DEBUG:pivy_dir={pivy_dir}', file=sys.stderr)
print(f'DEBUG:files={os.listdir(pivy_dir)}', file=sys.stderr)
pivy_path = None
# Look for _coin module with any extension (.so on Unix, .pyd on Windows)
for f in os.listdir(pivy_dir):
print(f'DEBUG:checking={f}', file=sys.stderr)
if f.startswith('_coin') and (f.endswith('.so') or f.endswith('.pyd')):
pivy_path = os.path.join(pivy_dir, f)
break
print(f'DEBUG:pivy_path={pivy_path}', file=sys.stderr)
if pivy_path and os.path.exists(pivy_path):
with open(pivy_path, 'rb') as f:
content = f.read().decode('latin-1', errors='ignore')
print(f'DEBUG:content_len={len(content)}', file=sys.stderr)
# Use regex to find swig_runtime_data followed by a number
match = re.search(r'swig_runtime_data(\d+)', content)
print(f'DEBUG:match={match}', file=sys.stderr)
if match:
print(match.group(1))
except ImportError as e:
print(f'DEBUG:import_error={e}', file=sys.stderr)
print('ERROR_IMPORT')
except Exception as e:
print(f'DEBUG:exception={e}', file=sys.stderr)
]=])
execute_process(
COMMAND ${Python3_EXECUTABLE} -c "${PYTHON_CHECK_PIVY_RUNTIME}"
OUTPUT_VARIABLE PIVY_RUNTIME_VERSION
OUTPUT_STRIP_TRAILING_WHITESPACE
ERROR_VARIABLE PIVY_DEBUG_OUTPUT
TIMEOUT 10
)
message(DEBUG "Pivy debug output: ${PIVY_DEBUG_OUTPUT}")
# Handle errors and compare versions
if(PIVY_RUNTIME_VERSION STREQUAL "ERROR_IMPORT")
message(WARNING
"Could not import pivy to check SWIG compatibility.\n"
"Proceeding without SWIG version check."
)
elseif(SWIG_RUNTIME_VERSION AND PIVY_RUNTIME_VERSION)
if(NOT SWIG_RUNTIME_VERSION STREQUAL PIVY_RUNTIME_VERSION)
message(FATAL_ERROR
" --------------------------------------------------------
SWIG / PIVY RUNTIME VERSION MISMATCH DETECTED!
SWIG runtime API version: ${SWIG_RUNTIME_VERSION}
Pivy runtime API version: ${PIVY_RUNTIME_VERSION}
These must match for compatibility.
This will cause runtime errors: 'No SWIG wrapped library loaded'
swig v4.4.x is not compatible with pivy built with swig <=4.3.x
FIX: Install a SWIG version that uses runtime ${PIVY_RUNTIME_VERSION}
or rebuild Pivy with your current SWIG ${SWIG_VERSION}.
--------------------------------------------------------"
)
else()
message(STATUS "SWIG/Pivy runtime compatibility: PASSED")
message(STATUS "swig runtime API version: ${SWIG_RUNTIME_VERSION}")
message(STATUS "pivy runtime API version: ${PIVY_RUNTIME_VERSION}")
message(STATUS "swig binary version building freecad: ${SWIG_VERSION}")
endif()
else()
if(NOT SWIG_RUNTIME_VERSION)
message(WARNING "Could not determine SWIG runtime version")
endif()
if(NOT PIVY_RUNTIME_VERSION)
message(WARNING "Could not determine Pivy runtime version")
endif()
message(WARNING "Proceeding without SWIG/Pivy compatibility check.")
endif()
endif()
endmacro()
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+3 -2
View File
@@ -5,7 +5,7 @@
\pard\nowidctlpar\hyphpar0\sa140\sl276\slmult1\par
\pard\nowidctlpar\hyphpar0\sl276\slmult1\b\fs28 Third-party libraries licenses\b0\fs24\par
\pard\nowidctlpar\hyphpar0\sa140\sl276\slmult1\par
\pard\nowidctlpar\hyphpar0\sl276\slmult1\fs18 The different libraries used in FreeCAD and their respective licenses are described on the\line\fs24{\field{\*\fldinst{HYPERLINK "https://www.freecadweb.org/wiki/Third_Party_Libraries" }}{\fldrslt{\cf2\ul\fs18 Third Party Libraries wiki page}}}\cf0\ulnone\f0\fs18 .\fs24\par
\pard\nowidctlpar\hyphpar0\sl276\slmult1\fs18 The different libraries used in FreeCAD and their respective licenses are described on the\line\fs24{\field{\*\fldinst{HYPERLINK "https://www.freecad.org/wiki/Third_Party_Libraries" }}{\fldrslt{\cf2\ul\fs18 Third Party Libraries wiki page}}}\cf0\ulnone\f0\fs18 .\fs24\par
\par
\pard\noline\nowidctlpar\hyphpar0\sa283\fs12\par
\pard\nowidctlpar\hyphpar0\sl276\slmult1\b\fs18 GNU LIBRARY GENERAL PUBLIC LICENSE\b0\fs24\par
@@ -81,4 +81,5 @@
\pard\nowidctlpar\hyphpar0\sb240\sa180\sl276\slmult1\b\fs24 3D Mouse Support\b0\par
\pard\nowidctlpar\hyphpar0\sb180\sa180\sl276\slmult1\fs18 Development tools and related technology provided under license from 3Dconnexion.(c) 1992 - 2012 3Dconnexion. All rights reserved\fs12\par
}
+1 -5
View File
@@ -34,11 +34,7 @@ These typically need to be modified for each FreeCAD release
#--------------------------------
# get version info from freecadcmd
!system "${FILES_FREECAD}\bin\freecadcmd.exe --safe-mode -c $\"import datetime; print(f'!define COPYRIGHT_YEAR {datetime.date.today().year}')$\">${__FILEDIR__}\version.nsh" = 0
!system "${FILES_FREECAD}\bin\freecadcmd.exe --safe-mode -c $\"print(f'!define APP_VERSION_MAJOR \$\"{App.Version()[0]}\$\"')$\">>${__FILEDIR__}\version.nsh" = 0
!system "${FILES_FREECAD}\bin\freecadcmd.exe --safe-mode -c $\"print(f'!define APP_VERSION_MINOR \$\"{App.Version()[1]}\$\"')$\">>${__FILEDIR__}\version.nsh" = 0
!system "${FILES_FREECAD}\bin\freecadcmd.exe --safe-mode -c $\"print(f'!define APP_VERSION_PATCH \$\"{App.Version()[2]}\$\"')$\">>${__FILEDIR__}\version.nsh" = 0
!system "${FILES_FREECAD}\bin\freecadcmd.exe --safe-mode -c $\"print(f'!define APP_VERSION_REVISION \$\"{App.Version()[3].split()[0]}\$\"')$\">>${__FILEDIR__}\version.nsh" = 0
!system "${FILES_FREECAD}\bin\freecadcmd.exe --safe-mode $\"${__FILEDIR__}\write_version_nsh.py$\"" = 0
!include "${__FILEDIR__}\version.nsh"
!delfile "${__FILEDIR__}\version.nsh"
+5 -4
View File
@@ -7,7 +7,7 @@ Language: English
${LangFileString} TEXT_INSTALL_CURRENTUSER "(Installed for Current User)"
${LangFileString} TEXT_WELCOME "This wizard will guide you through the installation of $(^NameDA), $\r$\n\
${LangFileString} TEXT_WELCOME "This wizard will guide you through the installation of $(^NameDA). $\r$\n\
$\r$\n\
$_CLICK"
@@ -64,7 +64,8 @@ ${LangFileString} SecUnPreferencesDescription 'Deletes FreeCAD$\'s configuration
$AppSuff\$\r$\n\
${APP_DIR_USERDATA}$\")$\r$\n\
for you or for all users (if you are admin).'
${LangFileString} DialogUnPreferences 'You chose to delete the FreeCADs user configuration.$\r$\n\
This will also delete all installed FreeCAD addons.$\r$\n\
Do you agree with this?'
${LangFileString} DialogUnPreferences 'You chose to delete the FreeCAD user configuration.$\r$\n\
This will also delete all installed FreeCAD addons, and will affect the$\r$\n\
preferences for all versions of FreeCAD.$\r$\n\
Are you sure you want to proceed?'
${LangFileString} SecUnProgramFilesDescription "Uninstall FreeCAD and all of its components."
@@ -0,0 +1,20 @@
# SPDX-License-Identifier: LGPL-2.1-or-later
#
# this script is meant to be called by nsis installer scripts, it gets version information
# from freecad and writes version.nsh file in the directory the script is located at
import FreeCAD
import datetime
import os
filepath=os.path.join(os.path.dirname(os.path.abspath(__file__)),"version.nsh")
v=FreeCAD.Version()
content=f'''\
!define COPYRIGHT_YEAR {datetime.date.today().year}
!define APP_VERSION_MAJOR "{v[0]}"
!define APP_VERSION_MINOR "{v[1]}"
!define APP_VERSION_PATCH "{v[2]}"
!define APP_VERSION_REVISION "{v[3].split()[0]}"
'''
with open(filepath, "w", encoding="utf-8") as file:
file.writelines(content)
+4 -4
View File
@@ -16,7 +16,7 @@
Name: freecad
Epoch: 1
Version: 1.1.0~rc1
Version: 1.1.0~dev
Release: 1%{?dist}
Summary: A general purpose 3D CAD modeler
@@ -29,7 +29,7 @@ Source0: freecad-sources.tar.gz
# Maintainers: keep this list of plugins up to date
# List plugins in %%{_libdir}/%%{name}/lib, less '.so' and 'Gui.so', here
%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 libSMDS libSMESH libSMESHDS libStdMeshers libarea-native
%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 libSMDS libSMESH libSMESHDS libStdMeshers libarea-native tsp_solver
%global exported_libs libOndselSolver
@@ -44,14 +44,14 @@ Source0: freecad-sources.tar.gz
# Utilities
BuildRequires: cmake gcc-c++ gettext doxygen swig graphviz gcc-gfortran desktop-file-utils tbb-devel ninja-build strace
%if %{with tests}
BuildRequires: xorg-x11-server-Xvfb python3-typing-extensions
BuildRequires: xorg-x11-server-Xvfb python3-typing-extensions
%if %{without bundled_gtest}
BuildRequires: gtest-devel gmock-devel
%endif
%endif
# Development Libraries
BuildRequires:boost-devel Coin4-devel eigen3-devel freeimage-devel fmt-devel libglvnd-devel libicu-devel libspnav-devel libXmu-devel med-devel mesa-libEGL-devel mesa-libGLU-devel netgen-mesher-devel netgen-mesher-devel-private opencascade-devel openmpi-devel python3 python3-devel python3-matplotlib python3-pivy python3-pybind11 python3-pyside6-devel python3-shiboken6-devel pyside6-tools qt6-qttools-static qt6-qtsvg-devel vtk-devel xerces-c-devel yaml-cpp-devel
BuildRequires:boost-devel Coin4-devel eigen3-devel freeimage-devel fmt-devel libglvnd-devel libicu-devel libspnav-devel libXmu-devel med-devel mesa-libEGL-devel mesa-libGLU-devel netgen-mesher-devel netgen-mesher-devel-private opencascade-devel openmpi-devel python3 python3-devel python3-lark python3-matplotlib python3-pivy python3-pybind11 python3-pyside6-devel python3-shiboken6-devel pyside6-tools qt6-qttools-static qt6-qtsvg-devel vtk-devel xerces-c-devel yaml-cpp-devel
#pcl-devel
%if %{without bundled_smesh}
BuildRequires: smesh-devel
-2
View File
@@ -57,8 +57,6 @@
test: xvfb-run /usr/bin/FreeCAD -t TestPartGui
/TestPartDesignGui :
test: xvfb-run /usr/bin/FreeCAD -t TestPartDesignGui
/TestSketcherGui :
test: xvfb-run /usr/bin/FreeCAD -t TestSketcherGui
/TestTechDrawGui :
test: xvfb-run /usr/bin/FreeCAD -t TestTechDrawGui
/Workbench :
+30 -1
View File
@@ -8,7 +8,9 @@ if [[ ${HOST} =~ .*darwin.* ]]; then
# add hacks for osx here!
echo "adding hacks for osx"
# install space-mouse
# Install 3DConnexion (SpaceMouse) driver
# Note: For local builds, comment out the following lines if you encounter issues
# installing the driver or don't need SpaceMouse support
/usr/bin/curl -o /tmp/3dFW.dmg -L 'https://download.3dconnexion.com/drivers/mac/10-7-0_B564CC6A-6E81-42b0-82EC-418EA823B81A/3DxWareMac_v10-7-0_r3411.dmg'
hdiutil attach -readonly /tmp/3dFW.dmg
sudo installer -package /Volumes/3Dconnexion\ Software/Install\ 3Dconnexion\ software.pkg -target /
@@ -17,6 +19,31 @@ if [[ ${HOST} =~ .*darwin.* ]]; then
CMAKE_PLATFORM_FLAGS+=(-D3DCONNEXIONCLIENT_FRAMEWORK:FILEPATH="/Library/Frameworks/3DconnexionClient.framework")
CXXFLAGS="${CXXFLAGS} -D_LIBCPP_DISABLE_AVAILABILITY"
# Use MACOS_DEPLOYMENT_TARGET from environment, default to 11.0 for backwards compat.
# Note that CI sets this per target: 10.13 (Intel), 11.0 (ARM legacy), 15.0 (ARM modern)
# - macOS 10.13+ Intel: legacy QuickLook generator (.qlgenerator)
# - macOS 11-14 ARM: legacy QuickLook generator (.qlgenerator)
# - macOS 15+ ARM: modern QuickLook App Extensions (.appex)
DEPLOY_TARGET="${MACOS_DEPLOYMENT_TARGET:-11.0}"
CMAKE_PLATFORM_FLAGS+=(-DCMAKE_OSX_DEPLOYMENT_TARGET=${DEPLOY_TARGET})
# Patch Qt6's FindWrapOpenGL.cmake to not link AGL on macOS 10.15+
# AGL framework was removed in macOS 10.15 Catalina and Qt6's cmake
# unconditionally tries to link it on Apple platforms, causing build failures.
# Only apply this patch for deployment targets >= 10.15.
# See: https://github.com/conda-forge/qt-main-feedstock/issues/240
DEPLOY_MAJOR=$(echo "$DEPLOY_TARGET" | cut -d. -f1)
DEPLOY_MINOR=$(echo "$DEPLOY_TARGET" | cut -d. -f2)
if [[ "$DEPLOY_MAJOR" -gt 10 ]] || [[ "$DEPLOY_MAJOR" -eq 10 && "$DEPLOY_MINOR" -ge 15 ]]; then
FIND_WRAP_OPENGL="$PREFIX/lib/cmake/Qt6/FindWrapOpenGL.cmake"
if [[ -f "$FIND_WRAP_OPENGL" ]]; then
echo "Patching Qt6 FindWrapOpenGL.cmake to remove AGL linkage (not available on macOS 10.15+)..."
sed -i.bak \
-e '/find_library(WrapOpenGL_AGL/,/target_link_libraries.*__opengl_agl_fw_path/d' \
"$FIND_WRAP_OPENGL"
fi
fi
fi
unset CMAKE_GENERATOR
@@ -24,6 +51,7 @@ unset CMAKE_GENERATOR_PLATFORM
cmake \
${CMAKE_ARGS} \
${CMAKE_PLATFORM_FLAGS[@]} \
--preset ${CMAKE_PRESET} \
-D CMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \
-D CMAKE_INCLUDE_PATH:FILEPATH="$PREFIX/include" \
@@ -37,6 +65,7 @@ cmake \
-D OCC_LIBRARY_DIR:FILEPATH="$PREFIX/lib" \
-D Python_EXECUTABLE:FILEPATH="$PYTHON" \
-D Python3_EXECUTABLE:FILEPATH="$PYTHON" \
-D BUILD_DYNAMIC_LINK_PYTHON:BOOL=OFF \
-B build \
-S .
+1 -1
View File
@@ -31,4 +31,4 @@ else
MAIN="$HERE/usr/bin/freecad"
fi
"${MAIN}" "$@"
exec "${MAIN}" "$@"
+33 -6
View File
@@ -48,7 +48,11 @@ mkdir -p FreeCAD.app/Contents/MacOS
cp build/FreeCAD FreeCAD.app/Contents/MacOS/FreeCAD
python_version=$(${conda_env}/bin/python -c 'import platform; print("py" + platform.python_version_tuple()[0] + platform.python_version_tuple()[1])')
version_name="FreeCAD_${BUILD_TAG}-macOS-$(uname -m)-${python_version}"
# Add deployment target suffix to artifact name (e.g., "-macOS11" or "-macOS15")
deploy_target="${MACOS_DEPLOYMENT_TARGET:-11.0}"
deploy_suffix="-macOS${deploy_target%%.*}"
version_name="FreeCAD_${BUILD_TAG}-macOS-$(uname -m)${deploy_suffix}-${python_version}"
application_menu_name="FreeCAD_${BUILD_TAG}"
echo -e "\################"
@@ -62,14 +66,37 @@ sed -i "s/APPLICATION_MENU_NAME/${application_menu_name}/" ${conda_env}/../Info.
pixi list -e default > FreeCAD.app/Contents/packages.txt
sed -i '1s/.*/\nLIST OF PACKAGES:/' FreeCAD.app/Contents/packages.txt
# copy the plugin into its final location
cp -a ${conda_env}/Library ${conda_env}/..
rm -rf ${conda_env}/Library
# move plugins into their final location (Library only exists for macOS < 15.0 builds)
if [ -d "${conda_env}/Library" ]; then
mv ${conda_env}/Library ${conda_env}/..
fi
if [[ "${SIGN_RELEASE}" == "true" ]]; then
# move App Extensions (PlugIns) to the correct location for macOS registration
if [ -d "${conda_env}/PlugIns" ]; then
mv ${conda_env}/PlugIns ${conda_env}/..
fi
if [[ "${MACOS_SIGN_RELEASE}" == "true" ]]; then
# create the signed dmg
../../scripts/macos_sign_and_notarize.zsh -p "FreeCAD" -k ${SIGNING_KEY_ID} -o "${version_name}.dmg"
../../scripts/macos_sign_and_notarize.zsh -p "FreeCAD" -k ${MACOS_SIGNING_KEY_ID} -o "${version_name}.dmg"
else
# Ad-hoc sign for local builds (required for QuickLook extensions to register)
if [ -d "FreeCAD.app/Contents/PlugIns" ]; then
echo "Ad-hoc signing App Extensions with entitlements..."
codesign --force --sign - \
--entitlements ../../../src/MacAppBundle/QuickLook/modern/ThumbnailExtension.entitlements \
FreeCAD.app/Contents/PlugIns/FreeCADThumbnailExtension.appex
codesign --force --sign - \
--entitlements ../../../src/MacAppBundle/QuickLook/modern/PreviewExtension.entitlements \
FreeCAD.app/Contents/PlugIns/FreeCADPreviewExtension.appex
fi
echo "Ad-hoc signing app bundle..."
codesign --force --sign - FreeCAD.app/Contents/packages.txt
if [ -f "FreeCAD.app/Contents/Library/QuickLook/QuicklookFCStd.qlgenerator/Contents/MacOS/QuicklookFCStd" ]; then
codesign --force --sign - FreeCAD.app/Contents/Library/QuickLook/QuicklookFCStd.qlgenerator/Contents/MacOS/QuicklookFCStd
fi
codesign --force --sign - FreeCAD.app
# create the dmg
dmgbuild -s dmg_settings.py "FreeCAD" "${version_name}.dmg"
fi
@@ -1,7 +1,12 @@
cmake_minimum_required(VERSION 3.20)
project(freecad-launcher LANGUAGES CXX)
set(CMAKE_OSX_DEPLOYMENT_TARGET "10.13" CACHE STRING "Minimum OS X deployment version" FORCE)
# Use MACOS_DEPLOYMENT_TARGET from environment if set, otherwise keep original default
if(DEFINED ENV{MACOS_DEPLOYMENT_TARGET})
set(CMAKE_OSX_DEPLOYMENT_TARGET "$ENV{MACOS_DEPLOYMENT_TARGET}" CACHE STRING "Minimum OS X deployment version" FORCE)
else()
set(CMAKE_OSX_DEPLOYMENT_TARGET "10.13" CACHE STRING "Minimum OS X deployment version" FORCE)
endif()
set(CMAKE_CXX_STANDARD 17)
add_executable(FreeCAD FreeCAD.cpp)
File diff suppressed because it is too large Load Diff
+3 -1
View File
@@ -8,7 +8,7 @@ preview = ["pixi-build"]
[package]
name = "freecad"
version = "1.1.0rc1"
version = "1.1.0dev"
homepage = "https://freecad.org"
repository = "https://github.com/FreeCAD/FreeCAD"
description = "FreeCAD"
@@ -28,10 +28,12 @@ create_bundle = 'bash -c "cd $(bash scripts/get_os.bash) && bash create_bundle.s
## Linux (x86-64)
[feature.package.target.linux-64.dependencies]
coreutils = "*"
xcb-util-cursor = "==0.1.5" ## hack to address https://github.com/FreeCAD/FreeCAD/issues/26726
## Linux (aarch64)
[feature.package.target.linux-aarch64.dependencies]
coreutils = "*"
xcb-util-cursor = "==0.1.5" ## hack to address https://github.com/FreeCAD/FreeCAD/issues/26726
## macOS (Intel)
[feature.package.target.osx-64.dependencies]
+8 -3
View File
@@ -1,5 +1,5 @@
context:
version: "1.1.0rc1"
version: "1.1.0dev"
package:
name: freecad
@@ -22,7 +22,7 @@ requirements:
- noqt5
- python>=3.11,<3.12
- qt6-main>=6.8,<6.9
- swig
- swig>=4.3,<4.4
- if: linux and x86_64
then:
@@ -52,6 +52,7 @@ requirements:
- pixman-cos7-x86_64
- sed
- sysroot_linux-64
- xcb-util-cursor==0.1.5 ## hack to address https://github.com/FreeCAD/FreeCAD/issues/26726
- xorg-x11-server-common-cos7-x86_64
- xorg-x11-server-xvfb-cos7-x86_64
- xorg-xproto
@@ -84,6 +85,7 @@ requirements:
- pixman-cos7-aarch64
- sed
- sysroot_linux-aarch64
- xcb-util-cursor==0.1.5 ## hack to address https://github.com/FreeCAD/FreeCAD/issues/26726
- xorg-x11-server-common-cos7-aarch64
- xorg-x11-server-xvfb-cos7-aarch64
- xorg-xproto
@@ -98,10 +100,11 @@ requirements:
host:
- coin3d
- eigen
- eigen >=3.3,<5
- fmt
- freetype
- hdf5
- lark
- libboost-devel
- matplotlib-base
- noqt5
@@ -175,3 +178,5 @@ requirements:
- if: linux
then:
- libspnav
- qt6-wayland
- xcb-util-cursor==0.1.5 ## hack to address https://github.com/FreeCAD/FreeCAD/issues/26726
@@ -44,6 +44,9 @@ find ${copy_dir} -name \*arm\*.exe -delete # arm binaries that fail to extract u
mv ${copy_dir}/bin/Lib/ssl.py .ssl-orig.py
cp ssl-patch.py ${copy_dir}/bin/Lib/ssl.py
# Turn off the echo before we start actually calling "echo"
set +x
echo '[Paths]' >> ${copy_dir}/bin/qt6.conf
echo 'Prefix = ../lib/qt6' >> ${copy_dir}/bin/qt6.conf
@@ -67,6 +70,64 @@ sed -i '1s/.*/\nLIST OF PACKAGES:/' ${copy_dir}/packages.txt
mv ${copy_dir} ${version_name}
# Sign the EXE, DLL, and PYD files (if we can access the Azure account for signing):
set -euo pipefail
SIGN_DIR="${version_name}"
if [[ "${WINDOWS_SIGN_RELEASE:-0}" == "1" ]]; then
TENANT="$(az account show --query tenantId -o tsv)"
export AZURE_IDENTITY_DISABLE_WORKLOAD_IDENTITY=true
export AZURE_IDENTITY_DISABLE_MANAGED_IDENTITY=true
unset AZURE_IDENTITY_LOGGING_ENABLED
if az account get-access-token \
--tenant "$TENANT" \
--scope "https://codesigning.azure.net/.default" \
>/dev/null 2>&1;
then
echo "Azure Artifact Signing access confirmed. Beginning signing process..."
shopt -s nullglob
FILES=(
"$SIGN_DIR"/*.exe
"$SIGN_DIR"/bin/*.exe
"$SIGN_DIR"/bin/*.dll
"$SIGN_DIR"/bin/*.pyd
)
count=0
total=${#FILES[@]}
echo "Signing $total files"
for f in "${FILES[@]}"; do
((count+=1))
echo "Signing [$count/$total]: $f"
sign code artifact-signing \
--artifact-signing-endpoint "${WINDOWS_AZURE_ENDPOINT}" \
--artifact-signing-certificate-profile "${WINDOWS_AZURE_CERTIFICATE_PROFILE}" \
--artifact-signing-account "${WINDOWS_AZURE_SIGNING_ACCOUNT}" \
--timestamp-url https://timestamp.acs.microsoft.com \
--timestamp-digest sha256 \
"$f" >/dev/null 2>&1
# Output was redirected to /dev/null because Azure authentication is absurdly noisy, with constant misleading
# "failure" messages about Managed Identity authentication failing. We don't use, or want to use, that
# authentication, and the fact that it fails is not a problem as long as the real authentication succeeds.
done
# Manually check the important one!
signtool verify -pa "$SIGN_DIR/bin/FreeCAD.exe"
echo "Signing completed."
else
echo "Signing requested, but no Azure Artifact Signing available -- skipping signing."
fi
else
echo "Not logged into Azure -- skipping signing."
fi
7z a -t7z -mx9 -mmt=${NUMBER_OF_PROCESSORS} ${version_name}.7z ${version_name} -bb
# create hash
sha256sum ${version_name}.7z > ${version_name}.7z-SHA256.txt
@@ -88,6 +149,28 @@ if [ "${MAKE_INSTALLER}" == "true" ]; then
-X'SetCompressor /FINAL lzma' \
../../WindowsInstaller/FreeCAD-installer.nsi
mv ../../WindowsInstaller/${version_name}-installer.exe .
echo "Created installer ${version_name}-installer.exe"
# See if we can sign the installer exe as well:
if [[ "${WINDOWS_SIGN_RELEASE:-0}" == "1" ]] && \
az account get-access-token \
--tenant "$TENANT" \
--scope "https://codesigning.azure.net/.default" \
>/dev/null 2>&1;
then
echo "Signing the installer..."
sign code artifact-signing \
--artifact-signing-endpoint "${WINDOWS_AZURE_ENDPOINT}" \
--artifact-signing-certificate-profile "${WINDOWS_AZURE_CERTIFICATE_PROFILE}" \
--artifact-signing-account "${WINDOWS_AZURE_SIGNING_ACCOUNT}" \
--timestamp-url https://timestamp.acs.microsoft.com \
--timestamp-digest sha256 \
${version_name}-installer.exe >/dev/null 2>&1 \
|| { echo "Signing the installer failed!"; exit 1; }
else
echo "No code signing available, leaving the installer unsigned"
fi
sha256sum ${version_name}-installer.exe > ${version_name}-installer.exe-SHA256.txt
else
echo "Error: Failed to get NsProcess plugin. Aborting installer creation..."
@@ -96,8 +179,10 @@ if [ "${MAKE_INSTALLER}" == "true" ]; then
fi
if [ "${UPLOAD_RELEASE}" == "true" ]; then
echo "Uploading the release..."
gh release upload --clobber ${BUILD_TAG} "${version_name}.7z" "${version_name}.7z-SHA256.txt"
if [ "${MAKE_INSTALLER}" == "true" ]; then
gh release upload --clobber ${BUILD_TAG} "${version_name}-installer.exe" "${version_name}-installer.exe-SHA256.txt"
fi
echo "Done uploading"
fi
+42 -2
View File
@@ -96,6 +96,13 @@ function run_codesign {
/usr/bin/codesign --options runtime -f -s ${SIGNING_KEY_ID} --timestamp --entitlements entitlements.plist "$1"
}
function run_codesign_extension {
local target="$1"
local entitlements_file="$2"
echo "Signing extension $target with entitlements $entitlements_file"
/usr/bin/codesign --options runtime -f -s ${SIGNING_KEY_ID} --timestamp --entitlements "$entitlements_file" "$target"
}
IFS=$'\n'
dylibs=($(/usr/bin/find "${CONTAINING_FOLDER}/${APP_NAME}" -name "*.dylib"))
shared_objects=($(/usr/bin/find "${CONTAINING_FOLDER}/${APP_NAME}" -name "*.so"))
@@ -108,12 +115,45 @@ signed_files=("${dylibs[@]}" "${shared_objects[@]}" "${bundles[@]}" "${executabl
# This list of files is generated from:
# file `find . -type f -perm +111 -print` | grep "Mach-O 64-bit executable" | sed 's/:.*//g'
for exe in ${signed_files}; do
run_codesign "${exe}"
# Skip .appex executables as they will be signed separately with their bundles
if [[ "$exe" != */Contents/PlugIns/*.appex/* ]]; then
run_codesign "${exe}"
fi
done
# Two additional files that must be signed that aren't caught by the above searches:
run_codesign "${CONTAINING_FOLDER}/${APP_NAME}/Contents/packages.txt"
run_codesign "${CONTAINING_FOLDER}/${APP_NAME}/Contents/Library/QuickLook/QuicklookFCStd.qlgenerator/Contents/MacOS/QuicklookFCStd"
# Sign legacy QuickLook generator if present (not built for macOS 15.0+)
if [ -f "${CONTAINING_FOLDER}/${APP_NAME}/Contents/Library/QuickLook/QuicklookFCStd.qlgenerator/Contents/MacOS/QuicklookFCStd" ]; then
run_codesign "${CONTAINING_FOLDER}/${APP_NAME}/Contents/Library/QuickLook/QuicklookFCStd.qlgenerator/Contents/MacOS/QuicklookFCStd"
fi
# Sign new Swift QuickLook extensions (macOS 15.0+) with their specific entitlements
# These must be signed before the app itself to avoid overriding the extension signatures
if [ -d "${CONTAINING_FOLDER}/${APP_NAME}/Contents/PlugIns" ]; then
# Find the entitlements files relative to script location
# Script is in package/scripts/, entitlements are in src/MacAppBundle/QuickLook/modern/
SCRIPT_DIR="${0:A:h}" # zsh equivalent of dirname with full path resolution
PREVIEW_ENTITLEMENTS="${SCRIPT_DIR}/../../src/MacAppBundle/QuickLook/modern/PreviewExtension.entitlements"
THUMBNAIL_ENTITLEMENTS="${SCRIPT_DIR}/../../src/MacAppBundle/QuickLook/modern/ThumbnailExtension.entitlements"
# Sign individual executables within .appex bundles first
if [ -f "${CONTAINING_FOLDER}/${APP_NAME}/Contents/PlugIns/FreeCADThumbnailExtension.appex/Contents/MacOS/FreeCADThumbnailExtension" ]; then
run_codesign "${CONTAINING_FOLDER}/${APP_NAME}/Contents/PlugIns/FreeCADThumbnailExtension.appex/Contents/MacOS/FreeCADThumbnailExtension"
fi
if [ -f "${CONTAINING_FOLDER}/${APP_NAME}/Contents/PlugIns/FreeCADPreviewExtension.appex/Contents/MacOS/FreeCADPreviewExtension" ]; then
run_codesign "${CONTAINING_FOLDER}/${APP_NAME}/Contents/PlugIns/FreeCADPreviewExtension.appex/Contents/MacOS/FreeCADPreviewExtension"
fi
# Then sign the .appex bundles themselves with extension-specific entitlements
if [ -d "${CONTAINING_FOLDER}/${APP_NAME}/Contents/PlugIns/FreeCADThumbnailExtension.appex" ] && [ -f "$THUMBNAIL_ENTITLEMENTS" ]; then
run_codesign_extension "${CONTAINING_FOLDER}/${APP_NAME}/Contents/PlugIns/FreeCADThumbnailExtension.appex" "$THUMBNAIL_ENTITLEMENTS"
fi
if [ -d "${CONTAINING_FOLDER}/${APP_NAME}/Contents/PlugIns/FreeCADPreviewExtension.appex" ] && [ -f "$PREVIEW_ENTITLEMENTS" ]; then
run_codesign_extension "${CONTAINING_FOLDER}/${APP_NAME}/Contents/PlugIns/FreeCADPreviewExtension.appex" "$PREVIEW_ENTITLEMENTS"
fi
fi
# Finally, sign the app itself (must be done last)
run_codesign "${CONTAINING_FOLDER}/${APP_NAME}"
+20 -22
View File
@@ -1,15 +1,14 @@
#!/bin/bash
set -euo pipefail
# Add the KDE Neon repository for up-to-date and matching Qt6 and PySide packages
# Ubuntu 24.04 does not have PySide6 packages available
sudo wget -qO- http://archive.neon.kde.org/public.key | sudo gpg --dearmor -o /usr/share/keyrings/neon-keyring.gpg
echo "deb [signed-by=/usr/share/keyrings/neon-keyring.gpg] http://archive.neon.kde.org/user noble main" | sudo tee /etc/apt/sources.list.d/neon-qt.list
# Update package lists quietly
sudo apt-get update -qq
if apt-cache show libvtk9-dev >/dev/null 2>&1; then
vtk_dev="libvtk9-dev"
else
vtk_dev="libvtk7-dev"
fi
packages=(
ccache
cmake
@@ -35,13 +34,11 @@ packages=(
libopencv-dev
libproj-dev
libpcl-dev
libpyside2-dev
libqt5opengl5-dev
libqt5svg5-dev
libqt5x11extras5-dev
libshiboken2-dev
libpyside6-dev
libqt6opengl6-dev
libqt6svg6-dev
libspnav-dev
${vtk_dev}
libvtk9-dev
libx11-dev
libxerces-c-dev
libyaml-cpp-dev
@@ -50,25 +47,26 @@ packages=(
netgen-headers
ninja-build
occt-draw
pyqt5-dev-tools
pyside2-tools
pyside6-tools
python3-dev
python3-defusedxml
python3-git
python3-lark
python3-markdown
python3-matplotlib
python3-packaging
python3-pivy
python3-ply
python3-pybind11
python3-pyside2.qtcore
python3-pyside2.qtgui
python3-pyside2.qtnetwork
python3-pyside2.qtsvg
python3-pyside2.qtwidgets
qtbase5-dev
qttools5-dev
shiboken2
python3-pyside6.qtcore
python3-pyside6.qtgui
python3-pyside6.qtnetwork
python3-pyside6.qtsvg
python3-pyside6.qtwidgets
qt6-base-dev
qt6-l10n-tools
qt6-tools-dev
qt6-tools-dev-tools
swig
xvfb
)
+7422 -6786
View File
File diff suppressed because it is too large Load Diff
+6 -1
View File
@@ -19,11 +19,12 @@ debugpy = "*"
defusedxml = "*"
docutils = "*"
doxygen = "*"
eigen = "*"
eigen = ">=3.3,<5"
fmt = "*"
freetype = "*"
git = "*"
graphviz = "*"
harfbuzz = "*"
hdf5 = "*"
ifcopenshell = "*"
lark = "*"
@@ -92,8 +93,10 @@ mesa-libgl-cos7-x86_64 = "*"
mesa-libgl-devel-cos7-x86_64 = "*"
mold = "*"
pixman-cos7-x86_64 = "*"
qt6-wayland = ">=6.8,<6.9"
sed = "*"
sysroot_linux-64 = "*"
xcb-util-cursor = "==0.1.5" ## hack to address https://github.com/FreeCAD/FreeCAD/issues/26726
xorg-x11-server-common-cos7-x86_64 = "*"
xorg-x11-server-xvfb-cos7-x86_64 = "*"
xorg-xproto = "*"
@@ -130,8 +133,10 @@ mesa-libgl-devel-cos7-aarch64 = "*"
mesa-libglapi-cos7-aarch64 = "*"
mold = "*"
pixman-cos7-aarch64 = "*"
qt6-wayland = ">=6.8,<6.9"
sed = "*"
sysroot_linux-aarch64 = "*"
xcb-util-cursor = "==0.1.5" ## hack to address https://github.com/FreeCAD/FreeCAD/issues/26726
xorg-x11-server-common-cos7-aarch64 = "*"
xorg-x11-server-xvfb-cos7-aarch64 = "*"
xorg-xproto = "*"
+2
View File
@@ -1,3 +1,5 @@
add_subdirectory(FastSignals)
# Build SalomeMesh for all Platforms since heavily patched
if (BUILD_SMESH)
add_subdirectory(salomesmesh)
+102
View File
@@ -0,0 +1,102 @@
---
Language: Cpp
# BasedOnStyle: WebKit
AccessModifierOffset: -4
AlignAfterOpenBracket: DontAlign
AlignConsecutiveAssignments: false
AlignConsecutiveDeclarations: false
AlignEscapedNewlinesLeft: false
AlignOperands: false
AlignTrailingComments: false
AllowAllParametersOfDeclarationOnNextLine: true
AllowShortBlocksOnASingleLine: false
AllowShortCaseLabelsOnASingleLine: false
AllowShortFunctionsOnASingleLine: All
AllowShortIfStatementsOnASingleLine: false
AllowShortLoopsOnASingleLine: false
AlwaysBreakAfterDefinitionReturnType: None
AlwaysBreakAfterReturnType: None
AlwaysBreakBeforeMultilineStrings: false
AlwaysBreakTemplateDeclarations: false
BinPackArguments: true
BinPackParameters: true
BraceWrapping:
AfterClass: true
AfterControlStatement: true
AfterEnum: true
AfterFunction: true
AfterNamespace: true
AfterObjCDeclaration: false
AfterStruct: true
AfterUnion: true
BeforeCatch: true
BeforeElse: true
IndentBraces: false
BreakBeforeBinaryOperators: All
BreakBeforeBraces: Custom
BreakBeforeTernaryOperators: true
BreakConstructorInitializersBeforeComma: true
BreakAfterJavaFieldAnnotations: false
BreakStringLiterals: true
ColumnLimit: 0
CommentPragmas: '^ IWYU pragma:'
BreakBeforeInheritanceComma: true
FixNamespaceComments: true
ConstructorInitializerAllOnOneLineOrOnePerLine: false
ConstructorInitializerIndentWidth: 4
ContinuationIndentWidth: 4
Cpp11BracedListStyle: false
DerivePointerAlignment: false
DisableFormat: false
ExperimentalAutoDetectBinPacking: false
# FixNamespaceComments: false
ForEachMacros: [ foreach, Q_FOREACH, BOOST_FOREACH ]
IncludeCategories:
- Regex: '^"(stdafx|PrecompiledHeader)'
Priority: -2
- Regex: '^"(llvm|llvm-c|clang|clang-c)/'
Priority: 4
- Regex: '^(<|"(gtest|isl|json)/)'
Priority: 3
- Regex: '.*'
Priority: 2
IncludeIsMainRegex: '$'
IndentCaseLabels: false
IndentWidth: 4
IndentWrappedFunctionNames: false
JavaScriptQuotes: Leave
JavaScriptWrapImports: true
KeepEmptyLinesAtTheStartOfBlocks: true
MacroBlockBegin: 'BEGIN_MESSAGE_MAP_CUSTOM$|BEGIN_MSG_MAP$|BEGIN_SINK_MAP$|BEGIN_MESSAGE_MAP$|BOOST_FIXTURE_TEST_SUITE$|BOOST_AUTO_TEST_SUITE$|BEGIN_DLGRESIZE_MAP$|BEGIN_MSG_MAP_EX$|BEGIN_DDX_MAP$|BEGIN_COM_MAP$|BEGIN_CONNECTION_POINT_MAP$|WTL_BEGIN_LAYOUT_MAP$|WTL_BEGIN_LAYOUT_CONTAINER$'
MacroBlockEnd: 'END_MESSAGE_MAP_CUSTOM$|END_MSG_MAP$|END_SINK_MAP$|END_MESSAGE_MAP$|BOOST_AUTO_TEST_SUITE_END$|END_DLGRESIZE_MAP$|END_DDX_MAP$|END_COM_MAP$|END_CONNECTION_POINT_MAP$|WTL_END_LAYOUT_MAP$|WTL_END_LAYOUT_CONTAINER$'
MaxEmptyLinesToKeep: 1
NamespaceIndentation: None
ObjCBlockIndentWidth: 4
ObjCSpaceAfterProperty: true
ObjCSpaceBeforeProtocolList: true
PenaltyBreakBeforeFirstCallParameter: 19
PenaltyBreakComment: 300
PenaltyBreakFirstLessLess: 120
PenaltyBreakString: 1000
PenaltyExcessCharacter: 100
PenaltyReturnTypeOnItsOwnLine: 10000000
PointerAlignment: Left
ReflowComments: true
SortIncludes: true
SortUsingDeclarations: true
SpaceAfterCStyleCast: false
SpaceAfterTemplateKeyword: true
SpaceBeforeAssignmentOperators: true
SpaceBeforeParens: ControlStatements
SpaceInEmptyParentheses: false
SpacesBeforeTrailingComments: 1
SpacesInAngles: false
SpacesInContainerLiterals: true
SpacesInCStyleCastParentheses: false
SpacesInParentheses: false
SpacesInSquareBrackets: false
Standard: Cpp11
TabWidth: 4
UseTab: Always
IndentPPDirectives: AfterHash
...
+367
View File
@@ -0,0 +1,367 @@
# Prerequisites
*.d
# Compiled Object files
*.slo
*.lo
*.o
*.obj
# Precompiled Headers
*.gch
*.pch
# Compiled Dynamic libraries
*.so
*.dylib
*.dll
# Fortran module files
*.mod
*.smod
# Compiled Static libraries
*.lai
*.la
*.a
*.lib
# Executables
*.exe
*.out
*.app
## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.
##
## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore
# User-specific files
*.suo
*.user
*.userosscache
*.sln.docstates
# User-specific files (MonoDevelop/Xamarin Studio)
*.userprefs
# Build results
[Dd]ebug/
[Dd]ebugPublic/
[Rr]elease/
[Rr]eleases/
x64/
x86/
bld/
[Bb]in/
[Oo]bj/
[Ll]og/
# Visual Studio 2015/2017 cache/options directory
.vs/
# Uncomment if you have tasks that create the project's static files in wwwroot
#wwwroot/
# Visual Studio 2017 auto generated files
Generated\ Files/
# MSTest test Results
[Tt]est[Rr]esult*/
[Bb]uild[Ll]og.*
# NUNIT
*.VisualState.xml
TestResult.xml
# Build Results of an ATL Project
[Dd]ebugPS/
[Rr]eleasePS/
dlldata.c
# Benchmark Results
BenchmarkDotNet.Artifacts/
# .NET Core
project.lock.json
project.fragment.lock.json
artifacts/
# StyleCop
StyleCopReport.xml
# Files built by Visual Studio
*_i.c
*_p.c
*_i.h
*.ilk
*.meta
*.obj
*.iobj
*.pch
*.pdb
*.ipdb
*.pgc
*.pgd
*.rsp
*.sbr
*.tlb
*.tli
*.tlh
*.tmp
*.tmp_proj
*.log
*.vspscc
*.vssscc
.builds
*.pidb
*.svclog
*.scc
# Chutzpah Test files
_Chutzpah*
# Visual C++ cache files
ipch/
*.aps
*.ncb
*.opendb
*.opensdf
*.sdf
*.cachefile
*.VC.db
*.VC.VC.opendb
# Visual Studio profiler
*.psess
*.vsp
*.vspx
*.sap
# Visual Studio Trace Files
*.e2e
# TFS 2012 Local Workspace
$tf/
# Guidance Automation Toolkit
*.gpState
# ReSharper is a .NET coding add-in
_ReSharper*/
*.[Rr]e[Ss]harper
*.DotSettings.user
# JustCode is a .NET coding add-in
.JustCode
# TeamCity is a build add-in
_TeamCity*
# DotCover is a Code Coverage Tool
*.dotCover
# AxoCover is a Code Coverage Tool
.axoCover/*
!.axoCover/settings.json
# Visual Studio code coverage results
*.coverage
*.coveragexml
# NCrunch
_NCrunch_*
.*crunch*.local.xml
nCrunchTemp_*
# MightyMoose
*.mm.*
AutoTest.Net/
# Web workbench (sass)
.sass-cache/
# Installshield output folder
[Ee]xpress/
# DocProject is a documentation generator add-in
DocProject/buildhelp/
DocProject/Help/*.HxT
DocProject/Help/*.HxC
DocProject/Help/*.hhc
DocProject/Help/*.hhk
DocProject/Help/*.hhp
DocProject/Help/Html2
DocProject/Help/html
# Click-Once directory
publish/
# Publish Web Output
*.[Pp]ublish.xml
*.azurePubxml
# Note: Comment the next line if you want to checkin your web deploy settings,
# but database connection strings (with potential passwords) will be unencrypted
*.pubxml
*.publishproj
# Microsoft Azure Web App publish settings. Comment the next line if you want to
# checkin your Azure Web App publish settings, but sensitive information contained
# in these scripts will be unencrypted
PublishScripts/
# NuGet Packages
*.nupkg
# The packages folder can be ignored because of Package Restore
**/[Pp]ackages/*
# except build/, which is used as an MSBuild target.
!**/[Pp]ackages/build/
# Uncomment if necessary however generally it will be regenerated when needed
#!**/[Pp]ackages/repositories.config
# NuGet v3's project.json files produces more ignorable files
*.nuget.props
*.nuget.targets
# Microsoft Azure Build Output
csx/
*.build.csdef
# Microsoft Azure Emulator
ecf/
rcf/
# Windows Store app package directories and files
AppPackages/
BundleArtifacts/
Package.StoreAssociation.xml
_pkginfo.txt
*.appx
# Visual Studio cache files
# files ending in .cache can be ignored
*.[Cc]ache
# but keep track of directories ending in .cache
!*.[Cc]ache/
# Others
ClientBin/
~$*
*~
*.dbmdl
*.dbproj.schemaview
*.jfm
*.pfx
*.publishsettings
orleans.codegen.cs
# Including strong name files can present a security risk
# (https://github.com/github/gitignore/pull/2483#issue-259490424)
#*.snk
# Since there are multiple workflows, uncomment next line to ignore bower_components
# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
#bower_components/
# RIA/Silverlight projects
Generated_Code/
# Backup & report files from converting an old project file
# to a newer Visual Studio version. Backup files are not needed,
# because we have git ;-)
_UpgradeReport_Files/
Backup*/
UpgradeLog*.XML
UpgradeLog*.htm
ServiceFabricBackup/
*.rptproj.bak
# SQL Server files
*.mdf
*.ldf
*.ndf
# Business Intelligence projects
*.rdl.data
*.bim.layout
*.bim_*.settings
*.rptproj.rsuser
# Microsoft Fakes
FakesAssemblies/
# GhostDoc plugin setting file
*.GhostDoc.xml
# Node.js Tools for Visual Studio
.ntvs_analysis.dat
node_modules/
# Visual Studio 6 build log
*.plg
# Visual Studio 6 workspace options file
*.opt
# Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
*.vbw
# Visual Studio LightSwitch build output
**/*.HTMLClient/GeneratedArtifacts
**/*.DesktopClient/GeneratedArtifacts
**/*.DesktopClient/ModelManifest.xml
**/*.Server/GeneratedArtifacts
**/*.Server/ModelManifest.xml
_Pvt_Extensions
# Paket dependency manager
.paket/paket.exe
paket-files/
# FAKE - F# Make
.fake/
# JetBrains Rider
.idea/
*.sln.iml
# CodeRush
.cr/
# Python Tools for Visual Studio (PTVS)
__pycache__/
*.pyc
# Cake - Uncomment if you are using it
# tools/**
# !tools/packages.config
# Tabs Studio
*.tss
# Telerik's JustMock configuration file
*.jmconfig
# BizTalk build output
*.btp.cs
*.btm.cs
*.odx.cs
*.xsd.cs
# OpenCover UI analysis results
OpenCover/
# Azure Stream Analytics local run output
ASALocalRun/
# MSBuild Binary and Structured Log
*.binlog
# NVidia Nsight GPU debugger configuration file
*.nvuser
# MFractors (Xamarin productivity tool) working folder
.mfractor/
# ------------
# Custom Rules
build/
+12
View File
@@ -0,0 +1,12 @@
cmake_minimum_required(VERSION 3.10 FATAL_ERROR)
project(FastSignals)
include(cmake/functions.cmake)
add_subdirectory(libfastsignals)
if(BUILD_FASTSIGNALS_TESTING)
add_subdirectory(tests/libfastsignals_stress_tests)
add_subdirectory(tests/libfastsignals_unit_tests)
endif()
+21
View File
@@ -0,0 +1,21 @@
MIT License
Copyright (c) 2018 iSpring Solutions Inc.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
+17
View File
@@ -0,0 +1,17 @@
# FastSignals
Yet another C++ signals and slots library
* Works as drop-in replacement for Boost.Signals2 with the same API
* Has better performance and more compact binary code
* Thread-safe in most operations, including concurrent connects/disconnects/emits
* Implemented with compact, pure C++17 code
[![Build Status](https://travis-ci.org/ispringteam/FastSignals.svg?branch=master)](https://travis-ci.org/ispringteam/FastSignals)
[![License: MIT](https://img.shields.io/badge/License-MIT-brightgreen.svg)](https://opensource.org/licenses/MIT)
## Documentation
* [Why FastSignals?](docs/why-fastsignals.md)
* [Simple Examples](docs/simple-examples.md)
* [Migration from Boost.Signals2](docs/migration-from-boost-signals2.md)
+24
View File
@@ -0,0 +1,24 @@
# Function to add a library target.
function(custom_add_library_from_dir TARGET)
# Gather files from the current directory
file(GLOB TARGET_SRC "${CMAKE_CURRENT_SOURCE_DIR}/*.cpp" "${CMAKE_CURRENT_SOURCE_DIR}/*.h")
add_library(${TARGET} ${TARGET_SRC})
endfunction()
# Function to add an executable target.
function(custom_add_executable_from_dir TARGET)
# Gather files from the current directory
file(GLOB TARGET_SRC "${CMAKE_CURRENT_SOURCE_DIR}/*.cpp" "${CMAKE_CURRENT_SOURCE_DIR}/*.h")
add_executable(${TARGET} ${TARGET_SRC})
endfunction()
# Function to add an executable target containing tests for a library.
function(custom_add_test_from_dir TARGET LIBRARY)
custom_add_executable_from_dir(${TARGET})
# Add path to Catch framework header
target_include_directories(${TARGET} PRIVATE "${CMAKE_SOURCE_DIR}/libs/catch")
# Link with the library being tested
target_link_libraries(${TARGET} ${LIBRARY})
# Register the executable with CMake as a test set
add_test(${TARGET} ${TARGET})
endfunction()
+94
View File
@@ -0,0 +1,94 @@
# Function bind_weak
## Usage
* Use `fastsignals::bind_weak` instead of `std::bind` to ensure that nothing happens if method called when binded object already destroyed
* Pass pointer to T class method as first argument, `shared_ptr<T>` or `weak_ptr<T>` as second argument
* Example: `bind_weak(&Document::save(), document, std::placeholders::_1)`, where `document` is a `weak_ptr<Document>` or `shared_ptr<Document>`
## Weak this idiom
The `fastsignals::bind_weak(...)` function implements "weak this" idiom. This idiom helps to avoid dangling pointers and memory access wiolations in asynchronous and/or multithreaded programs.
In the following example, we use weak this idiom to avoid using dangling pointer wehn calling `print()` method of the `Enityt`:
```cpp
struct Entity : std::enable_shared_from_this<Entity>
{
int value = 42;
void print()
{
std::cout << "print called, num = " << value << std::endl;
}
std::function<void()> print_later()
{
// ! weak this idiom here !
auto weak_this = weak_from_this();
return [weak_this] {
if (auto shared_this = weak_this.lock())
{
shared_this->print();
}
};
}
};
int main()
{
auto entity = std::make_shared<Entity>();
auto print = entity->print_later();
// Prints OK.
print();
// Prints nothing - last shared_ptr to the Entity destroyed, so `weak_this.lock()` will return nullptr.
entity = nullptr;
print();
}
```
## Using bind_weak to avoid signal receiver lifetime issues
In the following example, `Entity::print()` method connected to the signal. Signal emmited once before and once after the `Entity` instance destroyed. However, no memory access violation happens: once `Entity` destoryed, no slot will be called because `bind_weak` doesn't call binded method if it cannot lock `std::weak_ptr` to binded object. The second `event()` expression just does nothing.
```cpp
#include <fastsignals/signal.h>
#include <fastsignals/bind_weak.h>
#include <iostream>
using VoidSignal = fastsignals::signal<void()>;
using VoidSlot = VoidSignal::slot_type;
struct Entity : std::enable_shared_from_this<Entity>
{
int value = 42;
VoidSlot get_print_slot()
{
// Here fastsignals::bind_weak() used instead of std::bind.
return fastsignals::bind_weak(&Entity::print, weak_from_this());
}
void print()
{
std::cout << "print called, num = " << value << std::endl;
}
};
int main()
{
VoidSignal event;
auto entity = std::make_shared<Entity>();
event.connect(entity->get_print_slot());
// Here slot called - it prints `slot called, num = 42`
event();
entity = nullptr;
// Here nothing happens - no exception, no slot call.
event();
}
```
@@ -0,0 +1,163 @@
# Migration from Boost.Signals2
This guide helps to migrate large codebase from Boost.Signals2 to `FastSignals` signals/slots library. It helps to solve known migration issues in the right way.
During migrations, you will probably face with following things:
* You code uses `boost::signals2::` namespace and `<boost/signals2.hpp>` header directly
* You code uses third-party headers included implicitly by the `<boost/signals2.hpp>` header
## Reasons migrate from Boost.Signals2 to FastSignals
FastSignals API mostly compatible with Boost.Signals2 - there are differences, and all differences has their reasons explained below.
Comparing to Boost.Signals2, FastSignals has following pros:
* FastSignals is not header-only - so binary code will be more compact
* FastSignals implemented using C++17 with variadic templates, `constexpr if` and other modern metaprogramming techniques - so it compiles faster and, again, binary code will be more compact
* FastSignals probably will faster than Boost.Signals2 for your codebase because with FastSignals you don't pay for things that you don't use, with one exception: you always pay for the multithreading support
## Step 1: Create header with aliases
## Step 2: Rebuild and fix compile errors
### 2.1 Add missing includes
Boost.Signals2 is header-only library. It includes a lot of STL/Boost stuff while FastSignals does not:
```cpp
#include <boost/signals2.hpp>
// Also includes std::map, boost::variant, boost::optional, etc.
// Compiled OK even without `#include <map>`!
std::map CreateMyMap();
```
With FastSignals, you must include headers like `<map>` manually. The following table shows which files should be included explicitly if you see compile erros after migration.
| Class | Header |
|--------------------|:--------------------------------------:|
| std::map | `#include <map>` |
| boost::variant | `#include <boost/variant/variant.hpp>` |
| boost::optional | `#include <boost/optional/optional.hpp>` |
| boost::scoped_ptr | `#include <boost/scoped_ptr.hpp>` |
| boost::noncopyable | `#include <boost/noncopyable.hpp>` |
| boost::bind | `#include <boost/bind.hpp>` |
| boost::function | `#include <boost/function.hpp>` |
If you just want to compile you code, you can add following includes in you `signals.h` header:
```cpp
// WARNING: [libfastsignals] we do not recommend to include following extra headers.
#include <map>
#include <boost/variant/variant.hpp>
#include <boost/optional/optional.hpp>
#include <boost/scoped_ptr.hpp>
#include <boost/noncopyable.hpp>
#include <boost/bind.hpp>
#include <boost/function.hpp>
```
### 2.2 Remove redundant returns for void signals
With Boost.Signals2, following code compiled without any warning:
```cpp
boost::signals2::signal<void()> event;
event.connect([] {
return true;
});
```
With FastSignals, slot cannot return non-void value when for `signal<void(...)>`. You must fix your code: just remove returns from your slots or add lambdas to wrap slot and ignore it result.
### 2.3 Replace track() and track_foreign() with bind_weak_ptr()
Boost.Signals2 [can track connected objects lifetype](https://www.boost.org/doc/libs/1_55_0/doc/html/signals2/tutorial.html#idp204830936) using `track(...)` and `track_foreign(...)` methods. In the following example `Entity` created with `make_shared`, and `Entity::get_print_slot()` creates slot function which tracks weak pointer to Entity:
```cpp
#include <boost/signals2.hpp>
#include <iostream>
#include <memory>
using VoidSignal = boost::signals2::signal<void()>;
using VoidSlot = VoidSignal::slot_type;
struct Entity : std::enable_shared_from_this<Entity>
{
int value = 42;
VoidSlot get_print_slot()
{
// Here track() tracks object itself.
return VoidSlot(std::bind(&Entity::print, this)).track_foreign(shared_from_this());
}
void print()
{
std::cout << "print called, num = " << value << std::endl;
}
};
int main()
{
VoidSignal event;
auto entity = std::make_shared<Entity>();
event.connect(entity->get_print_slot());
// Here slot called - it prints `print called, num = 42`
event();
entity = nullptr;
// This call does nothing.
event();
}
```
FastSignals uses another approach: `bind_weak` function:
```cpp
#include <fastsignals/bind_weak.h>
#include <iostream>
using VoidSignal = fastsignals::signal<void()>;
using VoidSlot = VoidSignal::slot_type;
struct Entity : std::enable_shared_from_this<Entity>
{
int value = 42;
VoidSlot get_print_slot()
{
// Here fastsignals::bind_weak() used instead of std::bind.
return fastsignals::bind_weak(&Entity::print, weak_from_this());
}
void print()
{
std::cout << "print called, num = " << value << std::endl;
}
};
int main()
{
VoidSignal event;
auto entity = std::make_shared<Entity>();
event.connect(entity->get_print_slot());
// Here slot called - it prints `slot called, num = 42`
event();
entity = nullptr;
// Here nothing happens - no exception, no slot call.
event();
}
```
### FastSignals Differences in Result Combiners
## Step 3: Run Tests
Run all automated tests that you have (unit tests, integration tests, system tests, stress tests, benchmarks, UI tests).
Probably you will see no errors. If you see any, please report an issue.
+55
View File
@@ -0,0 +1,55 @@
# Simple Examples
>If you are not familar with Boost.Signals2, please read [Boost.Signals2: Connections](https://theboostcpplibraries.com/boost.signals2-connections)
## Example with signal&lt;&gt; and connection
```cpp
// Creates signal and connects 1 slot, calls 2 times, disconnects, calls again.
// Outputs:
// 13
// 17
#include "libfastsignals/signal.h"
using namespace fastsignals;
int main()
{
signal<void(int)> valueChanged;
connection conn;
conn = valueChanged.connect([](int value) {
cout << value << endl;
});
valueChanged(13);
valueChanged(17);
conn.disconnect();
valueChanged(42);
}
```
## Example with scoped_connection
```cpp
// Creates signal and connects 1 slot, calls 2 times, calls again after scoped_connection destroyed.
// - note: scoped_connection closes connection in destructor
// Outputs:
// 13
// 17
#include "libfastsignals/signal.h"
using namespace fastsignals;
int main()
{
signal<void(int)> valueChanged;
{
scoped_connection conn;
conn = valueChanged.connect([](int value) {
cout << value << endl;
});
valueChanged(13);
valueChanged(17);
}
valueChanged(42);
}
```
+40
View File
@@ -0,0 +1,40 @@
# Why FastSignals?
FastSignals is a C++17 signals/slots implementation which API is compatible with Boost.Signals2.
FastSignals pros:
* Faster than Boost.Signals2
* Has more compact binary code
* Has the same API as Boost.Signals2
FastSignals cons:
* Supports only C++17 compatible compilers: Visual Studio 2017, modern Clang, modern GCC
* Lacks a few rarely used features presented in Boost.Signals2
* No access to connection from slot with `signal::connect_extended` method
* No connected object tracking with `slot::track` method
* Use [bind_weak](bind_weak.md) instead
* No temporary signal blocking with `shared_connection_block` class
* Cannot disconnect equivalent slots since no `disconnect(slot)` function overload
* Any other API difference is a bug - please report it!
See also [Migration from Boost.Signals2](migration-from-boost-signals2.md).
## Benchmark results
Directory `tests/libfastsignals_bench` contains simple benchmark with compares two signal/slot implementations:
* Boost.Signals2
* libfastsignals
Benchmark compairs performance when signal emitted frequently with 0, 1 and 8 active connections. In these cases libfastsignals is 3-6 times faster.
```
*** Results:
measure emit_boost emit_fastsignals
emit_boost/0 1.00 3.00
emit_boost/1 1.00 5.76
emit_boost/8 1.00 3.70
***
```
@@ -0,0 +1,5 @@
file(GLOB LIBFASTSIGNALS_SRC "${CMAKE_CURRENT_SOURCE_DIR}/src/*.cpp" "${CMAKE_CURRENT_SOURCE_DIR}/include/*.h")
add_library(libfastsignals STATIC ${LIBFASTSIGNALS_SRC})
set_target_properties(libfastsignals PROPERTIES POSITION_INDEPENDENT_CODE ON)
target_include_directories(libfastsignals INTERFACE "${CMAKE_CURRENT_SOURCE_DIR}/include")
@@ -0,0 +1,79 @@
#pragma once
#include <functional>
#include <memory>
#include <type_traits>
namespace fastsignals
{
namespace detail
{
template <class ReturnType, class ClassType, bool AddConst, class... Args>
struct weak_binder
{
using ConstMethodType = ReturnType (ClassType::*)(Args... args) const;
using NonConstMethodType = ReturnType (ClassType::*)(Args... args);
using MethodType = std::conditional_t<AddConst, ConstMethodType, NonConstMethodType>;
using WeakPtrType = std::weak_ptr<ClassType>;
weak_binder(MethodType pMethod, WeakPtrType&& pObject)
: m_pMethod(pMethod)
, m_pObject(std::move(pObject))
{
}
ReturnType operator()(Args... args) const
{
if (auto pThis = m_pObject.lock())
{
return (pThis.get()->*m_pMethod)(std::forward<Args>(args)...);
}
return ReturnType();
}
MethodType m_pMethod;
WeakPtrType m_pObject;
};
} // namespace detail
/// Weak this binding of non-const methods.
template <typename ReturnType, typename ClassType, typename... Params, typename... Args>
decltype(auto) bind_weak(ReturnType (ClassType::*memberFn)(Params... args), std::shared_ptr<ClassType> const& pThis, Args... args)
{
using weak_binder_alias = detail::weak_binder<ReturnType, ClassType, false, Params...>;
weak_binder_alias invoker(memberFn, std::weak_ptr<ClassType>(pThis));
return std::bind(invoker, args...);
}
/// Weak this binding of const methods.
template <typename ReturnType, typename ClassType, typename... Params, typename... Args>
decltype(auto) bind_weak(ReturnType (ClassType::*memberFn)(Params... args) const, std::shared_ptr<ClassType> const& pThis, Args... args)
{
using weak_binder_alias = detail::weak_binder<ReturnType, ClassType, true, Params...>;
weak_binder_alias invoker(memberFn, std::weak_ptr<ClassType>(pThis));
return std::bind(invoker, args...);
}
/// Weak this binding of non-const methods.
template <typename ReturnType, typename ClassType, typename... Params, typename... Args>
decltype(auto) bind_weak(ReturnType (ClassType::*memberFn)(Params... args), std::weak_ptr<ClassType> pThis, Args... args)
{
using weak_binder_alias = detail::weak_binder<ReturnType, ClassType, false, Params...>;
weak_binder_alias invoker(memberFn, std::move(pThis));
return std::bind(invoker, args...);
}
/// Weak this binding of const methods.
template <typename ReturnType, typename ClassType, typename... Params, typename... Args>
decltype(auto) bind_weak(ReturnType (ClassType::*memberFn)(Params... args) const, std::weak_ptr<ClassType> pThis, Args... args)
{
using weak_binder_alias = detail::weak_binder<ReturnType, ClassType, true, Params...>;
weak_binder_alias invoker(memberFn, std::move(pThis));
return std::bind(invoker, args...);
}
} // namespace fastsignals
@@ -0,0 +1,40 @@
#pragma once
#include <optional>
namespace fastsignals
{
/**
* This results combiner reduces results collection into last value of this collection.
* In other words, it keeps only result of the last slot call.
*/
template <class T>
class optional_last_value
{
public:
using result_type = std::optional<T>;
template <class TRef>
void operator()(TRef&& value)
{
m_result = std::forward<TRef>(value);
}
result_type get_value() const
{
return m_result;
}
private:
result_type m_result = {};
};
template <>
class optional_last_value<void>
{
public:
using result_type = void;
};
} // namespace fastsignals
@@ -0,0 +1,116 @@
#pragma once
#include "signal_impl.h"
namespace fastsignals
{
// Connection keeps link between signal and slot and can disconnect them.
// Disconnect operation is thread-safe: any thread can disconnect while
// slots called on other thread.
// This class itself is not thread-safe: you can't use the same connection
// object from different threads at the same time.
class connection
{
public:
connection() noexcept;
explicit connection(detail::signal_impl_weak_ptr storage, uint64_t id) noexcept;
connection(const connection& other) noexcept;
connection& operator=(const connection& other) noexcept;
connection(connection&& other) noexcept;
connection& operator=(connection&& other) noexcept;
~connection() = default;
bool connected() const noexcept;
void disconnect() noexcept;
protected:
detail::signal_impl_weak_ptr m_storage;
uint64_t m_id = 0;
};
// Connection class that supports blocking callback execution
class advanced_connection : public connection
{
public:
struct advanced_connection_impl
{
void block() noexcept;
void unblock() noexcept;
bool is_blocked() const noexcept;
private:
std::atomic<int> m_blockCounter {0};
};
using impl_ptr = std::shared_ptr<advanced_connection_impl>;
advanced_connection() noexcept;
explicit advanced_connection(connection&& conn, impl_ptr&& impl) noexcept;
advanced_connection(const advanced_connection&) noexcept;
advanced_connection& operator=(const advanced_connection&) noexcept;
advanced_connection(advanced_connection&& other) noexcept;
advanced_connection& operator=(advanced_connection&& other) noexcept;
~advanced_connection() = default;
protected:
impl_ptr m_impl;
};
// Blocks advanced connection, so its callback will not be executed
class shared_connection_block
{
public:
shared_connection_block(const advanced_connection& connection = advanced_connection(), bool initially_blocked = true) noexcept;
shared_connection_block(const shared_connection_block& other) noexcept;
shared_connection_block(shared_connection_block&& other) noexcept;
shared_connection_block& operator=(const shared_connection_block& other) noexcept;
shared_connection_block& operator=(shared_connection_block&& other) noexcept;
~shared_connection_block();
void block() noexcept;
void unblock() noexcept;
bool blocking() const noexcept;
private:
void increment_if_blocked() const noexcept;
std::weak_ptr<advanced_connection::advanced_connection_impl> m_connection;
std::atomic<bool> m_blocked {false};
};
// Scoped connection keeps link between signal and slot and disconnects them in destructor.
// Scoped connection is movable, but not copyable.
class scoped_connection : public connection
{
public:
scoped_connection() noexcept;
scoped_connection(const connection& conn) noexcept;
scoped_connection(connection&& conn) noexcept;
scoped_connection(const advanced_connection& conn) = delete;
scoped_connection(advanced_connection&& conn) noexcept = delete;
scoped_connection(const scoped_connection&) = delete;
scoped_connection& operator=(const scoped_connection&) = delete;
scoped_connection(scoped_connection&& other) noexcept;
scoped_connection& operator=(scoped_connection&& other) noexcept;
~scoped_connection();
connection release() noexcept;
};
// scoped connection for advanced connections
class advanced_scoped_connection : public advanced_connection
{
public:
advanced_scoped_connection() noexcept;
advanced_scoped_connection(const advanced_connection& conn) noexcept;
advanced_scoped_connection(advanced_connection&& conn) noexcept;
advanced_scoped_connection(const advanced_scoped_connection&) = delete;
advanced_scoped_connection& operator=(const advanced_scoped_connection&) = delete;
advanced_scoped_connection(advanced_scoped_connection&& other) noexcept;
advanced_scoped_connection& operator=(advanced_scoped_connection&& other) noexcept;
~advanced_scoped_connection();
advanced_connection release() noexcept;
};
} // namespace fastsignals
@@ -0,0 +1,54 @@
#pragma once
#include "function_detail.h"
namespace fastsignals
{
// Derive your class from not_directly_callable to prevent function from wrapping it using its template constructor
// Useful if your class provides custom operator for casting to function
struct not_directly_callable
{
};
template <class Fn, class Function, class Return, class... Arguments>
using enable_if_callable_t = typename std::enable_if_t<
!std::is_same_v<std::decay_t<Fn>, Function> && !std::is_base_of_v<not_directly_callable, std::decay_t<Fn>> && std::is_same_v<std::invoke_result_t<Fn, Arguments...>, Return>>;
template <class Signature>
class function;
// Compact function class - causes minimal code bloat when compiled.
// Replaces std::function in this library.
template <class Return, class... Arguments>
class function<Return(Arguments...)>
{
public:
function() = default;
function(const function& other) = default;
function(function&& other) noexcept = default;
function& operator=(const function& other) = default;
function& operator=(function&& other) noexcept = default;
template <class Fn, typename = enable_if_callable_t<Fn, function<Return(Arguments...)>, Return, Arguments...>>
function(Fn&& function) noexcept(detail::is_noexcept_packed_function_init<Fn, Return, Arguments...>)
{
m_packed.init<Fn, Return, Arguments...>(std::forward<Fn>(function));
}
Return operator()(Arguments&&... args) const
{
auto& proxy = m_packed.get<Return(Arguments...)>();
return proxy(std::forward<Arguments>(args)...);
}
detail::packed_function release() noexcept
{
return std::move(m_packed);
}
private:
detail::packed_function m_packed;
};
} // namespace fastsignals
@@ -0,0 +1,164 @@
#pragma once
#include <cassert>
#include <cstddef>
#include <cstdint>
#include <type_traits>
#include <utility>
namespace fastsignals::detail
{
/// Buffer for callable object in-place construction,
/// helps to implement Small Buffer Optimization.
static constexpr size_t inplace_buffer_size = (sizeof(int) == sizeof(void*) ? 8 : 6) * sizeof(void*);
/// Structure that has size enough to keep type "T" including vtable.
template <class T>
struct type_container
{
T data;
};
/// Type that has enough space to keep type "T" (including vtable) with suitable alignment.
using function_buffer_t = std::aligned_storage_t<inplace_buffer_size>;
/// Constantly is true if callable fits function buffer, false otherwise.
template <class T>
inline constexpr bool fits_inplace_buffer = (sizeof(type_container<T>) <= inplace_buffer_size);
// clang-format off
/// Constantly is true if callable fits function buffer and can be safely moved, false otherwise
template <class T>
inline constexpr bool can_use_inplace_buffer =
fits_inplace_buffer<T> &&
std::is_nothrow_move_constructible_v<T>;
// clang format on
/// Type that is suitable to keep copy of callable object.
/// - equal to pointer-to-function if Callable is pointer-to-function
/// - otherwise removes const/volatile and references to allow copying callable.
template <class Callable>
using callable_copy_t = std::conditional_t<std::is_function_v<std::remove_reference_t<Callable>>,
Callable,
std::remove_cv_t<std::remove_reference_t<Callable>>>;
class base_function_proxy
{
public:
virtual ~base_function_proxy() = default;
virtual base_function_proxy* clone(void* buffer) const = 0;
virtual base_function_proxy* move(void* buffer) noexcept = 0;
};
template <class Signature>
class function_proxy;
template <class Return, class... Arguments>
class function_proxy<Return(Arguments...)> : public base_function_proxy
{
public:
virtual Return operator()(Arguments&&...) = 0;
};
template <class Callable, class Return, class... Arguments>
class function_proxy_impl final : public function_proxy<Return(Arguments...)>
{
public:
// If you see this error, probably your function returns value and you're trying to
// connect it to `signal<void(...)>`. Just remove return value from callback.
static_assert(std::is_same_v<std::invoke_result_t<Callable, Arguments...>, Return>,
"cannot construct function<> class from callable object with different return type");
template <class FunctionObject>
explicit function_proxy_impl(FunctionObject&& function)
: m_callable(std::forward<FunctionObject>(function))
{
}
Return operator()(Arguments&&... args) final
{
return m_callable(std::forward<Arguments>(args)...);
}
base_function_proxy* clone(void* buffer) const final
{
if constexpr (can_use_inplace_buffer<function_proxy_impl>)
{
return new (buffer) function_proxy_impl(*this);
}
else
{
(void)buffer;
return new function_proxy_impl(*this);
}
}
base_function_proxy* move(void* buffer) noexcept final
{
if constexpr (can_use_inplace_buffer<function_proxy_impl>)
{
base_function_proxy* moved = new (buffer) function_proxy_impl(std::move(*this));
this->~function_proxy_impl();
return moved;
}
else
{
(void)buffer;
return this;
}
}
private:
callable_copy_t<Callable> m_callable;
};
template <class Fn, class Return, class... Arguments>
inline constexpr bool is_noexcept_packed_function_init = can_use_inplace_buffer<function_proxy_impl<Fn, Return, Arguments...>>;
class packed_function final
{
public:
packed_function() = default;
packed_function(packed_function&& other) noexcept;
packed_function(const packed_function& other);
packed_function& operator=(packed_function&& other) noexcept;
packed_function& operator=(const packed_function& other);
~packed_function() noexcept;
// Initializes packed function.
// Cannot be called without reset().
template <class Callable, class Return, class... Arguments>
void init(Callable&& function) noexcept(is_noexcept_packed_function_init<Callable, Return, Arguments...>)
{
using proxy_t = function_proxy_impl<Callable, Return, Arguments...>;
assert(m_proxy == nullptr);
if constexpr (can_use_inplace_buffer<proxy_t>)
{
m_proxy = new (&m_buffer) proxy_t{ std::forward<Callable>(function) };
}
else
{
m_proxy = new proxy_t{ std::forward<Callable>(function) };
}
}
template <class Signature>
function_proxy<Signature>& get() const
{
return static_cast<function_proxy<Signature>&>(unwrap());
}
void reset() noexcept;
private:
base_function_proxy* move_proxy_from(packed_function&& other) noexcept;
base_function_proxy* clone_proxy_from(const packed_function &other);
base_function_proxy& unwrap() const;
bool is_buffer_allocated() const noexcept;
function_buffer_t m_buffer[1] = {};
base_function_proxy* m_proxy = nullptr;
};
} // namespace fastsignals::detail
@@ -0,0 +1,151 @@
#pragma once
#include "combiners.h"
#include "connection.h"
#include "function.h"
#include "signal_impl.h"
#include "type_traits.h"
#include <type_traits>
namespace fastsignals
{
template <class Signature, template <class T> class Combiner = optional_last_value>
class signal;
struct advanced_tag
{
};
/// Signal allows to fire events to many subscribers (slots).
/// In other words, it implements one-to-many relation between event and listeners.
/// Signal implements observable object from Observable pattern.
template <class Return, class... Arguments, template <class T> class Combiner>
class signal<Return(Arguments...), Combiner> : private not_directly_callable
{
public:
using signature_type = Return(signal_arg_t<Arguments>...);
using slot_type = function<signature_type>;
using combiner_type = Combiner<Return>;
using result_type = typename combiner_type::result_type;
signal()
: m_slots(std::make_shared<detail::signal_impl>())
{
}
/// No copy construction
signal(const signal&) = delete;
/// Moves signal from other. Any operations on other except destruction, move, and swap are invalid
signal(signal&& other) = default;
/// No copy assignment
signal& operator=(const signal&) = delete;
/// Moves signal from other. Any operations on other except destruction, move, and swap are invalid
signal& operator=(signal&& other) = default;
/**
* connect(slot) method subscribes slot to signal emission event.
* Each time you call signal as functor, all slots are also called with given arguments.
* @returns connection - object which manages signal-slot connection lifetime
*/
connection connect(slot_type slot)
{
const uint64_t id = m_slots->add(slot.release());
return connection(m_slots, id);
}
/**
* connect(slot, advanced_tag) method subscribes slot to signal emission event with the ability to temporarily block slot execution
* Each time you call signal as functor, all non-blocked slots are also called with given arguments.
* You can temporarily block slot execution using shared_connection_block
* @returns advanced_connection - object which manages signal-slot connection lifetime
*/
advanced_connection connect(slot_type slot, advanced_tag)
{
static_assert(std::is_void_v<Return>, "Advanced connect can only be used with slots returning void (implementation limitation)");
auto conn_impl = std::make_shared<advanced_connection::advanced_connection_impl>();
slot_type slot_impl = [this, slot, weak_conn_impl = std::weak_ptr(conn_impl)](signal_arg_t<Arguments>... args) {
(void)this;
auto conn_impl = weak_conn_impl.lock();
if (!conn_impl || !conn_impl->is_blocked())
{
slot(args...);
}
};
auto conn = connect(std::move(slot_impl));
return advanced_connection(std::move(conn), std::move(conn_impl));
}
/**
* disconnect_all_slots() method disconnects all slots from signal emission event.
*/
void disconnect_all_slots() noexcept
{
m_slots->remove_all();
}
/**
* num_slots() method returns number of slots attached to this singal
*/
[[nodiscard]] std::size_t num_slots() const noexcept
{
return m_slots->count();
}
/**
* empty() method returns true if signal has any slots attached
*/
[[nodiscard]] bool empty() const noexcept
{
return m_slots->count() == 0;
}
/**
* operator(args...) calls all slots connected to this signal.
* Logically, it fires signal emission event.
*/
result_type operator()(signal_arg_t<Arguments>... args) const
{
return detail::signal_impl_ptr(m_slots)->invoke<combiner_type, result_type, signature_type, signal_arg_t<Arguments>...>(args...);
}
void swap(signal& other) noexcept
{
m_slots.swap(other.m_slots);
}
/**
* Allows using signals as slots for another signal
*/
operator slot_type() const noexcept
{
return [weakSlots = detail::signal_impl_weak_ptr(m_slots)](signal_arg_t<Arguments>... args) {
if (auto slots = weakSlots.lock())
{
return slots->invoke<combiner_type, result_type, signature_type, signal_arg_t<Arguments>...>(args...);
}
};
}
private:
detail::signal_impl_ptr m_slots;
};
} // namespace fastsignals
namespace std
{
// free swap function, findable by ADL
template <class Signature, template <class T> class Combiner>
void swap(
::fastsignals::signal<Signature, Combiner>& sig1,
::fastsignals::signal<Signature, Combiner>& sig2)
{
sig1.swap(sig2);
}
} // namespace std
@@ -0,0 +1,59 @@
#pragma once
#include "function_detail.h"
#include "spin_mutex.h"
#include <memory>
#include <vector>
namespace fastsignals::detail
{
class signal_impl
{
public:
uint64_t add(packed_function fn);
void remove(uint64_t id) noexcept;
void remove_all() noexcept;
size_t count() const noexcept;
template <class Combiner, class Result, class Signature, class... Args>
Result invoke(Args... args) const
{
packed_function slot;
size_t slotIndex = 0;
uint64_t slotId = 1;
if constexpr (std::is_same_v<Result, void>)
{
while (get_next_slot(slot, slotIndex, slotId))
{
slot.get<Signature>()(std::forward<Args>(args)...);
}
}
else
{
Combiner combiner;
while (get_next_slot(slot, slotIndex, slotId))
{
combiner(slot.get<Signature>()(std::forward<Args>(args)...));
}
return combiner.get_value();
}
}
private:
bool get_next_slot(packed_function& slot, size_t& expectedIndex, uint64_t& nextId) const;
mutable spin_mutex m_mutex;
std::vector<packed_function> m_functions;
std::vector<uint64_t> m_ids;
uint64_t m_nextId = 1;
};
using signal_impl_ptr = std::shared_ptr<signal_impl>;
using signal_impl_weak_ptr = std::weak_ptr<signal_impl>;
} // namespace fastsignals::detail
@@ -0,0 +1,38 @@
#pragma once
#include <atomic>
namespace fastsignals::detail
{
class spin_mutex
{
public:
spin_mutex() = default;
spin_mutex(const spin_mutex&) = delete;
spin_mutex& operator=(const spin_mutex&) = delete;
spin_mutex(spin_mutex&&) = delete;
spin_mutex& operator=(spin_mutex&&) = delete;
inline bool try_lock() noexcept
{
return !m_busy.test_and_set(std::memory_order_acquire);
}
inline void lock() noexcept
{
while (!try_lock())
{
/* do nothing */;
}
}
inline void unlock() noexcept
{
m_busy.clear(std::memory_order_release);
}
private:
std::atomic_flag m_busy = ATOMIC_FLAG_INIT;
};
} // namespace fastsignals::detail
@@ -0,0 +1,24 @@
#pragma once
namespace fastsignals
{
namespace detail
{
template <typename T>
struct signal_arg
{
using type = const T&;
};
template <typename U>
struct signal_arg<U&>
{
using type = U&;
};
} // namespace detail
template <typename T>
using signal_arg_t = typename detail::signal_arg<T>::type;
} // namespace fastsignals
@@ -0,0 +1,251 @@
#include "../include/fastsignals/connection.h"
namespace fastsignals
{
namespace
{
auto get_advanced_connection_impl(const advanced_connection& connection) noexcept
{
struct advanced_connection_impl_getter : private advanced_connection
{
advanced_connection_impl_getter(const advanced_connection& connection) noexcept
: advanced_connection(connection)
{
}
using advanced_connection::m_impl;
};
return advanced_connection_impl_getter(connection).m_impl;
}
} // namespace
connection::connection(connection&& other) noexcept
: m_storage(other.m_storage)
, m_id(other.m_id)
{
other.m_storage.reset();
other.m_id = 0;
}
connection::connection(detail::signal_impl_weak_ptr storage, uint64_t id) noexcept
: m_storage(std::move(storage))
, m_id(id)
{
}
connection::connection() noexcept = default;
connection::connection(const connection& other) noexcept = default;
connection& connection::operator=(connection&& other) noexcept
{
m_storage = other.m_storage;
m_id = other.m_id;
other.m_storage.reset();
other.m_id = 0;
return *this;
}
connection& connection::operator=(const connection& other) noexcept = default;
bool connection::connected() const noexcept
{
return (m_id != 0);
}
void connection::disconnect() noexcept
{
if (auto storage = m_storage.lock())
{
storage->remove(m_id);
m_storage.reset();
}
m_id = 0;
}
scoped_connection::scoped_connection(connection&& conn) noexcept
: connection(std::move(conn))
{
}
scoped_connection::scoped_connection(const connection& conn) noexcept
: connection(conn)
{
}
scoped_connection::scoped_connection() noexcept = default;
scoped_connection::scoped_connection(scoped_connection&& other) noexcept = default;
scoped_connection& scoped_connection::operator=(scoped_connection&& other) noexcept
{
disconnect();
static_cast<connection&>(*this) = std::move(other);
return *this;
}
scoped_connection::~scoped_connection()
{
disconnect();
}
connection scoped_connection::release() noexcept
{
connection conn = std::move(static_cast<connection&>(*this));
return conn;
}
bool advanced_connection::advanced_connection_impl::is_blocked() const noexcept
{
return m_blockCounter.load(std::memory_order_acquire) != 0;
}
void advanced_connection::advanced_connection_impl::block() noexcept
{
++m_blockCounter;
}
void advanced_connection::advanced_connection_impl::unblock() noexcept
{
--m_blockCounter;
}
advanced_connection::advanced_connection() noexcept = default;
advanced_connection::advanced_connection(connection&& conn, impl_ptr&& impl) noexcept
: connection(std::move(conn))
, m_impl(std::move(impl))
{
}
advanced_connection::advanced_connection(const advanced_connection&) noexcept = default;
advanced_connection::advanced_connection(advanced_connection&& other) noexcept = default;
advanced_connection& advanced_connection::operator=(const advanced_connection&) noexcept = default;
advanced_connection& advanced_connection::operator=(advanced_connection&& other) noexcept = default;
shared_connection_block::shared_connection_block(const advanced_connection& connection, bool initially_blocked) noexcept
: m_connection(get_advanced_connection_impl(connection))
{
if (initially_blocked)
{
block();
}
}
shared_connection_block::shared_connection_block(const shared_connection_block& other) noexcept
: m_connection(other.m_connection)
, m_blocked(other.m_blocked.load(std::memory_order_acquire))
{
increment_if_blocked();
}
shared_connection_block::shared_connection_block(shared_connection_block&& other) noexcept
: m_connection(other.m_connection)
, m_blocked(other.m_blocked.load(std::memory_order_acquire))
{
other.m_connection.reset();
other.m_blocked.store(false, std::memory_order_release);
}
shared_connection_block& shared_connection_block::operator=(const shared_connection_block& other) noexcept
{
if (&other != this)
{
unblock();
m_connection = other.m_connection;
m_blocked = other.m_blocked.load(std::memory_order_acquire);
increment_if_blocked();
}
return *this;
}
shared_connection_block& shared_connection_block::operator=(shared_connection_block&& other) noexcept
{
if (&other != this)
{
unblock();
m_connection = other.m_connection;
m_blocked = other.m_blocked.load(std::memory_order_acquire);
other.m_connection.reset();
other.m_blocked.store(false, std::memory_order_release);
}
return *this;
}
shared_connection_block::~shared_connection_block()
{
unblock();
}
void shared_connection_block::block() noexcept
{
bool blocked = false;
if (m_blocked.compare_exchange_strong(blocked, true, std::memory_order_acq_rel, std::memory_order_relaxed))
{
if (auto connection = m_connection.lock())
{
connection->block();
}
}
}
void shared_connection_block::unblock() noexcept
{
bool blocked = true;
if (m_blocked.compare_exchange_strong(blocked, false, std::memory_order_acq_rel, std::memory_order_relaxed))
{
if (auto connection = m_connection.lock())
{
connection->unblock();
}
}
}
bool shared_connection_block::blocking() const noexcept
{
return m_blocked;
}
void shared_connection_block::increment_if_blocked() const noexcept
{
if (m_blocked)
{
if (auto connection = m_connection.lock())
{
connection->block();
}
}
}
advanced_scoped_connection::advanced_scoped_connection() noexcept = default;
advanced_scoped_connection::advanced_scoped_connection(const advanced_connection& conn) noexcept
: advanced_connection(conn)
{
}
advanced_scoped_connection::advanced_scoped_connection(advanced_connection&& conn) noexcept
: advanced_connection(std::move(conn))
{
}
advanced_scoped_connection::advanced_scoped_connection(advanced_scoped_connection&& other) noexcept = default;
advanced_scoped_connection& advanced_scoped_connection::operator=(advanced_scoped_connection&& other) noexcept = default;
advanced_scoped_connection::~advanced_scoped_connection()
{
disconnect();
}
advanced_connection advanced_scoped_connection::release() noexcept
{
advanced_connection conn = std::move(static_cast<advanced_connection&>(*this));
return conn;
}
} // namespace fastsignals
@@ -0,0 +1,96 @@
#include "../include/fastsignals/function_detail.h"
#include <cstddef>
#include <functional>
namespace fastsignals::detail
{
packed_function::packed_function(packed_function&& other) noexcept
: m_proxy(move_proxy_from(std::move(other)))
{
}
packed_function::packed_function(const packed_function& other)
: m_proxy(clone_proxy_from(other))
{
}
packed_function& packed_function::operator=(packed_function&& other) noexcept
{
assert(this != &other);
reset();
m_proxy = move_proxy_from(std::move(other));
return *this;
}
base_function_proxy* packed_function::move_proxy_from(packed_function&& other) noexcept
{
auto proxy = other.m_proxy ? other.m_proxy->move(&m_buffer) : nullptr;
other.m_proxy = nullptr;
return proxy;
}
base_function_proxy* packed_function::clone_proxy_from(const packed_function& other)
{
return other.m_proxy ? other.m_proxy->clone(&m_buffer) : nullptr;
}
packed_function& packed_function::operator=(const packed_function& other)
{
if (this != &other)
{
if (other.is_buffer_allocated() && is_buffer_allocated())
{
// "This" and "other" are using SBO. Safe assignment must use copy+move
*this = packed_function(other);
}
else
{
// Buffer is used either by "this" or by "other" or not used at all.
// If this uses buffer then other's proxy is null or allocated on heap, so clone won't overwrite buffer
// If this uses heap or null then other's proxy can safely use buffer because reset() won't access buffer
auto newProxy = clone_proxy_from(other);
reset();
m_proxy = newProxy;
}
}
return *this;
}
packed_function::~packed_function() noexcept
{
reset();
}
void packed_function::reset() noexcept
{
if (m_proxy != nullptr)
{
if (is_buffer_allocated())
{
m_proxy->~base_function_proxy();
}
else
{
delete m_proxy;
}
m_proxy = nullptr;
}
}
base_function_proxy& packed_function::unwrap() const
{
if (m_proxy == nullptr)
{
throw std::bad_function_call();
}
return *m_proxy;
}
bool packed_function::is_buffer_allocated() const noexcept
{
return std::less_equal<const void*>()(&m_buffer[0], m_proxy)
&& std::less<const void*>()(m_proxy, &m_buffer[1]);
}
} // namespace fastsignals::detail
@@ -0,0 +1,84 @@
#include "../include/fastsignals/signal_impl.h"
#include <algorithm>
#include <mutex>
namespace fastsignals::detail
{
uint64_t signal_impl::add(packed_function fn)
{
std::lock_guard lock(m_mutex);
m_functions.emplace_back(std::move(fn));
try
{
m_ids.emplace_back(m_nextId);
}
catch (const std::bad_alloc& /*e*/)
{
// Remove function since we failed to add its id
m_functions.pop_back();
throw;
}
return m_nextId++;
}
void signal_impl::remove(uint64_t id) noexcept
{
std::lock_guard lock(m_mutex);
// We use binary search because ids array is always sorted.
auto it = std::lower_bound(m_ids.begin(), m_ids.end(), id);
if (it != m_ids.end() && *it == id)
{
size_t i = std::distance(m_ids.begin(), it);
m_ids.erase(m_ids.begin() + i);
m_functions.erase(m_functions.begin() + i);
}
}
void signal_impl::remove_all() noexcept
{
std::lock_guard lock(m_mutex);
m_functions.clear();
m_ids.clear();
}
bool signal_impl::get_next_slot(packed_function& slot, size_t& expectedIndex, uint64_t& nextId) const
{
// Slots always arranged by ID, so we can use a simple algorithm which avoids races:
// - on each step find first slot with ID >= slotId
// - after each call increment slotId
std::lock_guard lock(m_mutex);
// Avoid binary search if next slot wasn't moved between mutex locks.
if (expectedIndex >= m_ids.size() || m_ids[expectedIndex] != nextId)
{
auto it = (nextId < m_nextId)
? std::lower_bound(m_ids.cbegin(), m_ids.cend(), nextId)
: m_ids.end();
if (it == m_ids.end())
{
return false;
}
expectedIndex = std::distance(m_ids.cbegin(), it);
}
slot.reset();
slot = m_functions[expectedIndex];
nextId = (expectedIndex + 1 < m_ids.size()) ? m_ids[expectedIndex + 1] : m_ids[expectedIndex] + 1;
++expectedIndex;
return true;
}
size_t signal_impl::count() const noexcept
{
std::lock_guard lock(m_mutex);
return m_functions.size();
}
} // namespace fastsignals::detail
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,3 @@
custom_add_test_from_dir(libfastsignals_stress_tests libfastsignals)
target_include_directories(libfastsignals_stress_tests PRIVATE "${CMAKE_SOURCE_DIR}/tests")
@@ -0,0 +1,2 @@
#define CATCH_CONFIG_MAIN
#include "catch2/catch.hpp"
@@ -0,0 +1,124 @@
#include "catch2/catch.hpp"
#include <fastsignals/signal.h>
#include <array>
#include <mutex>
#include <random>
#include <vector>
#include <thread>
using namespace fastsignals;
namespace
{
using string_signal = signal<void(std::string)>;
using string_slot = string_signal::slot_type;
using void_signal = signal<void()>;
using void_slot = void_signal::slot_type;
class named_entity
{
public:
std::string name() const
{
std::lock_guard lock(m_nameMutex);
return m_name;
}
void fire_changed(std::string value)
{
bool fire = false;
{
std::lock_guard lock(m_nameMutex);
if (m_name != value)
{
m_name = std::move(value);
fire = true;
}
}
if (fire)
{
m_nameChanged(value);
}
}
connection on_name_changed(string_slot slot)
{
return m_nameChanged.connect(std::move(slot));
}
private:
mutable std::mutex m_nameMutex;
std::string m_name;
signal<void(std::string)> m_nameChanged;
};
unsigned get_next_seed()
{
static std::minstd_rand seedEngine(777);
return seedEngine();
}
size_t get_random_index(size_t size)
{
thread_local std::minstd_rand disconnectRandomEngine{ get_next_seed() };
std::uniform_int_distribution<size_t> disconnectIndexDistribution{ 0, size - 1 };
return disconnectIndexDistribution(disconnectRandomEngine);
}
} // namespace
TEST_CASE("Can work in a few threads", "[signal]")
{
constexpr unsigned fireThreadCount = 8;
constexpr unsigned signalsCount = 7;
constexpr unsigned fireCountPerThread = 100'000;
constexpr unsigned connectCallsCount = 80'000;
constexpr unsigned totalRunCount = 10;
for (unsigned i = 0; i < totalRunCount; ++i)
{
std::array<void_signal, signalsCount> signals;
std::mutex connectionsMutex;
std::vector<connection> connections;
connections.reserve(connectCallsCount);
std::vector<std::thread> threads;
auto slot = [&] {
std::lock_guard lock(connectionsMutex);
if (!connections.empty())
{
const size_t index = get_random_index(connections.size());
connections.at(index).disconnect();
}
};
threads.emplace_back([&] {
for (unsigned cci = 0; cci < connectCallsCount; ++cci)
{
const size_t index = get_random_index(signalsCount);
connection conn = signals.at(index).connect(slot);
{
std::lock_guard lock(connectionsMutex);
connections.emplace_back(conn);
}
}
});
for (unsigned fti = 0; fti < fireThreadCount; ++fti)
{
threads.emplace_back([&] {
for (unsigned fi = 0; fi < fireCountPerThread; ++fi)
{
const size_t index = get_random_index(signalsCount);
signals.at(index)();
}
});
}
for (auto& thread : threads)
{
thread.join();
}
}
}
@@ -0,0 +1,3 @@
custom_add_test_from_dir(libfastsignals_unit_tests libfastsignals)
target_include_directories(libfastsignals_unit_tests PRIVATE "${CMAKE_SOURCE_DIR}/tests")
@@ -0,0 +1,618 @@
#include "catch2/catch.hpp"
#include <fastsignals/function.h>
#include <array>
using namespace fastsignals;
namespace
{
int Abs(int x)
{
return x >= 0 ? x : -x;
}
int Sum(int a, int b)
{
return a + b;
}
void InplaceAbs(int& x)
{
x = Abs(x);
}
std::string GetStringHello()
{
return "hello";
}
class AbsFunctor
{
public:
int operator()(int x) const
{
return Abs(x);
}
};
class SumFunctor
{
public:
int operator()(int a, int b) const
{
return Sum(a, b);
}
};
class InplaceAbsFunctor
{
public:
void operator()(int& x) /* non-const */
{
if (m_calledOnce)
{
abort();
}
m_calledOnce = true;
InplaceAbs(x);
}
private:
bool m_calledOnce = false;
};
class GetStringFunctor
{
public:
explicit GetStringFunctor(const std::string& value)
: m_value(value)
{
}
std::string operator()() /* non-const */
{
if (m_calledOnce)
{
abort();
}
m_calledOnce = true;
return m_value;
}
private:
bool m_calledOnce = false;
std::string m_value;
};
} // namespace
TEST_CASE("Can use free function with 1 argument", "[function]")
{
function<int(int)> fn = Abs;
REQUIRE(fn(10) == 10);
REQUIRE(fn(-10) == 10);
REQUIRE(fn(0) == 0);
}
TEST_CASE("Can use free function with 2 arguments", "[function]")
{
function<int(int, int)> fn = Sum;
REQUIRE(fn(10, 5) == 15);
REQUIRE(fn(-10, 0) == -10);
}
TEST_CASE("Can use free function without arguments", "[function]")
{
function<std::string()> fn = GetStringHello;
REQUIRE(fn() == "hello");
}
TEST_CASE("Can use free function without return value", "[function]")
{
function<void(int&)> fn = InplaceAbs;
int a = -10;
fn(a);
REQUIRE(a == 10);
}
TEST_CASE("Can use lambda with 1 argument", "[function]")
{
function<int(int)> fn = [](int value) {
return Abs(value);
};
REQUIRE(fn(10) == 10);
REQUIRE(fn(-10) == 10);
REQUIRE(fn(0) == 0);
}
TEST_CASE("Can use lambda with 2 arguments", "[function]")
{
function<int(int, int)> fn = [](auto&& a, auto&& b) {
return Sum(a, b);
};
REQUIRE(fn(10, 5) == 15);
REQUIRE(fn(-10, 0) == -10);
}
TEST_CASE("Can use lambda without arguments", "[function]")
{
function<std::string()> fn = [] {
return GetStringHello();
};
REQUIRE(fn() == "hello");
}
TEST_CASE("Can use lambda without return value", "[function]")
{
bool calledOnce = false;
function<void(int&)> fn = [calledOnce](auto& value) mutable {
if (calledOnce)
{
abort();
}
calledOnce = true;
InplaceAbs(value);
};
int a = -10;
fn(a);
REQUIRE(a == 10);
}
TEST_CASE("Can use functor with 1 argument", "[function]")
{
function<int(int)> fn = AbsFunctor();
REQUIRE(fn(10) == 10);
REQUIRE(fn(-10) == 10);
REQUIRE(fn(0) == 0);
}
TEST_CASE("Can use functor with 2 arguments", "[function]")
{
function<int(int, int)> fn = SumFunctor();
REQUIRE(fn(10, 5) == 15);
REQUIRE(fn(-10, 0) == -10);
}
TEST_CASE("Can use functor without arguments", "[function]")
{
function<std::string()> fn = GetStringFunctor("hello");
REQUIRE(fn() == "hello");
}
TEST_CASE("Can use functor without return value", "[function]")
{
function<void(int&)> fn = InplaceAbsFunctor();
int a = -10;
fn(a);
REQUIRE(a == 10);
}
TEST_CASE("Can construct function with cons std::function<>&", "[function]")
{
using BoolCallback = std::function<void(bool succeed)>;
bool value = false;
const BoolCallback& cb = [&value](bool succeed) {
value = succeed;
};
function<void(bool)> fn = cb;
fn(true);
REQUIRE(value == true);
fn(false);
REQUIRE(value == false);
fn(true);
REQUIRE(value == true);
}
TEST_CASE("Can copy function", "[function]")
{
unsigned calledCount = 0;
bool value = false;
function<void(bool)> callback = [&](bool gotValue) {
++calledCount;
value = gotValue;
};
auto callback2 = callback;
REQUIRE(calledCount == 0);
CHECK(!value);
callback(true);
REQUIRE(calledCount == 1);
CHECK(value);
callback2(false);
REQUIRE(calledCount == 2);
CHECK(!value);
}
TEST_CASE("Can move function", "[function]")
{
bool called = false;
function<void()> callback = [&] {
called = true;
};
auto callback2(std::move(callback));
REQUIRE_THROWS(callback());
REQUIRE(!called);
callback2();
REQUIRE(called);
}
TEST_CASE("Works when copying self", "[function]")
{
bool called = false;
function<void()> callback = [&] {
called = true;
};
callback = callback;
callback();
REQUIRE(called);
}
TEST_CASE("Can release packed function", "[function]")
{
function<int()> iota = [v = 0]() mutable {
return v++;
};
REQUIRE(iota() == 0);
auto packedFn = std::move(iota).release();
REQUIRE_THROWS_AS(iota(), std::bad_function_call);
auto&& proxy = packedFn.get<int()>();
REQUIRE(proxy() == 1);
REQUIRE(proxy() == 2);
}
TEST_CASE("Function copy has its own packed function", "[function]")
{
function<int()> iota = [v = 0]() mutable {
return v++;
};
REQUIRE(iota() == 0);
auto iotaCopy(iota);
REQUIRE(iota() == 1);
REQUIRE(iota() == 2);
REQUIRE(iotaCopy() == 1);
REQUIRE(iotaCopy() == 2);
}
TEST_CASE("can work with callables that have vtable", "[function]")
{
class Base
{
};
class Interface : public Base
{
public:
virtual ~Interface() = default;
virtual void operator()() const = 0;
};
class Class : public Interface
{
public:
Class(bool* destructorCalled)
: m_destructorCalled(destructorCalled)
{
}
~Class()
{
*m_destructorCalled = true;
}
void operator()() const override
{
}
bool* m_destructorCalled = nullptr;
};
bool destructorCalled = false;
{
function<void()> f = Class(&destructorCalled);
f();
auto packed = f.release();
destructorCalled = false;
}
CHECK(destructorCalled);
}
TEST_CASE("can work with callables with virtual inheritance", "[function]")
{
struct A
{
void operator()() const
{
m_called = true;
}
~A()
{
*m_destructorCalled = true;
}
mutable bool m_called = false;
bool* m_destructorCalled = nullptr;
};
struct B : public virtual A
{
};
struct C : public virtual A
{
};
struct D : virtual public B
, virtual public C
{
D(bool* destructorCalled)
{
m_destructorCalled = destructorCalled;
}
using A::operator();
};
bool destructorCalled = false;
{
function<void()> f = D(&destructorCalled);
f();
auto packed = f.release();
destructorCalled = false;
}
CHECK(destructorCalled);
}
TEST_CASE("uses copy constructor if callable's move constructor throws", "[function]")
{
struct Callable
{
Callable() = default;
Callable(Callable&&)
{
throw std::runtime_error("throw");
}
Callable(const Callable& other) = default;
void operator()() const
{
}
};
Callable c;
function<void()> f(c);
auto f2 = std::move(f);
f2();
CHECK_THROWS(f());
}
TEST_CASE("uses move constructor if it is noexcept", "[function]")
{
struct Callable
{
Callable() = default;
Callable(Callable&& other) noexcept = default;
Callable(const Callable&)
{
throw std::runtime_error("throw");
}
void operator()() const
{
}
};
Callable c;
function<void()> f(std::move(c));
auto f2 = std::move(f);
f2();
CHECK_THROWS(f());
}
TEST_CASE("can copy and move empty function", "[function]")
{
function<void()> f;
auto f2 = f;
auto f3 = std::move(f);
}
TEST_CASE("properly copies callable on assignment", "[function]")
{
struct Callable
{
Callable(int& aliveCounter)
: m_aliveCounter(&aliveCounter)
{
++*m_aliveCounter;
}
Callable(const Callable& other)
: m_aliveCounter(other.m_aliveCounter)
{
if (m_aliveCounter)
{
++*m_aliveCounter;
}
}
Callable(Callable&& other) noexcept
: m_aliveCounter(other.m_aliveCounter)
{
other.m_aliveCounter = nullptr;
}
~Callable()
{
if (m_aliveCounter)
{
--*m_aliveCounter;
}
}
void operator()() const
{
}
int* m_aliveCounter = nullptr;
};
int aliveCounter1 = 0;
int aliveCounter2 = 0;
function<void()> f = Callable(aliveCounter1);
function<void()> f2 = Callable(aliveCounter2);
CHECK(aliveCounter1 == 1);
CHECK(aliveCounter2 == 1);
f = f2;
CHECK(aliveCounter1 == 0);
CHECK(aliveCounter2 == 2);
f = function<void()>();
f2 = function<void()>();
CHECK(aliveCounter1 == 0);
CHECK(aliveCounter2 == 0);
}
TEST_CASE("copy assignment operator provides strong exception safety", "[function]")
{
struct State
{
int callCount = 0;
bool throwOnCopy = false;
};
struct Callable
{
Callable(State& state)
: state(&state)
{
}
void operator()()
{
++state->callCount;
}
Callable(const Callable& other)
: state(other.state)
{
if (state->throwOnCopy)
{
throw std::runtime_error("throw on request");
}
}
State* state = nullptr;
};
static_assert(!detail::can_use_inplace_buffer<Callable>);
State srcState;
State dstState;
function<void()> srcFn(Callable{ srcState });
function<void()> dstFn(Callable{ dstState });
srcFn();
dstFn();
REQUIRE(srcState.callCount == 1);
REQUIRE(dstState.callCount == 1);
srcState.throwOnCopy = true;
REQUIRE_THROWS_AS(dstFn = srcFn, std::runtime_error);
// srcFn and dstFn must not be emptied even if assignment throws
REQUIRE_NOTHROW(srcFn());
REQUIRE_NOTHROW(dstFn());
// srcFn and dstFn must keep their state
REQUIRE(srcState.callCount == 2);
REQUIRE(dstState.callCount == 2);
// The next copy will succeed
srcState.throwOnCopy = false;
REQUIRE_NOTHROW(dstFn = srcFn);
// Both functions are usable
REQUIRE_NOTHROW(srcFn());
REQUIRE_NOTHROW(dstFn());
// After assignment, dstFn and srcFn refer the same state - srcState
REQUIRE(srcState.callCount == 4);
REQUIRE(dstState.callCount == 2);
}
TEST_CASE("assignment of variously allocated functions", "[function]")
{
int heapCalls = 0;
auto onHeap = [&heapCalls, largeVar = std::array<std::string, 1000>()]() mutable {
std::fill(largeVar.begin(), largeVar.end(), "large string to be allocated on heap instead of stack");
++heapCalls;
};
int stackCalls = 0;
auto onStack = [&stackCalls] {
++stackCalls;
};
static_assert(detail::can_use_inplace_buffer<detail::function_proxy_impl<decltype(onStack), void>>);
static_assert(!detail::can_use_inplace_buffer<detail::function_proxy_impl<decltype(onHeap), void>>);
using Fn = function<void()>;
{
Fn heap(onHeap);
Fn stack(onStack);
heap = stack;
heap();
REQUIRE(stackCalls == 1);
REQUIRE(heapCalls == 0);
}
{
Fn heap(onHeap);
Fn stack(onStack);
stack = heap;
stack();
REQUIRE(stackCalls == 1);
REQUIRE(heapCalls == 1);
}
{
Fn heap(onHeap);
Fn heap1(onHeap);
heap = heap1;
heap();
REQUIRE(stackCalls == 1);
REQUIRE(heapCalls == 2);
}
{
Fn stack(onStack);
Fn stack1(onStack);
stack = stack1;
stack();
REQUIRE(stackCalls == 2);
REQUIRE(heapCalls == 2);
}
{
Fn heap(onHeap);
Fn empty;
heap = empty;
REQUIRE_THROWS(heap());
REQUIRE(stackCalls == 2);
REQUIRE(heapCalls == 2);
}
{
Fn stack(onStack);
Fn empty;
stack = empty;
REQUIRE_THROWS(stack());
REQUIRE(stackCalls == 2);
REQUIRE(heapCalls == 2);
}
{
Fn empty;
Fn heap(onHeap);
empty = heap;
empty();
REQUIRE(stackCalls == 2);
REQUIRE(heapCalls == 3);
}
{
Fn empty;
Fn stack(onStack);
empty = stack;
empty();
REQUIRE(stackCalls == 3);
REQUIRE(heapCalls == 3);
}
{
Fn empty;
Fn empty1;
empty = empty1;
REQUIRE_THROWS(empty());
REQUIRE(stackCalls == 3);
REQUIRE(heapCalls == 3);
}
}

Some files were not shown because too many files have changed in this diff Show More