Commit Graph

89 Commits

Author SHA1 Message Date
bgbsww
cb3df1d59c 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
0ab5887fe1 Toponaming: Missing shape hasher line; fixed cleaned Transformed 2024-08-13 07:07:59 -04:00
bgbsww
5b7e03013e Toponaming: Fix transformed; abstract index element name generation 2024-08-10 23:02:05 -04:00
bgbsww
4fd5b0b562 Toponaming: Additional element map changes to transform 2024-08-08 09:09:46 -05:00
Max Wilfinger
86b1c2e863 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
André Althaus
ebad053c70 Change MultiTransform child detection to the previous method
isMultiTransformChild() tried to do a better job by checking
for a parent MultiTransform in the dependency list, but this
is unusable during initialization, when these dependencies are
not established.

The method is changed back to the previous one which only checks for
default property values. This will give false results during
initialization but not cause problems.
2024-05-23 12:23:32 +02:00
André Althaus
f021ea6c7f Fix ambiguous setValue() call 2024-05-23 12:23:32 +02:00
André Althaus
f2c3ade1f5 Remove unused function 2024-05-23 12:23:32 +02:00
André Althaus
5c0aaa40d9 Modernize code 2024-05-23 12:23:32 +02:00
André Althaus
75bba376c4 Format code with clang-format 2024-05-23 12:23:28 +02:00
André Althaus
5790795f03 Add a TransformMode property to the pattern features
This property controls wether the selected features tool shapes are
transformed or the whole base feature's shape.
2024-05-23 12:22:26 +02:00
André Althaus
d213827319 Add function to check if a Transformed feature is a sub-feature of MultiTransform
This will check the in-list instead of relying on an empty Originals property.
2024-05-23 12:22:26 +02:00
Kacper Donat
d0a35c8c03 PartDesign: Refactor single-solid rule enforcement
This refactors a single solid rule checking code from using the solid
count directly to using well abstracted `isSingleSolidRuleSatisfied`
method. This makes code easier to read and is the basis for next step
which is allowing users to disable this checks.
2024-05-20 12:25:36 -04:00
bgbsww
92e8a391c6 Toponaming/Part: Clean and add tests 2024-04-11 11:30:04 -04:00
André Althaus
6b721ac797 Ignore suppressed features in patterns
This will remove all suppressed features from the Originals list
before calculating the patterns.
2024-04-01 10:58:24 -05:00
wmayer
b908e46b26 PD: Mirror feature should be more permissive
If you have a mirror feature and set the mirror plane with the normal feature editing the recompute works. But if the mirror plane is set with the property editor then the recompute fails with the message that no mirror plane reference is set.

This is related to a an empty sub-name list of the link property instead of a single and empty sub-name element.

This PR allows to specify a sketch, plane or datum plane without a sub-name.

For more details see: https://forum.freecad.org/viewtopic.php?t=86568

This fixes #13238
2024-03-31 17:32:27 +02:00
Florian Foinant-Willig
24934d7843 PartDesign: modernize type checking 2023-10-23 18:08:16 +02:00
wmayer
3e09b8ee2d PD: modernize C++: use range-based for loop 2023-08-16 21:54:56 -05:00
Chris Hennes
397807b72d Gui: Minor translation fixes 2023-05-11 18:31:34 -05:00
Chris Hennes
272a84ca5b PD: Add translation to error messages 2023-04-28 11:32:56 -05:00
wmayer
52838aa6bd PD: fixes #7791: Linear Pattern With Single Occurrence Fails 2022-12-27 14:29:16 +01:00
wmayer
3e009e2693 PD: modernize C++: replace 'typedef' with 'using' 2022-08-29 22:20:49 +02:00
berniev
f4ffd15864 Mod: redundant void 2 2022-08-08 10:27:50 +02:00
wmayer
a93082bc06 PD: [skip ci] Fix several clazy issues:
* Maybe you meant to call base method instead [-Wclazy-skipped-base-method]
* Missing reference in range-for with non trivial type [-Wclazy-range-loop-reference]
* Mixing iterators with const_iterators [-Wclazy-strict-iterators]
* Unused QByteArray [-Wclazy-unused-non-trivial-variable]
* C++11 range-loop might detach Qt container (QList) [-Wclazy-range-loop-detach]
2022-07-25 13:40:19 +02:00
Ajinkya Dahale
ed370b5fe6 [PD] Do both fuse and cut in FeatureTransformed if applicable 2022-04-23 17:55:18 +02:00
Ajinkya Dahale
cad2d2c95b [PD] Delete "Overlap" property for FeatureTransformed
This property became redundant after 9b17ab4a58476f46802179de037a627974cb892b.
2022-04-21 01:21:59 +02:00
wmayer
d4aed4c6bd PD: issue #6641: polar pattern fails 2022-04-12 16:32:54 +02:00
wmayer
d1d4b996e7 PD: modernize C++11
* use nullptr
2022-03-23 19:26:14 +01:00
Uwe
1d58c674a2 [PD] some more work to remove unused includes 2022-02-21 02:50:16 +01:00
wmayer
0c583fb7fa Part: fix typos in make* functions 2022-02-16 12:48:02 +01:00
David Osterberg
3af6bf0880 PartDesign: Silence noisy FeatureTransformed
Remove several report view messages that are not necessary for everyday use.
By request from the forum (https://forum.freecadweb.org/viewtopic.php?f=3&t=64900&start=20#p558962)
2022-01-08 15:30:39 +01:00
Uwe
f3f6f08e31 [PD] avoid a single-letter variable
(single letter variables make it hard to read and understand code quickly and are error-prone for typos)
2022-01-05 03:16:00 +01:00
David Osterberg
1f84ed1e6e PD: Fix bug in FeatureTransformed
It is important to not include the original in the pattern because the original might not be at the tip of the feature tree. Including the original
will interfere with changes that occur further down in the feature tree

This fixes the bug identified in
https://forum.freecadweb.org/viewtopic.php?f=3&t=64900
2022-01-05 02:27:53 +01:00
wmayer
2af9c5038e PD: move handling of changed properties of Transformed to handleChangedPropertyType 2021-09-15 15:20:40 +02:00
wmayer
2fd0bb6859 PD: [skip ci] fixes -Wreturn-std-move 2021-04-13 18:55:18 +02:00
wmayer
5e71f945c4 PD: remove empty try/catch block 2021-03-13 14:48:16 +01:00
David Osterberg
482129c5a4 PartDesign: Transformed. Fix regression in preview 2021-03-13 14:48:16 +01:00
David Osterberg
b7ac48aef7 PartDesign: Transformed. Fix regression for Mirrored, and multiple features 2021-03-13 14:48:16 +01:00
David Osterberg
79facc579e PartDesign: Transformed: Allow explict selection of overlap mode 2021-03-13 14:48:16 +01:00
David Osterberg
34fbe57485 PartDesign: Performance improvements in Transformed (pattern)
- Use fuzzy fuse/cut method with tolerance Precision::Confusion()
- Use parallel computation feature
- Allow that individual patterned item fail to intersect the baseobject.
	Issue warning instead of error. This was done for performance reasons
	but it can also be considered a feature.
- Simplify the code a bit
- Distinguish between overlapping mode and non-overlapping mode. In non-overlapping mode
  the tool shapes are compounded instead of fused. For huge benefit in performance.
2021-03-13 14:48:16 +01:00
David Osterberg
9d24f90dd7 PartDesign: Transformded. Align the "property category" of Refine with other PD commands 2021-02-27 18:19:14 +01:00
Zheng, Lei
35007e30e5 PartDesign: fix pattern transformation 2020-07-31 14:46:33 +02:00
Zheng, Lei
a045f58a85 PartDesign: change feature DressUp behavior when used for pattern
Repurpose DressUp.SupportTransform property to define the following
behavior,

* When disabled (default), only the dressing will be used for patterning.

* When enabled, the additive/subtractive shape of the dressed base
  feature will be used for patterning. Any dressing that is not applied
  to the based feature will be ignored.

* If the dressing is applied to non-additive/subtractive feature, then
  only the dressing will be used for patterning.

New API FreatureAddSub::getAddSubShape() is added to account for the
fact that a dressing (e.g. a fillet) can be either additive or
subtractive, which means that a DressUP feature may contain both
additive and subtractive shapes.

FeatureTransformed is modified to perform both fusion and cut if
required.
2020-07-11 13:03:21 +02:00
Zheng, Lei
8b23d814f8 PartDesign: fix line ending in source code 2020-07-11 13:02:49 +02:00
luz.paz
dc8bf3dc39 PartDesign: [skip ci] fix header uniformity
This PR fixes header uniformity across all PartDesign WB files
2019-12-22 00:58:38 +01:00
wmayer
00de5bb7ad Replace Base::Exception with appropriate subclass 2018-11-14 19:28:00 +01:00
Markus Lampert
e13c09235f Changed all catch types to references for polymorphic exceptions. 2018-08-08 15:45:30 +02:00
wandererfan
a712d49685 Revise multiple solids message 2018-07-13 10:23:42 -03:00
wandererfan
0d3008e4eb Fix #3401 warning on multiple solid
- PartDesign only uses the first result shape
  of an operation and discards the rest without
  warning.

- this also fixes #1707
2018-07-13 10:23:42 -03:00
wmayer
920a4e62b2 add missing newlines 2018-06-09 11:47:12 +02:00