Commit Graph

2598 Commits

Author SHA1 Message Date
Alfredo Monclus
8444a3ec97 fix(PD): complete ISO-273 2024-12-20 07:51:33 -03:00
Florian Foinant-Willig
3969fc56db PartDesign: Add Std_ToggleFreeze to context menu 2024-12-16 11:47:52 -05:00
Chris Hennes
118b8e78b0 Merge pull request #18354 from CalligaroV/pd-hole-restore-missing-refineShapeIfActive
[PartDesign] Hole: restore missing call to FeatureAddSub::refineShapeIfActive()
2024-12-16 11:41:50 -05:00
PaddleStroke
83026233a7 Merge branch 'main' into core_LCS3 2024-12-13 18:48:35 +01:00
wmayer
0017bc730a PD: Fix possible crash in up to shape 2024-12-13 12:15:49 -05:00
PaddleStroke
9bfb0e3a5d Remove PartDesign Datums commands from the UI. 2024-12-13 18:04:10 +01:00
PaddleStroke
87838ca93b SubShapeBinder: Add support for point. 2024-12-13 18:04:10 +01:00
PaddleStroke
5162a2a093 PartDesign: Enable the use of the core datums as references. 2024-12-13 18:04:10 +01:00
PaddleStroke
19ef989300 Part: add datum objects and commands to create them. 2024-12-13 18:04:10 +01:00
PaddleStroke
655ae579ed Core: Datums: Fix axis placement and add migration script. 2024-12-13 18:04:10 +01:00
Florian Foinant-Willig
7f20215297 PartDesign: fix helix with negative angle 2024-12-13 11:41:55 -05:00
Kacper Donat
7e9fa4de99 TopoNaming: Refine - mark joined faces as modified not generated
This is parity change with LS3: a9810d509a/src/Mod/Part/App/TopoShapeEx.cpp (L3357)
2024-12-13 11:41:29 -05:00
Snow Faerie
8ac3800666 Fix and add menu accelerators (#15532)
* Fix and add menu accelerators: menus common to all workbenches

I use menu accelerators fairly often, so I find it very frustrating when
they are missing, or worse, they don't work due to the same letter being
assigned to several commands.

This patch adds accelerators to lots of menu entries missing them and
fixes broken accelerators.

Wherever possible, standard accelerator keys are used:
https://doc.qt.io/qt-5/accelerators.html

This commit covers accelerator fixes that are common to all workbenches.
Accelerator fixes for specific workbenches will be done in separate
commits.

* Add missing accelerators: Spreadsheet workbench
2024-12-13 10:39:30 -06:00
Jacob Oursland
72372b37d0 PartDesign: Fix failing TNP test. 2024-12-09 17:27:28 -05:00
Chris Hennes
7a0fc120d1 Merge pull request #18273 from Ondsel-Development/sk_group_drag
Sketcher: Group dragging
2024-12-09 12:29:49 -05:00
bgbsww
9566f06683 Toponaming: Add a plane matching based heuristic to TNP mitigation (#16803)
* Add a plane matching based heuristic to TNP mitigation

* Improve comments, add test
2024-12-09 11:06:02 -06:00
Jonas Bähr
e8bdb19a65 PD: Fix error "duplicate command PartDesign_InvoluteGear"
Every time the InvoluteGearFeature python module was imported, and we're
in GUI context, the command "PartDesign_InvoluteGear" was registered. On
the 2nd (3rd, ...) time, this was reported as an error in the console,
like "error: Command.cpp(1841): duplicate command PartDesign_InvoluteGear"

The first import happens when the PartDesign FreeCAD Module is loaded,
via `InitGui.py`. Subsequent imports may happen when e.g. executing the
involute gear command or when running it's tests via FC's Test WB.

This change now registers the command only then the PartDesign WB is set
up in InitGui, not when importing the python module. The same fix is
applied for sprocket, where the same pattern for command registration
was used.

In addition, the import error catch was removed, which seems to be a copy
paste left-over from the ShaftWizard. In contrast to ShaftWizard,
involute gear and sprocket only use modules from the Python standard lib,
so I think this precaution is not worth the additional complexity, just
for hiding actual errors.
2024-12-09 11:53:23 -05:00
Florian Foinant-Willig
4cd8f4b221 fix testGiantHelix* 2024-12-09 17:52:02 +01:00
Alexey Chernov
be7a16fc5b Require read-only and output attributes on updated properties
Require the property to be both read-only and output for it to be
updated back from support to binder when calculated with expression in
support.
2024-12-08 15:12:38 -05:00
Alexey Chernov
b66d413deb Use lambda to prevent code duplication 2024-12-08 15:12:38 -05:00
Alexey Chernov
d35d3a025b Apply result of copy on change properties
Copy on change properties propagated to SubShapeBinder can be changed
there and then updated in the base body (support). On the other hand,
they might be used in calculation of some other properties in the base
body which could also be copy on change and propagated to the same
SubShapeBinder. It looks natural that these latter properties should be
updated with the calculation results as well.

Example:
Body has copy on change properties A = 200 mm and B = 3 * A = 600 mm.
SubShapeBinder with support of Body has A changed to 300 mm and expects
B = 3 * 300 mm = 900 mm. Without this change B is not updated and equals
to 600 mm in SubShapeBinder as well.
2024-12-08 15:12:38 -05:00
Vincenzo Calligaro
040d5c3c2b [PartDesign] Hole: restore missing call to FeatureAddSub::refineShapeIfActive()
Signed-off-by: Vincenzo Calligaro <vincenzo.calligaro@gmail.com>
2024-12-07 15:23:44 +01:00
Kacper Donat
954b729b56 Gui: Use getObject<T>() helpers in classes
This commit is generated using regex based find and replace:

```
s/[\w:]+_cast\s*<([^>]+)\*>\s*\(\s*getObject\(\s*\)\)/getObject<$1>/
s/[\w:]+_cast\s*<([^>]+)\*>\s*\(\s*([^)]*)\s*->\s*getObject\(\s*\)\)/$2->getObject<$1>()/
```

To regenerate if needed.
2024-12-06 18:29:39 +01:00
Kacper Donat
44f3b37200 Gui: Add getObject<T>() helpers to various classes
Obtaining specific kind of document object is very common task. This
commit introduces handy helper which makes that a lot easier.
2024-12-06 18:19:53 +01:00
Chris Hennes
ea7e17ba00 Merge pull request #18126 from Ondsel-Development/core_LCS2
Core datums : Card2 : Core implementation
2024-12-06 12:12:04 -05:00
Nicola Cerone
a90bbf27cc Gui: Added SendToPythonConsole item in PartDesign tree view right-click menu. 2024-12-06 11:46:46 -05:00
PaddleStroke
598e32cdb3 PartDesign: revert e49cfde and 7331dc3 to fix https://github.com/FreeCAD/FreeCAD/issues/17949 2024-12-06 11:36:51 -05:00
PaddleStroke
17e6aa9629 Sketcher: Rename movePoint to moveGeometries. 2024-12-06 16:45:47 +01:00
luzpaz
2d40efd555 Fix various typos
Found with codespell
2024-12-04 23:18:00 -05:00
Ajinkya Dahale
398c95eb66 [PartDesign] Fix TestTopologicalNamingProblem
Issue caused by refactor of `SketchObject::trim()`.
2024-12-04 00:57:40 +05:30
Florian Foinant-Willig
115667f73a PartDesign: decouple refine and other geometric computation (#17008) 2024-12-02 10:57:30 -06:00
PaddleStroke
ad22aa3a8c PartDesign: Fix newSketch not working when editing a body from an external file. 2024-11-29 12:00:41 -05:00
wmayer
007b98df0e PD: Add test case to show the fix for the crash with active objects 2024-11-28 17:15:39 +01:00
wmayer
ab0b63e1e3 PD: Avoid touching the document when opening pad or pocket dialog 2024-11-28 17:11:42 +01:00
PaddleStroke
b2f965c06e ViewProviderOrigin: Renamed to ViewProviderCoordinateSystem 2024-11-27 12:15:53 +01:00
PaddleStroke
4ebb66838c Core: Add App::LocalCoordinateSystem.
Most of App::Origin is moved into this sub class of App::Origin.
Add App::Point. Change graphics of the planes/axis.
Remove scale-by-content behavior and make it fixed size on screen.
2024-11-26 17:36:02 +01:00
PaddleStroke
3993bfede7 Rename ViewProviderOriginFeature to ViewProviderDatum 2024-11-26 15:36:48 +01:00
PaddleStroke
a558475d8a Rename 'OriginFeature' to 'DatumElement' 2024-11-26 15:36:48 +01:00
PaddleStroke
8f43f3cc8b Core: Rename 'OriginFeature' file to 'Datums' 2024-11-26 15:36:48 +01:00
wmayer
2b4b8e4479 PD: Cleanup code of TaskRevolutionParameters 2024-11-22 11:59:21 -05:00
mwganson
fb642e9c9f [PartDesign] change claimChildren() function to include all profile objects except for other Part Design features 2024-11-22 11:51:30 -05:00
wmayer
ac14e2c960 MSVC: Fix compiler warnings 2024-11-22 16:53:00 +01:00
wmayer
4c5e3979ce PD: move refine model parameter to separate function 2024-11-22 11:59:49 +01:00
wmayer
01f5095aa8 PD: Fix convoluted event handling of dress-up task boxes 2024-11-22 11:55:46 +01:00
wwmayer
7a0154d1b1 PD: Add test case for #17184 (#17707) 2024-11-11 18:21:15 -03:00
Alfredo Monclus
78d57469af fix(PD): initialization of thread class and fit 2024-11-11 18:18:30 +01:00
Florian Foinant-Willig
b341dd1e64 Fix revolution with ShapeBinder profile (#17489)
* Fix revolution with ShapeBinder profile

* Remove log level init

---------

Co-authored-by: Chris Hennes <chennes@pioneerlibrarysystem.org>
2024-11-11 17:48:18 +01:00
Eric Price
f90c6f56d3 increase tolerance on helical shapes to avoid crash / broken geometry (#17356)
* increase tolerance on helical shapes to avoid crash

fix #17113
fix #9377
fix #11083

* added test cases for additive and subtractive helix

* fixed whitespace issue, reduced turncount for speed

* relaxed large scale testcases for OCCT 7.3 and below, work around windows CI error #17394

* Further reduce max size in test for buggy Ubuntu OCCT
2024-11-11 17:44:27 +01:00
Yorik van Havre
56a897cc96 Translations (#17725)
* Translations: updated ts files

* Translations: merged crowdin translations

* [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>
2024-11-11 17:01:52 +01:00
wmayer
6b490fc8af PD: Fix default display mode of ViewProviderBoolean
Make sure that by default display mode is set to 'Flat Lines' instead of 'Group' as otherwise it won't show the result object
2024-11-05 16:24:33 -05:00