Commit Graph

43372 Commits

Author SHA1 Message Date
Roy-043
8a13cbba67 BIM+Draft: change object related version info to log messages
To inform the user warnings are shown if an object has new or modified properties in the current version. These warnings can however be confusing, especially if there are many. With this PR they are turned into log messages. They are also moved out of translation, and instead of the object Label the object Name is displayed.

Additionally:
Zero path length warnings for path arrays are now only displayed if the Align property is True.

See: #21180.
2025-09-08 10:58:28 +02:00
Roy-043
31cdf5bf5e Draft: Improve ShapeString execute function 2025-09-08 10:58:06 +02:00
Furgo
aa20af4dd5 BIM: Fix sun ray creation in Arch Site solar study, suppress ladybug log messages (#23524)
* BIM: disable root logger propagation to imported modules

Prevents noisy log messages from third-party modules, such as ladybug,
from appearing in the console. A context manager temporarily sets the
root logging level to WARNING during the import process, which avoids
altering the application's permanent logging configuration. Ultimately,
this is a workaround: FreeCAD seems to set the root logging level to
INFO at least, which propagates to all loaded modules. It should set it
to WARNING or ERROR at least, but changes outside the BIM module were
out of scope for this PR.

* BIM: make module import error explicit, do not mask exceptions

* BIM: adapt code to the new Draft.Line properties (PR #11941)

Adapts the code to a Draft.Line API change. Property names for the sun
ray object are updated (e.g., from ArrowType to ArrowTypeEnd) to align
with the new definitions, which prevents errors and ensures the sun
ray's arrow displays correctly.

* BIM: do not update sun position until all properties are initialized

Prevents an AttributeError error when loading files. During the loading
sequence, the onChanged callback is triggered for related properties
until they all have been initialized. A hasattr guard is added to ensure
the dependent logic is not executed until the object is in a consistent
state.

* BIM: restore property constraints at the right time

Fixes an unconstrained properties issue when loading files. Constraint
metadata is not saved in files, and the UI is built before the Python
code can re-apply it. The fix defers the constraint restoration using
QTimer.singleShot(0) to run after the file has fully loaded. The
restoration logic also correctly preserves user-saved values by reading
them from the object before re-applying the non-persistent constraints.
2025-09-08 10:57:50 +02:00
luzpaz
ee78a6c536 Fix various typos
Found via codespell
2025-09-08 00:21:16 -05:00
Chris Hennes
38f34894d4 Merge pull request #23351 from 3x380V/fileinfo
Core: Modernize Fileinfo
2025-09-07 21:28:11 -05:00
wandererfan
3c21d2ef8c [TD]fix horizontal/vertical test for dimensions 2025-09-07 20:42:09 -05:00
drwho495
edb046d48e Toponaming: Remove updateElementReferences call in getLinks methods. (#23525)
* remove calls to updateElementReferences in getLinks

* add description of the bug for future developers' sake
2025-09-07 20:40:47 -05:00
marioalexis
a62c5b1151 Fem: Add default solver to new analysis - fixes #23043 2025-09-07 20:33:17 -05:00
marioalexis
cab5f4d85a Fem: Update old ElementGeometry*D with new properties 2025-09-07 20:32:42 -05:00
Adrian Insaurralde Avalos
5a02a99643 FEM: improve gmsh binary lookup logic
fixes https://github.com/flathub/org.freecad.FreeCAD/issues/28
also remove unnnecessary/redundant UseStandardGmshLocation preference
2025-09-07 20:32:07 -05:00
marioalexis
03267df425 Fem: Use Netgen bindings entirely in external program 2025-09-07 20:31:53 -05:00
FEA-eng
3e5c5ceccd FEM: Fix the shell to shell contact example (#23533)
* FEM: Update constraint_contact_shell_shell.py

* FEM: Update constraint_contact_shell_shell.inp
2025-09-07 20:31:38 -05:00
FEA-eng
a1a1849cce FEM: Better defaults for mesh export (#23553)
* FEM: Update mesh_gmsh.py

* FEM: Update DlgSettingsFemExportAbaqus.ui

* FEM: Update DlgSettingsFemExportAbaqus.ui

* FEM: Update DlgSettingsFemExportAbaqusImp.cpp

* FEM: Update AppFemPy.cpp
2025-09-07 20:31:20 -05:00
Chris Hennes
764edd81a7 Merge pull request #23494 from marioalexis84/fem-calculix_default_time_increment
Fem: Use default CalculiX time increments for thermo-mechanical steady state analysis
2025-09-07 20:31:06 -05:00
Chris Hennes
c00bf075e5 Merge pull request #23384 from 3x380V/units
Base: Units update
2025-09-07 20:22:54 -05:00
Chris Hennes
5d50e4ed7e Merge pull request #22340 from maxwxyz/3d-nav-cursors
Gui: Change navigation cursors to SVG
2025-09-07 19:11:14 -05:00
marioalexis
f39ffcfd3e Fem: Add support for 2D geometries to Centrif constraint 2025-09-08 00:25:55 +02:00
theo-vt
57f4987ce3 Sketcher: fix invalid constraint on first dimension (#23024)
* Sketcher: Scale: Reorder operations and delete original modified constraints to ensure validity

* Sketcher: replace boolean parameters for deletion with enum and expose solver override on some deletion functions in the python API

* Use correct flag in ::delGeometry

* Set default value of false to noSolve

* Sketcher: autoscale: use deleteAllGeometry

* Sketcher: Scale: revert to checking constraints for geoId validity and handle horizontal&vertical
2025-09-07 18:03:15 +02:00
Kacper Donat
32a517ff2e Merge pull request #22964 from B0cho/bugfix/CORE-Expression-dialog-widgets
Core: Enhance 'Expression editor' input and resize behavior
2025-09-07 17:35:29 +02:00
PaddleStroke
527c7e8a6c Fix Link MaterialOverride 0.0 transparency bug 2025-09-07 17:33:52 +02:00
Kacper Donat
87f283bc96 Merge pull request #22029 from tetektoza/realthunder_multiselect_without_pie
Gui: Add a context menu to select obstructed items (from RT's fork Pick Geometry)
2025-09-07 17:27:18 +02:00
tetektoza
0358d5bde6 Gui: Correct linter problems 2025-09-06 17:13:05 +02:00
David Kaufman
94fd2cbee2 [CAM] fix to ensure tool change command is issued forsame tool number, new spindle speed (#23691) 2025-09-06 10:00:37 -05:00
David Kaufman
170c1a274d [CAM] change default TC name to 5mm endmill (#23692) 2025-09-06 09:56:52 -05:00
tetektoza
9565589f89 Gui: Handle proper naming for Link objects in Clarify Selection 2025-09-06 15:55:39 +02:00
tetektoza
0e15b6520e Gui: Skip creating submenu for Object and Other types in Clarify Select 2025-09-06 15:55:39 +02:00
tetektoza
7c090f6348 Gui: Remember right click position before menu pop-up for ClarifySelect 2025-09-06 15:55:35 +02:00
tetektoza
dd17131154 Gui: Move Clarify Selection higher in Tools submenu hierarchy 2025-09-06 13:55:17 +02:00
tetektoza
4cfe200e23 Gui: Add Clarify Selection radius multiplier option 2025-09-06 12:09:36 +02:00
Kacper Donat
51e563040b Gui: Fix preview rendering issues 2025-09-06 01:27:06 +02:00
B0cho
3f24b767d2 Core: Fix 'Expression editor' handling with keyboard 2025-09-05 21:59:08 +02:00
Weston Schmidt
87a4ce2e8d Add test causing crash and fix map sorting function. (#22889)
* Add test causing crash and fix map sorting function.

When opening a model from FreeCAD 0.7, the model would crash when I
changed some of the parameters.  This turned out to be due to the
ElementNameComparator::operator() not correctly sorting the items going
into the map, which caused the map to be invalid.

This change adds a test that represented the exact names causing the
crash as well as a fix for the problem.  Names are now sorted:

1. Empty names first
2. Identifier based names second.
3. Hex based names last.

Identifiers are sorted lexicographically for the name portion and
numerically for the number portion, smallest to largest.

Hex based names are sorted by the value of the hex number, smallest to
largest.

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

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

* Fix lint issues.

* Add another test form to the mix.

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-09-05 14:07:02 -05:00
David Kaufman
83b2834cde [CAM] create adaptive epic (#23414)
* [CAM] create adaptive epic

* update adaptive epic
2025-09-05 11:49:51 -05:00
David Kaufman
c5df5d5ca2 [CAM] LeadInOut new features (#22669)
* CAM: Improve LeadInOut

* rebuild/fix task panel UI

* migrate old LeadInOut parameters to the new properties

* Keep original Lead-in and/or Lead-out

* LeadInOut Rename None/Original to No Retract/None

* merge in changes from tarman/leadovertravel

* LeadInOut update names to No Change/Suppress Retraction

* Remove IncludeLayers option from LeadInOut (always true)

* [CAM] Fix offset entrance UI string

* [CAM] improve handling of step angle on lead in/out ArcZ

* resolve merge conflicts

* finish pulling in tarman's updates

* switch back from 'No Change' style to enable checkbox

* 'Suppress Retraction' -> 'No Retract'

* fix documentation string for lead in/out dressup

---------

Co-authored-by: tarman3 <joice501790018@tutamail.com>
2025-09-05 11:24:42 -05:00
J-Dunn
28552c29f2 CAM: fix G0 regression in drilling (#22602)
* CAM: fix G0 regression in drilling

At some point the initial rapid to Safe Height got dropped from drilling cycles. 
This leads to excessive air drilling.
It also alters "OLD_Z" which sets the Retraction plane under G98.

The defect is causing much confusion and time wasting in the roadmap discussions

This PR fixes the G0 regression.

* [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-09-05 11:14:58 -05:00
Ladislav Michl
9f87add8cc Base: UnitsSchema: use basic imperial conversion constants
Use well defined basic constants for conversion of imperial units.
This makes code hopefully easily readable and verificable.
2025-09-05 17:31:55 +02:00
Ladislav Michl
fa98e178d1 Base: add back Imperial for Civil Engineering unit conversions
Fixes: 1155f0d752 ("Base: simplify UnitsSchemas management")
2025-09-05 17:31:54 +02:00
Ladislav Michl
e3d0baf109 Base: pass format specifiers to UnitsSchemasData::runSpecial
Make toFractional() aware of desired fractional inch denominator.

Fixes: 1155f0d752 ("Base: simplify UnitsSchemas management")
2025-09-05 17:31:54 +02:00
Ladislav Michl
a5f039dd6a Base: QuantityFormat: avoid storing formatting defaults
User defined precision and fractional inch are stored on QuantityFormat
construction making changes persistent to object life time.
Change that so until not explicitely overriden, user defined values
are always returned.

Co-authored-by: Matthias Danner <28687794+matthiasdanner@users.noreply.github.com>
2025-09-05 17:31:54 +02:00
Ladislav Michl
0278a1298d Base: refactor unit formatting defaults
Defaults for both precision (number of digits after decimal point)
and denominator (number of fractions) are defined on various places
making difficult to find which default is used for various tasks.
Store these values at one central place: UnitsApi. Unless overriden
by user, default values are defined by unitSchemasDataPack.
2025-09-05 17:31:54 +02:00
Ladislav Michl
4e27d4eebe Gui: fix 'Minimum fractional inch' preference visibility
Default Unit Schema is not yet changed in onUnitSystemIndexChanged
callback handler, so index needs to be used to request currently
selected one.

Fixes: 1155f0d752 ("Base: simplify UnitsSchemas management")
2025-09-05 17:31:54 +02:00
Ladislav Michl
1c99a9377c Base: Quantity: attribute pressure quantities to pressure unit
Although CompressiveStrength is of the same dimension as Pressure,
make it more straightforward and use base unit.
2025-09-05 17:31:54 +02:00
Ladislav Michl
1691fce36b Base: Quantity: remove redundant 'this' 2025-09-05 17:31:54 +02:00
Ladislav Michl
5106c7e69a Base: UnitsApi: remove nowhere called init() 2025-09-05 17:31:54 +02:00
Ladislav Michl
51aaaaff45 Base: make UnitsApi::toNumber method of Quantity
This static method takes Quantity as a parameter, so make it
method of Quantity directly.
2025-09-05 17:31:54 +02:00
Ladislav Michl
81e1321b32 Base: make UnitsApi::toString method of Quantity
This static method takes Quantity as a parameter, so make it
method of Quantity directly.
2025-09-05 17:31:54 +02:00
Ladislav Michl
5b0af477b7 Gui: do not misuse UnitApi to format numbers in property editor 2025-09-05 17:31:54 +02:00
Kacper Donat
cd08ca31ca Merge pull request #23677 from PaddleStroke/patch-58
Part: do not copy visual of sketch
2025-09-05 16:54:55 +02:00
PaddleStroke
9ea038c4ff Part: Revolution: do not copy style of sketches 2025-09-05 15:37:55 +02:00
PaddleStroke
9778c73667 Part: do not copy visual of sketch 2025-09-05 15:29:21 +02:00