Commit Graph

652 Commits

Author SHA1 Message Date
schmidtw
2ffbb55b2e Add unit tests for CommandInsertLink fix
Add comprehensive unit tests to verify the fix prevents AttributeError
  when accessing non-existent nodes.
2025-10-12 14:50:03 -07:00
schmidtw
36dec53a8c Fix: Prevent attempting to access non-existent nodes
This is defensive code that protects against attempting to dereference
  nodes that are not present, preventing the python code from throwing an
  AttributeError.
2025-10-12 14:49:28 -07:00
PaddleStroke
fe534bcf99 Assembly: Isolate joint components during selection and edit. (#23680)
* Core: Add signalBeforeOpenTransaction

* Assembly: Isolate

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

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

* Update src/App/AutoTransaction.cpp

Co-authored-by: Chris Hennes <chennes@pioneerlibrarysystem.org>

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Chris Hennes <chennes@pioneerlibrarysystem.org>
2025-10-02 21:07:06 -05:00
PaddleStroke
f8c9eaa1e5 Merge pull request #24162 from PaddleStroke/asm_linkgroup_asmlink
Assembly: Add support to Link groups in sub-assemblies.
2025-09-30 13:02:47 -05:00
PaddleStroke
fa15dc6791 Assembly: Fix errors on solve when limits 2025-09-29 12:46:19 -05:00
Chris Hennes
5938479cf4 Assembly: Fix translatable strings (#24243)
* Assembly: Fix translatable strings

* [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-09-29 17:48:01 +02:00
Chris Hennes
98cf59c281 Merge pull request #24240 from mrpilot2/cmake_pch_mods_part_2
Mods: use CMake to generate precompiled headers on all platforms
2025-09-26 09:46:26 -05:00
Chris Hennes
1c6d9c79fb Update translations 2025-09-25 2025-09-25 17:25:13 +02:00
Furgo
42bdb05cbc Assembly: fix delete shortcut parameter mismatch
Fixes: https://github.com/FreeCAD/FreeCAD/issues/23792
2025-09-24 22:19:00 -05:00
PaddleStroke
a3717afc5a Assembly: fix onChanged crash 2025-09-24 10:59:41 -05:00
PaddleStroke
500463ac0c Assembly: Fix subassembly linkgroups not moving with dragger 2025-09-23 19:07:25 -05:00
Markus Reitböck
e46020ada4 Assembly: use CMake to generate precompiled headers on all platforms
"Professional CMake" book suggest the following:

"Targets should build successfully with or without compiler support for precompiled headers. It
 should be considered an optimization, not a requirement. In particular, do not explicitly include a
 precompile header (e.g. stdafx.h) in the source code, let CMake force-include an automatically
 generated precompile header on the compiler command line instead. This is more portable across
 the major compilers and is likely to be easier to maintain. It will also avoid warnings being
 generated from certain code checking tools like iwyu (include what you use)."

Therefore, removed the "#include <PreCompiled.h>" from sources, also
there is no need for the "#ifdef _PreComp_" anymore
2025-09-23 22:39:34 +02:00
PaddleStroke
d56038bc4c Assembly: Prevent crash when link to linkgroup in subassembly (#24125)
* Assembly: Prevent crash when link to linkgroup in subassembly

* ViewProviderAssembly: Additional crash failsafe.
2025-09-23 11:06:01 -05:00
PaddleStroke
5308cef9d4 Assembly: Fix LinkElement dragger 2025-09-23 10:39:28 -05:00
PaddleStroke
7b5a08d950 Assembly: Simulation: Fix motion double click (#23778)
* Assembly: Simulation: Fix motion double click

* [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-09-22 21:22:29 -05:00
Chris Hennes
02721eec37 Update translations 2025-09-15 2025-09-16 09:55:13 +02:00
Markus Reitböck
496b31b087 do not use precompiled header for setting global compiler definitions and to disable compiler warnings
only 4 of these warnings are still relevant, CMake shall be used to disable them

Compiler definitions:

  NOMINMAX:
    * is already globally defined in SetGlobalCompilerAndLinkerSettings.cmake

  WIN32_LEAN_AND_MEAN:
    * use CMake target_compile_options on relevant targets

Warnings that still occur:

  C4251, C4273, C4275: all related to dllimport / export
    * use CMake target_compile_options on relevant targets

  C4661: no suitable definition provied for explicit template instantiation request
    * triggered in Mesh because of Vector3D in Base - not all functions are defined in header
    * use CMake target_compile_options on relevant targets

Warnings that are Currently not triggered (fix code if they appear again):

  C4005: macro redefinition

  C4244: argument conversion, possible loss of data

  C4267: conversion from size_t to type, possible loss of data

  C4305: truncation from type1 to type2
    * only occurrence disabled in Reader.cpp

  C4522: multiple assignment operator specified

  C5208: unnamed class in typedef name

Obsolete Compiler warnings:

  C4181: not mentioned in Microsoft docs anymore

  C4290: C++ exception specification ignored except to indicate a function is not __declspec(nothrow)
    * throw(optional_type_list)  deprecated in C++17

  C4482: nonstandard extension used: enum 'enumeration' used in qualified name
    * not generated for compilers that support C++11

  C4503: 'identifier': decorated name length exceeded, name was truncated
    * obsolete since Visual Studio 2017

  C4786: not mentioned in Microsoft docs anymore
2025-09-11 20:21:04 -05:00
Chris Hennes
ff349c81d6 Merge pull request #23746 from 3x380V/cmake
CMake: Use scoped include and library directories
2025-09-10 21:54:51 -05:00
PaddleStroke
dde9b038aa Assembly: Fix simulation crash with limits 2025-09-10 21:54:20 -05:00
Chris Hennes
23bcfd12ff Update translations 2025-09-09 2025-09-10 08:53:41 +02:00
wmayer
ac51455a0a CMake: Replace include_directories with target_include_directories 2025-09-08 19:04:34 +02:00
Chris Hennes
b699349e9b Merge pull request #23521 from z0r0/python-interface-bindings-final
Core: Python interface bindings cleanup
2025-09-08 10:58:15 -05:00
Chris Hennes
c0d1151633 Update translations 2025-09-03 2025-09-04 11:37:11 +02:00
Ian 'z0r0' Abreu
78ec52f1a8 updating docblock locations. 2025-09-02 08:28:47 -04:00
Ian 'z0r0' Abreu
b1c551026e reverting author metadata 2025-09-02 08:25:37 -04:00
Ian 'z0r0' Abreu
b0b9f8fc35 Adding license documentation to interface class docblocks. 2025-09-01 21:50:59 -04:00
PaddleStroke
e40e01b039 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
Chris Hennes
e36d5db583 Update translations 2025-08-30 2025-09-01 17:44:54 +02:00
Mathieu GRENET
0604c818a1 Assembly: Fix inconsistent positioning in distance joint validation
When validating distance joints, parts would move from preview position to
a different valid solution. This was caused by preSolve() being called
inconsistently - applied during offset changes for all joint types, but
distance joints are not in JointUsingPreSolve list.

Fix: Only call preSolve() for joint types that are designed to use it,
matching the logic used elsewhere in the codebase.
2025-08-31 21:31:45 -05:00
Ian 'z0r0' Abreu
4a17d628a7 Finalizing Python interface bindings for assembly 2025-08-31 15:19:25 -04:00
Chris Hennes
f3c675ed5b Update translations 2025-08-28 16:14:49 +02:00
PaddleStroke
465f6cb52c Assembly: Screw Joint, fix distance name to Thread Pitch 2025-08-25 16:44:04 -05:00
PaddleStroke
b7440a660c Assembly: Move label change logic to onChange 2025-08-25 11:06:11 -05:00
PaddleStroke
b4d799b0ed Assembly: Fix untranslatable string in CommandInsertNewPart.py (#23355)
* Assembly: Fix untranslatable string in CommandInsertNewPart.py

* [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-08-25 14:38:33 +00:00
tetektoza
59d4eec796 Assembly: Allow editing joint references
As the title says - root cause of this problem was imprecise reference
matching by moving_part and TNP string processing incosistencies, so the
solution is to give enhanced matching and TNP string mapping for
reliable deletion.

Also added context menu with keyboard shortucs so user is able to delete
stuff with right click.
2025-08-24 22:58:57 -05:00
PaddleStroke
59b01f6802 Assembly: toggle grounded: handle case of grounded joint selection. 2025-08-24 22:58:22 -05:00
Ian Abreu
300d971e98 Core: Fixing missing python bindings. (#23054)
* Adding missing python interfaces.

* fixing interface includes.

* attempting fix for CI build error related to path resolution.

* testing build

* More testing via Github Actions...

* renaming files

* fixing comparison operator.

* reverting...

* fixing CMakeLists

* fixing binding generation issue
2025-08-24 22:43:39 -05:00
tetektoza
63649bb9a8 Assembly: Auto close on deleted doc for dialogs to avoid segfaults
Currently if we close document on Assembly WB while having dialog
opened, it will throw segfault because it is not being auto closed
automatically during document close. This in turn resulted in dialog
having dangling references to document that was no longer existing,
throwing segfaults in random places.

So solution is simple - add `setAutoCloseOnDeletedDocument` for every
dialog in Assembly to avoid this situation and close every dialog upon
document close.
2025-08-24 22:22:19 -05:00
Max Wilfinger
ab5e9e0ded Fix source string mistakes reported on Crowdin (#23157)
* Fix source string mistakes reported on Crowdin

* Update src/Mod/Draft/Resources/ui/TaskPanel_CircularArray.ui

Co-authored-by: Roy-043 <70520633+Roy-043@users.noreply.github.com>

* Update src/Mod/Draft/Resources/ui/TaskPanel_CircularArray.ui

Co-authored-by: Roy-043 <70520633+Roy-043@users.noreply.github.com>

* Update src/Mod/Draft/draftfunctions/upgrade.py

Co-authored-by: Roy-043 <70520633+Roy-043@users.noreply.github.com>

* Update src/Mod/Draft/draftfunctions/upgrade.py

Co-authored-by: Roy-043 <70520633+Roy-043@users.noreply.github.com>

* Update src/Mod/Draft/draftguitools/gui_downgrade.py

Co-authored-by: Roy-043 <70520633+Roy-043@users.noreply.github.com>

* Update src/Mod/Draft/Resources/ui/TaskPanel_SetStyle.ui

Co-authored-by: Roy-043 <70520633+Roy-043@users.noreply.github.com>

---------

Co-authored-by: Roy-043 <70520633+Roy-043@users.noreply.github.com>
2025-08-24 20:51:32 -05:00
Chris Hennes
40b1ea294c Update translations 2025-08-18 17:55:24 +02:00
Ryan Kembrey
66aaf6a2ee Assembly: Update UI strings for consistency
Closes: #22194
2025-08-04 20:14:38 +02:00
Ian Abreu
ca95874813 Core: Generation of python bindings for Assembly (#22574)
* adding XML, CmakeLists, and interfaces.

* removing Dict, List from typing imports.

* Normalizing imports.
2025-08-04 10:36:22 -05:00
PaddleStroke
8aa0b5b108 Assembly: Fix https://github.com/FreeCAD/FreeCAD/issues/22815 2025-07-29 13:49:41 -05:00
PaddleStroke
94e6b30511 AssemblyGui: CmakeLists typo 2025-07-28 22:21:45 -05:00
PaddleStroke
38fb1ef274 Assembly: Replace "Activated" property by the core "Suppressed" mecha… (#22409)
* Assembly: Replace "Activated" property by the core "Suppressed" mechanism.

* Fix inaccuracy

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

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

* move the change to migrationScript5 function

* Update JointObject.py

* [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-28 18:20:01 +02:00
paddle
f4bdeeac16 Assembly: Task Watcher. 2025-07-27 21:23:12 +02:00
paddle
dc73b8272a Assembly: Add 'Activate assembly' command. 2025-07-27 21:17:28 +02:00
PaddleStroke
59c6742155 Assembly: Use icon overlay for unconnected joints instead of annoying warning. (#22662)
* Core: FeaturePython : Add getOverlayIcons to python interface

* Assembly: unconnected joints icon overlay Fix #22643

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

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

* Update AssemblyObject.cpp

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

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

* Update ViewProviderFeaturePython.h

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

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

* Update ViewProviderFeaturePython.h

* Update JointObject.py

* Update ViewProviderFeaturePython.h

* Update ViewProviderFeaturePython.cpp

* Update Application.cpp

* Update ViewProviderFeaturePython.cpp

* Update ViewProviderFeaturePython.h

* Update ViewProviderAssembly.cpp

---------

Co-authored-by: Kacper Donat <kadet1090@gmail.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-07-26 22:35:24 +02:00
PaddleStroke
db7c039881 Assembly: utils: tiny fix 2025-07-26 11:16:28 +02:00
PaddleStroke
e54984504a 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