Commit Graph

78 Commits

Author SHA1 Message Date
Jiří Mácha
2eec246e95 Assembly: fixed defect in the migrationScript4 function
The old CAD model created by the development version of FreeCAD
(in which the Assembly workbench was used) contained joints that,
for some reason, had an empty Joint Connector 1 reference (Reference1).

This was causing an exception and a crash of the Python function
called migrationScript4. The FreeCAD Report view contained:

23:28:29  pyException: Traceback (most recent call last):
  File "/FreeCAD/Mod/Assembly/JointObject.py", line 175, in onDocumentRestored
    self.createProperties(joint)
  File "/FreeCAD/Mod/Assembly/JointObject.py", line 181, in createProperties
    self.migrationScript4(joint)
  File "/FreeCAD/Mod/Assembly/JointObject.py", line 514, in migrationScript4
    if hasattr(joint, "Reference1") and joint.Reference1[0] is not None:
                                        ~~~~~~~~~~~~~~~~^^^
<class 'TypeError'>: 'NoneType' object is not subscriptable

This patch attempts to avoid such exceptions by validating the type of
the property variable before accessing it.
2024-11-18 17:46:44 +01:00
PaddleStroke
035e863592 Assembly: Fix regressions of https://github.com/FreeCAD/FreeCAD/pull/16671 2024-11-09 10:16:47 -05:00
PaddleStroke
4f2bd32048 Assembly: JointObject refactor adaptUi 2024-11-09 10:10:57 -05:00
PaddleStroke
458c2f96b1 Assembly: Improve joint taskbox offset ui. 2024-11-09 10:10:57 -05:00
PaddleStroke
38ea260fef Assembly: Fix reverse button in joint task (#17663) 2024-11-04 18:23:17 +01:00
PaddleStroke
ea334d2504 Update JointObject.py 2024-11-04 18:18:21 +01:00
PaddleStroke
f0e0f92424 Assembly: Joint creation: add expression support to spinboxes 2024-11-04 18:07:12 +01:00
Yorik van Havre
7e12ce34e7 Merge pull request #15629 from Ondsel-Development/asm_assembly_link
Assembly: Flexible sub-assemblies.
2024-10-28 17:07:26 +01:00
PaddleStroke
4bd750db82 Assembly: Fix limits disappearing on edit (#17289) 2024-10-17 20:19:21 -05:00
PaddleStroke
3a7139dc39 Fix regressions of #16726 2024-10-17 20:13:23 -05:00
PaddleStroke
e0471f580d Assembly: Create SoSwitchMarker.py to externalize the coin stuff that draw the joint's markers(JCS) 2024-10-16 15:39:23 +02:00
PaddleStroke
0a4d965baf Assembly: Joint creation UI : add advanced offset handling. 2024-10-16 15:39:23 +02:00
PaddleStroke
fd432f2bdc JointObject: fix flip one part 2024-10-14 08:58:35 -05:00
PaddleStroke
70142112f9 Assembly: Remove JointObject camera callbacks. And fix lock highlight. 2024-10-14 08:27:36 -05:00
PaddleStroke
ab4b95a459 Assembly: Joint: add support to non ascii characters. 2024-10-10 20:36:54 -05:00
PaddleStroke
c6c4e8cc25 Assembly: Fix joint labels bad auto-rename issue. 2024-10-10 20:36:54 -05:00
PaddleStroke
5ce79a760b Assembly: Fix gear/belt switch on checkbox toggle 2024-10-10 20:26:18 -05:00
PaddleStroke
29b719664b Assembly: Fix migrationScript2 error with bad joints (#17010)
* Fix migrationScript2 to handle bad joints
2024-10-07 18:48:38 -05:00
Chris Hennes
d1cdcd18bf Merge pull request #16726 from bgbsww/bgbsww-AssemblySubNames
Assembly: Correctly build reference from selection subname
2024-10-03 13:46:35 -05:00
bgbsww
d14ca595bd Refine further 2024-09-27 13:00:19 -04:00
bgbsww
d51f0f0f2a Return to python; simplify to work with only classic names, provide migration 2024-09-26 00:01:10 -04:00
bgbsww
e0e1cb565a Correctly build reference from selection subname 2024-09-24 22:01:14 -04:00
bgbsww
48c65aed76 Support macros and console logs in Assembly 2024-09-23 14:10:55 -05:00
PaddleStroke
20219c7e28 Assembly: Replace Offset and Rotation properties by Offset1 and Offset2, giving full control over JCS positions. 2024-09-09 18:22:06 +02:00
PaddleStroke
452d4a61d2 Assembly: Fix case of link groups 2024-09-02 18:20:18 +02:00
PaddleStroke
8d3e3acd11 Assembly: Property change from Object/Part to Reference 2024-07-29 17:48:25 +02:00
PaddleStroke
f92c4e393d Assembly: Create joint: prevent errors on undo/ctrl-Z 2024-07-10 08:44:08 +02:00
Max Wilfinger
8ff5a1f688 Fix source string typos mentioned on Crowdin (#15261) 2024-07-08 17:18:31 -05:00
PaddleStroke
f5a6e0fd32 Assembly: Change Object1/2 from strings to PropertyXLinkSub and Remove Element1/2 and Vertex1/2 2024-07-01 11:22:30 -05:00
Chris Hennes
82a680443c Merge pull request #14738 from Ondsel-Development/asm_limits
Assembly: Limits: Set one checkbox for each limit.
2024-07-01 10:54:19 -05:00
PaddleStroke
61c800c708 Assembly: Gears: Fix crash if user selected first elements before triggering tool. 2024-06-28 12:07:11 -05:00
PaddleStroke
c2c2178c51 Assembly: Create Joint limit: Moving objects updates the spinboxes values if they are disabled. 2024-06-27 09:10:38 +02:00
PaddleStroke
fcf54e031c Assembly: Enable moving objects while making joints. 2024-06-27 09:10:38 +02:00
PaddleStroke
e5d604369b Assembly: Create Joint : fix untranslated strings. 2024-06-27 09:10:37 +02:00
PaddleStroke
9ae198ab95 Assembly: Limits: Set one checkbox for each limit. 2024-06-26 17:06:02 +02:00
Chris Hennes
2354e08699 Merge pull request #14908 from Ondsel-Development/asm_sub_fix
Assembly: Fix link to external sub assemblies issues.
2024-06-25 09:15:52 -05:00
PaddleStroke
74eb6bb156 Assembly: Fix a bug with presolve. Presolve should not happen when there's a loop of joints. 2024-06-25 09:12:50 -05:00
PaddleStroke
4fcd31a373 Assembly: jointObject : handle case where gui_doc.ActiveView is None. 2024-06-24 17:52:29 +02:00
PaddleStroke
3052760541 Assembly: deleting a component deletes its joints. 2024-06-17 10:58:11 -05:00
PaddleStroke
9ec47a58a8 Assembly: Translate error 2024-05-30 10:33:19 +02:00
PaddleStroke
5fb3589f26 Assembly: Add 'Angle', 'Perpendicular' and 'Parallel' joints. 2024-05-27 11:59:06 -05:00
Max Wilfinger
323ec08e8e Update assembly icons to be consistent with main updates.
Add commands to menu/toolbar.
2024-05-20 10:46:45 -05:00
PaddleStroke
b12b95b908 Assembly: Fix Gear Radius2 spinbox issue 2024-05-06 18:32:00 +02:00
PaddleStroke
fed17ff6f1 Assembly: Improve Exploded View's radial explosion, and various small fixes. 2024-05-06 18:32:00 +02:00
PaddleStroke
ce455de2c5 Assembly: Mark new features as experimental. To enable them you need to create a parameter called ExperimentalFeatures and set it to true. 2024-05-06 18:32:00 +02:00
PaddleStroke
b25f90c694 Assembly: Fix small bugs in AssemblyObject.cpp, JointObject.py and UtilsAssembly.py 2024-05-06 18:32:00 +02:00
PaddleStroke
13c0ba1902 Assembly: Introduce Belt joint. 2024-05-06 18:32:00 +02:00
PaddleStroke
60b902fc7e Assembly: Adds limit and RackPinion/Screw/Gears 2024-05-06 18:32:00 +02:00
PaddleStroke
5ad1401ccc Assembly: Fix doubleclicked of joint and view #12958 2024-05-06 18:32:00 +02:00
PaddleStroke
cf81b18d21 Assembly: Remove Lock from labels and add lock to 3dView 2024-05-06 18:32:00 +02:00