Commit Graph

70 Commits

Author SHA1 Message Date
wmayer
33c9fa7f71 PD: SubtractivePipe Fails
Fixes issue 18003
2025-09-26 23:45:20 +02:00
Markus Reitböck
88c6f176bb 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
a3f49489b8 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
513208f328 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
Max Wilfinger
ab5e9e0ded Fix source string mistakes reported on Crowdin (#23157)
* Fix source string mistakes reported on Crowdin

* Update src/Mod/Draft/Resources/ui/TaskPanel_CircularArray.ui

Co-authored-by: Roy-043 <70520633+Roy-043@users.noreply.github.com>

* Update src/Mod/Draft/Resources/ui/TaskPanel_CircularArray.ui

Co-authored-by: Roy-043 <70520633+Roy-043@users.noreply.github.com>

* Update src/Mod/Draft/draftfunctions/upgrade.py

Co-authored-by: Roy-043 <70520633+Roy-043@users.noreply.github.com>

* Update src/Mod/Draft/draftfunctions/upgrade.py

Co-authored-by: Roy-043 <70520633+Roy-043@users.noreply.github.com>

* Update src/Mod/Draft/draftguitools/gui_downgrade.py

Co-authored-by: Roy-043 <70520633+Roy-043@users.noreply.github.com>

* Update src/Mod/Draft/Resources/ui/TaskPanel_SetStyle.ui

Co-authored-by: Roy-043 <70520633+Roy-043@users.noreply.github.com>

---------

Co-authored-by: Roy-043 <70520633+Roy-043@users.noreply.github.com>
2025-08-24 20:51:32 -05:00
FEA-eng
80c110764c PartDesign: Update error message about multiple solids (#23286) 2025-08-22 18:29:50 +00:00
wmayer
7335c798d1 PD: Use isSingleSolidRuleSatisfied() for pipe feature
This fixes issue 18977

Fixes: 17ad40b2c9f0 ("PartDesign: Refactor single-solid rule enforcement")
2025-06-25 00:13:54 +02:00
bofdahof
ba2c2ca5ad Console: rename PascalCase named methods to camelCase 2025-05-06 17:50:21 +02:00
Syres916
b2fb84fb3a [PartDesign] Fix spelling of auxiliary and curvilinear…
…but also handle the properties name change from old files
2025-04-07 11:30:51 -05:00
Chris Hennes
150445b058 Merge branch 'main' of https://github.com/FreeCAD/FreeCAD into bgbsww-toponamingAddFeatureRefine 2025-02-11 20:58:58 -06:00
Chris Hennes
6edce0cafa PD: Add onlyHaveRefined() to FeatureRefine 2025-02-07 21:44:43 -06:00
Benjamin Nauck
6f535f19fb Prefer to use BaseClass's isDerivedFrom<T> over non template or Base::Type's
Regex based changes, manually verified
2025-01-27 16:08:18 +01:00
Florian Foinant-Willig
115667f73a PartDesign: decouple refine and other geometric computation (#17008) 2024-12-02 10:57:30 -06:00
Eric Price
aba60775f6 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
e4a509cc77 Toponaming: Remove all FC_USE_TNP_FIX protected old code 2024-08-26 11:12:48 -05:00
bgbsww
cfb4514df7 Toponaming: Update tests, implement missing subtractive operation tests,
fix helix and revolution
2024-07-30 09:12:58 -05: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
7961e82c66 Toponaming/Part: Fix all getBaseTopoShape calls. Tests and missing code. 2024-04-26 21:15:11 -05: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
Uwe
1b6e97066c [PD] FeaturePipe.cpp formatting fixes
- remove commented includes (once mistakenly added by me)
- also fix too long lines
2023-03-28 01:56:30 +02:00
berniev
f4ffd15864 Mod: redundant void 2 2022-08-08 10:27:50 +02:00
wmayer
d1d4b996e7 PD: modernize C++11
* use nullptr
2022-03-23 19:26:14 +01:00
Uwe
037b2796b3 [PD] Hole, Pipe and Revolution: remove unused includes 2022-02-19 18:47:26 +01:00
Ajinkya Dahale
5e3ad45ef4 [PD] Use compare to compare strings instead of substr
Used when finding subelements of a feature. Many of the comparisons used to also
check for string lengths, but as far as I can tell they are not strictly
necessary (see https://www.cplusplus.com/reference/string/string/substr/) and
just `substr` can be used without them. However, `compare` explicitly is for
comparing, and does not make a new object that `substr` does.
2021-11-28 22:05:46 +01:00
Ajinkya Dahale
2fcee8ea82 [PD] Support "punctual" sections for PD Pipe
Similar to PR #5170 for loft. This commit squashes the following commits.

[PD] Refactor `Pipe::execute` and support point sections

[PD] Allow point profile in selection-based pipe workflow

[PD] Only add sketch subs if it is vertex

[PD] Make both end faces of pipe regardless of point sections

Earlier we were checking if these faces correspond to point sections, but
apparently the end faces are independent of the order in which the sections are
added, so the "front" may be the face closest to the last added section, rather
than the "profile". Creating null faces and adding them for sewing together into
a solid does not appear to have side-effects so far.
2021-11-28 19:19:16 +01:00
Uwe
6db3337cd2 [PD] handle changed property for loft and pipe
- this was missing in PR #5155
2021-11-11 01:24:53 +01:00
Ajinkya Dahale
9cade40755 [PD] Support adding solid faces for loft and pipe sections
With these changes, one face per solid can be added as either the first
"profile" or subsequent sections in loft and pipe.

This commit depends on `App::PropertyXLinkSubList` preserving the order in which
sections are added.

A minor change this also adds is that when a solid's face is selected that face
is mentioned in the fields instead of the solid (eg `Box:Face1` instead of
`Box`).
2021-11-09 23:05:29 +01:00
luz paz
909030859d PD: Fix typo in function getContiniusEdges->getContinuousEdges
Related to PR #5029
2021-09-15 10:11:37 -04:00
David Osterberg
de5c8574d3 PartDesign: Fix small bugs in the Pipe feature
- Previously a subtractive pipe on a body with no solids would create a solid. Now Pipe will generate an error.
- Fix incorrect property header. Previously Pipe was identifying itself as Pad (copy paste error)
2021-01-18 17:38:15 +01:00
vosk
d667dd7102 [PartDesign]: Fix refine boolean not being obeyed at multiple places
Related to issue #3927
2021-01-07 14:04:31 +01:00
wmayer
141c3bca53 fixes #0004158: FreeCAD crashes when deleting spline [skip ci] 2020-01-03 14:24:53 +01:00
asapelkin
ced8100ab9 use emplace_back instead of push_back where justified 2019-11-21 14:48:09 +01:00
Abdullah Tahiri
7b0a501c0a PartDesign: 3rdParty to PCH 2019-05-02 07:12:27 +02: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
luz.paz
9167064fc1 Misc. typos
Found via `codespell`
2018-04-25 09:41:33 -03:00
luzpaz
35ec477426 More typos, grammar fixes, uniformity 2017-11-15 10:46:43 -05:00
Peter Lama
e972a3c444 Enable creating PD Sweep along closed path 2017-09-29 00:41:59 +02:00
wmayer
14f6de974b fix typos 2017-09-25 22:36:31 +02:00
wmayer
3370d20a0d fixes #0003146: Crash in PartDesign Sweep 2017-09-25 15:13:58 +02:00
wmayer
0d617f97d6 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
fa4bebf2e0 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
wmayer
86f515ba25 fix typos 2016-11-12 17:57:14 +01:00
DeepSOIC
c612745902 PartDesign: port to use FaceMaker
Minimalistic port. Only re-use code that was duplicate before.
2016-10-01 23:13:44 +03:00
wmayer
dd7c91ddcf fix -Wextra in PartDesign 2016-09-22 18:34:56 +02:00