Commit Graph

38523 Commits

Author SHA1 Message Date
Hannu Koivisto
a55fc950da Fix crash when using box selection with Arch Survey
doSelect() loops over document's object vector.  It can happen that, within
the loop, Gui::Selection().addSelection() gets called and that ends up
calling App::Document::addObject() which pushes an object to the vector that
the loop is traversing.  If the vector is full, its storage is reallocated
and this means that later iterations of the loop are using invalid iterators.
Thus, one ends up with a bogus obj pointer and there will be a crash within
getGroupOfObject().  The problem was observed when using Arch Survey.
2024-08-26 17:33:55 +02:00
Roy-043
c2b8414609 BIM: Arch_Survey: Fix concatenate bytes issue
The line `t = t.encode("utf8")` returns a bytes object which does not make sense in the context of the rest of the code. It is probably a copy-paste error.

To test the bug:
1. open the file attached to this forum post: https://forum.freecad.org/viewtopic.php?t=89012#p770224
2. Make the rectangles visible.
3. Start the Survey command and box select all objects in the 3D view.
2024-08-26 17:31:59 +02:00
Chris Hennes
56b9b485d3 Merge pull request #15958 from AjinkyaDahale/sk-fix-14736
[Sketcher] Attempt to fix #14736
2024-08-25 21:27:00 -05:00
Kacper Donat
46a84da571 Gui: Fix issue with missing icons in sketcher
This boiled down to conflict of using `data` attribute of the QAction in
ActionGroup and ToolBarManager. I reworked ActionGroup here to not use
the data attribute but this is not a proper solution - but it should be
working well enough.

Proper solution would be to leave the data for the specific usecases (like index)
and store the command name in some other place. It would however require
us to subclass the QAction which is not something that should be done so
late in the release cycle.
2024-08-25 19:40:25 -05:00
Alfredo Monclus
70d0d50746 fix(PD): threadtype combobox too small for metric fine 2024-08-25 19:35:25 -05:00
David Carter
450ec1ad8c Rename *Impl.py to Imp.py 2024-08-25 19:32:02 -05:00
Ajinkya Dahale
86d5eea787 [planegcs] Support circle-to-circle tangent when centers coincide
This simply implies avoiding some NaN's when computing error or gradient.
2024-08-25 23:20:41 +05:30
Ajinkya Dahale
a30bbba4df [Sketcher] Fix #14736
Recompute even if the addition of new elements and autoconstraints failed
partially.
2024-08-25 07:33:59 +05:30
Ajinkya Dahale
e2664f397d [Sketcher] Use modernized geometry type checks 2024-08-25 07:33:59 +05:30
Ajinkya Dahale
6a1afdc4e2 [Sketcher] Fix endpoint-to-endpoint/edge tangency substitution
Only substitute if the point(s) involved are `start`/`end`. Centers do
not make sense here.
2024-08-25 07:33:59 +05:30
Chris Hennes
7c797b5a10 Gui: Workaround for #14350 2024-08-24 20:40:33 -05:00
Florian Foinant-Willig
ffb2ebe4c6 [PD] helix fix 2024-08-24 20:38:58 -05:00
CalligaroV
cbbc08fc47 Part/Toponaming: use TopoShape::getShape() in PartFeatures.cpp tests and TopoShapeMakeElementRefine.cpp tests
* Replace TopoShape::getValue() with TopoShape::getShape() to test the size of element maps
 * Update the expected values

Signed-off-by: CalligaroV <vincenzo.calligaro@gmail.com>
2024-08-24 19:54:33 -05:00
Andrea
1afe48140d Update ViewProviderFemMesh.cpp
fix warning: variable 'j'and 'i' is not initialized
[pre-commit.ci] auto fixes from pre-commit.com hooks

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

Update ViewProviderFemMesh.cpp
[pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci
2024-08-24 19:53:10 -05:00
marioalexis
ad28897c09 Fem: Disconnect connection when destroying Constraint object 2024-08-24 19:51:24 -05:00
Chris Hennes
f8a34d8063 Addon Manager: Adjust button reference for Qt6 compatibility 2024-08-24 19:40:27 -05:00
Chris Hennes
baec1037d8 Part: Fix compilation with Qt6/MSVC
-/permissive does not allow the original unwrapped call to ParseTupleAndKeywords
2024-08-23 20:45:26 -05:00
xtemp09
ebf02483af Reimplementation of Light source dialog (#15877)
* Reimplementation of Light source dialog

Closes #15793.

* Gui: Remove redundant void arguments

---------

Co-authored-by: Chris Hennes <chennes@pioneerlibrarysystem.org>
2024-08-22 18:58:14 -05:00
luzpaz
05c90f398a Measure: fix linting TaskMeasure.cpp
Adds missing whitespace before opening brackets (observed in #15907)
2024-08-22 18:54:45 -05:00
bgbsww
c8c657eefe Fix shape color / materials issues in fuse 2024-08-22 18:53:55 -05:00
bgbsww
c59b422f2c Toponaming fix #15969 following LS3 code change 2024-08-22 18:52:22 -05:00
wmayer
c9a586f34a Building: Boost dependency errors
Fixes #15999
2024-08-22 18:50:24 -05:00
bgbsww
40d23c2639 Toponaming: Support disabling hashing; getting element history 2024-08-22 11:24:09 -05:00
Shai Seger
a750034490 Cam simulator feature update (#15597)
* remove redundant code

* Improve lighting, add ambient occlusion

* Add cleanup code. Dialog is now deleted when cloesd.

* change back to ambient occlusion

* Fix G8x drill sequence bug.  issue #14369

* fix bad simulation artifacts under Linux and QT. Issue #14369

* fix merge issue

* fix border artifact on buttons

* support showing path lines. revise the gui.

* add option for arbitrary solids. wip

* use vectors instead of mallocs

* Handle arbitrary stock shapes + show base shape.

* Complete the base shape display feature. eliminate co-planar artifacts.

* support window scaling. upstream issue #14334

* Apply lint fixes

* some missing lints.

* Attend pylint issues

* Apply code fixes based on @kadet1090 review

* fix some clang-tidy warnings.

* CAM: Linter cleanup round 1

---------

Co-authored-by: Chris Hennes <chennes@gmail.com>
2024-08-21 15:18:52 -05:00
wmayer
80a09b3853 Part: Make ViewProviderPart::applyMaterial more robust
* Fixes hard crashes and throw an exception if value is out of range
* Fixes several linter warnings
2024-08-21 18:40:27 +02:00
luzpaz
7e311ed4b9 labels.yml: changed label to 'Mod: Measurement' 2024-08-20 17:26:26 -04:00
luzpaz
1514e52599 fix spacing 2024-08-20 17:26:26 -04:00
luzpaz
89b6addb8d labels.yml: add Measurement label
This adds the Measurement tag to the Labeler CI

[skip ci]
2024-08-20 17:26:26 -04:00
wandererfan
131956e201 [TD]fix crash on Cosmetic line > 10m 2024-08-19 12:34:53 -04:00
wandererfan
595fbc9c1b [TD]detect breakObject inside Body 2024-08-19 11:32:21 -05:00
Chris Hennes
8913b84f60 Gui: Correct repeated extension
Fixes #15908
2024-08-19 12:30:52 -04:00
hlorus
0b8c8ceab0 MeasureGui: Return the relative label offset for the initial position 2024-08-19 12:25:05 -04:00
hlorus
d11f710252 MeasureGui: Explicitly trigger the initial positioning of measurements 2024-08-19 12:25:05 -04:00
hlorus
aa98951b5c Measure: Apply global placement when retrieving shape 2024-08-19 12:16:19 -04:00
hlorus
01611c6a1c [MeasureGui] Fix order of setting properties to avoid update with outdated data 2024-08-19 12:16:19 -04:00
Jacob Oursland
0291603ffc CMake: Use RelWithDebInfo for Conda Windows Debug builds.
Python is not provided with debug libraries, so debug builds are not possible.
Building as RelWithDebInfo will build debug information for the binary, while
using the available release libraries.
2024-08-19 12:13:32 -04:00
Chris Hennes
1815941668 Addon Manager: Fix ZIP installation
Always delete the old version before installing the new one
2024-08-19 12:10:37 -04:00
wandererfan
558db30497 [TD]fix asCircle error calculation 2024-08-19 12:01:01 -04:00
Brad Collette
6a23cd01bb fixes #15902 2024-08-19 11:58:46 -04:00
Brad Collette
58ba9dd0e9 Remove deprecated materials
# Conflicts:
#	src/Mod/Material/Resources/Materials/Machining/ToolSteel.FCMat
2024-08-19 11:57:04 -04:00
CalligaroV
673b5a5e5e Part/Toponaming: align TopoShape::findSubShapesWithSharedVertex() to LS3
* added test for issue #15539

Signed-off-by: CalligaroV <vincenzo.calligaro@gmail.com>
2024-08-19 10:53:31 -05:00
Brad Collette
4ec94e678e Add Feedrate to G85 command moves
#fixes #15646
2024-08-19 11:52:15 -04:00
Roy-043
ce11e63958 BIM: Fix oversight in #15530
Fix bug introduced in #15530.

Forum topic:
https://forum.freecad.org/viewtopic.php?t=89790

@paullee0 can you check please? Thanks.
2024-08-19 13:41:05 +02:00
Nino Annighoefer
20549cacd2 Use portable text to set shortcut
At least on macOS, it seems that setting nontrivial shortcuts only works
when the shortcut is converted to `PortableText`, rather than
`NativeText`.

Before, it was impossible to map, eg, the backspace key or CMD-T to an
action. Now this appears to work.
2024-08-18 14:14:35 -05:00
Jacob Oursland
e3839f1286 CI: Disable Windows conda due to mamba bug. 2024-08-18 14:02:46 -05:00
wmayer
0dae7353d1 PD: Make PD tests more robust
If in the user settings the refinement is switched off several PD tests will fail. This change explicitly sets the Refine property to True to guarantee correct behaviour
2024-08-18 11:50:33 -05:00
bgbsww
f0982d1d61 Toponaming: Fuse call makeElementRefine; remove deprecated refineSha… (#15897)
* Toponaming:  Fuse call makeElementRefine; remove deprecated refineShapeIfActive
* Part/Toponaming: import code for MultiFuse::execute() from LS3
* added expected values of testRefine

Co-authored-by: Zheng, Lei <realthunder.dev@gmail.com>
Co-authored-by: CalligaroV <vincenzo.calligaro@gmail.com>
Co-authored-by: Chris Hennes <chennes@pioneerlibrarysystem.org>
2024-08-18 11:49:05 -05:00
Chris Hennes
ff1409d8bf MacOS: Modify OS detection macro (#15924)
* Fixes #15904
* MacOS: Always use Q_OS_MACOS to detect MacOS because the Conda builds do not define Q_OS_APPLE
2024-08-18 08:29:40 -05:00
Jonas Bähr
95c514fca3 Material: Add metal cards with machining model
With PR #14460 the "machinability" model was introduced. As sample data
the legacy material cards from the "feeds and speeds" addon were added
and (partly) converted to the new format. However, due to copyright
concerns and unclear semantics of the data, the values required for
cutting force calculations have been removed.
This commits adds material cards with complete machining model data
for various classes of metals. The data comes from the German standard
work "Tabellenbuch Zerspantechnik", ISBN 978-3-7585-1315-2, 5. Edition
2022, http://www.europa-lehrmittel.de/14733
Usage of this data for our purpose is legal as facts are not protected by
copyright according to German law. This view has been confirmed by the
licensing department of the publisher.
2024-08-17 16:35:26 -05:00
Brad Collette
8dc1fad1c9 Fixes #15909
regression bug caused by Path->CAM module rename.
2024-08-17 14:21:58 -05:00