Commit Graph

3262 Commits

Author SHA1 Message Date
bgbsww
5266a3b26d 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
wmayer
e51eef2195 Import: Fix of alpha channel misinterpretation 2024-12-09 12:00:15 -05:00
Kacper Donat
651cefde4d Gui: Use getObject<T>() helpers in classes
This commit is generated using regex based find and replace:

```
s/[\w:]+_cast\s*<([^>]+)\*>\s*\(\s*getObject\(\s*\)\)/getObject<$1>/
s/[\w:]+_cast\s*<([^>]+)\*>\s*\(\s*([^)]*)\s*->\s*getObject\(\s*\)\)/$2->getObject<$1>()/
```

To regenerate if needed.
2024-12-06 18:29:39 +01:00
Chris Hennes
b87bdc1f84 Merge pull request #18126 from Ondsel-Development/core_LCS2
Core datums : Card2 : Core implementation
2024-12-06 12:12:04 -05:00
Andrea
6d899e7d57 [Mod] clean JoinFeatures.py
Removed dead code
.
2024-12-06 11:55:09 -05:00
Ajinkya Dahale
05448b980a [Part] Avoid nullptr when using createArc
We could make `GeomCurve::createArc(...) = 0`, but then it needs to be
implemented in many subclasses which cannot be incomplete. It is implemented for
some of them, but others may need additional work (e.g. offsets), and would need
some exception throwing similar to what is now used.
2024-12-04 00:57:41 +05:30
Ajinkya Dahale
1453d5680a [Part] Add methods to create an arc of the curve 2024-12-04 00:57:40 +05:30
PaddleStroke
19702dcb21 Core: Add App::LocalCoordinateSystem.
Most of App::Origin is moved into this sub class of App::Origin.
Add App::Point. Change graphics of the planes/axis.
Remove scale-by-content behavior and make it fixed size on screen.
2024-11-26 17:36:02 +01:00
PaddleStroke
3e33cf61e5 Rename 'OriginFeature' to 'DatumElement' 2024-11-26 15:36:48 +01:00
PaddleStroke
3c1358da10 Core: Rename 'OriginFeature' file to 'Datums' 2024-11-26 15:36:48 +01:00
wmayer
c32628ec0d Part: Fix alpha <> transparency conversion 2024-11-25 12:05:25 -05:00
David Carter
89049add9e Materials: Physical property attributes
Add dynamic attributes to report the physical attributes of a part that
are automatically recalculaated when the shape or material changes.
These values are accessible from the part data display and as attributes
within Python
2024-11-25 18:00:29 +01:00
Syres916
c016e81a7f [Part] [Post 1.0] Preferences > Shape view > Maximum angle deflection warn user... (#16007)
* [Part] Preferences max angle deflection alert

* [Part] Comment added as requested
2024-11-25 10:50:58 -06:00
mwganson
a9554c2fe0 [Part CheckGeometry] add results entry for valid shapes without any errors, show skipped objects, add report view generator link in results panel label, addresses issue #17545 2024-11-22 12:22:01 -05:00
Chris Hennes
64f63ae97e Merge pull request #15528 from ppphp/move_some_inventor
refactor: move some nodes to Inventor folder
2024-11-22 12:20:50 -05:00
Kim Kirwan
a0e0713fef Repair XML Files - fixes #10730
In ../src/Mod/Part/App/Geom2d/ sixteen out of seventeen XML
files needed repair as per the GitHub issue. Tabbing in those
sixteen files set to 4-spaces no-tab-chars. Other minor
changes as needed.
2024-11-22 12:18:11 -05:00
wmayer
0e0df5b92e Part: move refine model parameter to separate function 2024-11-22 11:59:49 +01:00
wmayer
e299c46a94 Part: move model check to separate function
This is to avoid code duplication.
2024-11-22 11:59:49 +01:00
wmayer
ee18317e08 Part: Expose Geometry::isSame() to Python 2024-11-20 23:37:39 +01:00
luzpaz
ed40de3e23 Fix various typos
Found via codespell.
2024-11-15 20:18:46 +01:00
Max Wilfinger
616028efe5 Merge pull request #15957 from hasecilu/fix/capitalization
TechDraw: Fix capitalization of 2D and 3D
2024-11-15 18:37:47 +01:00
luzpaz
e2b67c19fc STEP: Rename generic Import/Export dialog title
Closes #16415
2024-11-15 18:36:09 +01:00
wmayer
ffa3fa5b5a Core: Extend Color API
* Fix issues with alpha value <> transparency
* Use type traits to convert between different color classes (fixes #14515)
2024-11-15 12:25:25 -05:00
FEA-eng
b9ca034261 Update Command.cpp 2024-11-15 11:56:46 -05:00
Eric Price
03cb520215 Part: bugfix #17468 recursively unpack compounds for boolean fuse (#17469)
* fix #17468  recursively unpack compounds for boolean fuse

* fix and into &&, add ctest case for multifuse with compounds and recursive compounds

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

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

* remove unneeded duplicated code - allow Part::Common to be created with a single object (compound or shape) - will result in Unity and possibly a warning message

* prevent endless loop in case of endless recursive compounds as suggested in chat

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

Co-authored-by: Benjamin Nauck <benjamin@nauck.se>

* implemented suggestion by wwmayer

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Benjamin Nauck <benjamin@nauck.se>
2024-11-11 17:51:56 +01:00
Eric Price
7680872e41 increase tolerance on helical shapes to avoid crash / broken geometry (#17356)
* increase tolerance on helical shapes to avoid crash

fix #17113
fix #9377
fix #11083

* added test cases for additive and subtractive helix

* fixed whitespace issue, reduced turncount for speed

* relaxed large scale testcases for OCCT 7.3 and below, work around windows CI error #17394

* Further reduce max size in test for buggy Ubuntu OCCT
2024-11-11 17:44:27 +01:00
Yorik van Havre
a9b4cb5611 Translations (#17725)
* 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-11-11 17:01:52 +01:00
wmayer
c3837a9849 Part: Handle exception in Feature::setMaterialAppearance 2024-11-09 10:23:17 -05:00
mwganson
7eb1d6bd79 [Part Booleans] fix issue with copying visuals when doing Part workbench booleans using App::Part objects, see https://forum.freecad.org/viewtopic.php?t=91813&sid=eea2494d6d02882c3be7df74d7e2b689 2024-11-04 18:02:36 +01:00
Eric Price
b7306d29e3 fix #17578 - RIP bgbsww , don't worry, we got this. 2024-10-30 18:11:43 -05:00
Eric Price
3897ec8b39 Updated Tolerance feature to optionally restrict maximum tolerance and repair shapes (#17421)
* Updated Tolerance feature to optionally restrict maximum tolerance and repair shapes (With Refine=True)

* implement suggestion by wwmayer
2024-10-28 17:18:15 +01:00
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