Commit Graph

38864 Commits

Author SHA1 Message Date
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
Frank Martinez
47ecb6b401 Revert 9b409da due to a regression in some platforms 2024-09-30 18:06:50 +02:00
Yorik van Havre
1ceda88243 Merge pull request #16893 from wwmayer/issue_16735
Core: Fix resetting placement of transformed image
2024-09-30 18:03:38 +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
bgbsww
4ef07e67a1 Tiny doc format changes to make pybin11_stubgen happy 2024-09-30 17:53:48 +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
Benjamin Nauck
5af4615337 Fixes name 'PyExc_FC_AbortIOException' is not defined 2024-09-30 17:46:08 +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
wmayer
f6818079d4 Core: Do not set to XY plane by default if the rotation of the image doesn't match 2024-09-28 19:05:52 +02:00
wmayer
1af82e621e Core: Fix resetting placement of transformed image
The restored Euler angles of a rotation may significantly differ from the input Euler angles so that determining the plane isn't very reliable.
To get the plane reliably multiply (0,0,1) with the rotation and use this as reference normal of the plane.
2024-09-28 18:46:35 +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
Syres916
a027a81799 [Gui] Qt6 OpenGLWidget - move black rectangle off screen (#16863) 2024-09-27 22:50:59 -04:00
Jacob Oursland
0f3e1dc1be CI: Fix conda builds. 2024-09-27 08:24:42 -05: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
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
Florian Foinant-Willig
1d204f57ec [PD] Fix Pad uptoface with custom direction (#16539)
* [PD] Fix Pad uptoface with custom direction

* Add unit test
2024-09-24 11:30:01 -05:00
wandererfan
1f825fb13c [TD]fix crash on bad selection (fix #16727) 2024-09-24 10:07:51 -05:00
Benjamin Nauck
e73e15e857 Swaps out the hard coded icon to the standard svg icon 2024-09-24 10:04:15 -05:00
Syres916
690d2196af [BIM] Fix error starting BIM Wb for certain new users 2024-09-24 14:22:20 +02:00
Eric Price
7f44a0e4b2 CLI: Enforce LC_NUMERIC=C on Posix systems (#16724) (#16763)
* Enforce LC_NUMERIC=C on Posix systems (#16724)

Initialising Qt with native LC_NUMERIC affects XML import on CLI (freecad -c)

This causes sketch constraints and potentially other components relying on numeric constants to break or have incorrect values.

Forcing LC_NUMERIC to C avoids this issue and enforces reproducible behaviour on all locales.
This does not affect the number format displayed in the GUI, as set in preferences.
2024-09-23 19:09:29 -05:00
Frank Martinez
0f2da45cbd Splash Screen minimal show time. Issue #16264 2024-09-23 16:06:59 -05:00
bgbsww
48c65aed76 Support macros and console logs in Assembly 2024-09-23 14:10:55 -05:00
Yorik van Havre
3395a8d4a7 Translations (#16754)
* Updated ts files

* merged crowdin translations

* [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-23 14:09:56 -04:00
Yorik van Havre
e878f54274 BIM: Fixed adding missing windows when converting to IFC - Fixes issue #16631 2024-09-23 17:54:12 +02:00
Benjamin Nauck
779fda5e4a Reuse Std_Delete shortcut instead of hardcoding Delete (#16682)
* Reuse Std_Delete shortcut in TaskBooleanParameters

* Reuse Std_Delete shortcut in TaskDressUpParameters

* Reuse Std_Delete shortcut in TaskLoftParameters

* Reuse Std_Delete shortcut in TaskPipeParameters

* Reuse Std_Delete shortcut in TaskSapeBinder

* Reuse Std_Delete shortcut in TaskTransformedParameters

* Reuse Std_Delete shortcut in TaskExtrudeParameters

* Reuse Std_Delete shortcut in TaskSections

* Reuse Std_Delete shortcut in MaterialSave

* Reuse Std_Delete shortcut in Array2D

* Reuse Std_Delete shortcut in TaskFemConstraint

* [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-23 10:53:39 -05:00
bgbsww
df41704c01 Match LS3 opcodes for sketch shape 2024-09-23 17:45:32 +02:00
3x380V
2443f3ebb4 TechDraw: Buggy Wayland custom cursors workaround (#16740)
* Gui: Minor polishing of cursor regression fix

* TD: Buggy Wayland custom cursors workaround

Until Qt v6.6 displaying custom cursors on Wayland is broken,
so add a workaround. See also QTBUG-95434.

Fix is the same as 094c1b10 ("Gui: Buggy Wayland custom cursors workaround")
plus subsequent fixes.
2024-09-23 17:43:10 +02:00
Christoph Moench-Tegeder
c74378be11 replace exec_program() with execute_process()
Recent CMake (>= 3.28) do not allow exec_program() any more by default,
but prefer execute_process(), which takes slightly different flags.
According to the documentation, exec_program() has been deprecated
since CMake 3.0 (which was released in 2014, so it should be common
enough that I don't feel like making allowances for any really old CMake).

References: https://cmake.org/cmake/help/latest/policy/CMP0153.html
2024-09-23 17:41:19 +02:00
WandererFan
c9beae7ef3 [TD] Fix win file spec backslash (fix #16646) (#16689)
* [TD]add method to clean win filespecs

- '\' in strings passed to Python as filespecs is interpreted as
  an escape of the following character.
- replace '\' with '/'

* [TD]remove '\' from filespecs before use
2024-09-23 17:40:05 +02:00
Shai Seger
1ce5fca06b [Cam Simulator][1.0] Fix minor Ambient Occlusion bug. (#16665)
* Fix minor Ambient Occlusion bug.

* fix text cutting in CAM Simulator task panel. Issue #16707
2024-09-23 17:38:53 +02:00
wandererfan
8a4342e6e1 [TD]fix BrokenView selection (fix #16567) 2024-09-23 10:36:51 -05:00
Kevin Martin
a36a4b04e5 DXF: Fix Import related behavior reported in issues #13597 and #16068 (#16511)
* Fix double-import on exception in ImportGUI.readDXF
The python code has a try/catch block intended to detect if the ImportGUI module is present and if so use its readDXF method, otherwise use Import.readDXF.
The block was incorrectly structured so that Import.readDXF would also be called if ImportGUI.readDXF raised an exception, causing the DXF file contents to be loaded twice into the drawing (at least, up to the point where the exception occurred)

* Make ImpExpDxfRead::MakeLayer use centralized accessor for Draft module
The importer class already had a method to find the python Draft module, but MakeLayer was doing the work itself. Now it uses the centralized accessor, which has also been improved to generate a message if the module can't be loaded.

* Give compounded objects names related to the containing layer name
If "Use Layers" is set and also "Group layers into blocks" the names of the generated compound objects will be based on the name of the containing layer.
If "Use Layers" is not set this will not occur because in general objects from several layers would be compounded together.
Fixes (partially) #16068, the remaining fix is likely just an explanation of the interaction of the options.
closes #13597

* Use correct (new) property name OverrideShapeAppearanceChildren
This corrects a bug created by commit 3aea798 which renamed the layer property "OverrideShapeColorChildren" to "OverrideShapeAppearanceChildren" but missed this particular reference to the property by its old name.

The code here called PyObject_SetAttrString which, due to the wrong attribute name, set an expection state in the Python engine, ultimately causing the next attempt at importing a module to fail, with various consequences depending on why the module is being imported.

* Wrap PyObject_SetAttrString and PyObject_GetAttrString with error-checkers
In DEBUG compiles these methods are wrapped to report errors which can occur if the property cannot be referenced.

* Make some error-printers static instead of const
They don't need the CDxfRead object to work

* Display exceptions raised by ReadEntity
Although the DXF reader has an ignore-errors flag, it should still report any errors it encounters. The flag is deemed to mean that, after an error, the reader should continue to try to read the file rather than quitting on the first error.

* [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-23 17:28:00 +02:00
sliptonic
eacc2a40d5 Catch other exceptions with Camotics on import. (#16583) 2024-09-23 10:27:49 -05:00
hasecilu
95be3bf89c Help: Don't open 404 documentation pages
Unfortunately, not all documentation is translated.

Instead of presenting to the user 404 code error pages is preferable to
show the documentation on English.

Status codes 200 and 404 are assumed as requests response.
2024-09-23 17:17:23 +02:00
David Carter
12ac1b8490 Materials: Update install locations
Ensure icons and images are put in the correct location.
2024-09-23 10:02:50 -05:00
David Carter
b9475fc74c Materials: Correct installation paths
Correct the installation paths affecting builds on various systems
while still maintaining the old material editor required for
backwards compatibility
2024-09-23 10:02:50 -05:00
wandererfan
a35ba33433 [TD]respect camera direction preference (fix #16593) 2024-09-23 09:23:42 -05:00