Commit Graph

39531 Commits

Author SHA1 Message Date
Chris Hennes
e2e9406a45 cMake: Update for LibPack 3.1
LibPack 3.1 removes boost-python and adds pybind11
2024-12-09 10:26:00 -05:00
paul
198c3ddc40 ArchStructure.py : Delete some trailing white space 2024-12-09 12:05:30 +01:00
Paul Lee
ec451f9eba [ArchStructure] Variant PropertrySet Support in ArchSketch
Now, user can create :

- Variant Layout / combination of ArchStructure (Slab) in addition to ArchWall and CurtainWall based on same ArchSketch, with another PropertySet
- Variant Properties / layer of ArchWall on same ArchSketch with different Width, Offset, Material, Height etc. to create Layers, Composite walls etc. (Layout, Layer, Combination, Composite, Elemented etc.)

FreeCAD Forum Discussion:

- https://forum.freecad.org/viewtopic.php?t=87721&start=130#p794785
2024-12-09 12:05:30 +01:00
wmayer
4666fe8a5b Arch/Draft: Fix transparency vs. alpha issues
Fix #18295
2024-12-09 11:50:14 +01:00
Roy-043
8d0efd4b21 BIM: Improve onChanged Placement code
* Switched Component code to new Comp=True version of code.
* Made the Placement code in both files identical. This also solves that Rotating a BuildingPart was not propagated to children.
2024-12-09 09:30:08 +01:00
Max Wilfinger
5532001e8b Update auto-close_stale_issues_and_pull-requests.yml
Exclude Feature Requests from auto close action
2024-12-09 08:23:18 +01:00
Max Wilfinger
29632606d1 Merge pull request #18268 from marioalexis84/fem-post_pipeline
Fem: Fix FemPostPipeline base class
2024-12-08 21:56:25 +01:00
Johannes Thyssen Tishman
7176b0f8f3 Materials: Check if m_uuid is empty before adding to recents 2024-12-08 15:42:04 -05:00
mosfet80
8d06f768c6 Update libs into .pre-commit-config.yaml
https://github.com/psf/black/releases/tag/24.10.0
https://github.com/pre-commit/pre-commit-hooks/releases/tag/v5.0.0
2024-12-08 15:25:23 -05:00
Chris Hennes
ca4cf4a952 Merge pull request #15332 from aclex/apply_copy_on_change_calculations
Apply result of calculations with copy on change properties
2024-12-08 15:17:44 -05: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
Max Wilfinger
25a394fda9 Merge pull request #17282 from mwganson/points
[Points WB] fix issue where points are inaccurately imported when the…
2024-12-08 20:43:05 +01:00
Max Wilfinger
cfdfcdd391 Update auto-close_stale_issues_and_pull-requests.yml
add exception for Feature Requests
2024-12-08 18:28:45 +01:00
Max Wilfinger
52ebdf96ff Update auto-close_stale_issues_and_pull-requests.yml
only check for PRs not issues in inactive_pr action
2024-12-08 18:17:06 +01:00
Max Wilfinger
36a02dc6a5 Update auto-close_stale_issues_and_pull-requests.yml
Exception for Issues on PR action
2024-12-08 17:35:18 +01:00
Max Wilfinger
b1bd92dc43 add exception for actions/stale to not check and close issues and pr with the 'no-auto-close' label 2024-12-07 17:36:45 +01:00
Max Wilfinger
de7a84a1e3 Added actions/stale for old, inactive issues and inactive PRs
Update and rename stale_issues.yml to auto-close_stale_issues_and_pull-requests.yml
Set ascending: true
2024-12-07 15:13:27 +01:00
FEA-eng
eacc1154eb FEM: ResultsPurge - delete all results objects including pipelines and filters (#18328)
* FEM: Update resulttools.py

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

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

* FEM: Update resulttools.py

* FEM: Update commands.py

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

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

* FEM: Update resulttools.py

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-12-07 07:17:02 +01:00
Chris Hennes
eb4e28eebd Merge pull request #17528 from kadet1090/get-object-T-helpers
Gui: Add getObject<T>() helpers to various classes
2024-12-06 19:51:11 -05: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
Chris Hennes
2cef70823c Update src/Mod/Fem/App/FemPostPipeline.cpp 2024-12-06 11:29:37 -06:00
Yorik van Havre
d17dd22aff BIM: Fixed lock button with no doc - Fixes #18191 2024-12-06 12:28:09 -05:00
lorenz
faa5711016 cam: remove imghdr import (#18081) 2024-12-06 11:27:36 -06:00
Dan Henderson
5cf757eae9 Path: Add G84/G74 Tapping Operation (#8069) 2024-12-06 11:21:49 -06: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
Furgo
3b39296599 Improve Notification Area settings (#15207)
* Initial UI mockup for notification area settings

* First iteration of adapting the code to the Notification area settings UI reorg

* Remove redundant code to enable/disable widgets

* Reorganize notification area settings UI, improve settings and tooltips text

* Auto-wrap tooltips, add tooltips for each group

* Remove trailing space

* Fix merge error

* Further fixes from merge error

---------

Co-authored-by: WandererFan <WandererFan@gmail.com>
2024-12-06 11:15:52 -06:00
Jiří Mácha
020532dc57 Assembly: migrationScript2 and migrationScript4 improved and refactored
Description of Defects in migrationScript2 and migrationScript4:

Several additional issues have been identified in the Assembly
functions migrationScript4 and migrationScript2, beyond those fixed in
patch 71f0104bb2.

One common problem is that the Joint property Reference1 or Reference2
can be set to an invalid format. For example, user can manually cause
this issue by assigning an incorrect reference (e.g., the Z-axis) to
these properties via the FreeCAD GUI.  When this happens, internal
errors (exceptions and their corresponding Python call stack) are
reported in the Report View.  However, such information is not helpful
for the user to fix their 3D model.

Issues with the Current Implementation (Using migrationScript4 as
Reference):

- Lack of Type Validation for Reference1 and Reference2:

  The script does not check whether joint.Reference1[1] or
  joint.Reference2[1] is a sequence. If this condition is not met,
  statements like:

    sub1 = joint.Reference1[1][0]

  will throw an exception, printing the Python call stack.

- Lack of Length Validation for Sequences:

  The script does not ensure that the sequence length is sufficient
  for indexing. For example, joint.Reference1 and joint.Reference2
  must each have at least two elements to allow:

    joint.Reference1[1][1]
    joint.Reference2[1][1]

  Without validation, such calls can result in exceptions, printing the
  Python call stack.

- No Feedback on Problematic Joint:

  The user is not informed about which Assembly joint in the object
  hierarchy has an invalid Reference1 or Reference2. Depending on the
  size of the 3D model, identifying the defect can be time-consuming
  and frustrating without proper feedback.

This patch is focused on:

- Reporting Problematic Joint Path:

  A new function has been added to retrieve the full path to the
  Assembly joint. The return value (a string) is used to report the
  issue.

- Improved Exception Handling:

  Instead of adding more conditional checks (see above), exception
  handling is implemented. AttributeError, IndexError, and TypeError
  exceptions are caught. The exception message (excluding the call
  stack) is displayed at the end of a user-friendly warning.

- User-Friendly Warnings in the Report View:

  A single-line warning is now shown in the Report View, containing
  the following details:

    - Source of Warning:              'Assembly joint'
    - Location in the 3D Model: e.g., 'Assembly_XY.object_XY.joint_XY'
    - Problematic Attribute: e.g.,    'ReferenceXY'
    - Exception Message: e.g.,        'list index out of range'

- Refactoring and Optimization:

  The functions were refactored and optimized at the end of the
  conversion process.

Advantages:

- Cleaner Report View:
  Internal errors (e.g., Python call stacks) are no longer logged in
  the Report View, as they are not useful for end users. Only the
  exception message is displayed.

- Improved User Feedback:
  Users can now identify the problematic Assembly joint in the object
  hierarchy, saving significant time and effort.

- Robust and Concise Code:
  The solution simplifies the code while increasing its robustness.
2024-12-06 12:13:41 -05:00
marioalexis
4d21c7791d Fem: Fix references assignment in centrif example 2024-12-06 12:12:55 -05: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
Chris Hennes
8467a6c32b Merge pull request #17799 from Roy-043/Gui-FreeCAD-Light-PreferencePack-should-not-change-PickRadius
Gui: Remove rogue preferences from PreferencePacks (Light theme should not change PickRadius)
2024-12-06 12:10:17 -05:00
Roy-043
432befd79a Merge pull request #17379 from yorikvanhavre/draft-fix-annotation
Draft: better check for Gui object
2024-12-06 18:05:41 +01:00
Chris Hennes
3134cd5d8c Merge pull request #17315 from mwganson/ssclearall
[Spreadsheet] avoid removing user dynamic properties when clearing ce…
2024-12-06 11:57:45 -05:00
Florian Foinant-Willig
326a439d5b [Core] Fix for frozen status
A frozen object prevents the document to be saved
The frozen status propagates into object inheritance
A frozen sketch is no more editable
Transform and Placement can't be changed for a frozen object
The freeze icon is reduced
2024-12-06 11:56:48 -05:00
Andrea
5190acbcac MOD: ImportOcaf2::getcolor
getcolor()
      fucntion optimizzazion.
      removed duplicated check.

Clean class ImportOCAF2
[pre-commit.ci] auto fixes from pre-commit.com hooks

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

.

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

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

.

Update ImportOCAF2.cpp

.
2024-12-06 11:55:51 -05:00
Andrea
91387dca44 [Mod] clean JoinFeatures.py
Removed dead code
.
2024-12-06 11:55:09 -05:00
Jiří Pinkava
e06ce1189c [PartDesign]: Sort sketches in Attach sketch tool alphabetically
The order of sketches in sketch attaching tool is now determined
by the order in which they were added to document.
Sorting them alphabetically makes IMHO much easier to find a sketch
by user, compared to current state, especially in large and complex
projects with lot of sketches. Of cuser thix expects the user
use sensible names for the sketches.
2024-12-06 11:52:59 -05:00
Nicola Cerone
a90bbf27cc Gui: Added SendToPythonConsole item in PartDesign tree view right-click menu. 2024-12-06 11:46:46 -05:00
marioalexis
b7ccf634af Fem: Add box and elliptical beam section types - fixes #12614 2024-12-06 11:44:05 -05:00
wmayer
e34fd72956 App: Extend/change color API:
* Also set/get alpha value in setValue/asValue
* Add new static method fromValue
2024-12-06 11:37:45 -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
Chris Hennes
fb410d15a2 Update src/Mod/Points/Gui/Command.cpp 2024-12-06 10:33:56 -06:00
Roy-043
8e57726701 Draft: allow point for Trimex extrusion to be co-planar with the face
Fixes #14826.

If the point for the extrusion height is co-planar with the face, the normal of the face is used for the direction of the extrusion. The user can then enter a positive or negative value in the task panel. It is probably not the ideal solution, but better than what we have now I think.
2024-12-06 13:10:18 +01:00
FEA-eng
289a9cac4e FEM: Update checksanalysis.py 2024-12-05 21:21:17 +01:00
Roy-043
dd1a9835ea Merge pull request #18314 from Roy-043/Draft-make-Trimex-extrude-mode-link-aware
Draft: make Trimex extrude mode link-aware
2024-12-05 20:03:19 +01:00
Roy-043
393a3fd050 Draft: make Trimex extrude mode link-aware
Fixes #14670.
2024-12-05 15:53:38 +01:00
PaddleStroke
fd0121236b Sketcher: Fix first external geo deletion failure. 2024-12-05 15:23:25 +01:00
Yorik van Havre
f1988bfd0b BIM: Fixed IFC type icon 2024-12-05 12:31:56 +01:00
Yorik van Havre
d0cf727b7a BIM: NativeIFC: Support for types 2024-12-05 12:31:56 +01:00