Commit Graph

2523 Commits

Author SHA1 Message Date
Florian Foinant-Willig
22131b3c93 [PD] Fix subtractive primitive placement 2024-10-02 13:40:21 +02:00
Florian Foinant-Willig
2276ffbf0a [PD] fix change primitive AttachmentOffset move the body 2024-10-02 13:40:17 +02:00
Eric Price
594010d9f0 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
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
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
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
Florian Foinant-Willig
22fbfeddc2 [PD] Fix Pad uptoshape and add unit test 2024-09-22 17:22:36 -05:00
bgbsww
c5ad54d5a8 Update method names and clean 2024-09-22 14:44:50 -04:00
Zheng, Lei
b2d6787571 Transfer FeatureHole code 2024-09-21 14:53:33 -04:00
Florian Foinant-Willig
8b9f5bdc4f [PD] fix pad uptoface and uptoshape (#16030)
* [PD] fix Pad UpToFace and UpToShape
* specify struct pointers for Win
* Rename variables for MSVC compatibility - windows.h defines 'near' and 'far' as macros
* Add unit test

---------

Co-authored-by: Chris Hennes <chennes@pioneerlibrarysystem.org>
2024-09-19 08:51:18 -05:00
Yorik van Havre
56dbb6532a Translations (#16582)
* 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-19 09:36:54 +02:00
bgbsww
e4ad21e48f If we are creating a Sketch inside a Body that is in a link, use link position 2024-09-18 08:35:20 -05:00
bgbsww
0f53f2195d Add override flag for recomputes; set it in relevant tests with old files. 2024-09-16 17:49:35 +02:00
Yorik van Havre
7b3eca8396 Translations (#16389)
* Translations: Updated ts files

* Translations: 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-09 18:25:52 +02:00
Florian Foinant-Willig
355610cfb3 [PD] Fix helix placement 2024-09-09 18:11:25 +02:00
wmayer
6812aca7f8 PD: Fix compiler warning 2024-09-03 16:26:52 +02:00
bgbsww
85c1f5c47c Toponaming: Fix ctrl selection issues by looking up element names and setting up detail path 2024-09-02 18:28:11 +02:00
bgbsww
24bb499c1f Cleanup element map in Revolution and add test (#15959) 2024-09-02 17:59:44 +02:00
wwmayer
e98ffc3060 PartDesign: Prepare for clang-format (#16048)
* PartDesign: Prepare for clang-format

* [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-02 17:48:26 +02:00
bgbsww
2a541c9536 Toponaming: Remove remaining FC_USE_TNP_FIX defines 2024-08-31 13:21:10 -05:00
Yorik van Havre
b065691032 Merged crowdin translations 2024-08-28 17:51:34 +02:00
Yorik van Havre
5df158352a Updated ts files 2024-08-28 17:50:59 +02:00
wmayer
c80fd64c82 PD: Fix compiler warning 2024-08-26 23:55:17 +02:00
bgbsww
34030c9ece Toponaming: Run black on the entire toponaming python test file. 2024-08-26 11:19:47 -05:00
wmayer
3e33f184b4 Core: Rename ViewProviderPythonFeature to ViewProviderFeaturePython
Fixes #15888
2024-08-26 18:14:22 +02:00
bgbsww
ecf7e51ab3 Toponaming: Remove all FC_USE_TNP_FIX protected old code 2024-08-26 11:12:48 -05:00
bgbsww
8c08549f5a Update to Toposhape versions and fix shapebinder references with test (#16036)
* Update to Toposhape versions and fix shapebinder references with test

* Update src/Mod/PartDesign/PartDesignTests/TestShapeBinder.py

---------

Co-authored-by: Chris Hennes <chennes@pioneerlibrarysystem.org>
2024-08-26 10:50:18 -05:00
Alfredo Monclus
70d0d50746 fix(PD): threadtype combobox too small for metric fine 2024-08-25 19:35:25 -05:00
Florian Foinant-Willig
ffb2ebe4c6 [PD] helix fix 2024-08-24 20:38:58 -05:00
bgbsww
c8c657eefe Fix shape color / materials issues in fuse 2024-08-22 18:53:55 -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
bgbsww
a1ce983035 Toponaming: Missing shape hasher line; fixed cleaned Transformed 2024-08-13 07:07:59 -04:00
Chris Hennes
6f849e1ce2 Merge pull request #15845 from bgbsww/bgbsww-toponamingTransformedFixes
Toponaming: Fix transformed; abstract index element name generation
2024-08-12 08:48:11 -04:00
MisterMaker
d62444e230 Update FeatureLoft.cpp (#15851)
caused compile issues on MSVC with PCH.
See
https://forum.freecad.org/viewtopic.php?t=89702
4925957185
2024-08-11 19:38:36 -04:00
bgbsww
25ba8ab223 Toponaming: Fix transformed; abstract index element name generation 2024-08-10 23:02:05 -04:00
bgbsww
aab0b31aec Toponaming: Make FeatureThickness elementMap aware 2024-08-09 16:40:07 -04:00
bgbsww
4925957185 Toponaming: fix loft mistake and complete test 2024-08-08 09:12:48 -05:00
bgbsww
2b97b20a03 Toponaming: Additional element map changes to transform 2024-08-08 09:09:46 -05:00
bgbsww
4afbe73f51 Toponaming: Fix PropertyTopoShape restore; tweak Loft test; missing TopoShape method. 2024-08-07 20:31:21 -05:00
Chris Hennes
74e5c3fafb Revert "[PD] Revert 316506f, back to shell algo for some helix cases (#15678)"
This reverts commit dcfae6a897.
2024-08-06 18:54:46 -05:00
Chris Hennes
4801300913 Merge pull request #15734 from bgbsww/bgbsww-toponamingFixTopoShapeToHaveHasher
Toponaming: make sure TopoShapes have Hashers
2024-08-05 11:17:46 -05:00
bgbsww
80045d0e88 Toponaming: add code to implement guessing missing references 2024-08-05 11:01:46 -05:00
Yorik van Havre
aad060c0f0 Translations (#15689)
* 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-08-05 10:42:18 -05:00
Florian Foinant-Willig
dcfae6a897 [PD] Revert 316506f, back to shell algo for some helix cases (#15678)
* [PD] Revert 316506f, back to shell algo for some helix cases

* fix test accuracy
2024-08-05 10:40:00 -05:00
bgbsww
19b63630c6 Toponaming: reformat tnp tests 2024-08-04 17:57:38 -04:00
bgbsww
cd128984e1 Toponaming: make sure toposhapes have hashers 2024-08-02 21:42:16 -04:00
bgbsww
a348a1bc82 Toponaming: Update tests, implement missing subtractive operation tests,
fix helix and revolution
2024-07-30 09:12:58 -05:00
David Carter
233fcd1416 Material: PartDesign DiffuseColor custom attribute
PartDesign features did not inherit the custom attribute for
DiffuseColors as expected. The inheritance chain was incorrect. Also
added tests to ensure it's available.

fixes #15364
2024-07-29 11:24:46 -05:00