Commit Graph

2958 Commits

Author SHA1 Message Date
Kacper Donat
d4dc5c01d8 Part: Introduce PreviewUpdateScheduler
This commit introduces PreviewUpdateScheduler class that is responsible
to schedule the true recompute of the preview. View Providers (or other
components) can use this service to ask for the preview recompute to
happend at a time that is convinent for a program and that won't impact
performance.

The provided implementation uses Queued Connections in Qt to calculate
preview essentially on next run of the event loop. It allows business
logic in FreeCAD (like property propagation) to execute fully and then
recompute preview once. This greately reduces number of recompute calls
for previews.
2026-01-11 20:32:50 -06:00
freecad-gh-actions-translation-bot
bf068081f7 Update translations from Crowdin 2026-01-11 19:42:50 -06:00
Louis Gombert
3f39840f83 PartDesign: remove preview update on property changed (#26803)
This recompute seemed unnecessary, and caused slowdowns when opening the file and recomputing. This decreases the time necessary to both open and recompute files that use boolean operations, and should not change anything regarding preview computation when the dialog is open.
2026-01-09 23:05:23 +00:00
Max Wilfinger
c6ede8614f Part: Fix orientation of internal shells of a solid (#26717)
* Part: Fix orientation of internal shells of a solid

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

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

* Part: Add method Feature::fixSolids

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

Using ShapeFix_Solid fixes the solid.

---------

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

---------

Co-authored-by: wwmayer <wmayer@freecad.org>
2026-01-08 10:31:42 -06:00
tetektoza
5994b67502 Revert "PartDesign: Bake in geometry transform after boolean"
This reverts commit 527b2de560.

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

This matches Part WB's Boolean behavior which does not use
`bakeInTransform()` and has working refine functionality.
2026-01-08 13:40:52 +01:00
tritao
40a9f46d71 Base: Remove Boost-based signals and switch to FastSignals. 2026-01-07 21:16:16 +00:00
Krrish777
c7c39f27eb Improve error message for empty transformed features 2026-01-07 10:20:24 +01:00
PaddleStroke
352b0b2213 PartDesign: Enable drag and drop of shapeBinders (#25264)
* PartDesign: Enable drag and drop of shapeBinders

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

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

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2026-01-07 09:21:58 +01:00
freecad-gh-actions-translation-bot
c8b757bd3c Update translations from Crowdin 2026-01-05 08:47:20 +01:00
Kacper Donat
c5c937c8bd PartDesign: Fix misplaced preview for patterns
Previous solution did not take into account supporting shape transform
which should now be handled correctly.
2026-01-04 10:31:46 -09:00
Krrish777
badb6397f9 Fix: Update PartDesign Boolean dropdown immediately before recomputation 2026-01-03 02:41:28 +01:00
Chris Hennes
a970f1263d PD: Add case for when scripts set Midplane=False 2025-12-29 17:42:13 +01:00
Alfredo Monclus
71f62d15e5 PartDesign: fix transform removal causing an invalid base feature on the next solid if it was broken itself 2025-12-29 17:41:36 +01:00
PaddleStroke
be06d1bc07 PartDesign: Fix upToFace not working with non-ASCII filenames (#26514)
* PartDesign: Fix upToFace not working with non-ASCII filenames

* Update TaskExtrudeParameters.cpp
2025-12-29 17:33:19 +01:00
freecad-gh-actions-translation-bot
dc3be6111a Update translations from Crowdin 2025-12-29 11:31:39 +01:00
Chris Hennes
dd14033329 PD: For Body get the color from the tip
Mostly affects STEP export.
2025-12-27 18:29:41 +01:00
Chris Hennes
4ebab46d93 PD: Modify tests to use SideType instead of Midplane 2025-12-27 18:28:01 +01:00
horseDeveloper
5978247580 Fixing Leftover references from migration from freecadweb.org (#26163) 2025-12-26 11:11:12 -06:00
Kacper Donat
9876a5acc9 PartDesign: Revolution - add FuseOrder
In older versions of FreeCAD the boolean order was base + result. After
TNP mitigation the order was changed to be result + base. For the
resulting shape that does not matter, but order of edges can differ if
arguments are in a different order.

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

To support all cases we introduce FuseOrder compatibility property that
will be set to FeatureFirst for files saved with 1.0 to preserve
behavior.
2025-12-22 11:17:27 -06:00
chris
e660ca5a29 partdesign: pd: fix for issue #25794 2025-12-22 14:58:07 +01:00
Chris
37a83a48b9 Part Design: Add sketch sub element names for refs in revolutions (#26227)
* part design: partdesign: pd: fix regression issue #26223 add sketch sub element names for refs in revolutions

* refractor code to remove else blocks as every condition has a return statement, make lsp happy
2025-12-22 14:56:53 +01:00
Alfredo Monclus
111c6df9b0 PartDesign: fix hole clearance not appearing in the taskpanel when switching type 2025-12-22 14:56:09 +01:00
Alfredo Monclus
35bcb14d89 PartDesign: fix thread depth not shown in taskpanel 2025-12-22 14:55:45 +01:00
Chris Hennes
9e5e52c0ff PD: Fix missing silent mode check in GetTopoShapeVerifiedFace
Also ensure that all calls to this method actually verify the result.
2025-12-22 14:34:25 +01:00
Kacper Donat
ffd4487f6d PartDesign: Chamfer - migrate Size and Size2 for older files (#26137)
* PartDesign: Chamfer - migrate Size and Size2 for older files

* Apply suggestions from code review

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

---------

Co-authored-by: Chris Hennes <chennes@pioneerlibrarysystem.org>
2025-12-22 11:52:55 +00:00
freecad-gh-actions-translation-bot
310419d45e Update translations from Crowdin 2025-12-22 12:40:21 +01:00
Kacper Donat
2ea7c39563 Compiler warning cleanup (#26229)
* App: Compiler warning cleanup

* Gui: Compiler warning cleanup

* Assembly: Compiler warning cleanup

* Measure: Compiler warning cleanup

* Sketcher: Compiler warning cleanup

* TechDraw: Compiler warning cleanup

* PartDesign: Compiler warning cleanup
2025-12-18 07:50:26 +01:00
freecad-gh-actions-translation-bot
9b07585b88 Update translations from Crowdin 2025-12-17 21:10:10 -06:00
Chris Hennes
e5d7920dd7 PartDesign: Compiler warning cleanup 2025-12-17 11:08:38 -06:00
Saksham Malhotra
44584858a5 PartDesign: move AllowCompound to Base property group (#26180) 2025-12-15 21:45:29 -06:00
Chris Hennes
90f98807ef PD: Don't warn about Midplane on document load 2025-12-15 18:22:31 +01:00
Chris Hennes
3cb1d812db PD: Correct is-datum-in-body check 2025-12-15 18:20:04 +01:00
Alfredo Monclus
b70fe3bea5 PardDesign: fix hole task thread combos not translating 2025-12-11 18:56:10 -06:00
Kacper Donat
0523480e93 PartDesign: Recompute preview after forced recompute
This fixes some cases where Preview was stale and not recomputed after
changes done via code.
2025-12-11 18:55:10 -06:00
Chris Hennes
8d0e0a4763 PD: Add deprecation warning if Midplane is set 2025-12-10 12:42:13 +01:00
freecad-gh-actions-translation-bot
97b9193d71 Update translations from Crowdin 2025-12-08 22:31:48 -06:00
Captain
982d3dc729 PartDesign: fix symmetric mode of draggers in revolution/groove (#25656) 2025-11-30 23:03:31 -06:00
Chris Hennes
9cd4a2ec7d Merge pull request #24262 from mnesarco/pyi-fixes-1 2025-11-29 20:23:37 -06:00
PaddleStroke
7247fb82a2 PartDesign: Polar pattern: Accept negative angles (#25621) 2025-11-27 18:08:01 -06:00
Chris Hennes
44df99e458 Merge pull request #25580 from kadet1090/fix-boolean-position
PartDesign: Fix boolean positioning
2025-11-26 14:22:59 -06:00
Chris
e56ba339e1 PartDesign: Use c++ exception to prevent crash (#25671)
* part design: fix issue #25639 use c++ exception to prevent crash

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

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

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-11-26 15:43:47 +01:00
github-actions
914b34cc1a Update translations from Crowdin 2025-11-25 21:20:42 -06:00
Kacper Donat
2388b2841b PartDesign: Use true tool positions for boolean preview
This fixes positioning of some previews for booleans that were misplaced
after #24750 was merged. It restores previous code that was correct for
most cases. The reason for some previews being misaligned is described
in the #25578 - the preview actually shows how the result should be but
due to some shortcuts taken in code the result is incorrect.
2025-11-24 10:48:32 -06:00
chris
4935a4c21a part design: reimp feature to move datum objects using modal / dialogue box from right click menu in model tab 2025-11-24 10:39:13 -06:00
Kacper Donat
8f8ba2dad0 PartDesign: Bake in geometry transform after boolean
This bakes in transform into geometry after boolean to ensure that
regardless of parameters the result of boolean operation is the same.
2025-11-23 23:10:25 +01:00
Kacper Donat
234d69e58b PartDesign: Simplify FeatureBoolean
This commit removes a ton of dead code from FeatureBoolean. It might
been ported here from the Link branch but it is not used and it is
confusing. The reason for having that code here is also not really
obvious so there is no reason to keep it.
2025-11-23 23:10:25 +01:00
pre-commit-ci[bot]
15c4db7024 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2025-11-20 19:04:34 +00:00
Syres916
b3a7c4077a [PartDesign] Fix string encoding for document name and face reference 2025-11-20 19:02:25 +00:00
captain0xff
b71f9d1623 PartDesign: fix the interactive controls for revolution/groove 2025-11-18 15:39:42 +01:00