Commit Graph

39460 Commits

Author SHA1 Message Date
bgbsww
d535c5a6e7 Refine further 2024-09-27 13:00:19 -04:00
Jacob Oursland
d519f24df9 CI: Fix conda builds. 2024-09-27 08:24:42 -05:00
bgbsww
7bed7ef370 Return to python; simplify to work with only classic names, provide migration 2024-09-26 00:01:10 -04:00
PaddleStroke
84b422c976 Add notr="true" 2024-09-25 21:02:13 +02:00
Eric Price
69676a0f9d 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
9df2ec7b86 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
ca7b7fe5a0 Fix compiler warning 2024-09-25 18:46:55 +02:00
Roy-043
abc95b42ca Fix linter warning 2024-09-25 15:59:49 +02:00
Roy-043
4313024162 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
54c278c123 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
PaddleStroke
cf5a704e19 Remove unecessary ':' cluttering Placement.ui 2024-09-25 09:51:40 +02:00
bgbsww
f0053e5388 Correctly build reference from selection subname 2024-09-24 22:01:14 -04:00
chris
6be69ac576 issue #15329 add missing include to resolve build error 2024-09-24 19:08:45 -05:00
Eric Price
256ad7a01a 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 fa8f29aed4 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
490d6c5abc [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
0ff7c3a38f [TD]fix crash on bad selection (fix #16727) 2024-09-24 10:07:51 -05:00
Benjamin Nauck
ad141f1796 Swaps out the hard coded icon to the standard svg icon 2024-09-24 10:04:15 -05:00
Syres916
1f4adf9e56 [BIM] Fix error starting BIM Wb for certain new users 2024-09-24 14:22:20 +02:00
Eric Price
b38c42262f 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
9b409da59c Splash Screen minimal show time. Issue #16264 2024-09-23 16:06:59 -05:00
bgbsww
a715a4d161 Support macros and console logs in Assembly 2024-09-23 14:10:55 -05:00
Yorik van Havre
abd5c3ca31 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
4d35aa06dd BIM: Fixed adding missing windows when converting to IFC - Fixes issue #16631 2024-09-23 17:54:12 +02:00
Benjamin Nauck
fdfb9fd2c6 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
837920f378 Match LS3 opcodes for sketch shape 2024-09-23 17:45:32 +02:00
3x380V
1207715849 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 d3bb2068 ("Gui: Buggy Wayland custom cursors workaround")
plus subsequent fixes.
2024-09-23 17:43:10 +02:00
Christoph Moench-Tegeder
15a75ba5d3 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
a1ff05f382 [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
b4e29414b6 [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
0d6f47d1ce [TD]fix BrokenView selection (fix #16567) 2024-09-23 10:36:51 -05:00
Kevin Martin
5bed9bf53f 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 495a96a 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
b31084f609 Catch other exceptions with Camotics on import. (#16583) 2024-09-23 10:27:49 -05:00
hasecilu
0a18849a0a 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
1c6b7dc8b8 Materials: Update install locations
Ensure icons and images are put in the correct location.
2024-09-23 10:02:50 -05:00
David Carter
1542ddc815 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
99b7edef3a [TD]respect camera direction preference (fix #16593) 2024-09-23 09:23:42 -05:00
wandererfan
fcdd946261 [TD]fix torus render (fix #16646) 2024-09-23 09:21:00 -05:00
wandererfan
d5d66b2c70 [TD]fix double pdf file on win (fix #16538) 2024-09-23 09:18:47 -05:00
marioalexis
685d10dcfa Fem: Use shape global placement in Mesh Netgen new implementation 2024-09-23 08:17:04 -05:00
marioalexis
dbe74c2595 Fem: Add offset between faces and wireframe in FemMesh view provider 2024-09-23 08:16:27 -05:00
marioalexis
5ff4d427a5 Fem: Use reference subshape transformation on the underlying geometry 2024-09-23 08:11:15 -05:00
Jiří Pinkava
a55e704758 BIM: Fix tabstop order for Project Manager dialog
Until now not defined explicitly, using tab juped throught boxes in
order in which they were created, which is really jumpy user experience.
2024-09-23 12:14:30 +02:00
Kevin Martin
c9887d9400 DXF: Place objects in layer all at once rather than one at a time to improve DXF import speed dramatically. (#16596)
* Place objects in layer all at once rather than one at a time.
This reduces (by a factor of the number of objects in the layer) the number of times that the layer contents are traversed to set the properties of the contained objects.
This means the layer insertion of O(n) rather then O(n^2) on the number of objects.
Also remove a loop invariant in view_layer so the chidren are not traversed if colours or appearnces are not inherited from the layer.
Fixes #15732

* [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 11:39:02 +02:00
Kevin Martin
980303b618 DXF: Remove O(n^2) time on DXF import with the legacy importer (#16611)
* Remove O(n^2) time on DXF import
Accumulates the contents of each layer in a local Python list, then at the end assignes all the objects at once into the layer. This avoids a very slow process of traversing the objects so far and (re-)updating their properties each time a new object is added.
Fixes #16604

* Correct last change to not damage existing layer contents.
The layer could already have contents if the DXF file is being Imported rather than Opened.
The original change would lose the previous layer contents.
2024-09-23 11:37:34 +02:00
hlorus
af9097ce87 MeasureGui: Move _mMeasureType member to local variable
Fixes #16565
2024-09-22 20:34:45 -05:00
Florian Foinant-Willig
22fbfeddc2 [PD] Fix Pad uptoshape and add unit test 2024-09-22 17:22:36 -05:00
Roy-043
d6e9be45bb Correct tree icon for TechDraw_AreaDimension 2024-09-22 16:58:52 -05:00
Bas Ruigrok
f779ebe60a Tux: Fix default orbit style shown in status bar 2024-09-22 16:57:26 -05:00
Chris Hennes
5a614828e3 Merge pull request #16713 from bgbsww/bgbsww-ToponamingFeatureHole
Toponaming: transfer feature hole
2024-09-22 16:55:00 -05:00
bgbsww
c5ad54d5a8 Update method names and clean 2024-09-22 14:44:50 -04:00