Commit Graph

39867 Commits

Author SHA1 Message Date
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
Pascal de Bruijn
c4116daf99 TechDraw: Component Drawing as default document type (#18827)
Presumably Component Drawings are more common as opposed to Assembly Drawing's
therefore FreeCAD's default should reflect this.

find src/Mod/TechDraw/Templates -iname "*.svg" -exec sed -i 's#Assembly Drawing#Component Drawing#g' "{}" \;
2025-01-13 11:59:57 -05:00
Kevin Martin
6c6904453d Address the poor performance of the existing unique-name generation (part 1) (#18589)
* Change Address the poor performance of the existing unique-name generation

As described in Issue 16849, the existing Tools::getUniqueName method
requires calling code to form a vector of existing names to be avoided.

This leads to poor performance both in the O(n) cost of building such a
vector and also getUniqueName's O(n) algorithm for actually generating
the unique name (where 'n' is the number of pre-existing names).

This has  particularly noticeable cost in documents with large numbers
of DocumentObjects because generating both Names and Labels for each new
object incurs this cost. During an operation such as importing this
results in an O(n^2) time spent generating names.

The other major cost is in the saving of the temporary backup file,
which uses name generation for the "files" embedded in the Zip file.
Documents can easily need several such "files" for each object in the
document.

This is the first part of the correction, adding an efficient class for
managing sets of unique names.

New class UniqueNameManager keeps a list of existing names organized in
a manner that eases unique-name generation. This class essentially acts
as a set of names, with the ability to add and remove names and check if
a name is already there, with the added ability to take a prototype name
and generate a unique form for it which is not already in the set.

a new unit test for UniqueNameManager has been added as well.

There is a small regression, compared to the existing unique-name code,
insofar as passing a prototype name like "xyz1234" to the old code would
yield "xyz1235" whether or not "xyz1234" already existed, while the new
code will return the next name above the currently-highest name on the
"xyz" model, which could be "xyz" or "xyz1" or "xyz0042"..
2025-01-13 10:57:53 -06:00
Chris Hennes
9459b85081 Merge pull request #18704 from wwmayer/fix_line_dir
App: Add methods to get base and direction of datum element
2025-01-13 10:56:55 -06:00
wwmayer
f43339ad23 Fix issues in ellipse creation (#18800)
* Sketcher: Handle exceptions in onViewValueChanged

Because the method onViewValueChanged is used as a Qt slot it must handle all possibly raised exceptions as otherwise
they will slip through GUIApplication::notify() that usually results into a crash on some platforms like macOS

* Sketch: Handle undefined values in calculateThroughPointMinorAxisParameters

* The argument of acos() must be in the range [-1, +1], otherwise it returns nan (not a number)
* The value of sin(0) = 0. So, it cannot be used in the denominator of a fraction
2025-01-13 17:42:40 +01:00
PaddleStroke
f6e15f15ad Extend branding options (#18804) 2025-01-13 10:37:14 -06:00
Roy-043
326d1eb70b BIM: improve roof getSubVolume function
Fixes #19013.

* Check direction of plane axis with a tolerance.
* Check the produced solids. Notably check for a min. volume. Required for solids created from non-planar faces.
* Apply placement to created compound.
2025-01-13 10:07:13 +01:00
Benjamin Nauck
8d07665c97 Light refactoring of macro execute window 2025-01-13 08:24:44 +01:00
Benjamin Nauck
e9123e4649 Clear correct macro list box 2025-01-13 08:23:50 +01:00
Roy-043
7829fcc488 Merge pull request #18988 from Roy-043/Draft-Bim-Layer-manager-transp-zero
Draft and BIM: Layer manager did not accept zero transparency
2025-01-10 23:40:27 +01:00
Roy-043
27ac5c4277 Draft and BIM: Layer manager did not accept zero transparency 2025-01-10 22:29:03 +01:00
Paul Lee
73f0e165be [ArchSpace] Improve Space Creation and ensureBase
Refer to discussion at -
https://github.com/FreeCAD/FreeCAD/issues/18917

Like Wall and Stairs, Space should do without Base. Base validity tested in execute() prevented the desired and documented behaviour.

EnsureBase() is remarked out in execute() and to be run in getShape(). With this improvement, if there is no Base, or Base is not valid, Space would be created if it could be defined by obj.Boundaries.
2025-01-10 10:44:48 +01:00
Gaël Écorchard
fe597c1933 BIM: Colors in DAE import + code improvements (#18965)
* BIM: Fix color support for DAE import

There was some mention of color in the original code but it was not
working on my system.

Signed-off-by: Gaël Écorchard <gael@km-robotics.cz>

* BIM: Use `BIM` rather than `Arch` for translation context

* BIM: remove Python 2 compatibility

* BIM: improve style of importDAE.py

Signed-off-by: Gaël Écorchard <gael@km-robotics.cz>

---------

Signed-off-by: Gaël Écorchard <gael@km-robotics.cz>
Co-authored-by: Gaël Écorchard <gael@km-robotics.cz>
2025-01-10 09:15:43 +01:00
Roy-043
558eb19103 Merge pull request #18949 from Roy-043/Draft-and-Pref-Packs-fix-snapcolor
Draft (and Pref Packs): fix snapcolor
2025-01-09 11:31:22 +01:00
Roy-043
09573f4ad4 Merge pull request #18959 from Roy-043/Core-fix-sWhatsThis-for-Std_LinkActions
Core: fix sWhatsThis for Std_LinkActions
2025-01-09 11:29:56 +01:00
Roy-043
89101ff4cc Merge pull request #18905 from Roy-043/Part-Rename-new-datum-commands
Part: Rename new datum commands
2025-01-09 11:27:14 +01:00
Roy-043
38ef33e272 Merge pull request #18942 from Roy-043/Draft-fix-selection-for-FacebinderTaskPanel
Draft: fix selection for FacebinderTaskPanel
2025-01-09 11:25:46 +01:00
Roy-043
3b258b6178 Draft: fix axis calculation in make_sketch
Fixes #18713.

The code follows the suggestion by imm/webmite:
https://forum.freecad.org/viewtopic.php?p=799014#p799014

@webmite Thank you.
2025-01-09 09:40:33 +01:00
Roy-043
bee46bca68 Core: fix sWhatsThis for Std_LinkActions 2025-01-08 22:25:25 +01:00
Roy-043
f6f11ac429 Draft (and Pref Packs): fix snapcolor
Fixes #17978.
2025-01-08 18:11:42 +01:00
Roy-043
89b95fc938 Draft: fix selection for FacebinderTaskPanel
See:
https://forum.freecad.org/viewtopic.php?t=93682
2025-01-08 14:36:07 +01:00