Commit Graph

388 Commits

Author SHA1 Message Date
PaddleStroke
cecb965f50 Assembly: Add 'Angle', 'Perpendicular' and 'Parallel' joints. 2024-05-27 11:59:06 -05:00
Jiří Mácha
9d2f72a34f Missing property Object1 or Object2 of fixed joint causing crash (#13912)
* Assembly: removal of object of fixed joint causing crash

FreeCAD is crashing if the 'Object'
property of fixed joint (Assembly/Joints/Fixed/Joint Connector 1/Object1 or
Assembly/Joints/Fixed/Joint Connector 2/Object2) is manually removed.

Steps to reproduce:

 - make simple Assembly e.g. of two cubes with Fixed joint
 - Select Fixed joint in the tree and go-to property 'Data' tab
 - Select 'Object1' or 'Object2' of the 'Joint Connector 1' or 'Joint Connector 2'
   and remove this reference
 - click by your pointing device (mouse) to the arbitrary other property

The FreeCAD will crash here because the call
App::DocumentObject* obj = getObjFromNameProp(joint, propObjName, propPartName);
will return NULL pointer.

This problem is similar to the
4b5d079e6b.

* Assembly: fixed warning message text

The warning message text is not describing two cases which can happen,
but only one - property of specific joint.

* Assembly: avoiding possible crash in rack pinion joint code

Similar problems:

07c6df61f8456a6b02e88b369dcef5643ac1574e
and
4b5d079e6b

were causing real crashes (Linux + Sway Wayland compositor) when
Fixed joint type was used.

This patch tries to avoid the same situation, but now for the
rack pinion joint type.

The returned pointer value (part1 and obj1) can get NULL pointer value
and is used in the code:

    if (obj1->getNameInDocument() != part1->getNameInDocument()) { ....

a few lines later.
2024-05-27 10:46:02 -05:00
Chris Hennes
d4f780782d Update translations
Arch->BIM is a WIP
2024-05-25 19:11:51 -05:00
PaddleStroke
7c2a95bb0d Assembly: JCS selection: cones surfaces offers the cone's apex. Fixes #13958 2024-05-20 12:00:17 -05:00
Max Wilfinger
748306dcaf Update assembly icons to be consistent with main updates.
Add commands to menu/toolbar.
2024-05-20 10:46:45 -05:00
wmayer
e9c95b131b Assembly: Fix possible build failure with PCH 2024-05-17 13:12:24 +02:00
PaddleStroke
344b125a07 Core: Add getRootObjectsIgnoreLinks and fix bugs in tree.cpp and AssemblyObject.cpp, CommandInsertLink.py, UtilsAssembly.py 2024-05-13 17:58:34 +02:00
Chris Hennes
e703615603 Update translations 2024-05-12 17:06:56 -05:00
wmayer
40b9c972c5 Assembly: Fix warning: -Wunused-variable 2024-05-07 19:48:33 +02:00
PaddleStroke
de683708ba Assembly: Fix Gear Radius2 spinbox issue 2024-05-06 18:32:00 +02:00
PaddleStroke
ca8ab83e09 Assembly: Improve Exploded View's radial explosion, and various small fixes. 2024-05-06 18:32:00 +02:00
PaddleStroke
3e049b6420 Assembly: add try/catch blocks in drag step. 2024-05-06 18:32:00 +02:00
PaddleStroke
53721aaf25 Assembly: Improve tooltip of CommandCreateJointDistance 2024-05-06 18:32:00 +02:00
PaddleStroke
15176db32c 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
98c518835c Assembly: Make RackPinion and Screw easier to setup. 2024-05-06 18:32:00 +02:00
PaddleStroke
b44505db39 Assembly: Fix small bugs in AssemblyObject.cpp, JointObject.py and UtilsAssembly.py 2024-05-06 18:32:00 +02:00
PaddleStroke
d5beaf900e Assembly: Introduce Belt joint. 2024-05-06 18:32:00 +02:00
PaddleStroke
b5a6a26166 Assembly: Drag: switch from solver Solve to dragStep. 2024-05-06 18:32:00 +02:00
PaddleStroke
748ed561db Assembly: Adds limit and RackPinion/Screw/Gears 2024-05-06 18:32:00 +02:00
PaddleStroke
9115f31c84 Assembly: ViewProviderAssembly: Fix issues raised by @wwmayer 2024-05-06 18:32:00 +02:00
PaddleStroke
ff4684fcd7 Assembly: Add Screw/Pulley/Gears/RackPinion icons. Credits to @maxwxyz 2024-05-06 18:32:00 +02:00
PaddleStroke
85bfb99715 Assembly: Solve on recompute. Fixes #12983 2024-05-06 18:32:00 +02:00
PaddleStroke
622821906f Assembly: Add support to origin components Fixes #12446 2024-05-06 18:32:00 +02:00
PaddleStroke
e37d15f081 Assembly: Improve dragging behavior. Fixes #13058 2024-05-06 18:32:00 +02:00
PaddleStroke
8fd15eaf28 Assembly: Exploded view refactoring 2024-05-06 18:32:00 +02:00
PaddleStroke
971355e1dc Assembly: Fix doubleclicked of joint and view #12958 2024-05-06 18:32:00 +02:00
PaddleStroke
b59a743f6f Assembly: Remove Lock from labels and add lock to 3dView 2024-05-06 18:32:00 +02:00
PaddleStroke
b78f8695a8 Assembly: Prevent failure when double clicking a joint if another taskbox is present. Fixes #12770 2024-05-06 18:32:00 +02:00
PaddleStroke
1213967c76 Assembly: Fix distance 0 between 2 vertex. Issue mentioned in #12490 2024-05-06 18:32:00 +02:00
PaddleStroke
8885591ea6 Assembly: Insert link: insert at the center of the screen rather than origin of document. 2024-05-06 18:32:00 +02:00
PaddleStroke
0fa18820d8 Assembly: attach selection observer only if in edit mode. 2024-05-06 18:32:00 +02:00
PaddleStroke
1941fda891 Assembly: InsertLink : Kill behavior of parts following mouse. 2024-05-06 18:32:00 +02:00
PaddleStroke
c8128f19ee Assembly: Enable dragger when solid is selected. Fixes #12656 2024-05-06 18:32:00 +02:00
PaddleStroke
56051b83bc Assembly: Remove bad joints : joints between a part and itself. Fixes #12752 2024-05-06 18:32:00 +02:00
PaddleStroke
2c4f244359 Assembly: Insert Part tool : Change from list to tree. Fixes #12890 2024-05-06 18:32:00 +02:00
PaddleStroke
51feeb89f1 Assembly: Fix #12887: changing offset can move grounded parts in some cases. 2024-05-06 18:32:00 +02:00
PaddleStroke
7aafb8d85c Assembly: Joint edition : Fix bug when changing offset while only one part is selected 2024-05-06 18:32:00 +02:00
PaddleStroke
5349d08abe Assembly: Fix #12889 : deleting a part does not delete joint and later crashes freecad. 2024-05-06 18:32:00 +02:00
PaddleStroke
ef010e6f7c Assembly: define nested assemblies. Fixes 12440 2024-05-06 18:32:00 +02:00
PaddleStroke
687843ff41 Assembly: Introduce 'Exploded Views' 2024-05-06 18:32:00 +02:00
PaddleStroke
6a834422e7 Assembly: Adds a dragger object to the assembly, so that assembly tools can access a dragger. 2024-05-06 18:32:00 +02:00
PaddleStroke
d76e33cdd1 Assembly: Move static functions from JointObject to UtilsAssembly so they can be reused. And adds few functions 2024-05-06 18:32:00 +02:00
PaddleStroke
833913a342 Assembly : Add icon for joint group. 2024-05-06 18:32:00 +02:00
PaddleStroke
8f1e3e1dec Assembly: Insert link, clear selection on deactivation. 2024-05-06 18:32:00 +02:00
PaddleStroke
f9593d237d Assembly: Change 'Insert Link' name to 'Insert Component' Fixes #12165 2024-05-06 18:32:00 +02:00
PaddleStroke
8ae8573282 Assembly: InsertLink : Open File does partial opening. So no tab opens. 2024-05-06 18:32:00 +02:00
PaddleStroke
a6752bf0cc Assembly: Insert: fix non-ascii names issue #12164 2024-05-06 18:32:00 +02:00
PaddleStroke
9aae3504ad Assembly: Fix JCS not drawing correctly when removing selection. 2024-05-06 18:32:00 +02:00
PaddleStroke
534cb58d50 Assembly : Fix : In Joint taskbox, deleting an element in the list should unselect it #10750 2024-05-06 18:32:00 +02:00
PaddleStroke
0270c25d69 Assembly : Typos 2024-05-06 18:32:00 +02:00