Commit Graph

29368 Commits

Author SHA1 Message Date
Benjamin Bræstrup Sayoc
35d5259c31 [Sketcher] If origin selected: don't do distance to origin
In auto constrainer. Fixes #12684
2024-10-07 09:02:43 -05:00
mwganson
502f3182f8 [PartDesign AllowCompound] recompute all features when AllowCompound property is changed either from true to false or from false to true 2024-10-07 08:56:07 -05:00
shai
e926b65b0c Fix issue #17035 2024-10-07 08:35:43 -05:00
Eric Price
29a4f08ed3 Changed QuickMeasurement to be conservative (#17060)
* Changed QuickMeasurement to be conservative

QuickMeasurement should not measure while tool dialogs are open
this includes but is not limited to editing sketches
also changed several other sanity checks to be opt-in vs opt-out, as discussed.

* move the test if it is safe to measure to when the measurement actually happens - avoids any potential race conditions
2024-10-07 08:33:31 -05:00
Roy-043
763f56bd98 BIM: BimWall add missing imports
Fixes #16996.
2024-10-07 15:21:11 +02:00
Roy-043
ae015a18b4 Draft: avoid confusing SVG warning for nested circles and ellipses
Forum topic:
https://forum.freecad.org/viewtopic.php?t=90942
2024-10-07 15:07:51 +02:00
bgbsww
7d9e955190 Disallow end_all_events in Gesture Nav Style 2024-10-07 15:03:17 +02:00
Roy-043
1dd4fd636c More logical implementation of the fix. 2024-10-07 14:58:36 +02:00
Roy-043
6ccca8b9ad Draft: Stop draftToolBar.escape() executing multiple times
Fixes #17027.

The `DraftTaskPanel.reject()` function can be called multiple times if Esc is pressed during a fast mouse move. We need to prevent multiple calls to `draftToolBar.escape()` as this will lead to multiple calls to `gui_utils.end_all_events()` which results in a crash.
2024-10-07 14:58:36 +02:00
Furgo
07e801be86 Prepend a single quote to BOM index to be interpreted as a string in generated spreadsheets 2024-10-04 08:53:02 -05:00
Roy-043
3608ed2613 BIM: Compatibility fix for walls based on wire or face with -Z normal
In V1.0 the handling of wall normals has changed. As a result existing walls with their Normal set to [0, 0, 0], based on wires or faces with a shape normal pointing towards -Z, would be extruded in that direction instead of towards +Z as before. To avoid this their Normal property is changed to [0, 0, 1].
2024-10-04 13:54:17 +02:00
Ajinkya Dahale
101040c395 [Sketcher] Apply tangent autoconstraint only when Dir given
This relates to `seekAutoConstraint` and `seekAndRenderAutoConstraint`.

Fixes #16321.
2024-10-03 23:17:43 -05:00
Florian Foinant-Willig
8945971578 [PD Helix] allow refinement to fail 2024-10-03 21:54:07 -05:00
Chris Hennes
d1cdcd18bf Merge pull request #16726 from bgbsww/bgbsww-AssemblySubNames
Assembly: Correctly build reference from selection subname
2024-10-03 13:46:35 -05:00
Kris Wilk
d1c04fd193 Prevent using reserved names for properties or aliases (Fix #16846) (#16902)
* Prevent naming properties with reserved words (Fix #16846)

* Prevent using reserved constant names for properties or aliases

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

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

* App: Add unit test for isTokenAConstant

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Chris Hennes <chennes@pioneerlibrarysystem.org>
2024-10-03 10:03:10 -05:00
PaddleStroke
ced8869b49 Assembly: Use cpp getGlobalPlacement python binding rather than reimplementing it. 2024-10-03 09:59:15 -05:00
Frank Martinez
6c66acacf9 [AddonManager] Set default filter to ANY package type 2024-10-03 09:55:04 -05:00
PaddleStroke
c6e4f8a946 QuickMeasure: Prevent crash by limiting selection to Part::Features (#16921)
* QuickMeasure: Prevent crash by limiting selection to Part::Features

* chennes' fix

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

---------

Co-authored-by: Chris Hennes <chennes@pioneerlibrarysystem.org>
2024-10-03 09:49:09 -05:00
Roy-043
2875a58482 BIM: check if Width and Height of window are not zero 2024-10-02 21:49:21 -06:00
Benjamin Nauck
dbeeb1534a Fix macos crashes when unhandled exceptions reaches qt 2024-10-02 21:11:41 -06:00
David Carter
8bc796cd9c Materials: Correct DiffuseColor custom attribute
Custom attributes were modified to maintain the behaviour of setting
transparencies using the DiffuseColor alpha channels
2024-10-02 20:35:09 -06:00
David Carter
b7021452b5 FEM: Translation error causing a crash
An error in the Italian translation added an extra '{}' to the
translation string resulting in a dump when formatting.

This has also been updated in CrowdIn but as it's causing a crash is
also beiung changed via this PR. It should updated correctly when
doing the next translation pull.

Fixes #16704
2024-10-02 20:29:01 -06:00
hlorus
299c27ab12 MeasureGui: Also hide delta measurements 2024-09-30 18:24:19 +02:00
hlorus
d186909f20 MeasureGui: Remove leftover reset of _mMeasureObject
This was introduced in af9097ce87 due to a faulty resolve of a merge conflict
2024-09-30 18:22:58 +02:00
WandererFan
a2c3a1a542 [TD]Fix auto correct msg missing16892 (#16909)
* [TD]fix bad return code on auto-correct fail

* [TD]prevent changing references in property editor

- this is a "shoot yourself in the foot" practice
2024-09-30 18:20:47 +02:00
mwganson
54b669d9e8 [Part CheckGeometry] prevent crash when attempting to check origin axis 2024-09-30 18:19:11 +02:00
wandererfan
faad9fd432 [TD]fix no dim repair on area (fix #16894) 2024-09-30 18:13:28 +02:00
Shai Seger
bae3c8bb5d [CAM Simulator][1.0] Change usage of sample shader code to one with compatible license. (#16899)
* Change usage of sample shader code to one with compatible license.

* [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-09-30 18:08:39 +02:00
wandererfan
0d342c67a1 [TD]fix solid line detail highlight not shown 2024-09-30 18:01:43 +02:00
Yorik van Havre
eec3fe4c5d Merge pull request #16889 from WandererFan/fixProjConvention16788
[TD]Fix proj convention (fix #16788, fix #16785)
2024-09-30 18:00:43 +02:00
Eric Price
4c0c7fc84b Do not allow loft where the segment shapes are too close ( fix #5855 )
A loft or pocket only makes sense if the segments used for it have some minimum separation. Having the shapes identical causes segfaults in OCCT

Checking for CoG is a hack. Identical shapes have identical CoG - but an identical CoG does not necessarily mean identical shapes - however it can be argued that a shape that is not offset at least somewhat in the direction of the loft doesnt make a valid shape for a loft (it will typically freeze OCCT instead of crashing it) and a sufficiently suitable shape will have a different CoG

throwing the exception will make it easy to identify if there ever is a case where this is a bad thing - and exceptions are better than segfaults.
2024-09-30 17:58:13 +02:00
marioalexis
f0a15d2082 Fem: Add offset between faces and wireframe in FemPostObject view provider 2024-09-30 17:50:12 +02:00
Eric Price
531f1b609f PadDesign: Work around issue 16690
This is a stopgap measure, I don't know if the underlying issue is fully understood - but this prevents it from happening in the given test case.

By overriding the base for the pocket prism, which is a trick also applied by
TopoShape::makeElementPrismUntil() if the prism creation fails on first try, the bug where said prism goes to the wrong shape is avoided - this on its own would however break a pad in the inverse case, so we only do that when pocketing
2024-09-30 17:47:47 +02:00
wandererfan
e1f5d3b8a5 [TD]fix bad default value (fix #16783) 2024-09-30 11:44:53 -04:00
bgbsww
94aad208bc Make python Regex Strings raw to avoid py3.12 SyntaxError 2024-09-30 17:42:49 +02:00
Yorik van Havre
37857a8dad Merge pull request #16639 from WandererFan/balloonDrag15388
[TD]Balloon origin drag modifiers (fix #15388)
2024-09-30 17:40:23 +02: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
wandererfan
98906c5edf [TD]fix handling of projection convention (fix #16788 #16785) 2024-09-28 10:39:30 -04:00
wandererfan
d77ce6b78e [TD]add preference methods for Projection Group 2024-09-28 10:39:18 -04:00
bgbsww
d14ca595bd Refine further 2024-09-27 13:00:19 -04:00
bgbsww
d51f0f0f2a Return to python; simplify to work with only classic names, provide migration 2024-09-26 00:01:10 -04:00
Eric Price
dc6799fb7c Measurement: Avoid null shapes to be returned in all code branches (Fix #16820)
Returning a null shape would have triggered an exception in the bottom branch but not in the top one - which later leads to a segfault - solution - raise an exception. OOC doesn't like null shapes.
2024-09-25 12:29:48 -05:00
David Carter
9c5bfd94b7 Materials: Fix QT6 error
The MaterialTreeWidget was not working in QT6 due to a type check for a
QT5 widget
2024-09-25 11:48:57 -05:00
wmayer
301f9d0629 Fix compiler warning 2024-09-25 18:46:55 +02:00
Roy-043
b6f07e9e04 Fix linter warning 2024-09-25 15:59:49 +02:00
Roy-043
2b51ae9be5 Draft: ShapeString Fuse caused single face string to lose fill
The `faces.concatenate` function can return a Face or a Compound. The code did not take that into account.
2024-09-25 15:59:49 +02:00
Eric Price
2ef683e56f Measurement: Correctly handle unknown selections to avoid segfaults (Fix 16794)
The measurement code did not handle mixed selections of known and unknown types correctly. Although a unknown selected object would leave the type at Invalid, selecting both known and unknown objects would have the type determined by the known object type and treat the unknown as the same. This causes exceptions and - worst case a segmentation fault.

This fix introduces a new category "other" which - if present in a selection always forces type to Invalid. This should be forward compatible in case new types are introduced in the future.
2024-09-25 07:48:56 -05:00
bgbsww
e0e1cb565a Correctly build reference from selection subname 2024-09-24 22:01:14 -04:00
chris
07c95a60ff issue #15329 add missing include to resolve build error 2024-09-24 19:08:45 -05:00
Eric Price
17323f274f PartDesign: Loft Intelligence - Select the whole sketch if the selected shape is … (#16791)
* Loft Intelligence - Select the whole sketch if the selected shape is a component of a sketch that is not a vertex (Fix #16630)

In 301194a69682633debfc919c4e146811d1b29617 FeatureLoft.cpp was refactured, dropping some functionality, mainly the ability to create lofts to entire sketches or other 2d shapes if a single component that was not a single vertex was selected as either the base shape or a section

the old code was:

1     auto getSectionShape =
2          [](App::DocumentObject* feature, const std::vector<std::string> &subs) -> TopoDS_Shape {
3              if (!feature ||
4                  !feature->isDerivedFrom(Part::Feature::getClassTypeId()))
5                  throw Base::TypeError("Loft: Invalid profile/section");
6
7              auto subName = subs.empty() ? "" : subs.front();
8
9              // only take the entire shape when we have a sketch selected, but
10             // not a point of the sketch
11             if (feature->isDerivedFrom(Part::Part2DObject::getClassTypeId()) &&
12                 subName.compare(0, 6, "Vertex") != 0)
13                 return static_cast<Part::Part2DObject*>(feature)->Shape.getValue();
14             else {
15                 if(subName.empty())
16                     throw Base::ValueError("No valid subelement linked in Part::Feature");
17                 return static_cast<Part::Feature*>(feature)->Shape.getShape().getSubShape(subName.c_str());
18             }
19         };

this commit forward-ports the missing functionality provided by line 7-12 in above snippet

* Code cleanup as suggested by (#16791)
2024-09-24 15:01:26 -05:00