Compare commits

...

505 Commits

Author SHA1 Message Date
Chris Hennes adf77600e2 Build: Update version to 1.1rc3 2026-02-23 20:43:19 -03:00
PaddleStroke 0500beb110 PartDesign: UpToFace to plane in LCS (#27637)
* PartDesign: UpToFace to plane in LCS

* Update TaskSketchBasedParameters.cpp

(cherry picked from commit 194ec0820c)
2026-02-23 23:52:13 +01:00
Yash Suthar b965a74824 Measure: fix measurements are saved if exit tool by opening a sketch
Signed-off-by: Yash Suthar <yashsuthar983@gmail.com>
(cherry picked from commit 1c0ac9a269)
2026-02-23 23:05:49 +01:00
Petter Reinholdtsen f5d59c0e5b 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

(cherry picked from commit 954a1239f3)
2026-02-23 21:40:57 +01:00
captain0xff ce8679df59 CAM: fix the transform tool
(cherry picked from commit f238a5f4e5)
2026-02-23 15:30:05 +01:00
Max Wilfinger 61a11a5e41 Merge pull request #27806 from FreeCAD/backport-27775-to-releases/FreeCAD-1-1
[Backport releases/FreeCAD-1-1] Fem: Load Elmer text output
2026-02-23 00:32:55 +01:00
marioalexis f1edbe7613 Fem: Enable keep results on rerun option for new CalculiX
(cherry picked from commit 1e51d10de8)
2026-02-22 20:30:57 +00:00
marioalexis 0d202e5eb3 Fem: Load Elmer solver text output
(cherry picked from commit e116b5ae34)
2026-02-22 20:30:57 +00:00
Roy-043 155e46a188 Merge pull request #27795 from Roy-043/Backport-releases/FreeCAD-1-1-BIM-fix-coordinate-normalization-and-area-calculation-for-generic-ArchComponents-(partial)
[Backport releases/FreeCAD-1-1] BIM: fix coordinate normalization and area calculation for generic ArchComponents (partial)
2026-02-22 15:18:24 +00:00
Max Wilfinger 10196f2704 Merge pull request #27780 from FreeCAD/backport-27749-to-releases-2
Backport #27749 to releases/FreeCAD-1-1
2026-02-22 07:20:31 +01:00
marioalexis db3026100a Fem: Update and clean up examples and test
(cherry picked from commit 49652e3c60)
2026-02-21 15:38:17 -06:00
marioalexis 4e1c3933d7 Fem: Add base class for solver and mesher tools
(cherry picked from commit f8e5a92b98)
2026-02-21 15:36:36 -06:00
marioalexis 860aa6a45b Fem: Add Tool property to solvers and meshers
(cherry picked from commit 6f8e9f1a9e)
2026-02-21 15:36:36 -06:00
Max Wilfinger f1227b51c9 Merge pull request #27772 from FreeCAD/backport-27616-to-releases/FreeCAD-1-1
[Backport releases/FreeCAD-1-1] TechDraw: Fix fillTemplateFields returns unusual fractional scale
2026-02-21 21:41:55 +01:00
Max Wilfinger 5e97098395 Merge pull request #27769 from FreeCAD/backport-27728-to-releases/FreeCAD-1-1
[Backport releases/FreeCAD-1-1] Addon Manager: Update to 2026-02-19
2026-02-21 18:28:35 +01:00
Max Wilfinger 9084e9bd3f Merge pull request #27770 from FreeCAD/backport-27577-to-releases/FreeCAD-1-1
[Backport releases/FreeCAD-1-1] FEM: Reenable visibility icon for Analysis and Solver
2026-02-21 18:20:44 +01:00
WandererFan 4ad4fb5eba fix spelling mistake
Co-authored-by: Chris Hennes <chennes@pioneerlibrarysystem.org>
(cherry picked from commit 82ba9ec9d8)
2026-02-21 16:13:40 +00:00
wandererfan 308e360c26 [TD]use nearestFraction to get scale
(cherry picked from commit f60f3d7cc5)
2026-02-21 16:13:40 +00:00
wandererfan 8fb9e43a96 [TD]expose nearestFraction to python
(cherry picked from commit bef9d03312)
2026-02-21 16:13:39 +00:00
Pieter Hijma 973d647b44 Fem: Improve visibility toggling Result and Solver
(cherry picked from commit 94c722d285)
2026-02-21 13:01:58 +00:00
Pieter Hijma 347c6087bc Core: Disable toggling visibility text document
(cherry picked from commit 0339458869)
2026-02-21 13:01:58 +00:00
Pieter Hijma 5e88d52fc5 FEM: Reenable toggling visibility
This reenables visibility toggling for Analysis and Solver objects.

(cherry picked from commit 1bfaa81d77)
2026-02-21 13:01:58 +00:00
Pieter Hijma 9f71b7a8bb Revert [Core] Remove various DisplayModes from FEM
This reverts commit 5915575f19.

(cherry picked from commit 7586620d41)
2026-02-21 13:01:58 +00:00
Chris Hennes 43184c9ae6 Addon Manager: Update to 2026-02-19
(cherry picked from commit 359e1033ec)
2026-02-21 13:00:58 +00:00
tarman3 1678010f30 [1-1] CAM: LeadInOut - Replace G00 and G01 by G0 and G1 2026-02-21 05:41:47 +01:00
Yash Suthar 5efbdd44d4 Measure: Fix crash while dragging label of unsaved measurment
Signed-off-by: Yash Suthar <yashsuthar983@gmail.com>
(cherry picked from commit f67088a970)
2026-02-19 16:08:11 +01:00
Yash Suthar 62fd4c4cb7 Measure: ix angle measurement for face and edge selection
Signed-off-by: Yash Suthar <yashsuthar983@gmail.com>
(cherry picked from commit 2d3b0a2ded)
2026-02-18 12:32:43 +01:00
PaddleStroke fa98b87203 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>
(cherry picked from commit bd07c8a214)
2026-02-18 04:50:37 +01:00
Roy-043 3b9fbfd5a1 Add files via upload (#27672) 2026-02-17 14:50:00 +00:00
Max Wilfinger c16443b031 Merge pull request #27655 from FreeCAD/backport-27587-to-releases/FreeCAD-1-1 2026-02-17 05:00:52 +01:00
Max Wilfinger 2bc94a6318 Merge pull request #27591 from FreeCAD/backport-27552-to-releases/FreeCAD-1-1
[Backport releases/FreeCAD-1-1] Base: Fix schema issues
2026-02-17 02:41:58 +01:00
Chris 5dd55bf3dd part: fixes #27365 mirror place copy at correct location (#27370)
(cherry picked from commit 17d5bca2ec)
2026-02-17 01:31:21 +01:00
xtemp09 4d848a9ad5 [Spreadsheet] Syncronize scrollbars in ZoomableView
Closes #27165.

(cherry picked from commit e0cd49e670)
2026-02-16 23:53:38 +01:00
Chris Hennes f643c88b09 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>
(cherry picked from commit f991407900)
2026-02-16 22:13:49 +01:00
wandererfan 36f6912c9a [TD]use BRepAlgoAPI_Cut instead of FCBRepAlgoAPI_Cut
(cherry picked from commit 6d73f9173c)
2026-02-16 20:15:10 +00:00
wandererfan 25ea37598d [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

(cherry picked from commit 36ddfdc7b9)
2026-02-16 20:15:10 +00:00
Benjamin Nauck 1ff520063a Base: Remove mT from schema sweep tests
mT doesn't exist yet in 1.1
2026-02-16 21:07:01 +01:00
PaddleStroke 01893cbbe5 Assembly: Backport 27567 (#27628) 2026-02-16 10:43:16 -06:00
Chris Hennes 6b1823931e Merge pull request #27468 from FreeCAD/backport-27346-to-releases/FreeCAD-1-1
[Backport releases/FreeCAD-1-1] Sketcher: Fix dimension label alignment and inactive strikethrough
2026-02-16 10:41:28 -06:00
PaddleStroke 3a6c095194 Sketcher: Fix loss of expression on trim (#27505)
(cherry picked from commit bb5afb911a)
2026-02-16 07:21:19 +01:00
Roy-043 33ea0f1067 Draft: fix ghost preview of Arch_SectionPlane and Draft_WorkingPlaneProxy (#27605)
(cherry picked from commit 37600b85a0)
2026-02-16 05:43:51 +01:00
Chris Hennes f89379545b Revert "feat(Gui): set client name to FreeCAD when connecting to spacenav"
This reverts commit bfcc69d436.
2026-02-15 22:37:41 +01:00
Max Wilfinger 9c1b6ed6f5 Merge pull request #27593 from FreeCAD/backport-26938-to-releases/FreeCAD-1-1
[Backport releases/FreeCAD-1-1] Gui: Don't record macro path if default
2026-02-15 00:25:37 +01:00
Chris Hennes 16a9c6a56c Gui: Migrate old macro dir if needed
(cherry picked from commit 5b27deb4f0)
2026-02-14 19:24:59 +00:00
Chris Hennes c9e01ed21c Gui: Don't record macro path if default
(cherry picked from commit f008c80030)
2026-02-14 19:24:59 +00:00
Benjamin Nauck 419a908402 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>
(cherry picked from commit d94269f85f)
2026-02-14 18:18:21 +00:00
Benjamin Nauck f03ccde2c4 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>
(cherry picked from commit bb977afe55)
2026-02-14 18:18:21 +00:00
Benjamin Nauck c222de0c8c 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>
(cherry picked from commit 3f17f2f01f)
2026-02-14 18:18:20 +00:00
Syres916 6006f581c3 [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

(cherry picked from commit ba030237b7)
2026-02-14 10:43:53 +01:00
wmayer c29185075d 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

(cherry picked from commit be3acac53a)
2026-02-14 09:04:47 +01:00
wmayer 6db18e1604 Import: Use ImportGui module for IGES import & export
Fixes issue 10701

(cherry picked from commit 1412cad2ec)
2026-02-14 09:04:47 +01:00
theo-vt 6fca6cfd9e Sketcher.scale: scale constraint with the right index (#27188)
(cherry picked from commit 9cbef0c5ce)
2026-02-14 08:53:50 +01:00
chris jones @ipatch f8e85016a8 material: fixes #25817 prevent unecessary save over dialogue
(cherry picked from commit 4938a6f75b)
2026-02-14 08:02:21 +01:00
Kacper Donat b65617c295 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.

(cherry picked from commit bf697ca710)
2026-02-14 06:40:15 +01:00
Chris 2d44f92d55 FEM: Update netgenplugin src files to fix builds with netgen >= 6.2.2601 (#27508)
(cherry picked from commit e595cc49f2)
2026-02-14 05:52:57 +01:00
Frank David Martínez M 5095b7a224 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.

(cherry picked from commit f1366e8a75)
2026-02-14 05:52:30 +01:00
Loke Strøm 60b7f6d26c Sketcher: Fix: Arc of ellipse when first and second X coordinates are the same (#27327)
(cherry picked from commit 5d81f8ac16)
2026-02-14 05:51:30 +01:00
chris jones @ipatch 3f179cb32d gui: preferences fixes #27379
(cherry picked from commit 9289e27230)
2026-02-14 00:39:33 +01:00
Roy-043 4ddc0d8859 Draft: fix depency of patharray normal on view direction
Change normal calculation to use get_shape_normal

(cherry picked from commit a8757f7947)
2026-02-13 22:55:16 +01:00
Chris Hennes 0439a998f1 PD: Improve error handling for RevolMethod::ToFirst
(cherry picked from commit 9e042ff480)
2026-02-13 21:21:25 +01:00
Roy-043 0f338003dd 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

(cherry picked from commit 7912f84136)
2026-02-12 17:37:23 +01:00
Roy-043 b1340ab5b5 BIM: fix BuildingPart issues with Arch_Reference
(cherry picked from commit db5fff6ccc)
2026-02-12 16:37:20 +01:00
Yash Suthar c88f5e3247 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>
(cherry picked from commit 3d14203fa4)
2026-02-12 07:10:11 +01:00
Roy-043 178cd713f8 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).

(cherry picked from commit 54c0c2f83c)
2026-02-10 22:03:51 +01:00
Yash Suthar ea6d02157f Sketcher: Fix snap while drag and fix drag for arc
Signed-off-by: Yash Suthar <yashsuthar983@gmail.com>
(cherry picked from commit 2cd45b07f7)
2026-02-10 21:27:32 +01:00
Caio Venâncio do Rosário 7392a87526 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>
(cherry picked from commit bf51a00dfd)
2026-02-10 13:57:13 +01:00
drwho495 b8bf211d19 Remove hasher check and migrate CAM files
(cherry picked from commit 72b1076788)
2026-02-10 06:49:01 +01:00
Neale Swinnerton bfcc69d436 feat(Gui): set client name to FreeCAD when connecting to spacenav
This enables per-application configuration in spacenavd for FreeCAD.

(cherry picked from commit e38c831970)
2026-02-10 06:48:07 +01:00
Billy Huddleston 394305b325 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"

(cherry picked from commit 6e34b79da4)
2026-02-10 06:46:48 +01:00
Tomáš Pikálek e31f7148dd Sketcher: Reimplement strikethrough of inactive constraint labels
(cherry picked from commit 41e3cdb9a5)
2026-02-10 04:41:11 +00:00
Tomáš Pikálek 3505b6e739 Sketcher: Vertical centering of constraint labels
(cherry picked from commit 77e5645af0)
2026-02-10 04:41:11 +00:00
tarman3 bd0d52257d CAM: Profile - fix _getCutAreaCrossSection()
(cherry picked from commit 353459f1fe)
2026-02-09 22:36:18 +01:00
freecad-gh-actions-translation-bot af79ce4fd8 Update translations from Crowdin
(cherry picked from commit e5d0e5316d)
2026-02-09 09:38:39 +01:00
wandererfan 42247b35ff [TD]fix fail on single edge cutting profile
(cherry picked from commit 0745d40f86)
2026-02-08 09:34:29 +01:00
Roy-043 e2e7d41a50 BIM: fix regression caused by Link Hosts handling (#27406)
(cherry picked from commit 105543bf17)
2026-02-08 09:34:14 +01:00
Chris Hennes 1d1496a716 Merge pull request #27261 from kkocdko/backport-27220-and-27074-to-1-1
Backport pixi fixes #26753 #27074 #27220 for linux
2026-02-07 22:29:40 -06:00
Petter Reinholdtsen d59d400fea 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.

(cherry picked from commit dfdabbfc87)
2026-02-07 01:31:26 +01:00
Chris Hennes 11c14e3387 Packaging: Fix typo in end-of-line format
(cherry picked from commit 27587b9cd2)
2026-02-05 23:29:34 +01:00
Jacob Oursland 219d3e0d3a CI: pin swig on release builds.
(cherry picked from commit 9440749423)
2026-02-04 23:09:24 +01:00
Chris Hennes 719f790da8 Package: Make Windows uninstaller preferences language clearer
(cherry picked from commit 6f60022a35)
2026-02-04 21:57:55 +01:00
xtemp09 09778d9922 [GUI] Handle Enter and Escape in the search box in Preferences.
(cherry picked from commit 0b5a0a6abb)
2026-02-04 07:43:37 +01:00
Roy-043 50b950d830 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

(cherry picked from commit ed104dd2c1)
2026-02-03 11:10:34 +01:00
Roy-043 61f67410dd BIM: add processSubShapes to ArchSpace.py
Fixes #24579.

(cherry picked from commit 30ea676367)
2026-02-03 11:09:10 +01:00
PaddleStroke 377d3a8d6b 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>
(cherry picked from commit a3486b4dd2)
2026-02-03 10:30:05 +01:00
PaddleStroke 8175e0633f Assembly: Fix isolate not working on sub assembly components
(cherry picked from commit 212e4f07af)
2026-02-02 21:56:16 +01:00
PaddleStroke 88c2a58868 Assembly: Fix Assembly activation issues. - backport (#27194)
* 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"

* Update ViewProviderAssembly.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-02-02 17:41:06 +01:00
freecad-gh-actions-translation-bot 6ac2e75a4d Update translations from Crowdin
(cherry picked from commit 0b7da82433)
2026-02-02 15:45:35 +01:00
PaddleStroke b6f252ddfc Measure: fix new measure marked as recompute (#27235)
(cherry picked from commit 3d7cc53317)
2026-02-01 15:59:11 +01:00
nishi 1a797d9092 Measure: corrected angle measurements bug (#27254)
(cherry picked from commit 1818911c5f)
2026-02-01 15:54:00 +01:00
Billy Huddleston 5fbf699057 Revert "CAM: Add threshold for treating large-radius arcs as linear in simulator"
This reverts commit 0b35385f4a9416c58bda2353e912bf2539d21c6d.

(cherry picked from commit c98d077d91)
2026-02-01 13:01:00 +01:00
Vassily Checkin f93c26ff35 Sketcher: fix intermittent crash on sketch exit
(cherry picked from commit d3d6459484)
2026-02-01 10:53:30 +01:00
Arusekk 3e659cf6f8 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

(cherry picked from commit c497a583ca)
2026-01-31 15:50:01 +01:00
kkocdko 4c2da05273 Pixi: Fix qt6-wayland dep.
Co-authored-by: Gaël Écorchard <gael@km-robotics.cz>
2026-01-31 17:19:01 +08:00
kkocdko 5ed10ef76f Pixi: pin xcb-util-cursor==0.1.5 to address cursor bug.
Co-authored-by: Jacob Oursland <jacob.oursland@gmail.com>
2026-01-31 17:13:48 +08:00
Chris Hennes 3d538beb80 Revert "Build: cmake: fixes #26247 update cmake to work with new required dep…"
This reverts commit 61b87e5ed0.
2026-01-31 09:24:44 +01:00
Roy-043 86d64caf64 Draft: fix autogroup behavior if active group is a layer (#27102)
(cherry picked from commit 0f2bdf280f)
2026-01-30 09:38:28 +01:00
PaddleStroke fddd465f05 Sketcher: fix logic flaw in ConstraintLineByAngle
(cherry picked from commit a0847c22c7)
2026-01-30 05:13:01 +01:00
Max Wilfinger f3ce0f0517 Merge pull request #27240 from FreeCAD/backport-27134-to-releases/FreeCAD-1-1
[Backport releases/FreeCAD-1-1] TechDraw: Fix circle centerline default line style
2026-01-30 04:56:10 +01:00
Kacper Donat df9f1dcd66 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.

(cherry picked from commit 4dda92e599)
2026-01-30 00:12:47 +01:00
wandererfan f253ad4c03 [TD]clang warnings
(cherry picked from commit b8f09bd758)
2026-01-29 16:08:35 +00:00
wandererfan 389901185c [TD]fix circle centerlines line style
(cherry picked from commit 29066c1a53)
2026-01-29 16:08:35 +00:00
Timothy Miller 30047c9c62 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>
(cherry picked from commit 9eed3a8d77)
2026-01-29 15:50:57 +01:00
sliptonic 80137b683d Merge pull request #27082 from chennes/eliminateRealpathForLibDir
App: Eliminate use of os.path.realpath for libdir
2026-01-29 05:09:52 -06:00
PaddleStroke 5b15169423 Sketcher: Fix arc angle dragging distance
(cherry picked from commit 7bcaa766de)
2026-01-27 20:52:41 +01:00
Alfredo Monclus 7c73521c46 Gui: fix skip wayland grabMouse since isn't supported
(cherry picked from commit ab29644276)
2026-01-27 14:37:41 +01:00
PaddleStroke f1cd83687b Assembly: fix sub assembly joint bug (#27172)
(cherry picked from commit caff52b1ed)
2026-01-27 14:36:35 +01:00
Chris ab9da908a7 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

(cherry picked from commit 3f49793794)
2026-01-26 21:34:17 +01:00
Max Wilfinger 9119100ca1 [Backport releases/FreeCAD-1-1] Expression Completer: speedup property completion (#27182)
* 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.

(cherry picked from commit d10bd05689)

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

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

(cherry picked from commit 78f38d5c15)

---------

Co-authored-by: Louis Gombert <louisgombert@gmail.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2026-01-26 20:57:27 +01:00
FreeCAD Ci Runner ac68914244 Sketcher: Fix external geometry creation from LCS (#26946) (#26995)
* Sketcher: Fix external geometry creation from LCS



* Sketcher : Refactor used freecad_cast



---------


(cherry picked from commit cf93c33359)

Signed-off-by: Yash Suthar <yashsuthar983@gmail.com>
Co-authored-by: Yash Suthar <yashsuthar983@gmail.com>
2026-01-26 19:42:45 +00:00
Max Wilfinger 1569fdd070 [Backport releases/FreeCAD-1-1] Core: Update copyright year to 2026 (#27180)
* Core: Update copyright year to 2026

(cherry picked from commit f0280bffad)

* Base: Auto-inject copyright year

(cherry picked from commit 4db0eaf171)

---------

Co-authored-by: Chris Hennes <chennes@gmail.com>
2026-01-26 19:36:40 +01:00
pre-commit-ci[bot] e24c3267e3 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci

(cherry picked from commit 78f38d5c15)
2026-01-26 17:23:21 +00:00
Louis Gombert fa338e6baf 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.

(cherry picked from commit d10bd05689)
2026-01-26 17:23:21 +00:00
Chris Hennes b201c7767d Base: Auto-inject copyright year
(cherry picked from commit 4db0eaf171)
2026-01-26 16:53:46 +00:00
Chris Hennes 3c101b055f Core: Update copyright year to 2026
(cherry picked from commit f0280bffad)
2026-01-26 16:53:46 +00:00
freecad-gh-actions-translation-bot b5041afe87 Update translations from Crowdin
(cherry picked from commit d574623a2e)
2026-01-26 14:42:08 +01:00
PaddleStroke 3ac3be68cf 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>
(cherry picked from commit b4025abab6)
2026-01-26 14:01:49 +01:00
captain0xff 21a243324c Gui: Prevent the editing root from getting clipped
(cherry picked from commit 11d22e326c)
2026-01-25 14:35:35 +01:00
PaddleStroke 97ed11358b Assembly: prevent assembly collapse when editing sketch. (#26956)
* Gui: View provider: isAutoCollapseOnDeactivation

* Update ViewProvider.h

* Update ActiveObjectList.cpp

* Update ViewProviderAssembly.cpp

* Update ActiveObjectList.cpp

(cherry picked from commit abc5f90466)
2026-01-23 18:13:04 +01:00
Amon Sha 202edb75d7 Merge pull request #27077 from amon-sha/fix_sketcher_autoscale_segfault
Sketcher: fix segfault during autoscale
(cherry picked from commit 6a0d59b0c1)
2026-01-23 17:32:01 +01:00
Max Wilfinger 7896d33d77 Merge pull request #27089 from FreeCAD/backport-24951-to-releases/FreeCAD-1-1
[Backport releases/FreeCAD-1-1] Assembly: Highlight joint elements on joint selection
2026-01-23 00:21:49 +01:00
PaddleStroke 6de0129f2a SoBrepEdgeSet : Fix color override crash
(cherry picked from commit 5009a4ddaf)
2026-01-22 19:17:28 +00:00
paddle 1bf9e7af16 Assembly: Highlight joint elements on joint selection
(cherry picked from commit d3cb7baa3a)
2026-01-22 19:17:28 +00:00
Chris Hennes e68568c121 App: Eliminate use of os.path.realpath for libdir
Some Windows users report that when given a non-existent path,
os.path.realpath is raising an exception (despite not setting
`strict=true`). To eliminate this error, switch processing of the
usually-non-existent `LibFcDir` to be entirely string-based, with no
filesystem access at all. This is a minimal fix to the reported bug and
does not attempt any larger, more systematic change.

See bug #26864 for details.
2026-01-22 06:28:32 -06:00
PaddleStroke d82661a433 Sketch: Forward non-default edit mode to base class. (#27063)
Ported from Codeberg commit 66dbf277

Co-authored-by: wwmayer <wmayer@freecad.org>
(cherry picked from commit 93abfc4fa4)
2026-01-22 05:28:37 +01:00
PaddleStroke 60239e9034 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>
(cherry picked from commit dee4ab6dbd)
2026-01-21 07:07:49 +01:00
chris 3883584369 cmake: fix issue #25048 have cmake fail when pivy and swig use different API versions, update status messages
(cherry picked from commit 1f213dd498)
2026-01-21 07:07:24 +01:00
Yash Suthar 9df276f9c5 Sketcher: Switch to perpendicular based instead of "de la Hire" in setting minor axis of ellipse
Signed-off-by: Yash Suthar <yashsuthar983@gmail.com>
(cherry picked from commit 9beca4363a)
2026-01-21 07:07:17 +01:00
Roy-043 2f5c3d46c2 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.

(cherry picked from commit fbf5cb7e11)
2026-01-21 00:46:38 +01:00
Max Wilfinger 6726ce5d84 Recalculate example files
(cherry picked from commit 98c042a587)
2026-01-20 06:40:13 +01:00
Roy-043 b4ce4e9dc4 BIM: fix ArchReference Placement if whole file is used
(cherry picked from commit 0a8392e995)
2026-01-20 01:20:24 +01:00
PaddleStroke ba69d0557c PropertyEditor: Fix tab toggling bool (#26955)
(cherry picked from commit a49edadde2)
2026-01-20 00:54:59 +01:00
Roy-043 9b37fae868 Draft: fix DiscretizeEllipses preference inconsistency (#26953)
(cherry picked from commit 23ce17f4d0)
2026-01-20 00:25:48 +01:00
sliptonic a36a15f8be Merge pull request #26989 from Connor9220/AddTaperedBallNosev1-1
CAM: Add tapered ball nose toolbit/shape asset
2026-01-19 15:30:47 -06:00
PaddleStroke 80a26fd324 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.

(cherry picked from commit 17ac7dab3d)
2026-01-19 21:48:19 +01:00
Zheng, Lei 877494c279 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>
(cherry picked from commit 72971d48e5)
2026-01-19 21:27:37 +01:00
Roy-043 1558ad000a BIM: fix placement issue in BIM_View (#27015)
* BIM: fix placement issue in BIM_View

* BIM: fix placement issue in BIM_View

(cherry picked from commit c858e09ca5)
2026-01-19 21:15:29 +01:00
PaddleStroke 11755bfbdc PartDesign: enable LCS in 'Move after feature'
(cherry picked from commit 443b71d96e)
2026-01-19 19:34:59 +01:00
PaddleStroke 65b1582a0d Sketcher: Fix box selection regressions. And make addSelections Print to python (#26869)
(cherry picked from commit af053f19f5)
2026-01-19 19:21:56 +01:00
freecad-gh-actions-translation-bot 662b6bc77d Update translations from Crowdin
(cherry picked from commit 10a540b1bf)
2026-01-19 11:56:39 +01:00
Syres916 54d06118e5 [Sketcher] Fix serious integer typo
(cherry picked from commit 0a45527b8b)
2026-01-18 17:50:20 +01:00
PaddleStroke 8a70ac50f2 Assembly: fix crash when measure active
(cherry picked from commit c5e9e602d1)
2026-01-18 12:15:27 +01:00
Yash Suthar f39c9e6b74 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>
(cherry picked from commit 7aafb105f7)
2026-01-18 06:58:10 +01:00
Billy Huddleston e06645e203 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:32:06 -05:00
Syres916 b22bf2352a [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>
(cherry picked from commit c14d6f8848)
2026-01-16 22:51:21 +01:00
PaddleStroke 222de6d9d2 Assembly: Fix error on open doc in insert tool
(cherry picked from commit 4cc0a1b718)
2026-01-14 06:22:23 +01:00
chris 6a10439bd7 core: qt layout ui: ux/ui: fixes #26048 keep workbench selector visible
(cherry picked from commit 9f9dc75627)
2026-01-14 00:58:32 +01:00
PaddleStroke 3f62f646e5 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.

(cherry picked from commit fc82d71c15)
2026-01-14 00:43:23 +01:00
tetektoza 84499b2ad2 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>
(cherry picked from commit bb48de8265)
2026-01-13 08:10:27 +01:00
PaddleStroke 9db0df680a Gui: Fix broken build in DlgAddProperty.cpp (#26877)
* Gui: Fix broken build in DlgAddProperty.cpp

---------

Co-authored-by: Chris Hennes <chennes@pioneerlibrarysystem.org>
(cherry picked from commit 5792b1173c)
2026-01-13 06:15:00 +01:00
PaddleStroke 443e10b563 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>
(cherry picked from commit 168cebd41f)
2026-01-13 06:14:45 +01:00
Billy Huddleston 6843e96f61 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

(cherry picked from commit 650ebf693e)
2026-01-13 06:12:29 +01:00
Roy-043 e9ec91adfd 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>
(cherry picked from commit 2019ff051e)
2026-01-13 02:51:26 +01:00
freecad-gh-actions-translation-bot 37c0c6b328 Update translations from Crowdin
(cherry picked from commit 7ddee25ec9)
2026-01-13 01:38:54 +01:00
Kacper Donat b722af7d72 PartDesign: Recompute preview only if enabled (#26805)
Co-authored-by: Chris Hennes <chennes@pioneerlibrarysystem.org>
(cherry picked from commit 47bd6ac99e)
2026-01-12 14:14:12 +01:00
Pieter Hijma 58909d1322 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>
(cherry picked from commit b173365653)
2026-01-12 13:14:04 +01:00
Roy-043 f6fe2df56f 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.

(cherry picked from commit 95b2a41e78)
2026-01-12 10:45:19 +01:00
Kacper Donat 199fbfb91a 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.

(cherry picked from commit 4fae2b83f8)
2026-01-12 00:36:17 -06:00
Kacper Donat fcf62a16ca 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.

(cherry picked from commit 800990bacd)
2026-01-12 00:26:18 -06:00
Fabio Rossi 824203038d fix hdf5 detection
avoid side-effects of reusing cached variables (defined PCHDF5_FOUND for
pkgconfig and HDF5_HEAD_FOUND for hdf5.h detections)

(cherry picked from commit 419e1822b8)
2026-01-11 23:49:11 -06:00
Chris 61b87e5ed0 Build: cmake: fixes #26247 update cmake to work with new required dep lark for BIM (#26407)
(cherry picked from commit 12d1dba109)
2026-01-11 23:48:14 -06:00
timpieces 18d11ad047 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.

(cherry picked from commit 50c22e10ce)
2026-01-11 19:43:30 -06:00
Kacper Donat 68394b2127 Merge pull request #26851 from FreeCAD/backport-26811-to-releases/FreeCAD-1-1
[Backport releases/FreeCAD-1-1] CI: Disalbe ubuntu run temporarily
2026-01-12 00:24:21 +01:00
Kacper Donat 552d67fd3d CI: Disable ubuntu run temporarily
(cherry picked from commit ca1c5eb322)
2026-01-11 19:39:23 +00:00
Kacper Donat 8d851d4f8b CI: Change github.ref into github.head_ref
This actually allows us to check source branch

(cherry picked from commit 77ee600544)
2026-01-11 19:39:23 +00:00
Roy-043 b8c5ada0aa Add files via upload
(cherry picked from commit bfb72a6925)
2026-01-11 06:26:10 +01:00
Louis Gombert 4948158443 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.

(cherry picked from commit c1b40e3dfc)
2026-01-10 07:17:22 +01:00
Roy-043 76da16ed82 TechDraw: fix-wrong sWhatsThis for align-commands
sWhatsThis should match the command name.

(cherry picked from commit fe86abea92)
2026-01-10 07:15:05 +01:00
FreeCAD Ci Runner 93c254de4c [Backport releases/FreeCAD-1-1] CAM: Fix 3D Surface Rotational Scan (#26798)
* Fix 3D Surface Rotational Scan

Retract to Clearance Height Before Transition Between Passes

(cherry picked from commit 5883bad32b)

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

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

(cherry picked from commit 61e053ffb9)

---------

Co-authored-by: Dimitris75 <30848292+Dimitris75@users.noreply.github.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2026-01-10 01:03:46 +00:00
petterreinholdtsen d997915c39 CAM: Get Fanuc post processor working and implement several improvements (1.1 backport) (#26436)
* 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.

* 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.

* 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.

* 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

* CAM: Switch Fanuc post processor default for M6T0 to disable by default.

* 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

* 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.

* 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.

* 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.

* CAM: Adjusted Fanuc post processor to use M05 consistently everywhere.

* 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.

* 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.

* 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.

* 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.
2026-01-09 10:39:24 -06:00
PaddleStroke baa60c515f Assembly: Explode radially: prevent click on item
(cherry picked from commit 5339f415be)
2026-01-09 10:31:24 +01:00
tarman3 eb127af4c8 CAM: RampEntryDressup - Fix findMinZ()
Backport of pull request #26695
2026-01-09 09:53:42 +01:00
tetektoza 69c09f6a13 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.

(cherry picked from commit 887c8d3bdf)
2026-01-09 07:21:54 +01:00
Max Wilfinger 116bb0dcd2 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>
(cherry picked from commit 5fbd150b18)
2026-01-09 05:34:29 +01:00
Max Wilfinger 6d91e63828 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>
(cherry picked from commit b0331ed979)
2026-01-09 05:34:13 +01:00
Max Wilfinger 82987c9972 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>
(cherry picked from commit 3616611ea3)
2026-01-08 22:49:40 +01:00
PaddleStroke 5704d1e66d Add files via upload
(cherry picked from commit 830329f0fc)
2026-01-08 20:17:32 +01:00
tetektoza 5f9ca54720 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.

(cherry picked from commit 0baf444c3e)
2026-01-08 20:13:01 +01:00
Adrian Insaurralde Avalos 0c7935c755 Build: bump version suffix to rc2 2026-01-08 09:03:27 -03:00
jffmichi b9c11dc75b CAM: fix Radius Mill TipDiameter resetting
(cherry picked from commit ae8412468a)
2026-01-08 04:52:17 +01:00
Kacper Donat 99f27d4b9f CI: Limit backports to pixi only
(cherry picked from commit ad0ad85b77)
2026-01-08 00:02:32 +01:00
tetektoza 0b4e10ca4d 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.

(cherry picked from commit b1fdf659d8)
2026-01-07 17:16:54 +01:00
tetektoza e5f717ba50 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.

(cherry picked from commit 4aa4f2663e)
2026-01-07 17:16:54 +01:00
drwho495 b3f5a35ef7 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.

(cherry picked from commit 9b64da827a)
2026-01-07 16:20:48 +01:00
PaddleStroke dae6cc2481 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.

(cherry picked from commit 450789e77b)
2026-01-06 21:39:25 +01:00
PaddleStroke 37b8ba683b Sketcher: Reverse #25478 and #26033
(cherry picked from commit 26723cf209)
2026-01-06 21:39:25 +01:00
Adrian Insaurralde Avalos 86f512e2c3 set BUILD_DYNAMIC_LINK_PYTHON=OFF for mac and linux release builds
fix regresion #25098

(cherry picked from commit ede7013f55)
2026-01-06 20:21:41 +01:00
WandererFan 2fdda0c4e0 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.

(cherry picked from commit cc707c98eb)
2026-01-06 20:17:39 +01:00
PaddleStroke 2468a26f01 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>
(cherry picked from commit 21f0d44320)
2026-01-06 19:21:44 +01:00
Yash Suthar f7761c5b14 Core: Fix premature merge of property in debug mode
Signed-off-by: Yash Suthar <yashsuthar983@gmail.com>
(cherry picked from commit 9e22524e11)
2026-01-06 17:13:03 +01:00
PaddleStroke b56fba2ee6 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>
(cherry picked from commit 0fa707c523)
2026-01-06 16:58:26 +01:00
Roy-043 d80801c07c BIM: remove v1.1 Sill Height code (#26641)
(cherry picked from commit 530aba61db)
2026-01-06 11:46:55 +01:00
Billy Huddleston 728ae02651 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

(cherry picked from commit 2a24a539e6)
2026-01-06 10:52:05 +01:00
wandererfan efbf8eafb7 [TD]prevent crash on cosmetic element delete
(cherry picked from commit dc0901839e)
2026-01-06 07:35:20 +01:00
Kacper Donat 1853a3b0a1 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.

(cherry picked from commit 2682d68809)
2026-01-06 05:00:26 +01:00
WandererFan 1d81ac4e2a 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>
(cherry picked from commit 7abdbe0ce0)
2026-01-05 23:17:12 +01:00
Captain 54b84ffa1b 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>
(cherry picked from commit 2b97d553f9)
2026-01-05 18:10:48 +01:00
freecad-gh-actions-translation-bot ad2f530875 Update translations from Crowdin
(cherry picked from commit 2592406b35)
2026-01-05 13:18:43 +01:00
Kacper Donat 43696df1b1 PartDesign: Fix misplaced preview for patterns
Previous solution did not take into account supporting shape transform
which should now be handled correctly.

(cherry picked from commit f819011d81)
2026-01-05 12:16:50 +01:00
PaddleStroke b7e3bb1f7c Sketcher: Use DenseQR for small sketches to avoid SparseQR rank issues (#26559)
(cherry picked from commit c8106982de)
2026-01-04 20:18:19 -09:00
Roy-043 fc2ad996f4 Draft: fix regression in Pattern display (Refactor texture handling in view_base.py)
(cherry picked from commit 34441b8101)
2026-01-05 05:34:04 +01:00
Roy-043 ea9039cd30 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.

(cherry picked from commit 21e7fa1e8b)
2026-01-05 05:34:04 +01:00
Billy Huddleston b16ec077ba 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

(cherry picked from commit a7c9cbee9e)
2026-01-05 02:49:34 +01:00
Kacper Donat b98dfeef70 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.

(cherry picked from commit c938645843)
2026-01-05 01:48:41 +01:00
tetektoza 4c844ca5f5 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`.

(cherry picked from commit 3f49f3f059)
2026-01-03 09:12:54 +01:00
Krrish777 6c8917d9c8 Fix: Update PartDesign Boolean dropdown immediately before recomputation
(cherry picked from commit d944df04e1)
2026-01-03 08:17:45 +01:00
PaddleStroke 48ddc33bd3 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>
(cherry picked from commit 07756cc838)
2026-01-03 02:37:10 +01:00
chris 39750371ad partdesign: fix issue #25811 while not breaking #14720 topo naming
(cherry picked from commit 6df651b5c8)
2026-01-03 01:21:40 +01:00
tetektoza ab65ea8fe4 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.

(cherry picked from commit c66aa58a60)
2026-01-02 23:43:48 +01:00
tetektoza f0930dbd83 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.

(cherry picked from commit 4dcef14bd8)
2026-01-02 23:43:48 +01:00
PaddleStroke 3672610617 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

(cherry picked from commit 9f2b0f910b)
2026-01-02 23:34:11 +01:00
Max Wilfinger 322f1348e3 Merge pull request #26606 from FreeCAD/backport-26598-to-releases/FreeCAD-1-1
[Backport releases/FreeCAD-1-1] Sketcher: Fix large sketch being laggy
2026-01-02 20:36:27 +01:00
PaddleStroke 3f24fca729 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>
(cherry picked from commit be6be63764)
2026-01-02 15:37:15 +00:00
tetektoza 73f5f332fb Gui: Use encodeAttribute when escaping XML attributes for XHTML
(cherry picked from commit 57dd04f214)
2025-12-30 23:00:43 +01:00
tetektoza 11756c1cd4 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

(cherry picked from commit 38bb34ab85)
2025-12-30 23:00:43 +01:00
tetektoza 2249b8cdd6 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

(cherry picked from commit 2ae054e470)
2025-12-30 23:00:43 +01:00
tetektoza ed6bf31b77 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;

(cherry picked from commit fe7bceeb79)
2025-12-30 23:00:43 +01:00
tetektoza c269631319 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

(cherry picked from commit 679d4c2397)
2025-12-30 23:00:43 +01:00
tetektoza 43c88854d0 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

(cherry picked from commit df25bd3cdb)
2025-12-30 22:07:35 +01:00
Kacper Donat 07f5b2362e 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.

(cherry picked from commit a0356796ac)
2025-12-30 19:41:49 +01:00
drwho495 b62a27ce6b TopoNaming: Enable migration code for 1.0.X -> 1.1 (#26538)
(cherry picked from commit e9ea3d0d25)
2025-12-30 15:45:30 +01:00
Roy-043 bab554670d BIM: fix component VerticalArea calculation (#26254)
(cherry picked from commit 0ced25c6dc)
2025-12-30 09:03:44 +01:00
theo-vt 8da1881389 Sketcher.scale: Scale label of modified constraints (#26442)
* Sketcher.scale: Scale label of modified constraints

* Sketcher.scale: Narrowing conversion on constraint index

(cherry picked from commit cc60502708)
2025-12-30 05:48:07 +01:00
Adrian Insaurralde Avalos 20623a7757 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

(cherry picked from commit 3dce4c831d)
2025-12-29 21:40:11 +01:00
Chris Hennes 1dbcd2f8df 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.

(cherry picked from commit bb8d4a8095)
2025-12-29 21:39:43 +01:00
Christoph Moench-Tegeder 2df9e6d0d5 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.

(cherry picked from commit 57b970f795)
2025-12-29 21:39:16 +01:00
Chris Hennes 99e25d353a Gui: Add explicit find_package for Qt6::GuiPrivate
(cherry picked from commit e858a13a5f)
2025-12-29 21:38:47 +01:00
Roy-043 0f8e601e78 BIM: prevent crash when switching BIM_View Render Mode
Fixes #24929.

Disabled animations in viewer to prevent crashes.

(cherry picked from commit 2292316f22)
2025-12-29 21:38:32 +01:00
Chris Hennes 2d3917c62f PD: Add case for when scripts set Midplane=False
(cherry picked from commit 8b9048a784)
2025-12-29 20:05:28 +01:00
Alfredo Monclus 7168aba55d PartDesign: fix transform removal causing an invalid base feature on the next solid if it was broken itself
(cherry picked from commit 24b9cdb4f9)
2025-12-29 18:50:56 +01:00
Adrian Insaurralde Avalos 730065a94c add freecad channel to pixi envs to use custom ifcopenshell and calculix package 2025-12-29 17:48:33 +01:00
Yash Suthar 5e9b228ce1 Fix : added empty link check to prevent null entry in document link map (#26406)
Signed-off-by: Yash Suthar <yashsuthar983@gmail.com>
(cherry picked from commit ee7d84bb03)
2025-12-29 17:44:16 +01:00
Rahul Paul e95b18012e [MOD] Fix premature evaluation and recursive updates in Image Plane Settings (#26390)
* Fixed image editor

* decoupled the chnage height and width fns

* final fixes

(cherry picked from commit 1002bcb398)
2025-12-29 17:44:04 +01:00
PaddleStroke e54f09e5e7 PartDesign: Fix upToFace not working with non-ASCII filenames (#26514)
* PartDesign: Fix upToFace not working with non-ASCII filenames

* Update TaskExtrudeParameters.cpp

(cherry picked from commit 20e45231c5)
2025-12-29 17:34:39 +01:00
freecad-gh-actions-translation-bot 737b6e27be Update translations from Crowdin
(cherry picked from commit 7fe10f7436)
2025-12-29 11:33:08 +01:00
Roy-043 c1d394802e BIM: fix transparency of curtain walls in BIMExample.FCStd
Curtain walls in the BIM example file did not have transparent glass panels.

(cherry picked from commit 776b2f2d5a)
2025-12-28 07:54:21 +01:00
Chris Hennes 2cf7cc761a PD: Modify tests to use SideType instead of Midplane
(cherry picked from commit a4bff812d7)
2025-12-27 19:30:13 +01:00
Chris Hennes 4a9f2ff24a PD: For Body get the color from the tip
Mostly affects STEP export.

(cherry picked from commit 51d2c88b02)
2025-12-27 19:30:04 +01:00
Chris Hennes 62181c7e74 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.

(cherry picked from commit 7da646754a)
2025-12-27 19:30:04 +01:00
horseDeveloper 90612b05a2 Fixing Leftover references from migration from freecadweb.org (#26163)
(cherry picked from commit 4892154faf)
2025-12-26 18:35:16 +01:00
Chris Hennes a896929f1e Tools: Add Surface to translations
(cherry picked from commit 2fbc36d472)
2025-12-25 21:50:26 +01:00
Krzysztof 39d2151eca 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

(cherry picked from commit 47d1913544)
2025-12-25 09:11:48 +01:00
captain0xff bffe90dce6 Gui: fix linear dragger increments when the multFactor is set
(cherry picked from commit 5cc05a1ab2)
2025-12-25 09:11:29 +01:00
Chris 3901c8f1de 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>
(cherry picked from commit eb61ee36a6)
2025-12-23 22:39:54 -06:00
Roy-043 1ab014c196 Draft: array task panels: add workaround for Building US unit system
Fixes #26276.

(cherry picked from commit 4fe0dff1bc)
2025-12-23 22:24:51 -06:00
Roy-043 05e26f3d03 BIM: fix AttributeError when snapping for window placement
(cherry picked from commit 5297493a65)
2025-12-23 22:24:44 -06:00
Rodrigo Olaya Moreno e99a06f402 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

(cherry picked from commit 345a656125)
2025-12-23 22:02:47 -06:00
timpieces d5ac6a07e6 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.

(cherry picked from commit a2dabd42e0)
2025-12-23 09:23:52 -06:00
Roy-043 c9ca3d01e3 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

(cherry picked from commit d93da36b41)
2025-12-23 09:16:54 -06:00
PaddleStroke f3511baa7e Assembly: Fix deletion of joint references to bodies
(cherry picked from commit d15347d2ad)
2025-12-23 05:48:02 +01:00
timpieces 1c374c68fa 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.

(cherry picked from commit 4567d04547)
2025-12-23 05:47:47 +01:00
wandererfan e3e04387a5 [TD]fix handling of non-standard page sizes
(cherry picked from commit 35d4a849ef)
2025-12-22 20:32:58 +01:00
marbocub 3a405bbf6b 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

(cherry picked from commit 244282f855)
2025-12-22 19:57:13 +01:00
wandererfan 38dd102f77 [TD]fix tearing of page edges
(cherry picked from commit 04e2d631bb)
2025-12-22 19:30:43 +01:00
Kacper Donat 6fd72e00cd 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.

(cherry picked from commit 8c399e1fd0)
2025-12-22 19:30:33 +01:00
Roy-043 ea048829f7 Part: fix Part_EditAttachment unitless input error (#25923)
(cherry picked from commit 3a5f5d70ee)
2025-12-22 18:31:14 +01:00
Florian Foinant-Willig aca2eeb173 fix %r format spec
(cherry picked from commit 7b315e80a7)
2025-12-22 18:24:32 +01:00
Kacper Donat 01c42b34d9 Gui: Ensure that QuantitySpiBox handles expression properly
(cherry picked from commit febfd65e59)
2025-12-22 18:02:49 +01:00
PaddleStroke dbf87623b2 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>
(cherry picked from commit 3608c9f8c4)
2025-12-22 17:59:47 +01:00
Syres916 173734c902 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

(cherry picked from commit 9375f579f0)
2025-12-22 17:59:03 +01:00
Yash Suthar cfe36321d1 UI: Fix select all instances of an object in the tree
Signed-off-by: Yash Suthar <yashsuthar983@gmail.com>
(cherry picked from commit 60bd277d7a)
2025-12-22 16:48:17 +01:00
chris 4e187e83bf partdesign: pd: fix for issue #25794
(cherry picked from commit 46066e1cca)
2025-12-22 15:47:46 +01:00
Chris 525ce8e056 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

(cherry picked from commit 452f9b2087)
2025-12-22 15:08:42 +01:00
Alfredo Monclus 1b678a2ec6 PartDesign: fix hole clearance not appearing in the taskpanel when switching type
(cherry picked from commit d9e0fd6251)
2025-12-22 14:59:14 +01:00
Alfredo Monclus 6e08c67a3b PartDesign: fix thread depth not shown in taskpanel
(cherry picked from commit 6729540a78)
2025-12-22 14:59:06 +01:00
Chris Hennes 5ae095a0a8 PD: Fix missing silent mode check in GetTopoShapeVerifiedFace
Also ensure that all calls to this method actually verify the result.

(cherry picked from commit 76bd68e672)
2025-12-22 14:36:58 +01:00
Kacper Donat d21f01ce3b 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.

(cherry picked from commit 78a6891dae)
2025-12-22 13:22:05 +01:00
Kacper Donat dde6efaa2d 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>
(cherry picked from commit 4d712f44c2)
2025-12-22 12:56:03 +01:00
freecad-gh-actions-translation-bot d495562e56 Update translations from Crowdin
(cherry picked from commit 8b7ec488f0)
2025-12-22 12:41:35 +01:00
Louis Gombert bd6dbbcf00 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>
(cherry picked from commit 3601161d80)
2025-12-22 12:07:41 +01:00
Roy-043 b67b74181c 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`.

(cherry picked from commit 0af22943b2)
2025-12-21 22:15:58 -06:00
Chris 0c48516c57 Sketcher: Allow live preview of sketch placement (#26033)
along with unit tests

(cherry picked from commit 4cd81136b6)
2025-12-21 18:28:35 +01:00
Furgo ec3775291a BIM: Initialize SketchArch variable before use (#26336)
(cherry picked from commit 0193b1776d)
2025-12-21 10:42:31 +01:00
Furgo 3b83c90c3b BIM: fix lock removal of Sill property
(cherry picked from commit 69de78e22d)
2025-12-21 10:29:22 +01:00
Furgo 749f6cbc53 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

(cherry picked from commit bdea3d105f)
2025-12-21 08:48:53 +01:00
Louis Gombert 9e58942004 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>
(cherry picked from commit cead907a57)
2025-12-21 08:48:38 +01:00
Chris Hennes 6c1bd0f21b Addon Manager: Update to 2025.12.19
Minor bug fixes and translation update.

(cherry picked from commit c423e8de08)
2025-12-20 06:58:52 +01:00
Christoph Moench-Tegeder 7310a88866 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.

(cherry picked from commit 4f4f4425aa)
2025-12-20 06:58:29 +01:00
Roy-043 d4f4691f1f 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>
(cherry picked from commit 348eef644b)
2025-12-20 06:58:14 +01:00
VM4Dim 3b1bc25870 Gui: Fix non-Latin groupName (#26285)
(cherry picked from commit 7cd88534b5)
2025-12-20 06:57:21 +01:00
Kacper Donat 254ee35bc2 Gui: Wrap strings with QStringLiteral
(cherry picked from commit 87b257546f)
2025-12-20 00:20:36 +01:00
PaddleStroke 4e74fe97ed 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

(cherry picked from commit 893a9d19b6)
2025-12-19 13:55:31 +01:00
Yash Suthar 456534cce6 Part: added floating point fallback in PropertyLinks::_updateElementReference
Signed-off-by: Yash Suthar <yashsuthar983@gmail.com>
(cherry picked from commit dbd2bade1e)
2025-12-19 11:32:58 +01:00
chris e1201b35a1 sketcher: fixes issue #26167 no polygon distort when repositioning / constraining
(cherry picked from commit 22552848fd)
2025-12-19 11:32:43 +01:00
Kacper Donat c7489597bc Stylesheets: Fix separators appearance
(cherry picked from commit b5d60baa68)
2025-12-18 19:50:24 +01:00
PaddleStroke 76b1cb43cc 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

(cherry picked from commit 0c1ef0c77f)
2025-12-18 15:46:57 +01:00
Chris Hennes 11d8e6a411 PartDesign: Compiler warning cleanup
(cherry picked from commit 0ba75a7573)
2025-12-18 10:40:24 +01:00
Chris Hennes d172914c5d TechDraw: Compiler warning cleanup
(cherry picked from commit c7c4c6f0cc)
2025-12-18 10:40:24 +01:00
Chris Hennes b33cadca1b Sketcher: Compiler warning cleanup
(cherry picked from commit 50f029edd4)
2025-12-18 10:40:24 +01:00
Chris Hennes 165e58a7b9 Measure: Compiler warning cleanup
(cherry picked from commit 36332bf9ca)
2025-12-18 10:40:24 +01:00
Chris Hennes fb807c5a62 Assembly: Compiler warning cleanup
(cherry picked from commit 04a9c1e7b0)
2025-12-18 10:40:24 +01:00
Chris Hennes 1a537852ae Gui: Compiler warning cleanup
(cherry picked from commit 0416a5bc0b)
2025-12-18 10:40:24 +01:00
Chris Hennes 0b370963e1 App: Compiler warning cleanup
(cherry picked from commit 55a55725eb)
2025-12-18 10:40:24 +01:00
freecad-gh-actions-translation-bot 3bf2c5a019 Update translations from Crowdin
(cherry picked from commit 6c6cff7322)
2025-12-18 05:49:49 +01:00
PaddleStroke 014851827c Assembly: Ball drag mode. (#26222)
(cherry picked from commit 8fd81d4109)
2025-12-16 21:00:04 +01:00
Saksham Malhotra 143e16bd44 PartDesign: move AllowCompound to Base property group (#26180)
(cherry picked from commit b7735044c4)
2025-12-16 07:46:13 +01:00
Chris Hennes 6b7262bba9 PD: Don't warn about Midplane on document load
(cherry picked from commit 3208b6de5f)
2025-12-16 05:52:44 +01:00
Chris Hennes ef5b86afa4 Gui: Correct UTF-8 support for property names
(cherry picked from commit 10ed34bd4c)
2025-12-16 05:52:24 +01:00
Roy-043 10680272e1 BIM: ArchReference: fix coin node handling
Fixes #25772.

(cherry picked from commit 2efd63614f)
2025-12-16 05:52:07 +01:00
Roy-043 17086d6ff2 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.

(cherry picked from commit 1c8df498f3)
2025-12-15 21:23:25 +01:00
Chris Hennes d03d8589f3 PD: Correct is-datum-in-body check
(cherry picked from commit 5ba7f207ab)
2025-12-15 21:23:10 +01:00
Roy-043 0e490cae46 BIM: use optimalBoundingBox in getCutVolume
(cherry picked from commit 15bb0ee896)
2025-12-15 21:23:02 +01:00
drwho495 4559d078e4 Implement Fix
Switch from checking child tag to checking the materTag

(cherry picked from commit 88b5cde45f)
2025-12-15 20:42:10 +01:00
Roy-043 7c7cb1a783 Draft: make Draft_AnnotationStyleEditor dialog wider
Increase AnnotationStyleEditorWidth from 450 to 600 to mitigate #25983.

(cherry picked from commit e6e285315c)
2025-12-15 19:01:09 +01:00
Kacper Donat 5c8ba72158 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.

(cherry picked from commit fc93004c89)
2025-12-15 17:40:12 +01:00
theo-vt 16bead131a Sketcher: Do not autoscale if there are blocked geometries
(cherry picked from commit 29eeab3624)
2025-12-15 17:40:00 +01:00
Ajinkya Dahale 3283b6e4e4 Sketcher: Only transfer angle to relevant segment on trim etc.
(cherry picked from commit 0800791a0f)
2025-12-15 17:39:50 +01:00
Ajinkya Dahale cf67fed6bc Sketcher: Handle angle constraint on sketchobject changes
Primarily trim, but also expected to affect split, extend etc.

(cherry picked from commit 78e5729520)
2025-12-15 17:39:50 +01:00
Kacper Donat 39c9bb67ef 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.

(cherry picked from commit aefd2592a8)
2025-12-15 17:39:41 +01:00
chris b59533a94d fem: attempt to resolve issue #19798
(cherry picked from commit 3476562dd7)
2025-12-14 19:17:18 +01:00
Yash Suthar f16e9f69e5 Core: fix "Save Image" giving dark area as compare to viewport
Signed-off-by: Yash Suthar <yashsuthar983@gmail.com>
(cherry picked from commit 8413922e52)
2025-12-14 14:51:01 +01:00
xtemp09 1387e274f2 [GUI] Rename Cancel ‘Close’ in Add Property dialog
(cherry picked from commit df6d148a85)
2025-12-13 15:20:31 +01:00
PaddleStroke 3090218976 Assembly: joint task: fix delete impossible of non-valid refs
(cherry picked from commit 9625a71d8d)
2025-12-12 11:11:10 +01:00
Roy-043 82f04f6303 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.

(cherry picked from commit 4b379c8e51)
2025-12-12 11:11:00 +01:00
Roy-043 56fab21375 Remove maxSnapFaces parameter from params.py
Removed 'maxSnapFaces' parameter from settings.

(cherry picked from commit e1d77cc771)
2025-12-12 11:11:00 +01:00
Alfredo Monclus 83b96c6c36 PardDesign: fix hole task thread combos not translating
(cherry picked from commit f92c8e126c)
2025-12-12 11:10:47 +01:00
Kacper Donat 29de8ace0e PartDesign: Recompute preview after forced recompute
This fixes some cases where Preview was stale and not recomputed after
changes done via code.

(cherry picked from commit c10f5d74d3)
2025-12-12 11:10:38 +01:00
PaddleStroke 3243f85145 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>
(cherry picked from commit 7a8135d863)
2025-12-11 14:46:48 +01:00
Kacper Donat 282768a5c8 Stylesheets: Fix toolbar button size change
(cherry picked from commit c12ca7b3ba)
2025-12-10 20:47:25 +01:00
Yash Suthar ac8ed20250 Link: Fixed Scale property behaviour when the object is moved
Signed-off-by: Yash Suthar <yashsuthar983@gmail.com>
(cherry picked from commit aed9b770f3)
2025-12-10 20:35:42 +01:00
Chris Hennes 8b257d701f PD: Add deprecation warning if Midplane is set
(cherry picked from commit 67948d60a2)
2025-12-10 19:46:26 +01:00
freecad-gh-actions-translation-bot 1f642f553b Update translations from Crowdin
(cherry picked from commit f7483a08b4)
2025-12-08 22:43:31 -06:00
wandererfan bfda3e194f [TD]guard against font size zero
(cherry picked from commit 475d46c3d0)
2025-12-09 05:25:53 +01:00
wandererfan f216df1126 [TD]convert transparency to alpha channel
(cherry picked from commit e2c5c643d8)
2025-12-09 05:25:53 +01:00
wandererfan 2e5a190149 [TD]add preference re alpha/transparency conversion
(cherry picked from commit 64f2c5388b)
2025-12-09 05:25:53 +01:00
wandererfan e83131ec20 [TD]fix CI fail on Win
(cherry picked from commit b1cbcbd238)
2025-12-08 19:42:53 +01:00
wandererfan 83a821c68e [TD]fix CosmeticVertex fail in script
(cherry picked from commit 3f10abe11b)
2025-12-08 19:42:53 +01:00
tetektoza 9b1e26cd87 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>
(cherry picked from commit 915b6f9901)
2025-12-07 14:30:01 +01:00
Ladislav Michl 7062b0511e Revert "[Base]retrieve unit text"
This reverts both pointless and broken commit c9fffa6789.

(cherry picked from commit 90086d3e31)
2025-12-06 11:03:24 +01:00
Ladislav Michl 9a70a2838a TechDraw: Refactor use of Unit Schema values
Quantity's getUserString already returns both factor and unitText.

(cherry picked from commit 3252aaf618)
2025-12-06 11:03:24 +01:00
Ladislav Michl e48a90dbde TechDraw: Fix MultiValueSchema formatting
Multi Value schemas cannot be forced to use Format::FORMATTED.

(cherry picked from commit a509bc2ee9)
2025-12-06 11:03:24 +01:00
Adrian Insaurralde Avalos 234ddb951a Plot: protect matplotlib.pyplot import form PyQt6 too and remove lingering debug print
(cherry picked from commit fbb65a34fe)
2025-12-05 10:18:13 -06:00
PaddleStroke 685b90c38a Sketcher: Fix errors message when selecting circle seam point. (#25953)
(cherry picked from commit a49d106807)
2025-12-05 08:59:59 +01:00
Sebastian 1df4fe0ffd 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>
(cherry picked from commit 945ba15e18)
2025-12-05 08:59:51 +01:00
PaddleStroke 528a1f5c6e Sketcher: Offset: Fix failure if 2+ closed wires with different orientations (#25941)
(cherry picked from commit 67234e98b7)
2025-12-05 06:37:10 +01:00
marioalexis 1b90efd21b Fem: Fix undefined variable
(cherry picked from commit 9d5f6c82be)
2025-12-05 06:36:54 +01:00
PaddleStroke 0308a1b849 Sketcher: dimension tool, use VPSketch version of addSelection
(cherry picked from commit 0c34c93fe4)
2025-12-04 05:37:59 +01:00
PaddleStroke c6de3d88be Sketcher: Make VPSketch::addSelection public
(cherry picked from commit 1784be046f)
2025-12-04 05:37:59 +01:00
Adrian Insaurralde Avalos 9e59e48e80 WindowsInstaller: more robust automatic version info from freecadcmd
otherwise it broke if freecad had other unrelated output

(cherry picked from commit af48da0dbf)
2025-12-04 00:14:31 -03:00
PaddleStroke 7a161b2f9e Part: revert changes to ViewProviderExt::getDetails (#25912)
(cherry picked from commit 5f70c4390d)
2025-12-03 19:17:42 +01:00
Billy Huddleston 5e506d0b18 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.

(cherry picked from commit ab817f8dc5)
2025-12-03 19:07:01 +01:00
Roy-043 448613f3c4 Part: make Part_EditAttachment nesting aware (#25887)
(cherry picked from commit 4f4db09572)
2025-12-03 08:22:07 +01:00
PaddleStroke 76a23ec105 GUI: Fix broken build - splitbutton (#25892)
(cherry picked from commit 7c2dac1278)
2025-12-02 20:31:40 -06:00
PaddleStroke 92165ac37d Assembly CommandInsertNewPart : Make sure assembly file is saved (#25730)
Co-authored-by: Chris Hennes <chennes@pioneerlibrarysystem.org>
(cherry picked from commit ac0685b841)
2025-12-02 06:19:18 +01:00
Frank Martinez 3922a674da Build: Fix some trivial warnings
(cherry picked from commit c057d0293a)
2025-12-02 05:06:58 +01:00
PaddleStroke 3dc4f11b2b Sketcher: fix new external always construction (#25733)
(cherry picked from commit 6ddb0165ff)
2025-12-01 22:06:49 -06:00
Roy-043 81956de275 Draft: fix X-axis reference for Draft_Arc_3Points
(cherry picked from commit 4eb110e861)
2025-12-02 05:06:35 +01:00
PaddleStroke 5763b1df60 Assembly: Fix selection during joint edition (#25687)
(cherry picked from commit b603630d1f)
2025-12-02 05:06:18 +01:00
Garfieldcmix 41a30467a5 Fix Export/Save Mesh incorrect error message
(cherry picked from commit 3aedb58e4b)
2025-12-02 05:06:03 +01:00
sliptonic b2e8b5c3e2 CAM: fixes bug with op creation/cancelation (#25800)
(cherry picked from commit db65e44bca)
2025-12-02 05:05:41 +01:00
Roy-043 b893924cbe 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>
(cherry picked from commit 5e90dc86fb)
2025-12-02 05:05:25 +01:00
Chris Hennes 3e8e2faf62 Utils: Don't save location of Python executable
(cherry picked from commit f366b0e2a7)
2025-12-01 20:54:15 -06:00
Syres916 feca3a8436 [TechDraw] QCheckBox fix compiling warning of stateChanged deprecation
(cherry picked from commit cb9c0ccd7f)
2025-12-01 15:03:57 -06:00
Roy-043 84a2662171 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

(cherry picked from commit 41c0621abb)
2025-12-01 21:15:30 +01:00
Roy-043 afbce0a6a2 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>
(cherry picked from commit 5155906848)
2025-12-01 19:22:59 +01:00
tetektoza b77c5da78b 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>
(cherry picked from commit 5f4fe75f5f)
2025-12-01 19:22:48 +01:00
Billy Huddleston de7c105a1a 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.

(cherry picked from commit 708717cee2)
2025-12-01 19:22:39 +01:00
Kacper Donat 6aa7f99e1e Gui: Use SplitButton for config migration modal
(cherry picked from commit 0de9ffc439)
2025-12-01 19:22:30 +01:00
Kacper Donat 522c2b116b Gui: Add SplitButton widget
This adds SplitButton widget that has one primary action and possibly
more secondary ones accessible via menu.

(cherry picked from commit c500408a6d)
2025-12-01 19:22:30 +01:00
Roy-043 e1128e3491 Convert asset path to string in filePath function
(cherry picked from commit 6a65b45242)
2025-12-01 19:22:21 +01:00
marbocub 9fcef20600 Sketcher: Fix error when first constraint is DistanceX/DistanceY to vertex (#25813)
(cherry picked from commit 8ea5075385)
2025-12-01 18:45:45 +01:00
Syres916 f72e3439af [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>
(cherry picked from commit 15c99ecdb2)
2025-12-01 18:03:48 +01:00
Syres916 135bd360f0 [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.

(cherry picked from commit 2be7bbf141)
2025-12-01 18:01:53 +01:00
Roy-043 2b5213863b 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`

(cherry picked from commit b865c4625d)
2025-12-01 17:54:29 +01:00
PaddleStroke 12438b1999 Part: Fix addSelection failing for links to body. (#25702)
(cherry picked from commit 6d48c51f4d)
2025-12-01 16:35:17 +01:00
PaddleStroke 7f785d64cb Core: Close partially opened document when doc is closed. (#25659)
(cherry picked from commit b249b9daeb)
2025-12-01 06:41:28 +01:00
Captain cdd6a0a719 PartDesign: fix symmetric mode of draggers in revolution/groove (#25656)
(cherry picked from commit a371231aea)
2025-11-30 23:11:37 -06:00
Chris Hennes b6f5216b70 Revert "GUI: fix "select all instances" (#25503)"
This reverts commit 70645e2f46.
2025-11-29 08:13:06 +01:00
Max Wilfinger 09127570d3 GUI: Update about image to 1.1 2025-11-28 17:28:39 +01:00
PaddleStroke 898c45cb95 Datums: Prevent 'doesn't contain feature with role' error on load
(cherry picked from commit 79f66b75f3)
2025-11-28 13:05:38 +01:00
Chris Hennes 9483062cbd Build: Fix punctuation in Windows installer (English only)
(cherry picked from commit 4e74031e06)
2025-11-28 06:49:54 +01:00
PaddleStroke d8f3bedbd9 TechDraw: DrawViewSpreadsheet do not create cyclic dependency
(cherry picked from commit eaee0f759a)
2025-11-28 06:38:10 +01:00
PaddleStroke 9c5a6ff782 PartDesign: Polar pattern: Accept negative angles (#25621)
(cherry picked from commit 5ae67ee2f9)
2025-11-27 18:13:55 -06:00
PaddleStroke 9ee1295842 Assembly: Enable negative distance for rackpinion and screw
(cherry picked from commit da717d4ca0)
2025-11-27 05:57:25 +01:00
PaddleStroke c5c336927d Assembly: CommandInsertLink: handle manual deletions (#25651)
(cherry picked from commit cf40007bd0)
2025-11-26 16:59:22 -06:00
Pieter Hijma 683fc7986c Gui: Fix refresh on boolean property toggle
(cherry picked from commit 63f739b2e4)
2025-11-26 15:41:05 -06:00
Chris Hennes 7b37c5612b Merge pull request #25709 from FreeCAD/backport-25580-to-releases/FreeCAD-1-1
[Backport releases/FreeCAD-1-1] PartDesign: Fix boolean positioning
2025-11-26 14:41:49 -06:00
Kacper Donat c7e3fbe738 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.

(cherry picked from commit 527b2de560)
2025-11-26 20:38:27 +00:00
Kacper Donat 386e375e1d 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.

(cherry picked from commit 4cbf10f045)
2025-11-26 20:38:27 +00:00
Kacper Donat b526751f97 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.

(cherry picked from commit 1555f65075)
2025-11-26 20:38:27 +00:00
Chris 70645e2f46 GUI: fix "select all instances" (#25503)
(cherry picked from commit 6b60867368)
2025-11-26 14:21:19 -06:00
PaddleStroke 5ea6fa8eb9 Gui: Do not lose thumbnail when saving partially loaded doc (#25458)
(cherry picked from commit 46a847c857)
2025-11-26 14:00:58 -06:00
Eugene Zhukov 2d77ea2221 Change params variable to uppercase PARAMS (#25663)
Addresses #25565

(cherry picked from commit e270d63e5c)
2025-11-26 16:32:36 +01:00
Chris 56d6bbe4b6 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>
(cherry picked from commit 5382ca4bbb)
2025-11-26 16:32:06 +01:00
github-actions 2596ab8bcb Update translations from Crowdin
(cherry picked from commit 68cb0a3270)
2025-11-25 22:19:40 -06:00
Chris Hennes 53767601ea Measure: Translate measurement types 2025-11-25 14:53:08 -03:00
Frank Martinez 08dabacfed Build: Remove deprecated pylint option
(cherry picked from commit 863d77562d)
2025-11-25 13:56:58 -03:00
Frank Martinez 9b934a45db Build: Update pylint minimum python version to 3.10
(cherry picked from commit 2ef70f6094)
2025-11-25 13:56:58 -03:00
Louis Gombert a0a8d7760b CMake: fix parsing error in Sandbox/Gui
Introduced by commit 755229d

(cherry picked from commit 0fca304912)
2025-11-25 14:49:51 +01:00
paul 4962bbbffe [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>
(cherry picked from commit bcc30869b7)
2025-11-25 08:42:38 +01:00
Bas Ruigrok 7c6d70ab02 Gui: Simplify QObject::connect in openPopupMenu
Co-authored-by: xtemp09 <9303235+xtemp09@users.noreply.github.com>
(cherry picked from commit 6e5a318ceb)
2025-11-25 08:42:30 +01:00
Bas Ruigrok 30e94d0b3f Gui: Fix Gesture style context menu segfault
(cherry picked from commit dec0ea238a)
2025-11-25 08:42:30 +01:00
PaddleStroke 70c69bbebc Assembly: Bom: replace QtWidget by QtGui for Qt6
(cherry picked from commit 59f672eb94)
2025-11-25 08:42:18 +01:00
PaddleStroke 1cd0927a07 Assembly: Joint task: fix spinbox not being populated
(cherry picked from commit 629eff4a26)
2025-11-25 06:04:24 +01:00
Billy Huddleston e5b5fb38a4 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.

(cherry picked from commit 9cab1f8f52)
2025-11-25 06:03:46 +01:00
FEA-eng e55305fb25 FEM: add new cyclic symm centrif example
(cherry picked from commit d2f082c7bc)
2025-11-25 06:03:29 +01:00
Furgo be96c07587 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.

(cherry picked from commit 2763bb962f)
2025-11-24 23:08:54 -03:00
Furgo b5dee9832f 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.

(cherry picked from commit b571889ab5)
2025-11-24 23:08:54 -03:00
PaddleStroke 69f6f9e4b0 Assembly: Joint task: Fix sel gate not being cleared if doc closed
(cherry picked from commit 8b1dce3437)
2025-11-24 23:06:43 -03:00
Chris Hennes 9c24507531 Gui: Switch to defusedxml for document recovery
(cherry picked from commit 4536a54f8f)
2025-11-24 22:45:07 -03:00
Adrian Insaurralde Avalos ada3b7c97e 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

(cherry picked from commit 46f3cf2f19)
2025-11-24 21:32:52 +01:00
Adrián Insaurralde Avalos bc5b7d66c1 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

(cherry picked from commit d466ba037b)
2025-11-24 21:32:52 +01:00
Adrian Insaurralde Avalos 9931e01be7 CI: specify environment for fedora-daily workflow
otherwise it doesn't have access to the secrets it needs

(cherry picked from commit a847a794c4)
2025-11-24 21:32:52 +01:00
pre-commit-ci[bot] 7176a5c3bb [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci

(cherry picked from commit 59715114f5)
2025-11-24 19:19:09 +01:00
chris ac39784aac core: fix various issues exporting step files, ie. #25540 #24962 #25567
(cherry picked from commit e226e9b06e)
2025-11-24 19:19:09 +01:00
chris da432a77af export: step file preserve last feature when exporting step file, fix issue #25567
(cherry picked from commit 9c48c9a3e3)
2025-11-24 19:19:09 +01:00
chris e6e0d03034 core: preserve body name in step file when exporting part that contains body with feature, fixes #24962
(cherry picked from commit 246218b28b)
2025-11-24 19:19:09 +01:00
PaddleStroke c5387aba66 Sketcher: External Face: decide between defining and construction (#25390)
(cherry picked from commit 74aafcee75)
2025-11-24 19:18:59 +01:00
Syres916 1d739f9773 [Gui] Reduce separator from 2px to 1px
(cherry picked from commit fc6a39658a)
2025-11-24 19:18:46 +01:00
Syres916 7c0c421401 [Gui] increase contrast of menu separators and down arrows in comboboxes
(cherry picked from commit cda9a107aa)
2025-11-24 19:18:46 +01:00
Kacper Donat 45c5b33db5 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.

(cherry picked from commit 88543612e4)
2025-11-24 19:18:40 +01:00
tarman3 501f29a247 CAM: Engrave - Fix #22380 - duplicates 2025-11-24 18:37:13 +01:00
chris 57a1ac5812 part design: reimp feature to move datum objects using modal / dialogue box from right click menu in model tab
(cherry picked from commit 0fc96a1a6f)
2025-11-24 18:37:07 +01:00
marioalexis 680ccc0ecf Fem: Improve VTK import/export preference page
(cherry picked from commit 2457715d84)
2025-11-24 18:26:53 +01:00
pre-commit-ci[bot] 7a7cba5587 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci

(cherry picked from commit ada21269aa)
2025-11-24 18:26:53 +01:00
Chris Hennes c90f7d67df FEM: Add missing translation in InOutVTK
(cherry picked from commit 128dec534a)
2025-11-24 18:26:53 +01:00
marioalexis 402032c230 Fem: Improve Gmsh preference page implementation
(cherry picked from commit 7d218b3f9b)
2025-11-24 18:12:56 +01:00
Chris Hennes 4ba4d1b848 FEM: Translate log verbosity settings
(cherry picked from commit 16eb18abb2)
2025-11-24 18:12:56 +01:00
sliptonic 024e904c9a Merge pull request #25554 from tarman3/1-1_leadinout_overtravel6
CAM: 1.1 - LeadInOut - Fix regression after #24829
2025-11-24 11:00:24 -06:00
Kacper Donat 74879b6738 Attacher: Reduce unnecessary rotation around normal for midpoint
(cherry picked from commit 3e356491e2)
2025-11-24 17:48:21 +01:00
PaddleStroke e76fdd82dc Sketcher: Prevent bad coincidences (#25304)
(cherry picked from commit e38154474a)
2025-11-24 17:48:14 +01:00
pjcreath a7486c6fa9 Sketcher: prevent undo/redo crash when selected geometry goes away.
Fixes #25497

(cherry picked from commit efb10e1b28)
2025-11-24 17:32:32 +01:00
pjcreath 4a331340fe Sketcher: prevent crash on undo/redo while dragging.
Fixes #25500

(cherry picked from commit 16aff10544)
2025-11-24 16:00:22 +01:00
xtemp09 e3d0fe6bb6 [GUI] Handle ampersand in windowTitle
(cherry picked from commit eb0c980c1d)
2025-11-24 15:19:44 +01:00
Syres916 8c36c5390a [Gui] Fix string coding on selection changed
(cherry picked from commit a10fbf2e8c)
2025-11-24 08:00:33 +01:00
Syres916 2ed6528d61 [Part] Fix string encoding for document name and object name
(cherry picked from commit 76071ffbeb)
2025-11-24 08:00:33 +01:00
Syres916 1c54777405 [Gui] Fix string encoding for document name
(cherry picked from commit 83c01fae68)
2025-11-24 08:00:33 +01:00
pre-commit-ci[bot] 4cd7fdc2df [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci

(cherry picked from commit 6d8c5bd2f9)
2025-11-24 08:00:33 +01:00
Syres916 c637b532f1 [Gui] Fix string encoding for preselect, select and deselect
(cherry picked from commit eb08fe2a78)
2025-11-24 08:00:33 +01:00
pre-commit-ci[bot] d5da0227ee [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci

(cherry picked from commit 23df7e4cad)
2025-11-24 08:00:33 +01:00
Syres916 3446b933cb [Gui] Fix string encoding for document, object and subojects
(cherry picked from commit d19ab48231)
2025-11-24 08:00:33 +01:00
pre-commit-ci[bot] 6f999f8885 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci

(cherry picked from commit 78bb40c419)
2025-11-24 08:00:33 +01:00
Syres916 95c547bd5a [PartDesign] Fix string encoding for document name and face reference
(cherry picked from commit 1e30362dd4)
2025-11-24 08:00:33 +01:00
Syres916 7aed77aaec [Gui] Fix string encoding for document name
(cherry picked from commit 61db439744)
2025-11-24 08:00:33 +01:00
pre-commit-ci[bot] aa02543896 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci

(cherry picked from commit 4c8d140373)
2025-11-24 08:00:33 +01:00
Syres916 a6da44aa03 [Gui] Fix string encoding document name and object name
(cherry picked from commit fcd487e0ad)
2025-11-24 08:00:33 +01:00
Syres916 c8f629b8b4 [Gui] Fix incorrect document name when updating PropertyLink
(cherry picked from commit 093a070439)
2025-11-24 08:00:33 +01:00
chris b71344c07b sketcher: fix issue #13852 resolve issue with state not updating constraint text
(cherry picked from commit d806b4e5f3)
2025-11-24 06:11:50 +01:00
PaddleStroke 8e73bddec1 Sketcher: Rotate: Fix line length ignored (#25434)
(cherry picked from commit 1d30d079b0)
2025-11-24 06:11:21 +01:00
Roy-043 aa010759d3 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.

(cherry picked from commit 98240a6de5)
2025-11-24 06:11:04 +01:00
FEA-eng 383a51075c FEM: Add Thick Pipe Internal Pressure 2D example (#25191)
Co-authored-by: Kacper Donat <kadet1090@gmail.com>
(cherry picked from commit 44bf1c35d6)
2025-11-24 06:10:44 +01:00
PaddleStroke aeb6fca064 Assembly: BOM: fix subassembly
(cherry picked from commit 40e4eb8770)
2025-11-24 06:10:22 +01:00
Chris 32bfee0ada Sketcher: allow grid snapping while hovering mouse over axis (#25226)
(cherry picked from commit 72d021108f)
2025-11-24 06:10:06 +01:00
Billy Huddleston cb4d6b9cb7 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.

(cherry picked from commit 4432575243)
2025-11-23 20:40:39 +01:00
sliptonic d2a99e83f7 Merge pull request #25573 from FreeCAD/backport-22738-to-releases/FreeCAD-1-1
[Backport releases/FreeCAD-1-1] CAM: Pocket BSplineSurface
2025-11-23 12:41:17 -06:00
sliptonic 78df9dd937 Merge pull request #25575 from FreeCAD/backport-25106-to-releases/FreeCAD-1-1
[Backport releases/FreeCAD-1-1] [CAM] Offer automatic migration of tools in (old) custom working directory to the new tool system
2025-11-23 12:40:58 -06:00
David Kaufman 0b92c77685 Hopefully placate CodeQL
(cherry picked from commit 767ee484ba)
2025-11-23 18:34:06 +00:00
David Kaufman b73a2cca0d migrate silently, no prompts
(cherry picked from commit f22d0e2292)
2025-11-23 18:34:06 +00:00
David Kaufman 205d024b74 remove unused import
(cherry picked from commit e2b4ea58b8)
2025-11-23 18:34:06 +00:00
David Kaufman fc317b16b0 automatically offer migration for tool libraries in custom working dir
(cherry picked from commit 21319f95d2)
2025-11-23 18:34:06 +00:00
David Kaufman 3b80c25339 [CAM] bugfix tools not imported properly during library import
(cherry picked from commit bb9ae3540e)
2025-11-23 18:34:06 +00:00
pre-commit-ci[bot] ccd3e778ff [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2025-11-23 18:06:12 +00:00
tarman3 7bf96e2ef0 CAM: LeadInOut - Fix regression after #24829 2025-11-23 20:02:15 +02:00
tarman3 387c3be2bf CAM: Pocket BSplineSurface
(cherry picked from commit 889dc7059c)
2025-11-23 18:02:10 +00:00
sliptonic 2c775840da Merge pull request #25403 from Connor9220/backport-24829-to-releases/FreeCAD-1-1
CAM: LeadInOut - Fix overtravel
2025-11-23 11:46:45 -06:00
sliptonic 14d93d24fb Merge pull request #25438 from Connor9220/FixBullnoseToolBit
CAM: Introduce unified ToolBit parameter migration logic for Bullnose tools
2025-11-23 11:39:34 -06:00
Andrew Burks c7b3353414 #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>
(cherry picked from commit bad2989b7b)
2025-11-23 07:24:49 +01:00
Adrian Insaurralde Avalos a469c45a2d pixi: enable building reverse engineering
(cherry picked from commit 3ab8dbe194)
2025-11-21 16:54:37 -06:00
Roy-043 4e6bb3f524 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

(cherry picked from commit 63c9b176e2)
2025-11-21 11:40:34 +01:00
Logstor ba5652e046 Removed sys in 'from os import sys, path'
(cherry picked from commit e802aa1821)
2025-11-21 08:47:32 +01:00
Jacob Oursland 40cd4fe772 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.

(cherry picked from commit f48db1f855)
2025-11-21 08:08:55 +01:00
Adrian Insaurralde Avalos 5f68507f6d set 1.1.0rc1 version in packaging files 2025-11-20 23:14:04 -03:00
PaddleStroke ae864aedb4 Assembly: Make the 'ground first part' dialog closable
(cherry picked from commit 2266a42009)
2025-11-20 07:58:52 +01:00
Chris Hennes d4f2c904f8 Gui: Translate 'Don't show me again'
(cherry picked from commit deab0abf8e)
2025-11-20 07:57:37 +01:00
Kacper Donat 2ff62e9727 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.

(cherry picked from commit 8995f43a15)
2025-11-19 20:18:03 +01:00
Kacper Donat 302fbc6765 Gui: Save defaults layout after first launch
(cherry picked from commit d1a8f99509)
2025-11-19 18:41:30 +01:00
PaddleStroke 456bc178c6 Assembly: Fix joint on Body-LCS not working
(cherry picked from commit 1cf6f5f3a6)
2025-11-19 14:09:37 +01:00
PaddleStroke 66ed85bb19 Assembly/TechDraw: Fix exploded view views (#25426)
(cherry picked from commit be7d41dea7)
2025-11-18 15:59:27 -06:00
pre-commit-ci[bot] cd2e26bbea [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2025-11-18 20:20:45 +00:00
Billy Huddleston 6058a47f58 Cleanup for 1.1 2025-11-18 15:17:45 -05:00
PaddleStroke 092ae3f8ea Assembly: Fix crash on moving unconnected parts
(cherry picked from commit 2a8d648ad3)
2025-11-18 20:28:06 +01:00
Billy Huddleston 3971ce2bf7 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-11-18 13:38:39 -05:00
Chris 69498be228 Part: fix splitting of a split that is a container / group (#25293)
(cherry picked from commit 3f42824ffa)
2025-11-18 19:22:57 +01:00
tetektoza 08cceec9cf 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.

(cherry picked from commit ca1528e2a9)
2025-11-18 17:51:51 +01:00
tetektoza 3c6cdb17e0 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.

(cherry picked from commit 3f6a0ee78b)
2025-11-18 17:51:51 +01:00
PaddleStroke 15de64e30b Sketcher: ConstraintList: prevent N transaction on box selection (#25254)
(cherry picked from commit 6f90c5ea61)
2025-11-18 09:18:59 -06:00
captain0xff d936ba474c PartDesign: fix the interactive controls for revolution/groove
(cherry picked from commit 5d387ae014)
2025-11-18 16:11:54 +01:00
Billy Huddleston b44af1f768 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

(cherry picked from commit 900d5ae255)
2025-11-18 14:12:09 +01:00
Chris Hennes f308fb92a3 Gui: Fix context of translation strings
(cherry picked from commit 0aec9c3b21)
2025-11-18 14:11:52 +01:00
Gaël Écorchard 98a1dd2f14 Remove functions that require Kuka files (#24984)
(cherry picked from commit c77e1d840c)
2025-11-18 14:11:42 +01:00
Chris Hennes 0887aa188b Gui: Add translation to 'No style sheet'
(cherry picked from commit 0a73f53990)
2025-11-18 14:11:31 +01:00
PaddleStroke 9a4cedf1a4 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>
(cherry picked from commit 551ab85076)
2025-11-18 11:05:47 +01:00
tarman3 894e1d9ae2 CAM: Engrave - Fix #9114 - Unable to engrave an arc
(cherry picked from commit a514cfdf4b)
2025-11-18 11:04:48 +01:00
PaddleStroke 37f014998c 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>
(cherry picked from commit 33d1d80555)
2025-11-18 11:04:42 +01:00
chris 1d21e56ee1 sketcher wb: fix issue #25076, resolve grid snapping placement
(cherry picked from commit 1ec1f1506e)
2025-11-18 11:04:32 +01:00
PaddleStroke c43b615301 Assembly: Insert link: Handle partially loaded documents (#25275)
(cherry picked from commit 10cc4dea16)
2025-11-18 09:05:59 +01:00
Chris 125d3b65c7 Import: STEP export preserve body names (#25042)
(cherry picked from commit f218c5f25c)
2025-11-18 08:14:09 +01:00
pre-commit-ci[bot] 9946819e9f [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2025-11-18 05:38:37 +01:00
Chris Hennes 06d55d50ce Build: Add network-failure fault tolerance to macOS signing (#25265)
(cherry picked from commit e0c5c89bd9)
2025-11-18 05:38:37 +01:00
pre-commit-ci[bot] 1678981185 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2025-11-17 20:23:55 +00:00
tarman3 4e2d2e3206 CAM: LeadInOut - Fix overtravel
(cherry picked from commit 2e3a4d541c)
2025-11-17 15:15:04 -05:00
David Carter 3fc8528692 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.

(cherry picked from commit f4e78e3163)
2025-11-17 18:32:15 +01:00
Chris Hennes 6508023e95 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.

(cherry picked from commit 50392855bf)
2025-11-17 18:07:17 +01:00
Chris Hennes ce6d9f361a 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>
(cherry picked from commit 4d0c35dd2d)
2025-11-17 17:18:42 +01:00
Florian Foinant-Willig 95fe960485 TechDraw: fix "%.0w" format spec (#25367)
(cherry picked from commit 526f7f2550)
2025-11-17 06:41:03 +01:00
Connor9220 49d4375f70 Fix carriage returns in the Migrator Dialog Title. (#25379)
(cherry picked from commit 11eba3f25c)
2025-11-16 22:53:36 -06:00
Jiří Pinkava b0ffa6728c Tests: Fix value for Imperial pressure tests
The decimal was (wrongly) cahnged in 5379378626

(cherry picked from commit 5fc650b2ff)
2025-11-16 22:48:42 -06:00
PaddleStroke 38fccbacf6 TaskAttacher: Remove 'reset edit' causing trouble to assembly (#25277)
(cherry picked from commit 5da1e3d899)
2025-11-15 17:33:43 +01:00
theo-vt a8ba9b82a5 Sketcher: Proceed to chamfer/fillet on a vertex if there are more than 2 lines but only two non-construction lines
(cherry picked from commit 15d9e14851)
2025-11-15 10:09:45 -06:00
theo-vt 647877384a Sketcher.planegcs: solve reference constraints with lower priority (#25318)
(cherry picked from commit d4bfa82161)
2025-11-15 10:08:53 -06:00
Pieter Hijma a60b4698be Doc: Improve the documentation of transactions (#21494)
(cherry picked from commit 0083364dbe)
2025-11-15 08:03:16 +01:00
Roy-043 1a7fa655f3 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>
(cherry picked from commit c422404020)
2025-11-15 06:24:11 +01:00
tarman3 6d023afaac CAM: DressupArray - Fix python import
(cherry picked from commit b0a79a6f2c)
2025-11-14 19:33:48 +01:00
Furgo 4642fecba3 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>
(cherry picked from commit 93868d54b7)
2025-11-14 19:33:16 +01:00
Stephan T. Lavavej 2ae9f89982 Avoid using non-Standard std::locale::empty() for MSVC
(cherry picked from commit 9e6509a3a4)
2025-11-14 19:32:50 +01:00
Chris Hennes a6ec30a8fc Build: Change package version suffix from 'dev' to 'rc1' 2025-11-13 08:53:47 -06:00
1612 changed files with 305325 additions and 274526 deletions
+17 -8
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:
@@ -45,20 +52,23 @@ jobs:
with:
artifactBasename: Pixi-${{ github.run_id }}
Ubuntu:
needs: [Prepare]
uses: ./.github/workflows/sub_buildUbuntu.yml
with:
artifactBasename: Ubuntu-${{ github.run_id }}
# 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 }}
@@ -73,7 +83,6 @@ jobs:
needs: [
Prepare,
Pixi,
Ubuntu,
Windows,
Lint
]
+3 -1
View File
@@ -29,12 +29,14 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
token: ${{ secrets.GH_TOKEN_FOR_CI_RUNNERS }}
- name: Create backport pull requests
uses: korthout/backport-action@d07416681cab29bf2661702f925f020aaa962997 # v3.4.1
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
@@ -1,5 +1,7 @@
name: Weekly Build
name: Build Release
on:
release:
types: [created]
schedule:
- cron: "0 0 * * 3"
workflow_dispatch:
@@ -8,10 +10,10 @@ permissions:
contents: write
jobs:
tag_build:
upload_src:
runs-on: ubuntu-latest
outputs:
build_tag: ${{ steps.tag_build.outputs.build_tag }}
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
@@ -21,20 +23,25 @@ jobs:
- name: Checkout Source
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
ref: ${{ github.sha }}
fetch-depth: 2
fetch-tags: true
submodules: 'recursive'
- name: Tag Build
id: tag_build
- name: get tag and create release if weekly
id: get_tag
shell: bash -l {0}
env:
GH_TOKEN: ${{ github.token }}
run: |
export BUILD_TAG=weekly-$(date "+%Y.%m.%d")
if [ "${{ github.event_name }}" = "release" ]; then
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
fi
echo "BUILD_TAG=${BUILD_TAG}" >> "$GITHUB_ENV"
echo "build_tag=${BUILD_TAG}" >> "$GITHUB_OUTPUT"
gh release create ${BUILD_TAG} --title "Development Build ${BUILD_TAG}" -F .github/workflows/weekly-build-notes.md --prerelease || true
- name: Upload Source
id: upload_source
@@ -42,10 +49,10 @@ jobs:
env:
GH_TOKEN: ${{ github.token }}
run: |
python3 package/rattler-build/scripts/make_version_file.py ../freecad_version.txt
python3 package/scripts/write_version_info.py ../freecad_version.txt
git config user.email '41898282+github-actions[bot]@users.noreply.github.com'
git config user.name 'github-actions[bot]'
git apply package/rattler-build/scripts/disable_git_info.patch
git apply package/disable_git_info.patch
git commit -a -m "Disable git info write to Version.h"
git archive HEAD -o freecad_source_${BUILD_TAG}.tar
git submodule foreach --recursive \
@@ -57,13 +64,13 @@ jobs:
gh release upload --clobber ${BUILD_TAG} "freecad_source_${BUILD_TAG}.tar.gz" "freecad_source_${BUILD_TAG}.tar.gz-SHA256.txt"
build:
needs: tag_build
needs: upload_src
strategy:
matrix:
include:
- { target: linux-64, os: ubuntu-22.04 }
- { target: linux-arm64, os: ubuntu-22.04-arm }
- { target: osx-64, os: macos-13 }
- { target: osx-64, os: macos-15-intel }
- { target: osx-arm64, os: macos-latest }
- { target: win-64, os: windows-latest }
fail-fast: false
@@ -88,10 +95,8 @@ jobs:
- name: Set Platform Environment Variables
shell: bash -l {0}
env:
BUILD_TAG: ${{ needs.tag_build.outputs.build_tag }}
OPERATING_SYSTEM: ${{ runner.os }}
run: |
echo "BUILD_TAG=${BUILD_TAG}" >> "$GITHUB_ENV"
if [[ $OPERATING_SYSTEM == 'Windows' ]]; then
echo 'PIXI_CACHE_DIR=D:\rattler' >> "$GITHUB_ENV"
echo 'RATTLER_CACHE_DIR=D:\rattler' >> "$GITHUB_ENV"
@@ -100,6 +105,7 @@ jobs:
- name: Checkout Source
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
ref: ${{ github.sha }}
fetch-depth: 2
fetch-tags: true
submodules: 'recursive'
@@ -110,6 +116,7 @@ jobs:
cache: false
- name: Install the Apple certificate and provisioning profile
id: get_cert
if: runner.os == 'macOS'
env:
APP_SPECIFIC_PASSWORD: ${{ secrets.APP_SPECIFIC_PASSWORD }}
@@ -120,9 +127,15 @@ jobs:
KEYCHAIN_PASSWORD: ${{ secrets.KEYCHAIN_PASSWORD }}
P12_PASSWORD: ${{ secrets.P12_PASSWORD }}
run: |
if [ -z "$BUILD_CERTIFICATE_BASE64" ]; then
echo "has_cert=false" >> $GITHUB_OUTPUT
echo "No certificate avalable... skipping" && exit 0
else
echo "has_cert=true" >> $GITHUB_OUTPUT
fi
# create variables
CERTIFICATE_PATH=$RUNNER_TEMP/build_certificate.p12
PP_PATH=$RUNNER_TEMP/FreeCAD_Weekly.provisionprofile
PP_PATH=$RUNNER_TEMP/FreeCAD_bundle.provisionprofile
KEYCHAIN_PATH=$RUNNER_TEMP/app-signing.keychain-db
export KEYCHAIN_PASSWORD=$(openssl rand -base64 8)
@@ -152,12 +165,13 @@ jobs:
env:
GH_TOKEN: ${{ github.token }}
SIGNING_KEY_ID: ${{ secrets.SIGNING_KEY_ID }}
SIGN_RELEASE: "true"
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/rattler-build/scripts/make_version_file.py ../freecad_version.txt
git apply package/rattler-build/scripts/disable_git_info.patch
python3 package/scripts/write_version_info.py ../freecad_version.txt
cd package/rattler-build
pixi install
pixi run -e package create_bundle
+1
View File
@@ -8,6 +8,7 @@ on:
jobs:
trigger-copr-build:
environment: fedora-daily
env:
copr_token: ${{ secrets.COPR_TOKEN }}
runs-on: ubuntu-latest
+1 -1
View File
@@ -3,7 +3,7 @@ files_to_sync:
- .packit.yaml
actions:
post-upstream-clone:
- bash -c 'BUILD_TAG=dev /usr/bin/python3 package/rattler-build/scripts/make_version_file.py freecad_version.txt'
- bash -c '/usr/bin/python3 package/scripts/write_version_info.py freecad_version.txt'
- rm -f freecad-sources.tar.gz
changelog-entry:
- bash -c 'git log --no-merges --pretty="format:- %s (%an)" $(git describe --tags --abbrev=0 )..HEAD -- |sed 's/%/%%/g''
+1 -5
View File
@@ -82,15 +82,11 @@ persistent=yes
# Minimum Python version to use for version dependent checks. Will default to
# the version used to run pylint.
py-version=3.8
py-version=3.10
# Discover python modules and packages in the file system subtree.
recursive=no
# When enabled, pylint would attempt to guess common misconfiguration and emit
# user-friendly hints instead of false-positive error messages.
suggestion-mode=yes
# Allow loading of arbitrary C extensions. Extensions are imported into the
# active Python interpreter and may run arbitrary code.
unsafe-load-any-extension=no
+2 -1
View File
@@ -53,8 +53,9 @@ project(FreeCAD)
set(PACKAGE_VERSION_MAJOR "1")
set(PACKAGE_VERSION_MINOR "1")
set(PACKAGE_VERSION_PATCH "0") # number of patch release (e.g. "4" for the 0.18.4 release)
set(PACKAGE_VERSION_SUFFIX "dev") # either "dev" for development snapshot or "" (empty string)
set(PACKAGE_VERSION_SUFFIX "rc3") # 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}")
-4
View File
@@ -71,10 +71,6 @@
"type": "BOOL",
"value": "ON"
},
"BUILD_REVERSEENGINEERING": {
"type": "BOOL",
"value": "OFF"
},
"ENABLE_DEVELOPER_TESTS": {
"type": "BOOL",
"value": "ON"
+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
+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.
+5
View File
@@ -0,0 +1,5 @@
*.exe
*-SHA256.txt
MSVCRedist
FreeCAD
version.nsh
+47
View File
@@ -0,0 +1,47 @@
del /S *_d.*
del /S *_debug.*
del /S *.pyc
del /S *.pdb
del /S boost*-gd-*.dll
cd bin
del assistant.exe
del Coin4d.dll
del designer.exe
del freetyped.dll
del libcrypto-3d.dll
del libEGLd.dll
del libGLESv2d.dll
del libssl-3d.dll
del linguist.exe
del qdoc.exe
del Qt6Concurrentd.dll
del Qt6Cored.dll
del Qt6DBusd.dll
del Qt6DesignerComponentsd.dll
del Qt6Designerd.dll
del Qt6Guid.dll
del Qt6Helpd.dll
del Qt6LabsAnimationd.dll
del Qt6LabsFolderListModeld.dll
del Qt6LabsPlatformd.dll
del Qt6LabsSettingsd.dll
del Qt6LabsSharedImaged.dll
del Qt6LabsWavefrontMeshd.dll
del Qt6MultimediaWidgetsd.dll
del Qt6Multimediad.dll
del Qt6Networkd.dll
del Qt6OpenGLWidgetsd.dll
del Qt6OpenGLd.dll
del Qt6PrintSupportd.dll
del Qt6SpatialAudiod.dll
del Qt6Sqld.dll
del Qt6SvgWidgetsd.dll
del Qt6Svgd.dll
del Qt6Testd.dll
del Qt6UiToolsd.dll
del Qt6Widgetsd.dll
del Qt6Xmld.dll
del QtWebEngineProcessd.exe
del Quarter1d.dll
del xerces-c_3_2D.dll
del zlibd.dll
@@ -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,7 +1,7 @@
# Creating a Windows installer for FreeCAD
These are instructions for building an NSIS-based installer for FreeCAD. They were designed for FreeCAD 0.21 and later,
and presume that you have cloned a copy of FreeCAD's source code, and therefore have the directory *src/WindowsInstaller*.
and presume that you have cloned a copy of FreeCAD's source code, and therefore have the directory *package/WindowsInstaller*.
## Install NSIS
To set up your system for building an NSIS installer:
@@ -15,16 +15,13 @@ To set up your system for building an NSIS installer:
4. Download and install the nsProcess plugin from https://nsis.sourceforge.io/NsProcess_plugin -- you will need the version that supports Unicode, so make sure to follow the appropriate instructions on their site to install that one (as of this writing it involves manually copying and renaming the plugin DLL file).
## Build the installer
Next, update the installer settings for the current version of FreeCAD. Starting from the *src/WindowsInstaller* folder in the FreeCAD source tree:
1. Set the appropriate version strings for the release you are creating. These are used to construct the filename of the installer, among other things. If you have to upload a new version of the installer for the exact same release of FreeCAD, increment `APP_VERSION BUILD` as needed.
```
!define APP_VERSION_MAJOR 0
!define APP_VERSION_MINOR 21
!define APP_VERSION_REVISION 0
Next, update the installer settings for the current version of FreeCAD. Starting from the *package/WindowsInstaller* folder in the FreeCAD source tree:
1. Set the appropriate version strings for the release you are creating. These are used to construct the filename of the installer, among other things. If you have to upload a new version of the installer for the exact same release of FreeCAD, increment `APP_VERSION BUILD` as needed. The main version numbers are dynamically obtained by calling `freecadcmd.exe`.
```nsis
!define APP_VERSION_EMERGENCY "RC1"
!define APP_VERSION_BUILD 1
```
2. Within the folder *src/WindowsInstaller*, create a new folder called MSVCRedist and copy the following files from your MSVC installation into it:
2. If the installer will be made from a LibPack build create a new folder called MSVCRedist within the folder *package/WindowsInstaller* and copy the following files from your MSVC installation into it:
```
vcruntime140.dll
concrt140.dll
@@ -33,28 +30,38 @@ vcamp140.dll
vccorlib140.dll
vcomp140.dll
```
3. Open the file *Settings.nsh* with a text editor (both jEdit and Visual Studio Code are good editors for NSIS files). Edit the following paths to correspond to your system: `FILES_FREECAD` corresponds to your installation directory (e.g. `CMAKE_INSTALL_PREFIX` if you self-compiled) and `FILES_DEPS` is the folder you created with the MSVC redistributable files in it.
```
!define FILES_FREECAD "C:\FreeCAD\Installer\FreeCAD"
!define FILES_DEPS "C:\FreeCAD\Installer\MSVCRedist"
3. If required open the file *Settings.nsh* with a text editor (both jEdit and Visual Studio Code are good editors for NSIS files). Edit the following paths to correspond to your system: `FILES_FREECAD` corresponds to your installation directory (e.g. `CMAKE_INSTALL_PREFIX` if you self-compiled), `FILES_THUMBS` is the directory where the thumbnailer dll is located and `FILES_DEPS` is the folder you created with the MSVC redistributable files in it. `FILES_DEPS` is not needed if the installer is created from a conda bundle so it is not set by default. These can be set via /D argument for `makensis.exe` or by editing *Settings.nsh*.
```nsis
!ifndef FILES_FREECAD
!define FILES_FREECAD "${__FILEDIR__}\FreeCAD"
!endif
!ifndef FILES_THUMBS
!define FILES_THUMBS "${__FILEDIR__}\thumbnail"
!endif
#!define FILES_DEPS "${__FILEDIR__}\MSVC_Redist"
```
4. Ensure the FreeCAD files are in place. Here you have two options:
* If you are working from an already-compiled version of FreeCAD provided to you by an outside source: in this case, simply ensure that `FILES_FREECAD` is set to the directory containing those files.
* If you compiled FreeCAD on your own as described [here](https://wiki.freecad.org/Compile_on_Windows) (and using the Install option outlined there). Then:
* Open the file *Settings.nsh* as described in step 3. above and set there</br>
`!define FILES_FREECAD` to the folder you specified as `CMAKE_INSTALL_PREFIX`
* Copy into that folder the file *Delete.bat* that is part of the installer
* Copy into the installation folder the file *Delete.bat* that is part of the installer
* open a command line in Windows and change to the folder
* run the comamand</br>
* run the command</br>
`Delete.bat`
* (These steps assure that the installer only contains files users need. Moreover it assures that the
overall files size is below 2 GB and we can use the most compact compression for the installer.)
5. Right-click on the file *FreeCAD-installer.nsi* and choose **Compile NSIS script**
to compile the installer.
to compile the installer. You can also run from command line to specify some settings
```cmd
%your_nsis_path%\makensis.exe /D'FILES_FREECAD="D:\some\path\FreeCAD"' /D'FILES_DEPS="${__FILEDIR__}\MSVC_Redist" /D'ExeFile="my-FreeCAD-installer.exe"' FreeCAD-installer.nsi
```
NOTE: For test builds of the installer you can turn off the compression. This speeds up
NOTE: For test builds of the installer you can turn off compression. This speeds up
the build time for the installer a lot but increases its file size. The compression
is turned off by uncommenting the line</br>
is turned off by commenting the line</br>
`SetCompressor /SOLID lzma`</br>
in the file *Settings.nsh*.
in the file *Settings.nsh* or by defining `FC_TEST_BUILD` in command line
```cmd
%your_nsis_path%\makensis.exe [OPTIONS] /DFC_TEST_BUILD FreeCAD-installer.nsi
```
+58
View File
@@ -0,0 +1,58 @@
/*
Settings for FreeCAD installer
These typically need to be modified for each FreeCAD release
*/
# Make the installer as small as possible
# Using /SOLID is usually better for file size but it can't be used if the original size is
# more than 2GB, if building with /SOLID fails try disabling it
# comment this or use /DFC_TEST_BUILD command line option for testing builds since it will reduce
# the time to create an installer a lot at the cost of a much greater file size.
# So assure it is active for release builds!
!ifndef FC_TEST_BUILD
SetCompressor /SOLID lzma
!endif
#--------------------------------
# File locations
# !!! you may need to adjust them to the folders in your Windows system !!!
# can be specified with /D command line argument to makensis.exe
!ifndef FILES_FREECAD
!define FILES_FREECAD "${__FILEDIR__}\FreeCAD"
!endif
!ifndef FILES_THUMBS
!define FILES_THUMBS "${__FILEDIR__}\thumbnail"
!endif
# msvc redistributables location is required for LibPack builds but not conda
# when using a LibPack build set the redistributables directory location here
# or with /D command line argument to makensis.exe
#!define FILES_DEPS "${__FILEDIR__}\MSVCRedist"
#--------------------------------
# get version info from freecadcmd
!system "${FILES_FREECAD}\bin\freecadcmd.exe --safe-mode $\"${__FILEDIR__}\write_version_nsh.py$\"" = 0
!include "${__FILEDIR__}\version.nsh"
!delfile "${__FILEDIR__}\version.nsh"
!define APP_VERSION_EMERGENCY "" # use "1" for an emergency release of FreeCAD otherwise ""
# alternatively you can use APP_VERSION_EMERGENCY for a custom suffix of the version number
!define APP_EMERGENCY_DOT "" # use "." for an emergency release of FreeCAD otherwise ""
!define APP_VERSION_BUILD 1 # Start with 1 for the installer releases of each version
!define APP_VERSION "${APP_VERSION_MAJOR}.${APP_VERSION_MINOR}.${APP_VERSION_PATCH}${APP_EMERGENCY_DOT}${APP_VERSION_EMERGENCY}" # Version to display
#--------------------------------
# Installer file name
# Typical names for the release are "FreeCAD-020-Installer-1.exe" etc.
!ifndef ExeFile
!define ExeFile "${APP_NAME}_${APP_VERSION_MAJOR}.${APP_VERSION_MINOR}.${APP_VERSION_PATCH}${APP_VERSION_EMERGENCY}-Windows-x86_64-installer-${APP_VERSION_BUILD}.exe"
!endif
#--------------------------------
# installer bit type - FreeCAD is only provided as 64bit build
!define MULTIUSER_USE_PROGRAMFILES64
@@ -1 +1,2 @@
signtool.exe sign /f FCweborg.pfx /p FreeCADIsCool /fd sha512 /tr http://timestamp.digicert.com /td sha512 /v %1
certutil -hashfile %1 SHA256 > %1-SHA256.txt
Binary file not shown.

After

Width:  |  Height:  |  Size: 151 KiB

Before

Width:  |  Height:  |  Size: 67 KiB

After

Width:  |  Height:  |  Size: 67 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

Before

Width:  |  Height:  |  Size: 116 KiB

After

Width:  |  Height:  |  Size: 116 KiB

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 13 KiB

Before

Width:  |  Height:  |  Size: 64 KiB

After

Width:  |  Height:  |  Size: 64 KiB

Before

Width:  |  Height:  |  Size: 91 KiB

After

Width:  |  Height:  |  Size: 91 KiB

@@ -13,13 +13,13 @@ Configuration and variables of FreeCAD installer
# Names and version
!define APP_NAME "FreeCAD"
!define APP_VERSION_NUMBER "${APP_VERSION_MAJOR}.${APP_VERSION_MINOR}.${APP_VERSION_REVISION}.${APP_VERSION_BUILD}"
!define APP_VERSION_NUMBER "${APP_VERSION_MAJOR}.${APP_VERSION_MINOR}.${APP_VERSION_PATCH}.${APP_VERSION_BUILD}"
# For the proposed install folder we use the scheme "FreeCAD 0.18"
# however for the Registry, we need the scheme "FreeCAD 0.18.x" in order
# to check if it is exactly this version (to support side-by-side installations)
!define APP_SERIES_NAME "${APP_VERSION_MAJOR}.${APP_VERSION_MINOR}"
!define APP_SERIES_KEY "${APP_VERSION_MAJOR}${APP_VERSION_MINOR}${APP_VERSION_REVISION}${APP_VERSION_EMERGENCY}"
!define APP_SERIES_KEY2 "${APP_VERSION_MAJOR}.${APP_VERSION_MINOR}.${APP_VERSION_REVISION}${APP_EMERGENCY_DOT}${APP_VERSION_EMERGENCY}"
!define APP_SERIES_KEY "${APP_VERSION_MAJOR}${APP_VERSION_MINOR}${APP_VERSION_PATCH}${APP_VERSION_EMERGENCY}"
!define APP_SERIES_KEY2 "${APP_VERSION_MAJOR}.${APP_VERSION_MINOR}.${APP_VERSION_PATCH}${APP_EMERGENCY_DOT}${APP_VERSION_EMERGENCY}"
!define APP_DIR_REGKEY "Software\Microsoft\Windows\CurrentVersion\App Paths\${APP_NAME}.exe"
!define APP_DIR "${APP_NAME} ${APP_SERIES_NAME}"
# Fixme: FC should use different preferences folder for every release
@@ -60,7 +60,7 @@ Configuration and variables of FreeCAD installer
!define SETUP_ICON "icons\FreeCAD.ico"
!define SETUP_HEADERIMAGE "graphics\header.bmp"
!define SETUP_WIZARDIMAGE "graphics\orange.bmp"
!define SETUP_WIZARDIMAGE "graphics\banner.bmp"
!define SETUP_UNINSTALLER "Uninstall-${APP_NAME}.exe"
!define SETUP_UNINSTALLER_KEY "${APP_NAME}${APP_SERIES_KEY}"
@@ -92,7 +92,7 @@ BrandingText " "
VIProductVersion "${APP_VERSION_NUMBER}"
VIAddVersionKey /LANG=${LANG_ENGLISH} "ProductName" "${APP_NAME}"
VIAddVersionKey /LANG=${LANG_ENGLISH} "ProductVersion" "${APP_DIR}.${APP_VERSION_REVISION}"
VIAddVersionKey /LANG=${LANG_ENGLISH} "ProductVersion" "${APP_DIR}.${APP_VERSION_PATCH}"
VIAddVersionKey /LANG=${LANG_ENGLISH} "FileDescription" "${APP_INFO}"
VIAddVersionKey /LANG=${LANG_ENGLISH} "FileVersion" "${APP_VERSION}"
VIAddVersionKey /LANG=${LANG_ENGLISH} "LegalCopyright" "${APP_COPYRIGHT}"
@@ -50,7 +50,7 @@ Function PostMultiUserPageInit
# check if there is an existing FreeCAD installation of the same FreeCAD series
# we usually don't release more than 10 versions so with 20 we are safe to check if a newer version is installed
IntOp $4 ${APP_VERSION_REVISION} + 20
IntOp $4 ${APP_VERSION_PATCH} + 20
${for} $5 0 $4
ReadRegStr $0 SHCTX "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APP_NAME}${APP_VERSION_MAJOR}${APP_VERSION_MINOR}$5" "DisplayVersion"
# also check for an emergency release
@@ -110,7 +110,8 @@ Function .onInit
${orif} $R0 == "5.1" # XP
${orif} $R0 == "5.2" # 2003
${orif} $R0 == "6.0" # Vista
MessageBox MB_OK|MB_ICONSTOP "${APP_NAME} ${APP_VERSION} requires Windows 7 or newer." /SD IDOK
${orif} $R0 == "6.1" # 7
MessageBox MB_OK|MB_ICONSTOP "${APP_NAME} ${APP_VERSION} requires Windows 8 or newer." /SD IDOK
Quit
${endif}
@@ -130,7 +131,7 @@ Function .onInit
# plugin must be unloaded
${nsProcess::Unload}
# initialize the multi-uder installer UI
# initialize the multi-user installer UI
!insertmacro MULTIUSER_INIT
# this can be reset to "true" in section SecDesktop
@@ -18,8 +18,8 @@
# and returns the number of the character in the FindStr where the SearchStr was found (Pointer)
# if nothing was found or the search is impossible the Pointer is set to -1
StrLen $R2 ${SearchStr}
StrLen $R4 ${FindStr}
StrLen $R2 "${SearchStr}"
StrLen $R4 "${FindStr}"
StrCpy $R5 0
${if} $R2 == 0
${orif} $R4 == 0
@@ -27,8 +27,8 @@
${endif}
IntCmp $R4 $R2 loopA NotFound
loopA:
StrCpy $R3 ${FindStr} $R2 $R5
StrCmp $R3 ${SearchStr} Found
StrCpy $R3 "${FindStr}" $R2 $R5
StrCmp $R3 "${SearchStr}" Found
IntOp $R5 $R5 + 1
IntCmp $R4 $R5 loopA NotFound
Goto loopA
@@ -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."
@@ -8,14 +8,15 @@ Installation of program files, dictionaries and external components
#--------------------------------
# Program files
!include LogicLib.nsh
Section -ProgramFiles SecProgramFiles
# if the $INSTDIR does not contain "FreeCAD" we must add a subfolder to avoid that FreeCAD will e.g.
# be installed directly to C:\programs - the uninstaller will then delete the whole
# C:\programs directory
StrCpy $String $INSTDIR
StrCpy $Search ${APP_NAME}
StrCpy $String "$INSTDIR"
StrCpy $Search "${APP_NAME}"
Call StrPoint # function from Utils.nsh
${if} $Pointer == "-1"
StrCpy $INSTDIR "$INSTDIR\${APP_DIR}"
@@ -38,8 +39,11 @@ Section -ProgramFiles SecProgramFiles
File /r "${FILES_FREECAD}\bin\*.*"
# MSVC redistributable DLLs
SetOutPath "$INSTDIR\bin"
File "${FILES_DEPS}\*.*"
!ifdef FILES_DEPS
!echo "Including MSVC Redist files from ${FILES_DEPS}"
SetOutPath "$INSTDIR\bin"
File "${FILES_DEPS}\*.*"
!endif
# Others
SetOutPath "$INSTDIR\data"
@@ -52,10 +56,6 @@ Section -ProgramFiles SecProgramFiles
File /r "${FILES_FREECAD}\lib\*.*"
SetOutPath "$INSTDIR\Mod"
File /r "${FILES_FREECAD}\Mod\*.*"
SetOutPath "$INSTDIR\resources"
File /r "${FILES_FREECAD}\resources\*.*"
SetOutPath "$INSTDIR\translations"
File /r "${FILES_FREECAD}\translations\*.*"
SetOutPath "$INSTDIR"
File /r "${FILES_THUMBS}"
@@ -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)
+2 -2
View File
@@ -16,7 +16,7 @@
Name: freecad
Epoch: 1
Version: 1.1.0~dev
Version: 1.1.0~rc3
Release: 1%{?dist}
Summary: A general purpose 3D CAD modeler
@@ -44,7 +44,7 @@ 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
+12
View File
@@ -0,0 +1,12 @@
linux/AppDir/usr
linux/AppDir/*.desktop
linux/AppDir/*.svg
linux/AppDir/packages.txt
windows/FreeCAD_*Windows*
osx/FreeCAD.app
**.AppImage
**.AppImage.zsync
**.dmg
**.7z
**.exe
**-SHA256.txt
+1
View File
@@ -37,6 +37,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 .
+26 -7
View File
@@ -1,7 +1,7 @@
#!/bin/bash
set -e
set -x
set -x
conda_env="AppDir/usr"
@@ -9,9 +9,6 @@ mkdir -p ${conda_env}
cp -a ../.pixi/envs/default/* ${conda_env}
export PATH="${PWD}/${conda_env}/bin:${PATH}"
export CONDA_PREFIX="${PWD}/${conda_env}"
echo -e "\nDelete unnecessary stuff"
rm -rf ${conda_env}/include
find ${conda_env} -name \*.a -delete
@@ -49,7 +46,7 @@ rm -rf ${conda_env}/lib/cmake/
find . -name "*.h" -type f -delete
find . -name "*.cmake" -type f -delete
python_version=$(python -c 'import platform; print("py" + platform.python_version_tuple()[0] + platform.python_version_tuple()[1])')
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}-Linux-$(uname -m)-${python_version}"
echo -e "\################"
@@ -62,6 +59,20 @@ sed -i "1s/.*/\nLIST OF PACKAGES:/" AppDir/packages.txt
curl -LO https://github.com/AppImage/appimagetool/releases/download/continuous/appimagetool-$(uname -m).AppImage
chmod a+x appimagetool-$(uname -m).AppImage
if [ "${UPLOAD_RELEASE}" == "true" ]; then
case "${BUILD_TAG}" in
*weekly*)
GH_UPDATE_TAG="weeklies"
;;
*rc*)
GH_UPDATE_TAG="${BUILD_TAG}"
;;
*)
GH_UPDATE_TAG="latest"
;;
esac
fi
echo -e "\nCreate the appimage"
# export GPG_TTY=$(tty)
chmod a+x ./AppDir/AppRun
@@ -69,7 +80,7 @@ chmod a+x ./AppDir/AppRun
--comp zstd \
--mksquashfs-opt -Xcompression-level \
--mksquashfs-opt 22 \
-u "gh-releases-zsync|FreeCAD|FreeCAD|${BUILD_TAG}|FreeCAD*$(uname -m)*.AppImage.zsync" \
-u "gh-releases-zsync|FreeCAD|FreeCAD|${GH_UPDATE_TAG}|FreeCAD*$(uname -m)*.AppImage.zsync" \
AppDir ${version_name}.AppImage
# -s --sign-key ${GPG_KEY_ID} \
@@ -77,5 +88,13 @@ echo -e "\nCreate hash"
sha256sum ${version_name}.AppImage > ${version_name}.AppImage-SHA256.txt
if [ "${UPLOAD_RELEASE}" == "true" ]; then
gh release upload --clobber ${BUILD_TAG} "${version_name}.AppImage" "${version_name}.AppImage-SHA256.txt"
gh release upload --clobber ${BUILD_TAG} "${version_name}.AppImage" "${version_name}.AppImage.zsync" "${version_name}.AppImage-SHA256.txt"
if [ "${GH_UPDATE_TAG}" == "weeklies" ]; then
generic_name="FreeCAD_weekly-Linux-$(uname -m)"
mv "${version_name}.AppImage" "${generic_name}.AppImage"
mv "${version_name}.AppImage.zsync" "${generic_name}.AppImage.zsync"
mv "${version_name}.AppImage-SHA256.txt" "${generic_name}.AppImage-SHA256.txt"
gh release create weeklies --prerelease | true
gh release upload --clobber weeklies "${generic_name}.AppImage" "${generic_name}.AppImage.zsync" "${generic_name}.AppImage-SHA256.txt"
fi
fi
+2 -5
View File
@@ -9,9 +9,6 @@ mkdir -p ${conda_env}
cp -a ../.pixi/envs/default/* ${conda_env}
export PATH="${PWD}/${conda_env}/bin:${PATH}"
export CONDA_PREFIX="${PWD}/${conda_env}"
# delete unnecessary stuff
rm -rf ${conda_env}/include
find ${conda_env} -name \*.a -delete
@@ -50,7 +47,7 @@ cmake --build build
mkdir -p FreeCAD.app/Contents/MacOS
cp build/FreeCAD FreeCAD.app/Contents/MacOS/FreeCAD
python_version=$(python -c 'import platform; print("py" + platform.python_version_tuple()[0] + platform.python_version_tuple()[1])')
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}"
application_menu_name="FreeCAD_${BUILD_TAG}"
@@ -71,7 +68,7 @@ rm -rf ${conda_env}/Library
if [[ "${SIGN_RELEASE}" == "true" ]]; then
# create the signed dmg
./macos_sign_and_notarize.zsh -p "FreeCAD" -k ${SIGNING_KEY_ID} -o "${version_name}.dmg"
../../scripts/macos_sign_and_notarize.zsh -p "FreeCAD" -k ${SIGNING_KEY_ID} -o "${version_name}.dmg"
else
# create the dmg
dmgbuild -s dmg_settings.py "FreeCAD" "${version_name}.dmg"
@@ -1,3 +1,5 @@
# SPDX-License-Identifier: LGPL-2.1-or-later
# Ensure default values are set in defines if they are not already provided
defines.setdefault('containing_folder', '.')
defines.setdefault('app_name', 'FreeCAD.app')
File diff suppressed because it is too large Load Diff
+13 -17
View File
@@ -1,14 +1,15 @@
[workspace]
channels = [
"https://prefix.dev/pixi-build-backends",
"https://prefix.dev/conda-forge",
"freecad",
"conda-forge",
]
platforms = ["linux-64", "linux-aarch64", "osx-64", "osx-arm64", "win-64"]
preview = ["pixi-build"]
[package]
name = "freecad"
version = "1.1.0dev"
version = "1.1.0rc3"
homepage = "https://freecad.org"
repository = "https://github.com/FreeCAD/FreeCAD"
description = "FreeCAD"
@@ -22,44 +23,39 @@ freecad = { path = "." }
[feature.package.dependencies]
python = ">=3.11,<3.12"
[feature.package.tasks]
create_bundle = 'bash -c "cd $(bash scripts/get_os.bash) && bash create_bundle.sh"'
## Linux (x86-64)
[feature.package.target.linux-64.dependencies]
coreutils = "*"
[feature.package.target.linux-64.tasks]
create_bundle = 'bash -c "cd linux && bash create_bundle.sh"'
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 = "*"
[feature.package.target.linux-aarch64.tasks]
create_bundle = 'bash -c "cd linux && bash create_bundle.sh"'
xcb-util-cursor = "==0.1.5" ## hack to address https://github.com/FreeCAD/FreeCAD/issues/26726
## macOS (Intel)
[feature.package.target.osx-64.dependencies]
coreutils = "*"
dmgbuild = "*"
pyobjc-framework-Quartz = "*"
sed = "*"
[feature.package.target.osx-64.tasks]
create_bundle = 'bash -c "cd osx && bash create_bundle.sh"'
## macOS (Apple Silicon)
[feature.package.target.osx-arm64.dependencies]
coreutils = "*"
dmgbuild = "*"
pyobjc-framework-Quartz = "*"
sed = "*"
[feature.package.target.osx-arm64.tasks]
create_bundle = 'bash -c "cd osx && bash create_bundle.sh"'
## Windows dependencies (x86-64)
[feature.package.target.win-64.dependencies]
git = "*"
[feature.package.target.win-64.tasks]
create_bundle = 'bash -c "cd windows && bash create_bundle.sh"'
nsis = { version = "*", build = "*_log*" }
7zip = "*"
vs2022_win-64 = "*"
[environments]
default = ["freecad"]
+6 -3
View File
@@ -1,5 +1,5 @@
context:
version: "1.1.0dev"
version: "1.1.0rc3"
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
@@ -145,7 +147,6 @@ requirements:
- gmsh
- graphviz
- ifcopenshell
- jinja2
- lark
- lxml
- matplotlib-base
@@ -176,3 +177,5 @@ requirements:
- if: linux
then:
- libspnav
- qt6-wayland
- xcb-util-cursor==0.1.5 ## hack to address https://github.com/FreeCAD/FreeCAD/issues/26726
@@ -1,13 +0,0 @@
diff --git a/src/Tools/SubWCRev.py b/src/Tools/SubWCRev.py
index 1f3f0a436343..c314003736f1 100644
--- a/src/Tools/SubWCRev.py
+++ b/src/Tools/SubWCRev.py
@@ -523,7 +523,7 @@ def main():
inp = open("%s/src/Build/Version.h.in" % (bindir))
lines = inp.readlines()
inp.close()
- lines = i.writeVersion(lines)
+ #lines = i.writeVersion(lines)
out = open("%s/src/Build/Version.h.out" % (bindir), "w")
out.writelines(lines)
out.write("\n")
@@ -1,53 +0,0 @@
import sys
import os
import subprocess
import platform
from datetime import datetime
import freecad
import FreeCAD
package_manager = "conda"
system = platform.platform().split("-")[0]
arch = platform.machine()
# Windows uses a different syntax
if arch == "AMD64":
arch = "x86_64"
if "ARCH" in os.environ:
if os.environ["ARCH"] != "":
arch = os.environ["ARCH"]
python_version = platform.python_version().split(".")
python_version = "py" + python_version[0] + python_version[1]
date = str(datetime.now()).split(" ")[0]
version_info = FreeCAD.Version()
build_version_suffix = FreeCAD.ConfigGet("BuildVersionSuffix")
dev_version = version_info[0] + "." + version_info[1] + "." + version_info[2] + build_version_suffix
revision = version_info[3].split(" ")[0]
if system == "macOS":
import jinja2
print("create plist from template")
osx_directory = os.path.join(os.path.dirname(__file__), "..", "osx")
with open(os.path.join(osx_directory, "Info.plist.template")) as template_file:
template_str = template_file.read()
template = jinja2.Template(template_str)
rendered_str = template.render( FREECAD_VERSION="{}-{}".format(dev_version, revision),
APPLICATION_MENU_NAME="FreeCAD-{}-{}".format(dev_version, revision) )
with open(os.path.join(osx_directory, "FreeCAD.app", "Contents", "Info.plist"), "w") as rendered_file:
rendered_file.write(rendered_str)
if "DEPLOY_RELEASE" in os.environ and os.environ["DEPLOY_RELEASE"] == "weekly-builds":
dev_version = "weekly-builds"
revision_separator = "-"
else:
revision_separator = ""
revision = ""
bundle_name = f"FreeCAD_{dev_version}{revision_separator}{revision}-{package_manager}-{system}-{arch}-{python_version}"
with open("bundle_name.txt", "w") as bundle_name_file:
bundle_name_file.write(bundle_name)
@@ -0,0 +1,8 @@
#!/usr/bin/env bash
if [[ "$OSTYPE" =~ (msys*|cygwin*|mingw*) ]]; then
echo windows
elif [[ "$OSTYPE" == darwin* ]]; then
echo osx
elif [[ "$OSTYPE" == linux* ]]; then
echo linux
fi
@@ -1,56 +0,0 @@
set conda_env="fc_env"
robocopy ..\.pixi\envs\default\* %conda_env% /S /MT:%NUMBER_OF_PROCESSORS% > nul
%conda_env%\python ..\scripts\get_freecad_version.py
set /p freecad_version_name= <bundle_name.txt
echo **********************
echo %freecad_version_name%
echo **********************
REM remove arm binaries that fail to extract unless using latest 7zip
for /r %conda_env% %%i in (*arm*.exe) do (@echo "%%i will be removed" & @del "%%i")
set copy_dir="FreeCAD_Conda_Build"
mkdir %copy_dir%
REM Copy Conda's Python and (U)CRT to FreeCAD/bin
robocopy %conda_env%\DLLs %copy_dir%\bin\DLLs /S /MT:%NUMBER_OF_PROCESSORS% > nul
robocopy %conda_env%\Lib %copy_dir%\bin\Lib /XD __pycache__ /S /MT:%NUMBER_OF_PROCESSORS% > nul
robocopy %conda_env%\Scripts %copy_dir%\bin\Scripts /S /MT:%NUMBER_OF_PROCESSORS% > nul
robocopy %conda_env%\python*.* %copy_dir%\bin\ /XF *.pdb /MT:%NUMBER_OF_PROCESSORS% > nul
robocopy %conda_env%\msvc*.* %copy_dir%\bin\ /XF *.pdb /MT:%NUMBER_OF_PROCESSORS% > nul
robocopy %conda_env%\ucrt*.* %copy_dir%\bin\ /XF *.pdb /MT:%NUMBER_OF_PROCESSORS% > nul
REM Copy meaningful executables
robocopy %conda_env%\Library\bin %copy_dir%\bin\ ccx.exe /MT:%NUMBER_OF_PROCESSORS% > nul
robocopy %conda_env%\Library\bin %copy_dir%\bin\ gmsh.exe /MT:%NUMBER_OF_PROCESSORS% > nul
robocopy %conda_env%\Library\bin %copy_dir%\bin\ dot.exe /MT:%NUMBER_OF_PROCESSORS% > nul
robocopy %conda_env%\Library\bin %copy_dir%\bin\ unflatten.exe /MT:%NUMBER_OF_PROCESSORS% > nul
robocopy %conda_env%\Library\mingw-w64\bin * %copy_dir%\bin\ /MT:%NUMBER_OF_PROCESSORS% > nul
REM Copy Conda's QT5/plugins to FreeCAD/bin
robocopy %conda_env%\Library\plugins %copy_dir%\bin\ /S /MT:%NUMBER_OF_PROCESSORS% > nul
robocopy %conda_env%\Library\resources %copy_dir%\resources /MT:%NUMBER_OF_PROCESSORS% > nul
robocopy %conda_env%\Library\translations %copy_dir%\translations /MT:%NUMBER_OF_PROCESSORS% > nul
REM get all the dependency .dlls
robocopy %conda_env%\Library\bin *.dll %copy_dir%\bin /XF *.pdb /XF api*.* /MT:%NUMBER_OF_PROCESSORS% > nul
REM Copy FreeCAD build
robocopy %conda_env%\Library\bin FreeCAD* %copy_dir%\bin /XF *.pdb /MT:%NUMBER_OF_PROCESSORS% > nul
robocopy %conda_env%\Library\data %copy_dir%\data /XF *.txt /S /MT:%NUMBER_OF_PROCESSORS% > nul
robocopy %conda_env%\Library\Ext %copy_dir%\Ext /S /XD __pycache__ /MT:%NUMBER_OF_PROCESSORS% > nul
robocopy %conda_env%\Library\lib %copy_dir%\lib /XF *.lib /XF *.prl /XF *.sh /MT:%NUMBER_OF_PROCESSORS% > nul
robocopy %conda_env%\Library\Mod %copy_dir%\Mod /S /XD __pycache__ /MT:%NUMBER_OF_PROCESSORS% > nul
robocopy %conda_env%\Library\doc %copy_dir%\doc ThirdPartyLibraries.html LICENSE.html /MT:%NUMBER_OF_PROCESSORS% > nul
REM Apply Patches
rename %copy_dir%\bin\Lib\ssl.py ssl-orig.py
copy ssl-patch.py %copy_dir%\bin\Lib\ssl.py
cd %copy_dir%\..
ren %copy_dir% %freecad_version_name%
dir
REM if errorlevel1 exit 1
"%ProgramFiles%\7-Zip\7z.exe" a -t7z -mx9 -mmt=%NUMBER_OF_PROCESSORS% %freecad_version_name%.7z %freecad_version_name%\ -bb
certutil -hashfile "%freecad_version_name%.7z" SHA256 > "%freecad_version_name%.7z"-SHA256.txt
echo %date%-%time% >>"%freecad_version_name%.7z"-SHA256.txt
+45 -21
View File
@@ -3,23 +3,9 @@
set -e
set -x
conda_env="fc_env"
conda_env="$(pwd)/../.pixi/envs/default/"
mkdir -p ${conda_env}
cp -a ../.pixi/envs/default/* ${conda_env}
export PATH="${PWD}/${conda_env}/bin:${PATH}"
export CONDA_PREFIX="${PWD}/${conda_env}"
# remove arm binaries that fail to extract unless using latest 7zip
rm $(find ${conda_env} -name \*arm\*.exe)
# delete unnecessary stuff
rm -rf ${conda_env}/include
find ${conda_env} -name \*.a -delete
copy_dir="FreeCAD_Conda_Build"
copy_dir="FreeCAD_Windows"
mkdir -p ${copy_dir}/bin
# Copy Conda's Python and (U)CRT to FreeCAD/bin
@@ -48,16 +34,28 @@ cp -a ${conda_env}/Library/lib ${copy_dir}/lib
cp -a ${conda_env}/Library/Mod ${copy_dir}/Mod
mkdir -p ${copy_dir}/doc
cp -a ${conda_env}/Library/doc/{ThirdPartyLibraries.html,LICENSE.html} ${copy_dir}/doc
rm -rf ${conda_env}/bin_tmp
# delete unnecessary stuff
find ${copy_dir} -name \*.a -delete
find ${copy_dir} -name \*.lib -delete
find ${copy_dir} -name \*arm\*.exe -delete # arm binaries that fail to extract unless using latest 7zip
# Apply Patches
mv ${copy_dir}/bin/Lib/ssl.py ssl-orig.py
mv ${copy_dir}/bin/Lib/ssl.py .ssl-orig.py
cp ssl-patch.py ${copy_dir}/bin/Lib/ssl.py
echo '[Paths]' >> ${copy_dir}/bin/qt6.conf
echo 'Prefix = ../lib/qt6' >> ${copy_dir}/bin/qt6.conf
python_version=$(python -c 'import platform; print("py" + platform.python_version_tuple()[0] + platform.python_version_tuple()[1])')
# convenient shortcuts to run the binaries
if [ -x /c/ProgramData/chocolatey/tools/shimgen.exe ]; then
pushd ${copy_dir}
/c/ProgramData/chocolatey/tools/shimgen.exe -p bin/freecadcmd.exe -i "$(pwd)/../../../WindowsInstaller/icons/FreeCAD.ico" -o "$(pwd)/FreeCADCmd.exe"
/c/ProgramData/chocolatey/tools/shimgen.exe --gui -p bin/freecad.exe -i "$(pwd)/../../../WindowsInstaller/icons/FreeCAD.ico" -o "$(pwd)/FreeCAD.exe"
popd
fi
python_version=$("${copy_dir}"/bin/python.exe -c 'import platform; print("py" + platform.python_version_tuple()[0] + platform.python_version_tuple()[1])')
version_name="FreeCAD_${BUILD_TAG}-Windows-$(uname -m)-${python_version}"
echo -e "################"
@@ -69,11 +67,37 @@ sed -i '1s/.*/\nLIST OF PACKAGES:/' ${copy_dir}/packages.txt
mv ${copy_dir} ${version_name}
"${PROGRAMFILES}/7-Zip/7z.exe" a -t7z -mx9 -mmt=${NUMBER_OF_PROCESSORS} ${version_name}.7z ${version_name} -bb
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
if [ "${MAKE_INSTALLER}" == "true" ]; then
FILES_FREECAD="$(cygpath -w $(pwd))\\${version_name}"
nsis_cpdir=$(pwd)/.nsis_tmp
cp -r "${CONDA_PREFIX}/NSIS" "${nsis_cpdir}"
# curl -L -o ".nsis-log.zip" http://prdownloads.sourceforge.net/nsis/nsis-3.11-log.zip # we use the log variant of the package already
# curl -L -o ".nsis-strlen_8192.zip" "http://prdownloads.sourceforge.net/nsis/nsis-3.11-strlen_8192.zip"
curl -L -o ".NsProcess.7z" "https://nsis.sourceforge.io/mediawiki/images/1/18/NsProcess.zip"
if [ ! $(echo fc19fc66a5219a233570fafd5daeb0c9b85387b379f6df5ac8898159a57c5944 .NsProcess.7z | sha256sum --check --status) ]; then
7z x .NsProcess.7z -o"${nsis_cpdir}" -y
mv "${nsis_cpdir}"/Plugin/nsProcess.dll "${nsis_cpdir}"/Plugins/x86-ansi/nsProcess.dll
mv "${nsis_cpdir}"/Plugin/nsProcessW.dll "${nsis_cpdir}"/Plugins/x86-unicode/nsProcess.dll
"${nsis_cpdir}"/makensis.exe -V4 \
-D"ExeFile=${version_name}-installer.exe" \
-D"FILES_FREECAD=${FILES_FREECAD}" \
-X'SetCompressor /FINAL lzma' \
../../WindowsInstaller/FreeCAD-installer.nsi
mv ../../WindowsInstaller/${version_name}-installer.exe .
sha256sum ${version_name}-installer.exe > ${version_name}-installer.exe-SHA256.txt
else
echo "Error: Failed to get NsProcess plugin. Aborting installer creation..."
fi
rm -rf "${nsis_cpdir}"
fi
if [ "${UPLOAD_RELEASE}" == "true" ]; then
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
fi
@@ -83,8 +83,11 @@ fi
# Check for dmgbuild executable
if ! command -v dmgbuild &> /dev/null; then
echo "Error: dmgbuild not installed. Please install it for example using pip:"
echo 'pip3 install "dmgbuild[badge_icons]>=1.6.0,<1.7.0"'
echo 'Error: dmgbuild not installed. Please install it'
echo '- using pixi:'
echo 'pixi g install dmgbuild --with pyobjc-framework-Quartz'
echo '- using pip:'
echo 'pip3 install dmgbuild pyobjc-framework-Quartz'
exit 1
fi
@@ -119,8 +122,96 @@ run_codesign "${CONTAINING_FOLDER}/${APP_NAME}"
echo "Creating disk image ${DMG_NAME}"
dmgbuild -s ${DMG_SETTINGS} -Dcontaining_folder="${CONTAINING_FOLDER}" -Dapp_name="${APP_NAME}" "${VOLUME_NAME}" "${DMG_NAME}"
# Submit it for notarization (requires that an App Store API Key has been set up in the notarytool)
time xcrun notarytool submit --wait --keychain-profile "${KEYCHAIN_PROFILE}" "${DMG_NAME}"
ID_FILE="${DMG_NAME}.notarization_id"
# Assuming that notarization succeeded, it's a good practice to staple that notarization to the DMG
xcrun stapler staple "${DMG_NAME}"
# Submit it for notarization (requires that an App Store API Key has been set up in the notarytool)
# This is a *very slow* process, and occasionally the GitHub runners lose the internet connection for a short time
# during the run. So in order to be fault-tolerant, this script polls, instead of using --wait
submit_notarization_request() {
if [[ -s "${ID_FILE}" ]]; then
cat "${ID_FILE}"
return
fi
local out
if ! out=$(xcrun notarytool submit --keychain-profile "${KEYCHAIN_PROFILE}" \
--output-format json --no-progress "${DMG_NAME}" 2>&1); then
print -r -- "$out" >&2
return 1
fi
# We asked for JSON output so we had something stable, but of course parsing JSON with ZSH is ugly, so a quick bit of
# Python does it instead...
local id
id=$(print -r -- "$out" |
/usr/bin/python3 -c 'import sys, json; print(json.load(sys.stdin).get("id",""))'
)
[[ -n "$id" ]] || { print -r -- "Could not parse submission id" >&2; return 1; }
print -r -- "$id" > "${ID_FILE}"
print -r -- "$id" # ID is a string here, not an integer, so I can't just return it
}
wait_for_notarization_result() {
local id="$1" attempt=0
while :; do
if xcrun notarytool wait "$id" --keychain-profile "${KEYCHAIN_PROFILE}" \
--timeout 10m --no-progress >/dev/null; then
return 0
fi
(( attempt++ ))
# If the failure was transient (timeout/HTTP/connection) just retry, but make sure to check to see if the problem
# was actually that the signing failed before retrying.
local tmp_json
tmp_json=$(mktemp)
trap 'rm -f "$tmp_json"' EXIT INT TERM
xcrun notarytool info "$id" --keychain-profile "${KEYCHAIN_PROFILE}" --output-format json 2>/dev/null > "$tmp_json"
/usr/bin/python3 - "$tmp_json" <<'PY'
import sys, json
try:
with open(sys.argv[1]) as f:
s = (json.load(f).get("status") or "").lower()
if s in ("invalid", "rejected"):
sys.exit(2)
else:
sys.exit(0)
except Exception:
sys.exit(1)
PY
rc=$?
rm -f "$tmp_json"
if [[ $rc == 2 ]]; then
print -r -- "Notarization was not accepted by Apple:" >&2
xcrun notarytool log "$id" --keychain-profile "${KEYCHAIN_PROFILE}" >&2
return 3
fi
if [[ $attempt -gt 120 ]]; then
print -r -- "🏳️ Notarization is taking too long, bailing out. 🏳️" >&2
return 4
fi
sleep $(( (attempt<6?2**attempt:60) + RANDOM%5 )) # Increasing timeout plus jitter for multi-run safety
done
}
if ! id="$(submit_notarization_request)"; then
print -r -- "❌ Failed to submit notarization request" >&2
exit 1
fi
if [[ -z "$id" ]]; then
print -r -- "❌ Submission succeeded but no ID was returned" >&2
exit 1
fi
print "Notarization submission ID: $id"
if wait_for_notarization_result "$id"; then
print "✅ Notarization succeeded. Stapling..."
xcrun stapler staple "${DMG_NAME}"
print "Stapled: ${DMG_NAME}"
rm -f "${ID_FILE}"
else
rc=$?
print "❌ Notarization failed (code $rc)." >&2
exit "$rc"
fi
@@ -11,12 +11,10 @@ import SubWCRev
gitInfo = SubWCRev.GitControl()
gitInfo.extractInfo("","")
gitDescription = os.environ['BUILD_TAG']
i = open("src/Build/Version.h.cmake")
content = []
for line in i.readlines():
line = line.replace("-${PACKAGE_VERSION_SUFFIX}",gitDescription)
line = line.replace("${PACKAGE_WCREF}",gitInfo.rev)
line = line.replace("${PACKAGE_WCDATE}",gitInfo.date)
line = line.replace("${PACKAGE_WCURL}",gitInfo.url)
@@ -28,6 +26,14 @@ with open("src/Build/Version.h.cmake", "w") as o:
content.append('#define FCRepositoryBranch "%s"\n' % (gitInfo.branch))
o.writelines(content)
with open("src/Tools/SubWCRev.py", "r") as f:
new_subwcrev = f.read()
new_subwcrev = new_subwcrev.replace("lines = i.writeVersion(lines)",
"#lines = i.writeVersion(lines) # this source package already has git info, we do nothing here")
with open("src/Tools/SubWCRev.py", "w") as f:
f.writelines(new_subwcrev)
with open(os.sys.argv[1], "w") as f:
f.write(f"rev_number: {gitInfo.rev}\n")
f.write(f"branch_name: {gitInfo.branch}\n")
@@ -35,8 +41,9 @@ with open(os.sys.argv[1], "w") as f:
f.write(f"commit_hash: {gitInfo.hash}\n")
f.write(f"remote_url: {gitInfo.url}\n")
p = subprocess.Popen(["git", "-c", "user.name='github-actions[bot]'", "-c", "user.email='41898282+github-actions[bot]@users.noreply.github.com'",
"commit", "-a", "-m", "add git information"], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
p = subprocess.Popen(["git", "-c", "user.name='github-actions[bot]'", "-c",
"user.email='41898282+github-actions[bot]@users.noreply.github.com'", "commit", "-a", "-m",
"add git version information"], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
out, err = p.communicate()
+7769 -7045
View File
File diff suppressed because it is too large Load Diff
+16 -12
View File
@@ -3,7 +3,7 @@ name = "FreeCAD"
version = "1.0.0"
description = "pixi instructions for FreeCAD"
authors = ["looooo <sppedflyer@gmail.com>"]
channels = ["conda-forge"]
channels = ["freecad", "conda-forge"]
platforms = [ "linux-64", "linux-aarch64", "osx-64", "osx-arm64", "win-64" ]
requires-pixi = ">=0.48"
@@ -92,8 +92,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 +132,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 = "*"
@@ -145,31 +149,31 @@ sed = "*"
sed = "*"
[target.win-64.dependencies]
pthreads-win32 = "*"
winpthreads-devel = "*"
[pypi-dependencies]
freecad-stubs = "*"
## Qt 6 Configuration Presets
[target.linux-64.tasks]
configure-debug = { cmd = [ "cmake", "--preset", "conda-linux-debug", "-DBUILD_REVERSEENGINEERING=OFF" ], depends-on = ["initialize"], env={ CFLAGS="", CXXFLAGS="", DEBUG_CFLAGS="", DEBUG_CXXFLAGS="" }}
configure-release = { cmd = [ "cmake", "--preset", "conda-linux-release", "-DBUILD_REVERSEENGINEERING=OFF" ], depends-on = ["initialize"], env={ CFLAGS="", CXXFLAGS="", DEBUG_CFLAGS="", DEBUG_CXXFLAGS="" }}
configure-debug = { cmd = [ "cmake", "--preset", "conda-linux-debug" ], depends-on = ["initialize"], env={ CFLAGS="", CXXFLAGS="", DEBUG_CFLAGS="", DEBUG_CXXFLAGS="" }}
configure-release = { cmd = [ "cmake", "--preset", "conda-linux-release" ], depends-on = ["initialize"], env={ CFLAGS="", CXXFLAGS="", DEBUG_CFLAGS="", DEBUG_CXXFLAGS="" }}
[target.linux-aarch64.tasks]
configure-debug = { cmd = [ "cmake", "--preset", "conda-linux-debug", "-DBUILD_REVERSEENGINEERING=OFF" ], depends-on= ["initialize"], env={ CFLAGS="", CXXFLAGS="", DEBUG_CFLAGS="", DEBUG_CXXFLAGS="" }}
configure-release = { cmd = [ "cmake", "--preset", "conda-linux-release", "-DBUILD_REVERSEENGINEERING=OFF" ], depends-on= ["initialize"], env={ CFLAGS="", CXXFLAGS="", DEBUG_CFLAGS="", DEBUG_CXXFLAGS="" }}
configure-debug = { cmd = [ "cmake", "--preset", "conda-linux-debug" ], depends-on= ["initialize"], env={ CFLAGS="", CXXFLAGS="", DEBUG_CFLAGS="", DEBUG_CXXFLAGS="" }}
configure-release = { cmd = [ "cmake", "--preset", "conda-linux-release" ], depends-on= ["initialize"], env={ CFLAGS="", CXXFLAGS="", DEBUG_CFLAGS="", DEBUG_CXXFLAGS="" }}
[target.osx-64.tasks]
configure-debug = { cmd = [ "cmake", "--preset", "conda-macos-debug", "-DBUILD_REVERSEENGINEERING=OFF" ], depends-on = ["initialize"], env={ CFLAGS="", CXXFLAGS="", DEBUG_CFLAGS="", DEBUG_CXXFLAGS="" }}
configure-release = { cmd = [ "cmake", "--preset", "conda-macos-release", "-DBUILD_REVERSEENGINEERING=OFF" ], depends-on = ["initialize"], env={ CFLAGS="", CXXFLAGS="", DEBUG_CFLAGS="", DEBUG_CXXFLAGS="" }}
configure-debug = { cmd = [ "cmake", "--preset", "conda-macos-debug" ], depends-on = ["initialize"], env={ CFLAGS="", CXXFLAGS="", DEBUG_CFLAGS="", DEBUG_CXXFLAGS="" }}
configure-release = { cmd = [ "cmake", "--preset", "conda-macos-release" ], depends-on = ["initialize"], env={ CFLAGS="", CXXFLAGS="", DEBUG_CFLAGS="", DEBUG_CXXFLAGS="" }}
[target.osx-arm64.tasks]
configure-debug = { cmd = [ "cmake", "--preset", "conda-macos-debug", "-DBUILD_REVERSEENGINEERING=OFF" ], depends-on = ["initialize"], env={ CFLAGS="", CXXFLAGS="", DEBUG_CFLAGS="", DEBUG_CXXFLAGS="" }}
configure-release = { cmd = [ "cmake", "--preset", "conda-macos-release", "-DBUILD_REVERSEENGINEERING=OFF" ], depends-on = ["initialize"], env={ CFLAGS="", CXXFLAGS="", DEBUG_CFLAGS="", DEBUG_CXXFLAGS="" }}
configure-debug = { cmd = [ "cmake", "--preset", "conda-macos-debug" ], depends-on = ["initialize"], env={ CFLAGS="", CXXFLAGS="", DEBUG_CFLAGS="", DEBUG_CXXFLAGS="" }}
configure-release = { cmd = [ "cmake", "--preset", "conda-macos-release" ], depends-on = ["initialize"], env={ CFLAGS="", CXXFLAGS="", DEBUG_CFLAGS="", DEBUG_CXXFLAGS="" }}
[target.win-64.tasks]
configure-debug = { cmd = [ "cmake", "--preset", "conda-windows-debug", "-DBUILD_REVERSEENGINEERING=OFF", "-DCMAKE_GENERATOR_PLATFORM=", "-DCMAKE_GENERATOR_TOOLSET=" ], depends-on = ["initialize"], env={ CFLAGS="", CXXFLAGS="", DEBUG_CFLAGS="", DEBUG_CXXFLAGS="" }}
configure-release = { cmd = [ "cmake", "--preset", "conda-windows-release", "-DBUILD_REVERSEENGINEERING=OFF", "-DCMAKE_GENERATOR_PLATFORM=", "-DCMAKE_GENERATOR_TOOLSET=" ], depends-on = ["initialize"], env={ CFLAGS="", CXXFLAGS="", DEBUG_CFLAGS="", DEBUG_CXXFLAGS="" }}
configure-debug = { cmd = [ "cmake", "--preset", "conda-windows-debug", "-DCMAKE_GENERATOR_PLATFORM=", "-DCMAKE_GENERATOR_TOOLSET=" ], depends-on = ["initialize"], env={ CFLAGS="", CXXFLAGS="", DEBUG_CFLAGS="", DEBUG_CXXFLAGS="" }}
configure-release = { cmd = [ "cmake", "--preset", "conda-windows-release", "-DCMAKE_GENERATOR_PLATFORM=", "-DCMAKE_GENERATOR_TOOLSET=" ], depends-on = ["initialize"], env={ CFLAGS="", CXXFLAGS="", DEBUG_CFLAGS="", DEBUG_CXXFLAGS="" }}
freecad-debug = { cmd = [ ".pixi/envs/default/Library/bin/FreeCAD.exe" ], depends-on = ["install-debug"]}
freecad-release = { cmd = [ ".pixi/envs/default/Library/bin/FreeCAD.exe" ], depends-on = ["install-release"]}
@@ -126,7 +126,11 @@ namespace netgen {
#endif
//extern void OCCSetLocalMeshSize(OCCGeometry & geom, Mesh & mesh);
DLL_HEADER extern MeshingParameters mparam;
DLL_HEADER extern volatile multithreadt multithread;
#if NETGEN_VERSION >= NETGEN_VERSION_STRING(6,2,2601)
using ngcore::multithread;
#else
DLL_HEADER extern volatile multithreadt multithread;
#endif
DLL_HEADER extern bool merge_solids;
}
@@ -112,7 +112,11 @@ namespace netgen {
DLL_HEADER extern int OCCGenerateMesh (OCCGeometry&, Mesh*&, int, int, char*);
#endif
DLL_HEADER extern MeshingParameters mparam;
DLL_HEADER extern volatile multithreadt multithread;
#if NETGEN_VERSION >= NETGEN_VERSION_STRING(6,2,2601)
using ngcore::multithread;
#else
DLL_HEADER extern volatile multithreadt multithread;
#endif
}
using namespace nglib;
using namespace std;
+3
View File
@@ -630,6 +630,9 @@ fs::path ApplicationDirectories::findHomePath(const char* sCall)
#include <cstdio>
#include <cstdlib>
#include <sys/param.h>
#if defined(__FreeBSD__)
#include <sys/sysctl.h>
#endif
fs::path ApplicationDirectories::findHomePath(const char* sCall)
{
+44 -23
View File
@@ -31,31 +31,38 @@ namespace App
class Application;
/// Helper class to manager transaction (i.e. undo/redo)
/**
* @brief A helper class to manage transactions (i.e. undo/redo).
*
* An AutoTransaction object is meant to be allocated on the stack and governs
* the transactions in that scope.
*/
class AppExport AutoTransaction
{
public:
/// Private new operator to prevent heap allocation
/// Delete the new operator to prevent heap allocation.
void* operator new(std::size_t) = delete;
public:
/** Constructor
/**
* @brief Construct an auto transaction.
*
* @param name: optional new transaction name on construction
* @param tmpName: if true and a new transaction is setup, the name given is
* @param[in] name: optional new transaction name on construction
* @param[in] tmpName: if true and a new transaction is setup, the name given is
* considered as temporary, and subsequent construction of this class (or
* calling Application::setActiveTransaction()) can override the transaction
* name.
*
* The constructor increments an internal counter
* (Application::_activeTransactionGuard). The counter prevents any new
* active transaction being setup. It also prevents close (i.e. commits) the
* current active transaction until it reaches zero. It does not have any
* effect on aborting transaction, though.
* active transactions being setup. It also prevents to close
* (i.e. commits) the current active transaction until it reaches zero. It
* does not have any effect on aborting transactions though.
*/
AutoTransaction(const char* name = nullptr, bool tmpName = false);
/** Destructor
/**
* @brief Destruct an auto transaction.
*
* This destructor decrease an internal counter
* (Application::_activeTransactionGuard), and will commit any current
@@ -63,15 +70,19 @@ public:
*/
~AutoTransaction();
/** Close or abort the transaction
/**
* @brief Close or abort the transaction.
*
* This function can be used to explicitly close (i.e. commit) the
* transaction, if the current transaction ID matches the one created inside
* the constructor. For aborting, it will abort any current transaction
* the constructor. For aborting, it will abort any current transaction.
*
* @param[in] abort: if true, abort the transaction; otherwise, commit it.
*/
void close(bool abort = false);
/** Enable/Disable any AutoTransaction instance in the current stack
/**
* @brief Enable/Disable any AutoTransaction instance on the current stack.
*
* Once disabled, any empty temporary named transaction is closed. If there
* are non-empty or non-temporary named active transaction, it will not be
@@ -79,6 +90,8 @@ public:
*
* This function may be used in, for example, Gui::Document::setEdit() to
* allow a transaction live past any command scope.
*
* @param[in] enable: if true, enable the AutoTransaction; otherwise, disable it.
*/
static void setEnable(bool enable);
@@ -87,47 +100,55 @@ private:
};
/** Helper class to lock a transaction from being closed or aborted.
/**
* @brief Helper class to lock a transaction from being closed or aborted.
*
* The helper class is used to protect some critical transaction from being
* The helper class is used to protect some critical transactions from being
* closed prematurely, e.g. when deleting some object.
*/
class AppExport TransactionLocker
{
public:
/** Constructor
* @param lock: whether to activate the lock
/**
* @brief Construct a transaction locker.
*
* @param[in] lock: whether to activate the lock
*/
TransactionLocker(bool lock = true);
/** Destructor
* Unlock the transaction is this locker is active
/**
* @brief Destruct a transaction locker.
*
* Unlock the transaction if this locker is active
*/
~TransactionLocker();
/** Activate or deactivate this locker
* @param enable: whether to activate the locker
/**
* @brief Activate or deactivate this locker.
*
* An internal counter is used to support recursive locker. When activated,
* the current active transaction cannot be closed or aborted. But the
* closing call (Application::closeActiveTransaction()) will be remembered,
* and performed when the internal lock counter reaches zero.
*
* @param enable: whether to activate the locker
*/
void activate(bool enable);
/// Check if the locker is active
/// Check if the locker is active.
bool isActive() const
{
return active;
}
/// Check if transaction is being locked
/// Check if transaction is being locked.
static bool isLocked();
friend class Application;
public:
/// Private new operator to prevent heap allocation
/// Delete the new operator to prevent heap allocation.
void* operator new(std::size_t) = delete;
private:
+2 -2
View File
@@ -199,12 +199,12 @@ const std::string& ComplexGeoData::elementMapPrefix()
std::string ComplexGeoData::getElementMapVersion() const
{
return "4";
return "5";
}
bool ComplexGeoData::checkElementMapVersion(const char* ver) const
{
return !boost::equals(ver, "3") && !boost::equals(ver, "4") && !boost::starts_with(ver, "3.");
return !boost::ends_with(ver, "5");
}
size_t ComplexGeoData::getElementMapSize(bool flush) const
+1 -1
View File
@@ -279,7 +279,7 @@ public:
return _elementMap->setElementName(element, name, masterTag, sid, overwrite);
}
bool hasElementMap()
bool hasElementMap() const
{
return _elementMap != nullptr;
}
+9 -4
View File
@@ -179,10 +179,15 @@ App::DatumElement* LocalCoordinateSystem::getDatumElement(const char* role) cons
if (featIt != features.end()) {
return static_cast<App::DatumElement*>(*featIt);
}
std::stringstream err;
err << "LocalCoordinateSystem \"" << getFullName() << "\" doesn't contain feature with role \""
<< role << '"';
throw Base::RuntimeError(err.str().c_str());
// During restore, if role lookup fails (e.g. timing issues or fallback to internal name),
// we suppress the error. The default getSubObject will try to resolve it by Internal Name next.
if (!getDocument()->testStatus(App::Document::Restoring)) {
std::stringstream err;
err << "LocalCoordinateSystem \"" << getFullName()
<< "\" doesn't contain feature with role \"" << role << '"';
throw Base::RuntimeError(err.str().c_str());
}
return nullptr;
}
App::Line* LocalCoordinateSystem::getAxis(const char* role) const

Some files were not shown because too many files have changed in this diff Show More