Commit Graph

62 Commits

Author SHA1 Message Date
pre-commit-ci[bot]
25c3ba7338 All: Reformat according to new standard 2025-11-11 13:49:01 +01:00
Chris Hennes
efbe579e25 Merge pull request #24333 from PaddleStroke/patch-83
PartDesign: Pocket Through all: Taper should be writable and offset hidden
2025-09-30 11:51:52 -05:00
Chris Hennes
2b1a3aedbe Merge pull request #23770 from PaddleStroke/patch-59
PartDesign: FeatureExtrude fix symmetric + custom dir
2025-09-30 08:55:18 -05:00
PaddleStroke
d52260b2f4 PartDesign: FeatureExtrude: Taper should not be read-only when throughall. 2025-09-30 10:17:36 +02:00
PaddleStroke
94750baa6b PartDesign: FeatureExtrude: single prism for modes that can 2025-09-29 13:24:55 +02:00
PaddleStroke
a01cab21cc PartDesign: FeatureExtrude: Make single prism if both modes are length and no taper 2025-09-29 09:33:53 +02:00
PaddleStroke
c384a52fa5 Feature Extrude: Make Length mode act as it did before. 2025-09-24 09:22:05 +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
PaddleStroke
aef10a1bc8 PartDesign: Extrude: Fix twoLength/uptoshape broken (#23812)
* PartDesign: Extrude: Fix twoLength/uptoshape broken

* Update FeaturePocket.cpp

* Update FeatureExtrude.cpp

* fix test
2025-09-10 19:12:02 +02:00
PaddleStroke
02479a1528 PartDesign: FeatureExtrude fix symmetric + custom dir 2025-09-09 15:25:00 +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
luzpaz
25a94705bd PartDesign: remove trailing whitespace
Removed from src/Mod/PartDesign/App/FeatureExtrude.cpp
2025-08-30 21:53:58 -05:00
PaddleStroke
7d3dd2605f PartDesign: Fix symmetric regression & LengthAlongSketchNormal (#23418)
* PartDesign: Fix symmetric regression

* to squash

* Fix LengthAlongSketchNormal not working

* to squash

* Fix checkbox not initially visible
2025-08-29 10:03:16 +02:00
FEA-eng
0bf22ffca8 PartDesign: Update missed error message about multiple solids (#23392)
* PartDesign: Update FeatureLoft.cpp

* PartDesign: Update FeatureExtrude.cpp

* PartDesign: Update FeaturePipe.cpp

* PartDesign: Remove empty lines added by GitHub editor

* PartDesign: Remove empty lines added by GitHub editor
2025-08-27 09:37:53 +00:00
PaddleStroke
a346c266e7 PartDesign: Extrude 2 sides (#21794)
* PartDesign: extrude 2 sides

* Part: OpCodes XOR

* PartDesign: Remove deprecated generatePrism functions

* PartDesign: Extrude : Update Sides combobox strings

* Change "Sides" to "Mode"

* Use OpCodes::Extrude instead of Prism.
2025-08-25 17:17:23 +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
theo-vt
13e7952ccc PartDesign: Fix hole centered on point edge case (#21257)
* Light refactor of getTopoShape function

* Fix hole edge case

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

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

* Update src/Mod/Part/App/PartFeature.cpp

Co-authored-by: Kacper Donat <kadet1090@gmail.com>

* Update src/Mod/Part/App/PartFeature.cpp

Co-authored-by: Kacper Donat <kadet1090@gmail.com>

* Update src/Mod/Part/App/PartFeature.cpp

Co-authored-by: Kacper Donat <kadet1090@gmail.com>

* Update src/Mod/Part/App/PartFeature.cpp

Co-authored-by: Kacper Donat <kadet1090@gmail.com>

* Refactor simplifyCompound()

* Use Base::Flags<GetShapeOption>

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

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

* Shorten enum name and move it from class scope to namespace scope

* [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>
Co-authored-by: Kacper Donat <kadet1090@gmail.com>
2025-05-29 22:37:54 +02:00
Benjamin Nauck
f932c7e4e0 Use Base::toRadians() instead of manually converting 2025-04-15 07:16:36 +02:00
Benjamin Nauck
65a0fb0ed4 PartDesign: Add #include <limits> where used 2025-03-31 23:52:18 +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
wmayer
00f6fbeaa3 PD: Fix possible crash in up to shape 2024-12-13 12:15:49 -05:00
Florian Foinant-Willig
70184ba59d PartDesign: decouple refine and other geometric computation (#17008) 2024-12-02 10:57:30 -06:00
wmayer
aea09d4a45 MSVC: Fix compiler warnings 2024-11-22 16:53:00 +01:00
Kacper Donat
e5b2d8c874 PD: Fix TwoLengths and Midplane both enabled
This scenario makes no sense, so it is removed from the code.
2024-10-23 21:16:57 +02: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
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
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
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
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
Florian Foinant-Willig
309dd6e30d PD Extrude up to multiple faces or shape 2024-06-03 11:26:19 -05:00
bgbsww
12619b2c2d TopoNaming: restore defenses against multisolids when enabled 2024-05-21 21:42:05 -04: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
wmayer
56f84c8042 Fix various compiler warnings:
* fix -Wunused-parameter
* fix -Wunused-function
* fix -Wunused-private-field
* fix -Wunused-variable
* fix -Winconsistent-missing-override
2024-04-30 16:59:31 +02:00
bgbsww
a4dd600ec6 Toponaming/Part: Fix hashing, hasher mismatches, and adjust test results to match 2024-04-15 23:00:27 -05:00
bgbsww
a88e7baff5 TopoShape/Part: Bug fixes; pass Hasher parms, OCCT 7.8 compatibility, ElementMaps correct item count 2024-04-14 13:56:07 -04:00
Zheng, Lei
6c6dce236d Bring in missing code 2024-04-11 18:20:26 -04:00
bgbsww
c9d8bdf13d Toponaming/Part: Add deprecation comments, clean up code 2024-04-09 21:17:08 -04:00
Zheng, Lei
82c3e107d7 TopoShape/Part: Bring in PartDesign dependencies 2024-04-09 21:17:08 -04:00
Florian Foinant-Willig
2010268187 PartDesign_Pad: add an up to shape mode 2023-11-12 20:06:57 +01:00
wmayer
ca1cb21498 PD: modernize C++: use equals default 2023-08-22 13:31:17 +02:00
Florian Foinant-Willig
b80c960077 PartDesign: Fix uptolast ends too soon 2023-08-21 11:14:24 -05:00
wmayer
9a1f8a11d6 PD: modernize C++: use range-based for loop 2023-08-16 21:54:56 -05:00
wmayer
2a88c7c7df modernize C++: use bool literals 2023-08-06 01:35:39 +02:00
luzpaz
129d5882a7 Migrate domain name from freecadweb to freecad (#9352)
* Migrate domain name from freecadweb to freecad
* Migrate src/Mod/Material files
* Migrate Stylesheet related files
* Migrate *.svg files
* Migrate miscellaneous files
* Migrate some build files
* Migrate recently added TD AR_IRAM template files

Closes #6415
2023-04-24 15:19:20 -05:00
adrianinsaval
0e22ada9dd [PD Pad/Pocket] Fix bug with midplane usage in TwoLengths mode (#7216)
* [PD Pad/Pocket] Fix bug with midplane usage in TwoLengths mode
2022-07-20 03:13:01 +02:00
Uwe
43f289f27a [PD] [skip CI] FeatureExtrude.cpp: fix a comment 2022-07-19 03:30:48 +02:00
Uwe
a8d01fa6c6 [PD] add parameter enabling logic for pad/pocket
- currently all parameters are always enabled and thus can lead to errors like the one reported here:
https://forum.freecadweb.org/viewtopic.php?f=3&t=70266
2022-07-18 00:26:15 +02:00
Uwe
4b08dd8142 [PD] Boolean to Groove: remove unused includes 2022-02-21 01:07:36 +01:00