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.
* 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>
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.
* 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>
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.
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
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
.
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.
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.