Commit Graph

39887 Commits

Author SHA1 Message Date
Ajinkya Dahale
73253bd2d4 [Sketcher] Fix issues in knot operations
For some reason this is not caught in the tests.
2025-01-16 15:56:22 +05:30
Ajinkya Dahale
b2e414c407 [Sketcher] Make replaceGeometries protected
This should be a `protected` or `private` operation since it doesn't handle
constraints. However, this is intended to be used by external classes that
modify a `SketchObject` (instead of these modifications like `split`, `trim`,
`join` etc. being methods of `SketchObject`). In that case, it may be best to
use the `friend` keyword.
2025-01-16 15:56:22 +05:30
Ajinkya Dahale
aa1122c774 [Sketcher] Fix "used" B-spline poles being deleted 2025-01-16 15:56:22 +05:30
Ajinkya Dahale
8f7a6628ca [Sketcher][test] Add new test for internal geometry deletion
...when some are "used"
2025-01-16 15:56:21 +05:30
Ajinkya Dahale
821bc2ecdf [Sketcher] Incorporate review of #18665 by kadet
1. Replace `find_if` with `any_of` when the iterator is not used.
2. Use PascalCase for templated class.
2025-01-16 15:56:19 +05:30
Ajinkya Dahale
c6f5739763 [Sketcher] Refactor SketchObject::split
1. Now uses `Part::Geometry::createArc`.
2. Removed type-specific codes. It can be generalized now.
2025-01-16 15:55:14 +05:30
Ajinkya Dahale
e6becd0b61 [Sketcher] Further refactor modifyBSplineKnotMultiplicity 2025-01-16 15:55:14 +05:30
Ajinkya Dahale
12102abd6b [Sketcher] Incorporate review of #18665
...by hyarion on December 29.
2025-01-16 15:55:14 +05:30
Ajinkya Dahale
226d24792d [Sketcher] Fix some issues in trim
Fixes fails at cases where one (or both) of the remaining segments is (are)
degenerate. This existed pre-refactor.

Fixes cases where there are some constraints on internal geometry that do not
get deleted cleanly.

Also fixes a memory leak.
2025-01-16 15:55:14 +05:30
Ajinkya Dahale
e4f906c23b [Sketcher] Refactor SketchObject::trim
Cognitive complexity down to 57.
2025-01-16 15:55:14 +05:30
Ajinkya Dahale
3832db01ff [Sketcher] Refactor SketchObject::modifyBSplineKnotMultiplicity 2025-01-16 15:55:14 +05:30
Ajinkya Dahale
6ba1b0b7a9 [Sketcher] Refactor SketchObject::insertBSplineKnot() 2025-01-16 15:55:14 +05:30
Ajinkya Dahale
8c53b2ded5 [Sketcher][test] Add tests for B-spline operations 2025-01-16 15:55:14 +05:30
Ajinkya Dahale
0ded3a4af1 [Sketcher] Refactor SketchObject::trim()
1. Use `Part::GeomCurve::createArc()`
2. Refactor constraint logic in `trim`
2025-01-16 15:55:14 +05:30
Ajinkya Dahale
5a01d438f2 [Sketcher] Refactor internal geometry operations
* Use range-for and rearrange for understandability.
* Break down into individual functions by geomtype.
* Also refactor `exposeInternalGeometryForType<Part::GeomBSplineCurve>`
* Use `Constraint::involves...()` in delete internal

Suppress clang-tidy/clazy warnings by using `[[maybe_unused]]`.

Co-authored-by: Chris Hennes <chennes@pioneerlibrarysystem.org>
2025-01-16 15:54:47 +05:30
Ajinkya Dahale
23cd6cb54e [Sketcher][test] Tests for expose/delete internal geometry 2025-01-16 15:52:03 +05:30
Ajinkya Dahale
568f984b0b [planegcs] Refactor pointer vector freeing
Remove the type-checks in `free(std::vector<Constraint*>& constrvec)` as well as
checks for `nullptr` before deleting.
2025-01-16 15:52:03 +05:30
Ajinkya Dahale
2025c009cd [planegcs] Refactor conditions & loops in GCS.cpp for readability 2025-01-16 15:52:03 +05:30
Ajinkya Dahale
a2521d0798 [planegcs] Refactor identifyConflictingRedundantConstraints() 2025-01-16 15:52:03 +05:30
Ajinkya Dahale
bd522fe189 [planegcs] Refactor GCS::System::initSolution() 2025-01-16 15:52:02 +05:30
Ajinkya Dahale
bc2b35da4e [Sketcher] Helper functions for deleting geometry
Some tests probably needed
2025-01-16 15:52:02 +05:30
Ajinkya Dahale
2249c99b33 [Sketcher] Write SketchObject::replaceGeometries() 2025-01-16 15:52:02 +05:30
Ajinkya Dahale
5c52353480 [Sketcher] Refactor SketchObject::join() (expected trivial)
No tests are added since this commit only adjusts if-then statements.
2025-01-16 15:52:02 +05:30
Ajinkya Dahale
5a4072587b [Sketcher] Some trivial for loop changes in SketchObject
No tests added since this should be no more different than existing code.
2025-01-16 15:52:02 +05:30
Ajinkya Dahale
0f3aff0eac [Sketcher][test] Create test for getConstraintAfterDeletingGeo+
[Sketcher] Add null case to constraint change on deletion checks
2025-01-16 15:52:02 +05:30
Tim
201eca4d02 Addon Manager: Improve proxy URL parsing & enhanced the error messaging (#19078) 2025-01-15 13:39:04 -06:00
Boots
4cb01753ed File export: generate a default filename if the selected object chang… (#18907)
* File export: generate a default filename if the selected object changed since the last export

* Renamed variable to be more clear as per PR review feedback
2025-01-14 16:20:09 -06:00
Chris Hennes
115cd050bc Merge pull request #19019 from hyarion/refactor/countObjectsOfType
Refactor countObjectsOfType in selection and document
2025-01-14 16:05:12 -06:00
tritao
70423b7d59 CMake: Issue a non-fatal error when module dependency is not found. 2025-01-14 15:45:21 -06:00
tritao
19cfb363b8 Gui: Bind NavigationStyle to Python. 2025-01-14 15:11:09 -06:00
Chris Hennes
5e9ee22c75 Merge pull request #19024 from hyarion/fix-macro-execute-window
Fix missing user macros in macro execute window
2025-01-14 13:50:17 -06:00
tritao
35d2106594 Gui: Rename View3DInventorPy::getView3DIventorPtr() due to typo. 2025-01-14 13:37:33 -06:00
wmayer
cb4dd89d55 Fix several compiler warnings 2025-01-14 13:34:18 -06:00
mosfet80
344ae40024 Update sub_buildPixi.yml 2025-01-14 08:43:08 -06:00
Benjamin Nauck
ef27cc7d17 Make old type countObjectsOfType functions protected 2025-01-14 14:23:46 +01:00
Benjamin Nauck
3ea3ae0132 Modernizing countObjectsOfType functions 2025-01-14 14:23:46 +01:00
Benjamin Nauck
7b22027b90 Add template based Document::countObjectsOfType
Also convert code to use this new method
2025-01-14 14:23:46 +01:00
Yorik van Havre
00c00ed595 BIM: Fixed late global declaration - fixes #19049 2025-01-14 13:32:23 +01:00
tritao
13cc6a8d22 BIM: Only import TechDraw when its actually needed.
Allows FreeCAD BIM module to load without TechDraw module compiled.
2025-01-14 11:14:16 +01:00
Chris Hennes
0b1d7349b0 MSVC: Add missing PreCompiled.h includes 2025-01-14 09:28:47 +01:00
João Matos
6222b935f0 Gui: Scene inspector improvements (#18781)
* Improve naming for root scene graph switch/separator nodes.

* Improve scene graph inspector.

This commit improves the scene graph inspector by improving the UI
layout and displaying information in a more human-readable way.

Instead of having a main generic string column for all node-specific
data, introduce specific columns for node name, memory address and data.

Better visualization was also added for `SoDrawStyle`, `SoPickStyle`
and `SoCoordinate3` node types.
2025-01-13 21:38:41 -06:00
Yorik van Havre
fe60505c17 Translations (#18923)
* Updated ts files

* 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>
2025-01-13 21:30:30 -06:00
wandererfan
4ba83f0f50 [TD]use transformShape instead of transformGeometry 2025-01-13 21:14:10 -06:00
Benjamin Nauck
08c9a191e2 Add template based SelectionSingleton::countObjectsOfType
Also convert code to use this new method
2025-01-13 18:55:15 +01:00
Tobias Frost
7a5a3d1ffc spelling fixes (#18688)
* Fixes spelling of "Allow to" to "Allow one to"

and those variants:
Allows to -> Allows one to
allow to -> allow one to
allows to -> allows one to

* Fix "Let's -> Lets"

(and lower case variant.)

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

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

* Update src/3rdParty/salomesmesh/inc/MED_Wrapper.hxx

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

* Update src/Base/PyObjectBase.cpp
Update src/App/ExtensionContainer.h
Update src/App/PropertyContainer.h

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

* Use gerund in user-facing texts.

* Use gerund for two more user-facing strings.

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

* Update src/Mod/Fem/App/FemMeshShapeNetgenObject.cpp

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

* Update src/Mod/Fem/App/FemMeshShapeNetgenObject.cpp

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

* Update src/Mod/Fem/App/FemMeshShapeNetgenObject.cpp

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

---------

Co-authored-by: Tobias Frost <tobi@debian.org>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Chris Hennes <chennes@pioneerlibrarysystem.org>
2025-01-13 11:22:20 -06:00
PaddleStroke
f30139367a Stylesheet toolbar background (#18831) 2025-01-13 11:21:17 -06:00
FEA-eng
43dd1e32e8 FEM: Print contact forces (#18840)
* FEM: Update write_step_output.py

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

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

* FEM: Update constraint_contact_shell_shell.inp

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-01-13 11:19:50 -06:00
Chris Hennes
7bb4302eaf Merge pull request #17564 from kadet1090/new-transform-dialog
Gui: New transform dialog
2025-01-13 11:18:26 -06:00
WandererFan
e9c30cf370 [TD]Dimension font clipping (fix #11452) (#18771)
* [TD]separate alignment and rendering bounding rectangles

* [TD]use alignment rectangle (fix #11452)
2025-01-13 11:13:59 -06:00
Jonas Bähr
382d13ee77 PD: Make GearTests independent of "single solid" setting
When enabling the experimental "Allow multiple solids in Part Design Body
by default" some involute gear tests broke. As a quick measure,
`AllowCompound` was disabled for the respective body. This commit now
makes the tests independent of this setting and removes the workaround.
2025-01-13 11:05:31 -06:00