Commit Graph

3229 Commits

Author SHA1 Message Date
mwganson
1ced63d0d8 [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
wmayer
a614b44fcd Fix compiler warning [-Wmisleading-indentation] 2024-10-22 22:57:29 -05:00
wmayer
14cd061809 Part: Use Base::toRadians to convert degree to radian 2024-10-22 22:37:01 -05:00
Yorik van Havre
0b0bb18323 Revert "Horrible hack to work around bug in OCCT7.7.2"
This reverts commit 60640fa441.
2024-10-22 13:27:55 +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
David Carter
0804d80ebf Materials: Child ignoring parent material
Inherit the material from the parent object when creating a new object,
such as during a boolean operation, or when extruding a sketch.

fixes #15503
2024-10-21 18:20:20 +02:00
PaddleStroke
4528a05113 Fix datum not being cancelled 2024-10-21 17:56:48 +02:00
wmayer
990b9b27fe Part/PD: Fix cone creation if both radii are equal
The cone features in Part and PartDesign automatically create a cylinder if top and bottom radius are identical. However, the algorithm
ignores the angle and always creates a full cylinder.
2024-10-21 17:53:25 +02:00
Yorik van Havre
59302609ec Merge pull request #17214 from AIRCAP/debugTolerance
Add features to investigate and debug the effect of Tolerance on FreeCAD features - and the effect of FreeCAD features on tolerance
2024-10-21 17:45:21 +02:00
Yorik van Havre
e8fc9cf45f crowdin translations 2024-10-14 17:56:08 +02:00
Yorik van Havre
6c08b5a63c updated ts files 2024-10-14 17:56:08 +02:00
wmayer
8711ae90c6 Part: Fix XML output of PropertyGeometryList::Save
Write all XML attributes of the Geometry element into a single line.

Currently the XML output looks:
                        <Geometry type="Part::GeomLineSegment"
 id="-1" migrated="1">

With the fix it will be:
                        <Geometry type="Part::GeomLineSegment" id="-1" migrated="1">
2024-10-14 09:07:46 -05:00
Eric Price
42dde995db Added new Feature to force-set Tolerance on a part 2024-10-12 19:47:15 +02:00
Eric Price
7283ba5429 Add very basic tolerance Information to GeometryCheck 2024-10-12 18:42:07 +02:00
Eric Price
1d4918ba70 disable tesselation limit in ViewProviderGUI to prevent large parts from freezing FreeCAD 2024-10-12 18:41:23 +02:00
wmayer
9bfa461520 Core: Check returned pointer of convertSWIGPointerObj 2024-10-10 20:36:03 -05:00
PaddleStroke
12c6fc2920 Core: Fix #7580 (#17013)
Fixes several undo/redo issues with the attachment dialog
2024-10-08 10:21:08 +02:00
mwganson
a836e0d656 [Part Workbench] Fix issue with Sketcher_NewSketch icon moving on changing back to workbench 2024-10-07 10:52:48 -05:00
David Carter
d876e18808 Materials: Correct DiffuseColor custom attribute
Custom attributes were modified to maintain the behaviour of setting
transparencies using the DiffuseColor alpha channels
2024-10-02 20:35:09 -06:00
mwganson
59be5b1757 [Part CheckGeometry] prevent crash when attempting to check origin axis 2024-09-30 18:19:11 +02:00
Eric Price
9ee2c74545 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
chris
6be69ac576 issue #15329 add missing include to resolve build error 2024-09-24 19:08:45 -05:00
Yorik van Havre
abd5c3ca31 Translations (#16754)
* Updated ts files

* merged crowdin translations

* [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-09-23 14:09:56 -04:00
Florian Foinant-Willig
22fbfeddc2 [PD] Fix Pad uptoshape and add unit test 2024-09-22 17:22:36 -05:00
David Carter
84b0109ad2 Materials: Set transparency from DiffuseColor
Migrate the transparency from the DiffuseColor alpha channel to the
transparency color attribute. This allows the alpha channel to be
used as designed

fixes #14938
2024-09-21 10:35:28 -05:00
Chris Hennes
f07cb77bd7 Merge pull request #16613 from theosib/main
Filter out infinite objects from Part Loft and Sweep
2024-09-20 08:17:41 -05:00
bgbsww
c5d10cf236 Match Ruled Surface behavior to prior versions 2024-09-20 08:09:11 -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
Yorik van Havre
56dbb6532a Translations (#16582)
* updated ts files

* merged crowdin translations

* [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-09-19 09:36:54 +02:00
theosib
ad98d729b9 Filter out infinite shapes from Sweep available surfaces 2024-09-17 15:13:30 -04:00
theosib
a70d25b65e Filter out infinite shapes from Loft available shapes 2024-09-17 15:12:34 -04:00
hlorus
ab031bc92c Measure: Use getGlobalPlacement method (#16251)
* Initial commit to apply delta also for interactive measurement

* Not required special logic to check if possible, it can be easily checked if the property exists

* remember setting so it is not required to turn it always on

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

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

* Measure: Use getGlobalPlacement method

Fixes #16058

---------

Co-authored-by: Martin Marmsoler <martin.marmsoler@gmail.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-09-16 18:05:21 +02:00
bgbsww
0f53f2195d Add override flag for recomputes; set it in relevant tests with old files. 2024-09-16 17:49:35 +02:00
bgbsww
a54f03f666 Move code for recompute dialog and disable warning 2024-09-16 17:49:35 +02:00
wmayer
86806cb353 Port: Include changes of FreeBSD port 2024-09-13 08:31:54 -05:00
Yorik van Havre
7b3eca8396 Translations (#16389)
* Translations: Updated ts files

* Translations: Merged crowdin translations

* [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-09-09 18:25:52 +02:00
PaddleStroke
4d5fa15d24 Test: remove unecessary toggle that is failing the test 2024-09-03 18:17:01 +02:00
Álvaro González Vila
a6980be400 add BOPFeatures to BOPTools __init__.py 2024-09-02 18:11:28 +02:00
CalligaroV
ac253463c1 Applied review hints
Signed-off-by: CalligaroV <vincenzo.calligaro@gmail.com>
2024-09-02 18:05:42 +02:00
Zheng, Lei
c6dc482f02 Part/Toponaming: import code for TopoShape::prepareProfiles() from LS3
* import code
2024-09-02 18:05:42 +02:00
CalligaroV
bb86ed3206 Part/Toponaming: import code for TopoShape::prepareProfiles() from LS3
* add test for issue #15735

Signed-off-by: CalligaroV <vincenzo.calligaro@gmail.com>
2024-09-02 18:05:42 +02:00
bgbsww
3a6f70946a Fix #16013 (#16090)
* Fix #16013

* Fix #16013
2024-09-02 18:00:47 +02:00
bgbsww
24bb499c1f Cleanup element map in Revolution and add test (#15959) 2024-09-02 17:59:44 +02:00
bgbsww
2a541c9536 Toponaming: Remove remaining FC_USE_TNP_FIX defines 2024-08-31 13:21:10 -05:00
Florian Foinant-Willig
80c1ad4a0a [PD] Fix Pad a Plane attached Sketch upto a Plane (#16056) 2024-08-31 13:09:39 -05:00
Chris Hennes
0524288117 Merge pull request #16129 from FEA-eng/compound_merge_tip
Fix incorrect Compound merge tip
2024-08-31 11:41:12 -05:00
FEA-eng
1e82a35024 Part: Update DlgImportStep.ui 2024-08-29 10:05:33 +02:00
Yorik van Havre
b065691032 Merged crowdin translations 2024-08-28 17:51:34 +02:00
Yorik van Havre
5df158352a Updated ts files 2024-08-28 17:50:59 +02:00
wmayer
3e33f184b4 Core: Rename ViewProviderPythonFeature to ViewProviderFeaturePython
Fixes #15888
2024-08-26 18:14:22 +02:00