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
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
bgbsww
ae46ea5e7b
Toponaming: Refactor refine to its own FeatureRefine class
2024-09-14 23:24:43 -04: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
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
wmayer
c80fd64c82
PD: Fix compiler warning
2024-08-26 23:55:17 +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
Florian Foinant-Willig
ffb2ebe4c6
[PD] helix fix
2024-08-24 20:38:58 -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
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
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
a348a1bc82
Toponaming: Update tests, implement missing subtractive operation tests,
...
fix helix and revolution
2024-07-30 09:12:58 -05:00
bgbsww
6a5207f7a8
Toponaming: Cleanup review notes
2024-07-23 23:58:56 -05:00
luzpaz
a71f49f4f6
Fix trailing newlines and minor typo fixes
2024-07-23 16:16:30 +02:00
bgbsww
5afdc19874
Toponaming: Cleanup
2024-07-21 17:40:42 -04:00
bgbsww
0bddc51805
Refactor all element name pairs into clearer struct names - renames
2024-07-20 16:32:12 -04:00
Zheng, Lei
bcea524177
Toponaming: Missing getSubObject code in PartDesign::Body and SketchObject::getSubObject
2024-07-15 11:59:15 -04:00
bgbsww
e6fbc6b447
Toponaming: Missing suppress property and code
2024-07-15 09:38:13 -05:00
Max Wilfinger
7d21d9edb8
Fix source string typos mentioned on Crowdin ( #15261 )
2024-07-08 17:18:31 -05:00
Max Wilfinger
e490531510
Activate Part/Part Design check and refine preferences by default ( #14406 )
...
* Activate Part/Part Design check and refine preferences by default
* added bool in .ui
* Update tests
* Fix Sketcher tests
2024-07-01 10:50:42 -05:00
pre-commit-ci[bot]
54920e6611
Review cleanups
2024-06-28 11:57:43 -05:00
bgbsww
a674729dd3
Toponaming: Cleanups
2024-06-28 11:57:43 -05:00
Zheng, Lei
7a4bc95d47
Toponaming: Transfer in missing Code for BaseFeatures and Sketches
2024-06-28 11:57:43 -05:00
mosfet80
36b9b58eb3
[MOD:PART] removed unused parameter ( #14252 )
...
d variable are never used
Co-authored-by: Chris Hennes <chennes@pioneerlibrarysystem.org >
2024-06-24 10:41:39 -05:00
wmayer
9b198c7704
MSVC: Fix warnings and build failure
2024-06-12 10:36:58 -05:00
Florian Foinant-Willig
0b4e01047f
Fix can't pad a sketch on datum plane ( #14397 )
...
* Fix can't pad a sketch on datum plane
* Add a unit test for Pad a sketch on datum plane
2024-06-10 11:21:32 -05:00
Kacper Donat
b68da9d844
GUI: Add UI for Up To Shape feature
...
Add UI for Up To Shape feature and overall refactor of Pad / Pocket.
2024-06-10 18:05:21 +02:00
Chris Hennes
681e8c9d2f
Merge pull request #14485 from bgbsww/bgbsww-toponamingFixDressUpShadowSubs
...
Toponaming fix dress up shadow subs
2024-06-03 21:01:22 -05:00
bgbsww
96aa878b7e
Toponaming: reformat code
2024-06-03 19:29:01 -04:00
Florian Foinant-Willig
309dd6e30d
PD Extrude up to multiple faces or shape
2024-06-03 11:26:19 -05:00
Chris Hennes
64fbafe30e
Merge pull request #12589 from NomAnor/pd-trans-body
...
Add a new mode to PD patterns that will transform the base feature's shape instead of the tool shapes
2024-06-03 10:46:33 -05:00
Chris Hennes
bb40f9cfc1
Merge pull request #13317 from Ondsel-Development/add-prop-varset
...
Core: Add properties to variable sets
2024-06-03 10:34:57 -05:00
bgbsww
958d83ed06
Toponaming: Restore use of AttachmentSupport
2024-06-01 11:49:58 -05:00
wmayer
ffad1e0c34
Mod: Fix several compiler warnings
2024-05-30 08:55:11 +02:00
wmayer
4185605d5e
clang/gcc: Add build option FREECAD_WARN_ERROR to force to make warnings into errors
2024-05-29 13:37:07 +02:00
Zheng, Lei
b7bbc2ed11
Toponaming: Missing code for shapebinder
2024-05-23 09:47:25 -04:00