Commit Graph

50 Commits

Author SHA1 Message Date
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
Benjamin Nauck
32e339447a Move back the assembly util functions to AssemblyUtil (#18020)
* Move back util functions to AssemblyUtils again

* Add getPropertyByName<T>() helper

* Improve constness in AssemblyUtils

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

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

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-12-02 10:48:48 -06:00
PaddleStroke
3357baef99 Core / Assembly: Add a way for vp edit modes to be restored. 2024-11-29 12:04:25 -05:00
Kacper Donat
03d4157627 Assembly: Refactor get/setDraggerPlacement
It seems that Base has very handy helpers for converting between various
types. This simplifies code of ViewProviderAssembly::get/setDraggerPlacement a
lot.
2024-11-25 12:27:35 -05:00
PaddleStroke
97387325c8 Assembly: Fix joints not being deleted when subassembly is deleted. 2024-11-25 18:20:46 +01:00
PaddleStroke
d0da5f7969 Assembly: Pressing Esc while a task is active will not escape edit mode 2024-11-22 12:15:57 -05:00
wmayer
3db95989d3 Assembly: Handle thrown Base::Exception in ViewProviderAssembly 2024-11-11 01:11:56 +01:00
PaddleStroke
127d5dd840 Assembly: AssemblyLinks. 2024-10-16 15:39:23 +02:00
PaddleStroke
292b4c22ad Assembly: Fix context menu 'Activate object' not working and causing crash (#17092)
* Assembly: Add setupContextMenu to ViewProviderAssembly.h

* Assembly: Fix right click 'activate object' menu not setting edit

* add QMenu header

* Add NOLINT

* Add one more space before //NOLINT or clang cries...

* Fix isInEditMode

* add isInEditMode to ViewProviderAssemblyPy.xml

* add isInEditMode to ViewProviderAssemblyPyImp.cpp

* update activeAssembly() in Utils to make sure isInEditMode
2024-10-14 08:29:49 -05:00
PaddleStroke
1b44435e98 Assembly: Fix lag during dragging of large assemblies. Bundle fix joints together. Show only the movingJoint during dragging. Do not recompute joints during dragging. 2024-09-30 17:38:54 +02:00
Bas Ruigrok
174846a665 Move getGlobalPlacement from AssemblyObject to GeoFeature 2024-09-07 13:27:59 +02:00
Bas Ruigrok
a2736e8a37 Move splitSubName from AssemblyObject to Base::Tools 2024-09-07 13:27:59 +02:00
PaddleStroke
452d4a61d2 Assembly: Fix case of link groups 2024-09-02 18:20:18 +02:00
PaddleStroke
62e5e0e41d Assembly: Enable ungrounded connected parts to move as one item. 2024-09-02 18:20:18 +02:00
PaddleStroke
8fdbeeced6 Assembly: Make sure that when a components is deleted its joints are as well. 2024-08-12 11:43:54 -04:00
PaddleStroke
1824322369 Assembly: Fix bug where double-clicking on a joint would unselect the underlying edge. 2024-08-12 11:43:26 -04:00
PaddleStroke
855835cf4e Assembly: Replace ObjRefPairs std::pair by structure. 2024-07-29 17:48:25 +02:00
PaddleStroke
8d3e3acd11 Assembly: Property change from Object/Part to Reference 2024-07-29 17:48:25 +02:00
PaddleStroke
363d1489c3 Assembly: define joint double click on 3dview (#15572)
* Assembly: define joint double click on 3dview

* Update string
2024-07-24 18:44:36 -05:00
PaddleStroke
22bdbcad11 Assembly: Fix edit mode to allow users to transform the assembly. 2024-07-16 23:44:00 -05:00
Kacper Donat
ceb0447d03 Gui: Reduce Transform Dragger size
Fixes: #13853
2024-07-15 10:57:19 -05:00
PaddleStroke
e6fb9f0185 Assembly: Use canDragObjectToTarget in viewProviderAssembly 2024-07-15 17:53:02 +02:00
luzpaz
2837b46c3e Fix various typos throughout the codebase 2024-07-08 17:19:20 -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
PaddleStroke
fcf54e031c Assembly: Enable moving objects while making joints. 2024-06-27 09:10:38 +02:00
PaddleStroke
0972645fab Assembly: Do not attempt to drag grounded objects. 2024-06-25 09:14:59 -05:00
PaddleStroke
3052760541 Assembly: deleting a component deletes its joints. 2024-06-17 10:58:11 -05:00
PaddleStroke
6fa7c4785e Assembly: Makes sure deleting assembly deletes the joints, the exploded views and the view group. 2024-06-11 10:09:57 +02:00
wmayer
c1b7d38b27 Assembly: Fix warning: -Wunused-variable 2024-05-07 19:48:33 +02:00
PaddleStroke
b4168c95ee Assembly: Drag: switch from solver Solve to dragStep. 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
083437b5ba Assembly: ViewProviderAssembly: Fix issues raised by @wwmayer 2024-05-06 18:32:00 +02:00
PaddleStroke
e264a25714 Assembly: Improve dragging behavior. Fixes #13058 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
PaddleStroke
9b2cee5cbe Assembly: attach selection observer only if in edit mode. 2024-05-06 18:32:00 +02:00
PaddleStroke
ce72c2d438 Assembly: Enable dragger when solid is selected. Fixes #12656 2024-05-06 18:32:00 +02:00
PaddleStroke
2cf789a45f Assembly: define nested assemblies. Fixes 12440 2024-05-06 18:32:00 +02:00
PaddleStroke
cff97eb887 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
1018162528 Assembly: Add drag mode for planar distances. 2024-05-06 18:32:00 +02:00
ppphp
041ed30055 fix: some unuse argument warning 2024-03-31 10:47:32 +02:00
PaddleStroke
7d1f1f2143 Assembly: Esc pref 2024-02-13 08:26:54 +01:00
Paddle
888013d3c6 Assembly : Add support for perspective camera.
Remove exportASMT from toolbar.
Fix Fixedjoint name and tooltip
Fix various bugs
Introduce solver drag functions.
2024-02-13 08:25:46 +01:00
Paddle
31a771917d Assembly: set the rotating joint visible when dragging. 2024-02-13 08:25:46 +01:00
Paddle
fc5a1f1b24 Assembly: Adds a pre-solve when creating joint, preventing wrong orthogonal solutions from solver. 2024-02-13 08:25:46 +01:00
Paddle
a8ed4dd9a7 Assembly: Implement special drag mode for revolute. 2024-02-13 08:25:46 +01:00
Paddle
1d40087b3f Assembly: Add support for body subobjects (coordinate systems, datums...) and various fixes 2024-02-13 08:25:46 +01:00
Paddle
1a44706e6d Assembly: Change the joint placements to be relative to the object rather than to the doc origin.
This enable 'detaching' them, so that they are not recomputed
2024-02-13 08:25:46 +01:00
Paddle
f306515b28 Assembly: Add support to external objects. (And various fixes) 2024-02-13 08:25:45 +01:00
Paddle
2a3284808f Assembly: Replace Tangent+Parallel+Planar by 'Distance'. 2024-02-13 08:25:45 +01:00
Paddle
1d7671942f Assembly: Introduce core functionality of assembly workbench. 2024-02-13 08:25:45 +01:00