Commit Graph

148 Commits

Author SHA1 Message Date
Chris Hennes
ec050db9a8 Merge pull request #18791 from CalligaroV/toponaming-ElementMapVersion-code-from-LS3
[Toponaming] Import code releted to _ElementMapVersion from LS3
2025-02-14 10:54:38 -06:00
Chris Hennes
334cc2f6b9 Part(toponaming): Remove support for OCCT 6.x 2025-02-14 10:54:13 -06:00
Chris Hennes
79fd880ed2 Part: Add comment explaining element map version string 2025-02-12 14:19:37 -06:00
mwganson
89f307b7a2 [Part TopoShapeExpansion] move shape transform from make element copy into ruled surface function since it does not work well when copying vertex objects 2025-02-03 18:17:14 +01: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
Zheng, Lei
2addda9126 Toponaming: import code related to ElementMapVersion from LS3
*Imported original code
2025-01-03 14:15:19 +01:00
Kacper Donat
7e9fa4de99 TopoNaming: Refine - mark joined faces as modified not generated
This is parity change with LS3: a9810d509a/src/Mod/Part/App/TopoShapeEx.cpp (L3357)
2024-12-13 11:41:29 -05:00
wmayer
22a5db1ee9 Part: Fix compiler warnings [-Wodr]
Type 'struct EdgePoints' violates the C++ One Definition Rule because it's defined in two different translation units
2024-12-13 09:24:19 -05:00
bgbsww
9566f06683 Toponaming: Add a plane matching based heuristic to TNP mitigation (#16803)
* Add a plane matching based heuristic to TNP mitigation

* Improve comments, add test
2024-12-09 11:06:02 -06:00
mwganson
ab4e812277 [Part RuledSurface] fix issue where ruled surface is failing if both edges are from same object and the object is not at the identity placement, addresses issue #17235 2024-10-25 09:58:47 -05: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
Eric Price
4c0c7fc84b Do not allow loft where the segment shapes are too close ( fix #5855 )
A loft or pocket only makes sense if the segments used for it have some minimum separation. Having the shapes identical causes segfaults in OCCT

Checking for CoG is a hack. Identical shapes have identical CoG - but an identical CoG does not necessarily mean identical shapes - however it can be argued that a shape that is not offset at least somewhat in the direction of the loft doesnt make a valid shape for a loft (it will typically freeze OCCT instead of crashing it) and a sufficiently suitable shape will have a different CoG

throwing the exception will make it easy to identify if there ever is a case where this is a bad thing - and exceptions are better than segfaults.
2024-09-30 17:58:13 +02:00
Florian Foinant-Willig
8161537def [PD] Fix Pad uptoshape and add unit test 2024-09-22 17:22:36 -05:00
bgbsww
99cdc19b50 Match Ruled Surface behavior to prior versions 2024-09-20 08:09:11 -05:00
Florian Foinant-Willig
e157f0616a [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
Zheng, Lei
c68d7edffc Part/Toponaming: import code for TopoShape::prepareProfiles() from LS3
* import code
2024-09-02 18:05:42 +02:00
bgbsww
891f012264 Fix #16013 (#16090)
* Fix #16013

* Fix #16013
2024-09-02 18:00:47 +02:00
bgbsww
d1ac4551aa Cleanup element map in Revolution and add test (#15959) 2024-09-02 17:59:44 +02:00
bgbsww
608c80b5a3 Toponaming: Remove remaining FC_USE_TNP_FIX defines 2024-08-31 13:21:10 -05:00
Florian Foinant-Willig
fad86f4fbc [PD] Fix Pad a Plane attached Sketch upto a Plane (#16056) 2024-08-31 13:09:39 -05:00
bgbsww
e4a509cc77 Toponaming: Remove all FC_USE_TNP_FIX protected old code 2024-08-26 11:12:48 -05:00
bgbsww
07d84d8a6e Toponaming: Match findSubShapesWithSharedVertex exception suppression 2024-08-12 11:59:08 -04:00
bgbsww
959fa6b628 Toponaming: Refactor out duplicated code using elementMap() 2024-08-10 10:47:01 -04:00
bgbsww
a0b44f8405 Toponaming: Fix PropertyTopoShape restore; tweak Loft test; missing TopoShape method. 2024-08-07 20:31:21 -05:00
bgbsww
9f2210313d Toponaming: Tests, cleanup, and fix axis drawing 2024-07-26 11:49:56 -04:00
bgbsww
1eda66dfd8 Cleanup, format 2024-07-24 16:41:15 -04:00
Zheng, Lei
38269241e6 Toponaming: Transfer in getHigherElement 2024-07-24 15:10:42 -04:00
bgbsww
077f3b3ab4 Toponaming: Clean code, apply remark recommendations and Tweak tests 2024-07-22 12:55:23 -04:00
Zheng, Lei
62d1c300fb Toponaming: Bring in composite shapes for findSubshapesWithSharedVertex ( searchSubShape ) 2024-07-22 12:51:25 -04:00
bgbsww
ae6f7f25e8 Toponaming: Missing suppress property and code 2024-07-15 09:38:13 -05:00
Chris Hennes
1c86a60877 Switch back to emplace_back 2024-06-26 10:46:36 -05:00
Zheng, Lei
f28d8a6a05 Part/Toponaming: makeElementWires
* restored original definitions of makeElementWires methods
2024-06-26 10:46:36 -05:00
mosfet80
5f38b52114 [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
Florian Foinant-Willig
7ffddb6f7d PD Extrude up to multiple faces or shape 2024-06-03 11:26:19 -05:00
wmayer
3e23bd759b Mod: Fix several compiler warnings 2024-05-30 08:55:11 +02:00
bgbsww
60ef70b81e Toponaming used mapped index to find shape. fix #14194 2024-05-23 23:48:34 -05:00
bgbsww
5054cace46 Rework makeElementChamfer to match current parms, and add PartDesign code for Chamfers 2024-05-12 13:28:20 -05:00
bgbsww
3ee0530ac2 Toponaming/Part: Fix fillet/pad bug, add tests 2024-05-07 09:40:48 -04:00
bgbsww
20cae6c026 Toponaming/Part: unify revolution changes 2024-05-02 18:50:02 -05:00
bgbsww
7961e82c66 Toponaming/Part: Fix all getBaseTopoShape calls. Tests and missing code. 2024-04-26 21:15:11 -05:00
Chris Hennes
b985f6339e Base/Toponaming: Correct string hasher output 2024-04-18 13:25:57 -05:00
bgbsww
0d8631973e Toponaming/Part: Fix hashing, hasher mismatches, and adjust test results to match 2024-04-15 23:00:27 -05:00
bgbsww
459644be31 TopoShape/Part: Bug fixes; pass Hasher parms, OCCT 7.8 compatibility, ElementMaps correct item count 2024-04-14 13:56:07 -04:00
bgbsww
9ebb23f234 Toponaming/Part: Initialize the hasher so that it operates 2024-04-13 22:41:57 -05:00
bgbsww
942ebd58f0 Toponaming/Part: Add deprecation comments, clean up code 2024-04-09 21:17:08 -04:00
Zheng, Lei
231a638fc7 TopoShape/Part: Bring in PartDesign dependencies 2024-04-09 21:17:08 -04:00
bgbsww
7c812105ee Toposhape/Part: Cleanup FeatureFillet, FeatureChamfer and dependencies 2024-03-19 11:10:18 -04:00
Zheng, Lei
5da174f46e Toposhape/Part: Transfer in FeatureFillet, FeatureChamfer and dependencies 2024-03-18 22:05:25 -04:00
luzpaz
65cdbe3e89 Fix various typos throughout the codebase (#13029)
* Fix various typos throughout the codebase

* [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>
2024-03-18 16:54:30 -05:00
bgbsww
a27e91a272 Toposhape/Part: clean and add tests 2024-03-17 10:24:58 -04:00