Commit Graph

76 Commits

Author SHA1 Message Date
wmayer
4d80f3ec28 PD: Improve revolution feature
* Allow a minimum angle of 0.0 as this is needed in 'Two Angles' mode
* Set the default value of Angle2 to 0.0
* Check for valid input in 'Angle' and 'Two Angles' mode
* Replace the confusing enum labels 'Dimension' and 'TwoDimensions'
2025-09-26 23:45:53 +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
drwho495
c01b12044a PartDesign: Fix revolution's Toponaming support (#23342)
* PartDesign: Fix revolution's Toponming support

* fix test
2025-09-01 10:56:43 -05:00
captain0xff
6e896b1248 PartDesign: add interactive gizmos 2025-08-30 17:02:52 +02: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
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
Florian Foinant-Willig
3d5e4f7cd8 Fix revolution with ShapeBinder profile (#17489)
* Fix revolution with ShapeBinder profile

* Remove log level init

---------

Co-authored-by: Chris Hennes <chennes@pioneerlibrarysystem.org>
2024-11-11 17:48:18 +01: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
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
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
a348a1bc82 Toponaming: Update tests, implement missing subtractive operation tests,
fix helix and revolution
2024-07-30 09:12:58 -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
ffad1e0c34 Mod: Fix several compiler warnings 2024-05-30 08:55:11 +02:00
bgbsww
040502280f Toponaming: Cleanup verified face calls 2024-05-20 17:48:01 -05:00
bgbsww
b72a8c4222 Toponaming: Bring in Chamfer, Fillet code and add tests (#14035)
* Toponaming: bring in missing code fragments in Sketcher

* Toponaming: Fix infinite recursion, remove debug cruft, rough in fillet test

* Bring in missing code; fix chamfers

* Toponaming: Add code for fillets and test
2024-05-15 19:43:30 -04:00
bgbsww
ad0cb61656 Toponaming/Part: unify revolution changes 2024-05-02 18:50:02 -05:00
bgbsww
fa8f29aed4 Toponaming/Part: Fix all getBaseTopoShape calls. Tests and missing code. 2024-04-26 21:15:11 -05:00
Ajinkya Dahale
4c80e567c6 [PD] Use enum class for revolution method 2023-11-14 00:20:20 +05:30
Ajinkya Dahale
0829c96549 [PD] Update revolution properties based on method 2023-11-14 00:20:20 +05:30
Ajinkya Dahale
7e09589942 [PD] Refactor FeatureRevolution further
New methods created to reduce size of `execute`.

Use BRepPrimAPI instead of BRepFeat whenever possible since otherwise there are
some limitations.
2023-11-14 00:20:19 +05:30
Ajinkya Dahale
6b1a1e1508 [PartDesign] Refactor mode support in revolution
Encodes support for "two angles".
Clarifies that up-to-first and up-to-last is not supported.
2023-11-14 00:20:19 +05:30
Ajinkya Dahale
b41e592441 [PartDesign] Add some dummy options for revolution
These options correspond to "up to face" and "2 angles". They are expected to do
nothing right now. However there is also some experimental code for "up to face"
in this commit, whose behavior is not confirmed.
2023-11-14 00:20:19 +05:30
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
7c8031d356 [PD] Hole, Pipe and Revolution: remove unused includes 2022-02-19 18:47:26 +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
donovaly
c0de42335b [PD] disallow angles <=0 for holes and revolution
neither the taper, drill or countersink angle can be zero or negative for a valid hole, thus set a constraint
2021-03-03 14:33:01 +01:00
wmayer
7acdb56d92 Replace Base::Exception with appropriate subclass 2018-11-14 19:28:00 +01: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
wmayer
371cb0fa2a fix compiler warning 2017-08-12 17:26:11 +02:00
Kurt Kremitzki
7c87549e4b Fix return type 2017-08-12 14:48:57 +02:00
Kurt Kremitzki
d29bed15d1 PDN: Add catch statements for Revolution perpendicular axis 2017-08-12 14:43:45 +02:00
Kurt Kremitzki
fdf66b3e88 PDN: Check both parallel and antiparallel cases before trying Revolve 2017-08-12 14:09:39 +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
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
b815656649 Refactored code of SketchBased features to have common code in an abstract superclass 2016-04-12 18:11:50 +02:00