Commit Graph

48 Commits

Author SHA1 Message Date
forbes
acc255972d feat(assembly): fixed reference planes + solver docs
Some checks failed
Build and Test / build (pull_request) Failing after 7m52s
Assembly Origin Planes:
- AssemblyObject::setupObject() relabels origin planes to
  Top (XY), Front (XZ), Right (YZ) on assembly creation
- CommandCreateAssembly.py makes origin planes visible by default
- AssemblyUtils.cpp getObjFromRef() resolves LocalCoordinateSystem
  to child datum elements for joint references to origin planes
- TestAssemblyOriginPlanes.py: 9 integration tests covering
  structure, labels, grounding, reference resolution, solver,
  and save/load round-trip

Solver Documentation:
- docs/src/solver/: 7 new pages covering architecture overview,
  expression DAG, constraints, solving algorithms, diagnostics,
  assembly integration, and writing custom solvers
- docs/src/SUMMARY.md: added Kindred Solver section
2026-02-21 09:09:16 -06:00
forbes
5c33aacecb feat(solver): refactor AssemblyObject to use IKCSolver interface (#295)
Rewire AssemblyObject to call through KCSolve::IKCSolver instead of
directly manipulating OndselSolver ASMT types.

Key changes:
- Remove all 30+ #include <OndselSolver/*> from AssemblyObject.cpp
- Remove MbDPartData, objectPartMap, mbdAssembly members
- Add solver_ (IKCSolver), lastResult_ (SolveResult), partIdToObjs_ maps
- New buildSolveContext() builds SolveContext from FreeCAD document objects
  with JointType/DistanceType -> BaseJointKind decomposition
- New computeMarkerTransform() replaces handleOneSideOfJoint()
- New computeRackPinionMarkers() replaces getRackPinionMarkers()
- Rewrite solve/preDrag/doDragStep/postDrag/generateSimulation to call
  through IKCSolver interface
- Rewrite setNewPlacements/validateNewPlacements to use SolveResult
- Rewrite updateSolveStatus to use ConstraintDiagnostic
- Add export_native() to IKCSolver for ASMT export support
- Register OndselAdapter at Assembly module init in AppAssembly.cpp
- Remove OndselSolver from Assembly_LIBS (linked transitively via KCSolve)

Assembly module now has zero OndselSolver includes. All solver coupling
is confined to KCSolve/OndselAdapter.cpp.
2026-02-19 16:43:52 -06:00
PaddleStroke
b4025abab6 Assembly: Change Joint References to remove cyclic dependency. (#25513)
* Assembly: Change Joint References to remove cyclic dependency.

* Update JointObject.py

* Update TestCore.py

* Update JointObject.py

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

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

* Update AssemblyUtils.cpp

* Update UtilsAssembly.py

* Update JointObject.py

* small fix for link groups

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2026-01-26 09:44:59 +01:00
PaddleStroke
bb6832897a Assembly: Solver messages (#24623)
* Assembly: Solver messages

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

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

* Update ViewProviderAssembly.cpp

* Update src/Mod/Assembly/App/AssemblyUtils.cpp

Co-authored-by: Kacper Donat <kadet1090@gmail.com>

* Update src/Mod/Assembly/App/AssemblyUtils.cpp

Co-authored-by: Kacper Donat <kadet1090@gmail.com>

* Update src/Mod/Assembly/App/AssemblyUtils.cpp

Co-authored-by: Kacper Donat <kadet1090@gmail.com>

* Update src/Mod/Assembly/Gui/Commands.cpp

Co-authored-by: Kacper Donat <kadet1090@gmail.com>

* Update ViewProviderAssembly.cpp

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

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

* Update src/Mod/Assembly/Gui/TaskAssemblyMessages.cpp

Co-authored-by: Kacper Donat <kadet1090@gmail.com>

* Update AssemblyObject.h

* Update AssemblyObject.cpp

* Update Commands.cpp

* Update ViewProviderAssembly.cpp

* Update AssemblyObject.cpp

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

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

* Thank you

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Kacper Donat <kadet1090@gmail.com>
2026-01-22 15:21:13 +01:00
tritao
69058376e6 Base: Remove Boost-based signals and switch to FastSignals. 2026-01-07 21:16:16 +00:00
pre-commit-ci[bot]
25c3ba7338 All: Reformat according to new standard 2025-11-11 13:49:01 +01:00
PaddleStroke
3ce9452771 Assembly: Solver message taskbox. UI setup, App not implemented yet. (#23420)
* Assembly: Solver message taskbox. UI setup, App not implemented yet.

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

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

* Update TaskAssemblyMessages.cpp

* Update ViewProviderAssembly.cpp

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-09-01 21:29:06 +00:00
PaddleStroke
e141cb7a49 Assembly: Fix infinite loop with subassembly. Fix #19319 (#22685)
* Assembly: Fix infinite loop with subassembly. Fix #19319

* squash

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

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

* Update AssemblyObject.h

* [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>
2025-07-25 00:11:24 +02:00
PaddleStroke
facfbeb47e Assembly: Fix crash 20614 (#22538) 2025-07-18 09:53:35 -05:00
Jacob Oursland
926757a258 Assembly: align parameter names between decl and impl. 2025-04-17 15:11:36 +02:00
Andrea
0f4f47e313 [Mod] assembly clean
clean code
2025-03-29 14:31:40 -05:00
PaddleStroke
1ce8f2c859 AssemblyObject: Use std::unordered_set instead of vector. 2024-12-13 18:04:10 +01:00
PaddleStroke
024fee7f97 Assembly: Enable the use of App::Datums 2024-12-13 18:04:10 +01:00
efferre79
fe57e3176d cmake fixes for external OndselSolver building (#18379)
* Assembly: fix building with external OndselSolver

This commit pairs with f35b075e271e9cb3451f3439f7dc0274841a0838.
It solves two issues:

- remove hardcoded includes of 3rdparty files
- add missing include_directories()

* Assembly: add check for external OndselSolver includes
2024-12-13 10:46:46 -06:00
Aik-Siong Koh
3326c33d83 Assembly: Simulation implementation 2024-12-03 20:07:04 +01:00
Benjamin Nauck
e5c2c81685 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
a049641771 Assembly: Store DocumentObject instead of mbdPart for the dragged parts. Fixing the bug where doDragStep was 50% of time failing to find the correct DocumentObject due to bundling. 2024-11-18 17:43:53 +01:00
PaddleStroke
761e5a43e8 Assembly: AssemblyLinks. 2024-10-16 15:39:23 +02:00
PaddleStroke
bdfcb6bfb2 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
e9fc6fb89a Move getGlobalPlacement from AssemblyObject to GeoFeature 2024-09-07 13:27:59 +02:00
Bas Ruigrok
5ed26f56f1 Move splitSubName from AssemblyObject to Base::Tools 2024-09-07 13:27:59 +02:00
PaddleStroke
7c6dde17fb Assembly: Fix case of link groups 2024-09-02 18:20:18 +02:00
PaddleStroke
79b9d45726 Assembly: Enable ungrounded connected parts to move as one item. 2024-09-02 18:20:18 +02:00
PaddleStroke
39c4e2e600 Assembly: Fix distance joints 2024-08-12 11:47:21 -04:00
PaddleStroke
a5505a1b1c Assembly: Replace ObjRefPairs std::pair by structure. 2024-07-29 17:48:25 +02:00
PaddleStroke
4f79c675b7 Assembly: Property change from Object/Part to Reference 2024-07-29 17:48:25 +02:00
PaddleStroke
cf5314919a Assembly: Change Object1/2 from strings to PropertyXLinkSub and Remove Element1/2 and Vertex1/2 2024-07-01 11:22:30 -05:00
PaddleStroke
a0c4a273ba Assembly: Enable moving objects while making joints. 2024-06-27 09:10:38 +02:00
Chris Hennes
879b71cbc3 Merge pull request #14608 from Ondsel-Development/asm_del_obj
Assembly: Makes sure deleting assembly deletes the joints and views
2024-06-17 10:49:58 -05:00
PaddleStroke
9fad901fa8 Assembly: Fix bug by replacing const char* by std::string for variables that need to be swapped. 2024-06-11 12:11:16 +02:00
PaddleStroke
b463846bea Assembly: Add validation step during dragging to ignore steps where grounded objects moved. 2024-06-10 11:35:04 -05:00
PaddleStroke
cecb965f50 Assembly: Add 'Angle', 'Perpendicular' and 'Parallel' joints. 2024-05-27 11:59:06 -05:00
PaddleStroke
98c518835c Assembly: Make RackPinion and Screw easier to setup. 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
85bfb99715 Assembly: Solve on recompute. Fixes #12983 2024-05-06 18:32:00 +02:00
PaddleStroke
8fd15eaf28 Assembly: Exploded view refactoring 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
b537d0724a Assembly: Add DistanceType enum and getDistanceType function. 2024-05-06 18:32:00 +02:00
Paddle
cdb1af6543 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
d13df26333 Assembly: Adds a pre-solve when creating joint, preventing wrong orthogonal solutions from solver. 2024-02-13 08:25:46 +01:00
Paddle
48173f2b9d Assembly: Implement special drag mode for revolute. 2024-02-13 08:25:46 +01:00
Paddle
22e4d7f2dd 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
4a119c43f1 Assembly: Add support to external objects. (And various fixes) 2024-02-13 08:25:45 +01:00
Paddle
323deff46a Assembly: Replace Tangent+Parallel+Planar by 'Distance'. 2024-02-13 08:25:45 +01:00
Paddle
d77cd7acf5 Assembly: Introduce core functionality of assembly workbench. 2024-02-13 08:25:45 +01:00