Commit Graph

29831 Commits

Author SHA1 Message Date
luzpaz
20d64a7f0f Fix various typos
Found via `codespell -q 3 -L aci,addmin,ake,aline,alle,alledges,alocation,als,ang,anid,anormal,aply,apoints,ba,beginn,behaviour,bloaded,bottome,brushin,bu,byteorder,calculater,cancelled,cancelling,cas,cascade,centimetre,childrens,childs,colour,colours,commen,connexion,currenty,documentin,dof,doubleclick,dum,eiter,elemente,ende,feld,finde,findf,findn,fle,freez,graphin,hist,iff,incrementin,indexin,indicies,initialisation,initialise,initialised,initialises,initialisiert,inout,ist,itsel,kilometre,leadin,lod,mantatory,methode,metres,millimetre,modell,nd,noe,normale,normaly,nto,numer,oce,oder,ontop,orgin,orginx,orginy,ot,pard,parm,parms,pres,programm,que,rady,recurrance,renderin,rin,ro,rougly,sectionin,seperator,serie,shs,sinc,siz,som,strack,substraction,te,technic,thist,thru,tread,tru,ue,uint,unter,uptodate,vas,vertexes,vew,wallthickness,whitespaces -S "./.git,*.po,*.ts,*.pdf,./ChangeLog.txt,./src/3rdParty,./src/Mod/Assembly/App/opendcm,./src/CXX,./src/zipios++,./src/Base/swig*,./src/Mod/Robot/App/kdl_cp,./src/Mod/Import/App/SCL,./src/WindowsInstaller,./src/Doc/FreeCAD.uml,./src/Base/StackWalker.cpp,./build/doc/SourceDoc,./tools/build/WindowsInstaller/lang,./src/Mod/TechDraw/Templates/locale"`
2024-12-10 15:09:51 +01:00
Jacob Oursland
16ac5f9977 PartDesign: Fix failing TNP test. 2024-12-09 17:27:28 -05:00
Chris Hennes
1fdd27ad94 Points: add QMessageBox to PreCompiled.h 2024-12-09 17:01:17 -05:00
FEA-eng
1c35d08d87 FEM: Allow shell faces for tie constraint (#18325)
FEM: Update meshtools.py
2024-12-09 19:21:09 +01:00
Syres916
74e7df9676 [Sketcher] [Post 1.0] Allow CarbonCopy to work with SketchObjectPython (#15594) 2024-12-09 11:31:04 -06:00
Chris Hennes
fde778faeb Merge pull request #18273 from Ondsel-Development/sk_group_drag
Sketcher: Group dragging
2024-12-09 12:29:49 -05:00
Vincent
ebf528a653 Assembly: fix gears created with null radius and de-sync (#18275) 2024-12-09 11:23:05 -06:00
Yorik van Havre
2e7e01febe BIM: Updated NativeIFC unit tests (#18266)
* BIM: Updates NativeIFC self tests
2024-12-09 11:22:06 -06:00
Chris Hennes
95ced0ecdb Addon Manager: Refactor progress reporting 2024-12-09 18:11:59 +01:00
marioalexis
a6b36f6e57 CMake: Decouple internal SMESH build from Fem build - fixes #18287 2024-12-09 12:09:30 -05:00
Murmele
be8b2de07d Add possiblity to autosave current measurement and restarting new measurement (#17717)
* initial commit to implement more interactive measurement functionality

Files: TaskMeasure.cpp and TaskMeasure.h

* Enable artifacts for easy download

Files: sub_buildWindows.yml

* clearSelection before setting new selection

Files: TaskMeasure.cpp

* No need for mSkipSelectionChange

Reason/Description: Because the next onSelectionChanged will be triggered asynchronly
Files: TaskMeasure.cpp and TaskMeasure.h

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

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

* block selection

* Block selection must be done on the taskMeasure, because it is the signal observer

* Set autosave to false by default

Reason/Description: Because the measurement tool is intended to be a temporary tool
Files: TaskMeasure.cpp and TaskMeasure.h

* Add tooltip

Files: TaskMeasure.cpp

* No need to set the selection style

Reason: Because it was changed to normal, so no need to re set it
Files: TaskMeasure.cpp

* No need to clear and reset the selection

Reason/Description: Because it will be done directly in the application. It was required with greedy selection, but now it is anymore required
Files: TaskMeasure.cpp

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

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

* Revert "Enable artifacts for easy download"

This reverts commit 8118323ab4104ada1fb89eebbe72965c5f2f2b67.

* Move autosave and selection mode into a group box and add a possibility to hide those options

Files: TaskMeasure.cpp and TaskMeasure.h

* Use toolbutton with a normal menu instead of a normal QPushButton

Reason/Description: Because it integrates much better
Files: TaskMeasure.cpp and TaskMeasure.h

* QAction uses a bool for the checkstate

Files: TaskMeasure.cpp and TaskMeasure.h

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

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

* Fix compile warnings

Reason/Description: cleanup and fix warnings
Files: TaskMeasure.cpp and TaskMeasure.h

* Add better tool tip

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

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

* fix typo

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-12-09 11:08:02 -06:00
marioalexis
babc88f40d Fem: Add options for Elmer solver output file - fixes #17569 2024-12-09 12:06:42 -05:00
bgbsww
5266a3b26d 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
wmayer
e51eef2195 Import: Fix of alpha channel misinterpretation 2024-12-09 12:00:15 -05:00
Jonas Bähr
e89fb4a92c 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
669f108fab fix testGiantHelix* 2024-12-09 17:52:02 +01:00
wandererfan
0f6809f325 [TD]fix #18050 hidden line color 2024-12-09 17:39:54 +01:00
wandererfan
8f8bdd5c93 [TD]add shape validation tool for debugging 2024-12-09 17:37:33 +01:00
Yorik van Havre
29ea971777 BIM: Fixed copy-paste bug in nativeifc psets - Fixes #18293 2024-12-09 17:26:55 +01:00
Chris Hennes
ba1b3b1cb7 cMake: Update for LibPack 3.1
LibPack 3.1 removes boost-python and adds pybind11
2024-12-09 10:26:00 -05:00
paul
b1119ccc4f ArchStructure.py : Delete some trailing white space 2024-12-09 12:05:30 +01:00
Paul Lee
3dae0f09f1 [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
0607c555d6 Arch/Draft: Fix transparency vs. alpha issues
Fix #18295
2024-12-09 11:50:14 +01:00
Roy-043
e9e2df05a2 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
2f42341481 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
dc03238349 Materials: Check if m_uuid is empty before adding to recents 2024-12-08 15:42:04 -05:00
Alexey Chernov
66e1c0154d 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
4db7cd52e6 Use lambda to prevent code duplication 2024-12-08 15:12:38 -05:00
Alexey Chernov
2501296c95 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
1bb7d2ea3f 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
FEA-eng
f1995ef76c 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
94c57721b2 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
651cefde4d 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
7bd413066f Update src/Mod/Fem/App/FemPostPipeline.cpp 2024-12-06 11:29:37 -06:00
Yorik van Havre
da45328f6f BIM: Fixed lock button with no doc - Fixes #18191 2024-12-06 12:28:09 -05:00
lorenz
a3a0d316b1 cam: remove imghdr import (#18081) 2024-12-06 11:27:36 -06:00
Dan Henderson
95ef2d5147 Path: Add G84/G74 Tapping Operation (#8069) 2024-12-06 11:21:49 -06:00
Kacper Donat
deb15a57e4 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
Jiří Mácha
878d9525dc 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
726eee50c2 Fem: Fix references assignment in centrif example 2024-12-06 12:12:55 -05:00
Chris Hennes
b87bdc1f84 Merge pull request #18126 from Ondsel-Development/core_LCS2
Core datums : Card2 : Core implementation
2024-12-06 12:12:04 -05:00
Roy-043
28749e44dd 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
cdf6af935e 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
1eb8496aae [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
b6697c12eb 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
6d899e7d57 [Mod] clean JoinFeatures.py
Removed dead code
.
2024-12-06 11:55:09 -05:00
Jiří Pinkava
3164ee1849 [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
571018807e Gui: Added SendToPythonConsole item in PartDesign tree view right-click menu. 2024-12-06 11:46:46 -05:00
marioalexis
7411ffd199 Fem: Add box and elliptical beam section types - fixes #12614 2024-12-06 11:44:05 -05:00
PaddleStroke
4a80af74f4 PartDesign: revert c09ef94 and a3c4f4b to fix https://github.com/FreeCAD/FreeCAD/issues/17949 2024-12-06 11:36:51 -05:00