Commit Graph

3308 Commits

Author SHA1 Message Date
wmayer
837d088f3e Fix compiler warnings 2024-10-26 00:48:04 +02:00
PaddleStroke
ed45e20768 Fix circle tangent issue 2024-10-25 10:03:47 -05: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
pre-commit-ci[bot]
dda69c8b60 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2024-10-14 17:56:08 +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
PaddleStroke
a9bff78974 Sketcher: Fix double click of wire and remove selection that was not working 2024-10-08 10:53:00 -05:00
Benjamin Bræstrup Sayoc
5ce6c7933a [Sketcher] If origin selected: don't do distance to origin
In auto constrainer. Fixes #12684
2024-10-07 09:02:43 -05:00
Ajinkya Dahale
596fa2856b [Sketcher] Apply tangent autoconstraint only when Dir given
This relates to `seekAutoConstraint` and `seekAndRenderAutoConstraint`.

Fixes #16321.
2024-10-03 23:17:43 -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
bgbsww
837920f378 Match LS3 opcodes for sketch shape 2024-09-23 17:45:32 +02:00
bgbsww
c5ad54d5a8 Update method names and clean 2024-09-22 14:44:50 -04:00
CalligaroV
fd28d94f6a Sketcher/Gui: check if there's a 3D view while executing ViewProviderSketch::unsetEdit()
Signed-off-by: CalligaroV <vincenzo.calligaro@gmail.com>
2024-09-20 08:29:48 -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
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
Yorik van Havre
eb14fc9253 Merge pull request #16558 from CalligaroV/toponaming-sketcher-ViewProviderSketch-addSelection2-call-convertSubName
Sketcher/Toponaming: call SketchObject::convertSubName() in Gui selections
2024-09-16 18:01:23 +02: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
CalligaroV
c3bad9da25 Do the same for the elements selected in the Task Panel
Signed-off-by: CalligaroV <vincenzo.calligaro@gmail.com>
2024-09-15 19:54:09 +02:00
Zheng, Lei
3da4b59b37 Sketcher/Toponaming: call SketchObject::convertSubName() in ViewProviderSketch::addSelection2() 2024-09-15 19:26:48 +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
Kacper Donat
e260cf5c8a Sketcher: AutoColor should update only colors
Previously AutoColor property forced reinitialization of all subscribed
parameters. It was mostly fine as most of them should stay in sync with
user settings but it also affected grids.
2024-09-09 21:19:35 -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
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
Yorik van Havre
bd06fa3f03 Merge pull request #16140 from Ondsel-Development/sk_rectangle_thickness_crash
Sketcher: Fix round corner + thickness issue if radius + thickness = 0
2024-09-09 18:14:41 +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
bf50745075 Sketcher: Rectangle DSH: refactor the createShape function. 2024-09-04 08:32:22 +02:00
PaddleStroke
a1c3b48b56 Sketcher: Fix round corner + thickness issue if radius + thickness = 0. 2024-09-04 08:32:22 +02:00
Kacper Donat
b46ba096b2 Gui: Make sketcher element icons normally opaque 2024-09-03 20:53:47 +02:00
Kacper Donat
4a770767d3 Gui: Force 24px icons in sketcher task panel 2024-09-03 20:53:47 +02:00
PaddleStroke
d01d71198d Sketcher: CommandConstraints: Make sure points are created as constructions in few functions. 2024-09-03 18:28:54 +02:00
PaddleStroke
abb1eb46e9 Sketcher: Point DSH : remove unecessary "toggleConstruction(%d)", 2024-09-03 18:27:34 +02:00
PaddleStroke
4972335385 Sketcher: ConstraintPyImp: replace 'cstr' name by 'constraint' 2024-09-02 18:22:51 +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
PaddleStroke
ff74dd5106 Sketcher: Make it possible to specify if the constraint is active or driving during python creation. 2024-09-02 18:22:51 +02:00
Chris Hennes
ce40d344a7 Merge pull request #16133 from Ondsel-Development/sk_circle_ovp_bug
Sketcher: Fix autoconstraint issue
2024-08-31 13:23:14 -05:00
bgbsww
2a541c9536 Toponaming: Remove remaining FC_USE_TNP_FIX defines 2024-08-31 13:21:10 -05:00
Ajinkya Dahale
d43dbf2449 [planegcs] Fix error gradient check in ConstraintTangentCircumf 2024-08-31 13:19:13 -05:00
PaddleStroke
dca9c0ca3b Sketcher: Fix problem where preselectAtPoint was called after the autoconstraints being generated, hence having no effect. By adding updateDataAndDrawToPosition after we regenerate the correct autoconstraint. We cannot just move the mouseMove to after preselectAtPoint because we need to have the enforced position. 2024-08-29 12:49:07 +02:00
PaddleStroke
a7aa33f886 Sketcher: Circle DSH: fix seekSecond case of doEnforceControlParameters 2024-08-29 11:37:51 +02:00
pre-commit-ci[bot]
61c1f8fb21 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2024-08-28 15:56:09 +00: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
Ajinkya Dahale
71b513c1b8 [Sketcher] Replace tangent autoconstraint with equality for circles 2024-08-26 18:22:29 +02:00
Ajinkya Dahale
84cb77f0d7 [Sketcher] Fix a check during tangent autoconstraint 2024-08-26 18:22:29 +02:00
wmayer
3e33f184b4 Core: Rename ViewProviderPythonFeature to ViewProviderFeaturePython
Fixes #15888
2024-08-26 18:14:22 +02:00