Commit Graph

64 Commits

Author SHA1 Message Date
Chris Hennes
9e042ff480 PD: Improve error handling for RevolMethod::ToFirst 2026-02-13 17:48:13 +01:00
ᴩʜᴏɴᴇᴅʀᴏɪᴅ
8af563804c SPDX [ 49 ][ Src / Mod / PartDesign ] (#26715) 2026-02-07 22:53:31 -06:00
horseDeveloper
4892154faf Fixing Leftover references from migration from freecadweb.org (#26163) 2025-12-26 11:11:12 -06:00
pre-commit-ci[bot]
25c3ba7338 All: Reformat according to new standard 2025-11-11 13:49:01 +01:00
wmayer
df5c75d6b0 PD: Improve groove feature
The only difference between groove and revolution is that for the former
the revolved face is removed from the base shape instead of added.

Thus, the code of the Revolution and Groove classes should be almost
identical. This allows it in a further step to refactor the code and
make a common base class.

This fixes issue 18842.
2025-09-26 23:46:25 +02:00
Markus Reitböck
5b6a0b1852 PartDesign: use CMake to generate precompiled headers on all platforms
"Professional CMake" book suggest the following:

"Targets should build successfully with or without compiler support for precompiled headers. It
 should be considered an optimization, not a requirement. In particular, do not explicitly include a
 precompile header (e.g. stdafx.h) in the source code, let CMake force-include an automatically
 generated precompile header on the compiler command line instead. This is more portable across
 the major compilers and is likely to be easier to maintain. It will also avoid warnings being
 generated from certain code checking tools like iwyu (include what you use)."

Therefore, removed the "#include <PreCompiled.h>" from sources, also
there is no need for the "#ifdef _PreComp_" anymore
2025-09-23 22:39:36 +02:00
FEA-eng
b9efb481a2 PartDesign: Correct typo in multiple solids error (#23642)
* PartDesign: Update FeatureFillet.cpp

* PartDesign: Update FeaturePipe.cpp

* PartDesign: Update FeatureLoft.cpp

* PartDesign: Update FeatureExtrude.cpp

* PartDesign: Update FeatureGroove.cpp

* PartDesign: Update FeatureBoolean.cpp

* PartDesign: Update FeatureChamfer.cpp

* PartDesign: Update FeatureHole.cpp

* PartDesign: Update FeatureDraft.cpp

* PartDesign: Update FeatureRevolution.cpp

* PartDesign: Remove empty lines added by GitHub editor

* PartDesign: Remove empty lines added by GitHub editor

* PartDesign: Remove empty lines added by GitHub editor

* PartDesign: Remove empty lines added by GitHub editor

* PartDesign: Remove empty lines added by GitHub editor

* PartDesign: Remove empty lines added by GitHub editor

* PartDesign: Remove empty lines added by GitHub editor

* PartDesign: Remove empty lines added by GitHub editor

* PartDesign: Remove empty lines added by GitHub editor
2025-09-04 14:36:15 +00:00
FEA-eng
b7c233b94e PartDesign: Update error message about multiple solids (#23286) 2025-08-22 18:29:50 +00:00
wmayer
eb52dd4a9a PD: Fix regression about single-solid check
For several PD features the single-solid check fails. The regression
is caused by PR 13960 and reported as issue 19002. The reason for the
failure is that the first solid of the output shape is retrieved and
then checked for a single solid. This test will always pass, of course.

The single-solid is fixed for these features:
* Pad
* Pocket (never worked there)
* Fillet
* Chamfer
* Groove (never worked there)
* Revolution (never worked there)
* Loft

Fixes: 935bdf9a0f ("PartDesign: Refactor single-solid rule enforcement")
2025-06-25 00:09:33 +02:00
Benjamin Nauck
98876d070d PartDesign: Use std::numeric_limits and std::numbers instead of defines 2025-03-29 13:32:38 +01:00
Chris Hennes
a56756d814 PD: Add onlyHaveRefined() to FeatureRefine 2025-02-07 21:44:43 -06:00
Florian Foinant-Willig
70184ba59d PartDesign: decouple refine and other geometric computation (#17008) 2024-12-02 10:57:30 -06:00
mwganson
dbc91b393c [PartDesign Groove/Revolution] minor dialog improvements, addresses issue #13298 2024-10-27 12:12:36 +01:00
Eric Price
cf8ad66373 Fix boolean operations (#17119)
* add BRepAlgoAPI wrapper files to CMakeList

* introduce wrapper for BRepAlgoAPI_BooleanOperation and derivatives, set sensible default Fuzzyness for boolean operations

* allow default fuzzyness to be set in settings - including off

* backwards compatibility with OCCT 7.3.3 - removed newer paramateres from wrapper

* added missing header

* reverted src/Mod/Part/App/OpenCascadeAll.h to original state

* implement some changes suggested by @wwmayer

* removed unneeded destructor definitions

* moved getDefaultFuzzyValue into its own helper class

* removed unneeded references to base class default constructor

* default to SetRunParallel(Standard_True) as suggested by @FlachyJoe

* fixed license header as requested

* Added new method to autocalculate fuzzyness to BooleanOperation base class and use it for those parts that do not call the obsolete constructor but also do not set precision

* implemented static variable solution as suggested by @wwmayer

* added helix for test case

* Refactoring FCRepAlgoAPI to FCBRepAlgoAPI

* Added Test Case (fuse cylinder with helix with different working and non-working Fuzzy values)

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* increased default value of FuzzyBoolean and made tests more robust for compatibility with OCCT 7.3

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* fixes for FREECAD_USE_PCH - allow testing of FREECAD_USE_PCH on linux with cmake switch (default OFF)

* removed surplus line - wasn't needed after all

* included precompiled as instructed

* set anti-corruption flag in boolean operations, ensures source shape is not damaged in OCCT 7.1 and higher

* fix #17085

* disable subtests that were too specific for now

* fixed all CLI tests - see comments in Pull Request https://github.com/FreeCAD/FreeCAD/pull/17119#issuecomment-2420772452

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

suggested updated test by CalligaroV

Co-authored-by: Vincenzo Calligaro <vincenzo.calligaro@gmail.com>

* Update tests/src/Mod/Part/App/TopoShapeExpansion.cpp

suggested updated test by CalligaroV

Co-authored-by: Vincenzo Calligaro <vincenzo.calligaro@gmail.com>

* Update tests/src/Mod/Part/App/TopoShapeExpansion.cpp

suggested updated test by CalligaroV

Co-authored-by: Vincenzo Calligaro <vincenzo.calligaro@gmail.com>

* Update tests/src/Mod/Part/App/TopoShapeExpansion.cpp

suggested updated test by CalligaroV

Co-authored-by: Vincenzo Calligaro <vincenzo.calligaro@gmail.com>

* Update tests/src/Mod/Part/App/TopoShapeExpansion.cpp

suggested updated test by CalligaroV

Co-authored-by: Vincenzo Calligaro <vincenzo.calligaro@gmail.com>

* Update tests/src/Mod/Part/App/TopoShapeExpansion.cpp

suggested updated test by CalligaroV

Co-authored-by: Vincenzo Calligaro <vincenzo.calligaro@gmail.com>

* Update tests/src/Mod/Part/App/TopoShapeExpansion.cpp

suggested updated test by CalligaroV

Co-authored-by: Vincenzo Calligaro <vincenzo.calligaro@gmail.com>

* Update tests/src/Mod/Part/App/TopoShapeExpansion.cpp

suggested updated test by CalligaroV

Co-authored-by: Vincenzo Calligaro <vincenzo.calligaro@gmail.com>

* Update tests/src/Mod/Part/App/TopoShapeExpansion.cpp

suggested updated test by CalligaroV

Co-authored-by: Vincenzo Calligaro <vincenzo.calligaro@gmail.com>

* Update tests/src/Mod/Part/App/TopoShapeExpansion.cpp

suggested updated test by CalligaroV

Co-authored-by: Vincenzo Calligaro <vincenzo.calligaro@gmail.com>

* Update tests/src/Mod/Part/App/TopoShapeExpansion.cpp

suggested updated test by CalligaroV

Co-authored-by: Vincenzo Calligaro <vincenzo.calligaro@gmail.com>

* Update tests/src/Mod/Part/App/TopoShapeExpansion.cpp

suggested updated test by CalligaroV

Co-authored-by: Vincenzo Calligaro <vincenzo.calligaro@gmail.com>

* Update tests/src/Mod/Part/App/TopoShapeExpansion.cpp

suggested updated test by CalligaroV

Co-authored-by: Vincenzo Calligaro <vincenzo.calligaro@gmail.com>

* Update tests/src/Mod/Part/App/TopoShapeExpansion.cpp

suggested updated test by CalligaroV

Co-authored-by: Vincenzo Calligaro <vincenzo.calligaro@gmail.com>

* Update tests/src/Mod/Part/App/TopoShapeExpansion.cpp

Co-authored-by: Vincenzo Calligaro <vincenzo.calligaro@gmail.com>

* remove surplus tests from github suggestion interface bug

* hide the BooleanFuzzy variable - can now be only set by manually editing the config file
i
in FCParamGroup "Boolean"
<FCFloat Name="BooleanFuzzy" Value="10.000000000000"/>

* Suggestion by @FlachyJoe - add validity checks to the base and tool shape in any direct boolean op

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Vincenzo Calligaro <vincenzo.calligaro@gmail.com>
2024-10-21 18:38:51 +02:00
bgbsww
ecf7e51ab3 Toponaming: Remove all FC_USE_TNP_FIX protected old code 2024-08-26 11:12:48 -05:00
bgbsww
12619b2c2d TopoNaming: restore defenses against multisolids when enabled 2024-05-21 21:42:05 -04:00
bgbsww
040502280f Toponaming: Cleanup verified face calls 2024-05-20 17:48:01 -05:00
Kacper Donat
935bdf9a0f 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
fa8f29aed4 Toponaming/Part: Fix all getBaseTopoShape calls. Tests and missing code. 2024-04-26 21:15:11 -05:00
Ajinkya Dahale
2ae3c82606 [PD] Support two-angle/up-to-face groove
Elements copied from revolution and pocket feature.
2023-11-14 00:20:20 +05:30
Chris Hennes
80b29d2dbf Gui: Minor translation fixes 2023-05-11 18:31:34 -05:00
Chris Hennes
1995d84edd PD: Add translation to error messages 2023-04-28 11:32:56 -05:00
luz paz
c726b69d7e PD: remove trailing whitespace 2022-11-10 10:32:04 +01:00
berniev
da9ebc572f Mod: redundant void 2 2022-08-08 10:27:50 +02:00
wmayer
3608ee7f51 PD: modernize C++11
* use nullptr
2022-03-23 19:26:14 +01:00
Uwe
4b08dd8142 [PD] Boolean to Groove: remove unused includes 2022-02-21 01:07:36 +01:00
wmayer
501c3dc657 PD: fix ProfileBased::getAxis
Introduce an enum to verify the axis depending on the used context.
* For helix no restriction is needed
* For Pad/Pocket the axis must not be parallel with the sketch plane
* For Revolve/Groove the axis must not be perpendicular with the sketch plane
2021-12-02 17:24:18 +01:00
wmayer
3694da3102 PD: [skip ci] fix angle checks for groove and revolution 2021-03-03 14:56:16 +01:00
wmayer
3e7429d163 PD: [skip ci] set angle constraints for groove 2021-03-03 14:55:19 +01:00
vocx-fc
0a445d9e5b PartDesign: replace unicode characters with simple hyphens 2020-06-03 14:51:01 +02:00
luz.paz
d38f18af23 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
563d020b67 improve error messages for Pocket, Hole and Groove feature 2018-12-31 18:30:13 +01:00
wmayer
7acdb56d92 Replace Base::Exception with appropriate subclass 2018-11-14 19:28:00 +01:00
wandererfan
2b84be64cc Fix spurious error message
-  in FeatureGroove, the check for multiple
   solids in result was checking the wrong
   variable.
2018-10-29 10:29:23 -03:00
wandererfan
7e781bcfd0 Revise multiple solids message 2018-07-13 10:23:42 -03:00
wandererfan
883a726d52 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
949c86d364 Port to occ7.2:
+ Standard_Failure::Caught() is now marked as deprecated and should be replaced with standard C++ exception handling
2017-09-01 16:27:46 +02:00
Peter Lama
a75a98ef27 Use OCCT Handle macro for Handle_ classes
This is the result of running OCCT's upgrade script provided
with OCCT 7.0. See
https://www.opencascade.com/content/freecad-occt710-and-windows-rtti-data-missing#comment-form
and
https://www.forum.freecadweb.org/viewtopic.php?f=4&t=21405&start=120#p169019
for why this is necessary for OCCT >= 7.1
2017-04-20 12:27:34 +02:00
Stefan Tröger
59803ffc67 Travis: Add SMESH7 dependencies for OSX 2016-06-15 22:34:10 +02:00
Stefan Tröger
83ce80f133 fixes #0002512 Allow multi-face part design tools 2016-05-18 23:54:18 +02:00
Stefan Tröger
f712f5e4ac PartDesign: Modeling features work with faces
-Rename Sketchbased to ProfileBased to show new behavior
-Adopt ProfileBased to make the relevant helper functions work with faces too
-Adopt features for unified use of helper functions
-Adopt commands to allow face selection
2016-04-12 18:12:22 +02:00
DeepSOIC
4b48362ec6 PartDesign: refactor positionBySketch
Rename it to positionByPrevious. Rewrite.
Rewrite SketchBased::transformPlacement.
2016-04-12 18:12:11 +02:00
DeepSOIC
03be8e1bba PartDesign: tidy up sketch support and base feature confusion
Not complete, transformPlacement and positionBySketch are pending...
2016-04-12 18:12:11 +02:00
Stefan Tröger
9a2f5eea65 allow non-sketch based additive and subtractive features 2016-04-12 18:12:06 +02:00
jrheinlaender
75dc92fd90 Enable edges and datum lines as rotation axis for Groove and Revolution features 2016-04-12 18:11:51 +02:00
jrheinlaender
f954a51430 Pad/Pocket: Allow extrude up to a datum plane 2016-04-12 18:11:50 +02:00
jrheinlaender
7d84c7e6f0 Made Pocket, Revolution and Groove aware of the SketchBased::BaseFeature property 2016-04-12 18:11:48 +02:00
jriegel
664c1d4862 Integrate Werners & Jans double branch
Move from float to double
Further suggestions for float -> double move
Moved Tools2D from float to double
More suggestions for float->double move from Gui subdirectory
Changes to FEM constraint visuals for float->double move
Suggested changes for float -> double move
Suggestions for Part module moving float -> double
2013-09-24 11:00:57 +02:00
wmayer
3cc032c11e + Add option to refine solid on sketch-based features 2013-09-21 09:16:44 +02:00
wmayer
ce0e6e5cef Make FeaturePython Python binding a template class to avoid code duplication 2013-03-22 00:34:18 +01:00