Commit Graph

555 Commits

Author SHA1 Message Date
Ajinkya Dahale
4cc21e26e1 [Sketcher] Refactor SketchObject::delGeometry()
Just dropped cognitive complexity to 25.
2024-12-04 00:57:40 +05:30
Ajinkya Dahale
5f86d7f5a8 [Sketcher] Refactor SketchObject::getPoint()
...to reduce cognitive complexity.

Use templates to break longer functions. Also makes it possible to avoid
repetition of type-checking logic.
2024-12-04 00:57:39 +05:30
PaddleStroke
0e5e071d72 Sketcher: Intersection externals 2024-11-29 11:36:55 -05:00
PaddleStroke
f3c79302c4 Sketcher: Defining External geos. 2024-11-29 11:36:55 -05:00
PaddleStroke
1c514f5a15 External geos : Enable face selection 2024-11-29 11:36:55 -05:00
PaddleStroke
89fcfe95ee Sketcher: Offset & tranforms: enable external geos input. (#17615)
* Sketcher: Offset & tranforms: enable external geos input.
* Sketcher: enable delGeometries to handle external geos.
2024-11-25 10:57:16 -06:00
wmayer
aea09d4a45 MSVC: Fix compiler warnings 2024-11-22 16:53:00 +01:00
Syres916
08b9411e15 [Sketcher] Assist user in finding the sketch with the error 2024-11-15 12:15:59 -05:00
wmayer
837d088f3e Fix compiler warnings 2024-10-26 00:48:04 +02:00
PaddleStroke
336dda316d Sketcher: Symmetric: Do not copy names of constraints (#17433)
* Sketcher: Symmetric: Do not copy names of constraints

* Sketcher: Symmetric : Fix https://github.com/FreeCAD/FreeCAD/issues/17442
2024-10-24 22:58:51 -05: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
Jiří Pinkava
ca9b556ec0 Sketch: refactor GeoHistory 2024-10-21 17:41:54 +02:00
wmayer
d2637ec881 Sketch: Fix creating the shape of a sketch
SketchObject::buildShape() used the geometries as they were created by the user. However, they are not accurate enough in order
to create a closed wire. Instead the geometries after running the solver must be used because they are guaranteed to be accurate.
2024-10-15 23:21:21 -05:00
bgbsww
837920f378 Match LS3 opcodes for sketch shape 2024-09-23 17:45:32 +02:00
bgbsww
27ca64a201 Sketcher: Do not consider missing external geometry to be an error (#16590)
* Do not consider missing external geometry to be an error; highlight in conflict color.
2024-09-18 15:18:11 -05:00
Jiří Pinkava
89ac26e711 Sketcher: initialize geometry history limit variable (#16337)
* Sketcher: initialize geometry history limit variable

The variable seems to be uninitialized, valgrind complais about it.

The `git grep geoHistoryLevel` and the code ispection suggest it is never set.
If initialized to zero, most of the related code is never used, which
can point to the fact there is either another bug or the code is unused.

The variable was introduced in 42bf92ad12.

* Sketcher: Default geoHistoryLevel to 1

---------

Co-authored-by: Chris Hennes <chennes@pioneerlibrarysystem.org>
2024-09-16 17:41:12 +02:00
Chris Hennes
4ca08595ad Merge pull request #16355 from CalligaroV/Sketcher-checkSubName-from-LS3
Sketcher/Toponaming: import SketchObject::checkSubName() from LS3
2024-09-12 21:11:39 -05:00
Morimiue
62460a0334 Sketcher: transfer constraints on conic's mid point to the newly created conic arc (e.g. ellipse arc)" -m "Fixes #15860" -m "When spliting a sketch curve, constraints on the original curve are transferred to the newly created curve. The original code did not consider the constraints on the center point of an ellipse arc. 2024-09-09 18:31:13 +02:00
CalligaroV
d3f6f3e49e Sketcher/Toponaming: import code for SketchObject::checkSubName() from LS3
* applied review hints

Signed-off-by: CalligaroV <vincenzo.calligaro@gmail.com>
2024-09-08 10:39:54 +02:00
Zheng, Lei
38c6d842f2 Sketcher/Toponaming: import code for SketchObject::checkSubName() from LS3
* import code
 * add modified_item assignment in TaskSketcherElements::onSelectionChanged() like for non ExternalEdge
2024-09-07 14:08:23 +02:00
PaddleStroke
3db4633f9d Sketcher: addGeometry : Remove point construction limitation. 2024-09-02 18:22:51 +02:00
PaddleStroke
33e00078a5 Sketcher: Fillet preserving point : Make point construction. 2024-09-02 18:22:51 +02:00
bgbsww
2a541c9536 Toponaming: Remove remaining FC_USE_TNP_FIX defines 2024-08-31 13:21:10 -05:00
bgbsww
ecf7e51ab3 Toponaming: Remove all FC_USE_TNP_FIX protected old code 2024-08-26 11:12:48 -05:00
bgbsww
2b97b20a03 Toponaming: Additional element map changes to transform 2024-08-08 09:09:46 -05:00
Chris Hennes
ff693a4dc2 Sketcher: Modernize license text 2024-08-05 10:49:14 -05:00
bgbsww
c0c7bd647d Toponaming: use correct face maker 2024-08-02 21:55:51 -04:00
bgbsww
e4b2bf7630 Toponaming: bring in code to fix delExternal breakage. 2024-08-02 14:13:38 -05:00
bgbsww
4aaf72dcc2 Toponaming: Final piece nine of fixing Save/Restore sketch external geometry 2024-07-29 09:38:21 -05:00
wmayer
00990cb1e1 Sketch: Fix compiler warnings
Fix warning: -Wunused-but-set-variable
2024-07-28 11:59:51 +02:00
Chris Hennes
8948505b45 Sketcher/Toponaming: Further linter cleanup 2024-07-26 22:10:44 -05:00
Chris Hennes
037c05a927 Sketcher/Toponaming: Minor code cleanup during review 2024-07-26 21:48:33 -05:00
bgbsww
71870bd6f3 Toponaming: Touchup cleanup
Includes some header re-ordering from chennes.
2024-07-26 21:39:39 -05:00
bgbsww
e15646d158 Toponaming: Tests, cleanup, and fix axis drawing 2024-07-26 11:49:56 -04:00
Zheng, Lei
42bf92ad12 Toponaming: Transfer in ExportGeo and associated 2024-07-26 11:49:56 -04:00
Chris Hennes
d92029f0ba Apply suggestions from code review 2024-07-24 21:48:59 -05:00
bgbsww
b29abf7ffe Cleanup, format 2024-07-24 16:41:15 -04:00
Zheng, Lei
a7bdbaa662 Toponaming: Transfer in getHigherElement 2024-07-24 15:10:42 -04:00
Zheng, Lei
7d344e2818 Toponaming: Transfer in SketchObject::InternalShape 2024-07-22 17:26:52 -04:00
bgbsww
0bddc51805 Refactor all element name pairs into clearer struct names - renames 2024-07-20 16:32:12 -04:00
Chris Hennes
c8046b1c60 Sketcher: Fix crash on recompute with points
Fixes #15154.
2024-07-17 10:25:22 -04:00
Pesc0
0e5690d732 Rename variables and clean method 2024-07-15 12:50:30 -04:00
Zheng, Lei
bcea524177 Toponaming: Missing getSubObject code in PartDesign::Body and SketchObject::getSubObject 2024-07-15 11:59:15 -04:00
PaddleStroke
9868533d8d Sketcher: Fix undo of external creation not working. 2024-07-12 09:41:55 -05:00
Max Wilfinger
7d21d9edb8 Fix source string typos mentioned on Crowdin (#15261) 2024-07-08 17:18:31 -05:00
Chris Hennes
2411f9f3b3 Merge pull request #14461 from AjinkyaDahale/sk-fix-12592-bsp-by-knot-trim
[Part][Sketcher] Fix some B-spline trimming issues
2024-07-01 11:28:50 -05:00
bgbsww
d65ee84ff2 Cleanup 2024-06-28 22:24:30 -04:00
bgbsww
a674729dd3 Toponaming: Cleanups 2024-06-28 11:57:43 -05:00
Zheng, Lei
7a4bc95d47 Toponaming: Transfer in missing Code for BaseFeatures and Sketches 2024-06-28 11:57:43 -05:00
Ajinkya Dahale
333ca836c0 [Sketcher] Delete point-on-object on trimmed portion
This could cause undesirable shape change, especially in B-splines.
2024-06-24 21:56:58 +05:30