Commit Graph

2943 Commits

Author SHA1 Message Date
wandererfan
f6384b4d57 [TD]fix #18050 hidden line color 2024-12-09 17:39:54 +01:00
wandererfan
0fcd2241fb [TD]add shape validation tool for debugging 2024-12-09 17:37:33 +01:00
Kacper Donat
954b729b56 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
Kacper Donat
44f3b37200 Gui: Add getObject<T>() helpers to various classes
Obtaining specific kind of document object is very common task. This
commit introduces handy helper which makes that a lot easier.
2024-12-06 18:19:53 +01:00
Ladislav Michl
e62b91ada4 Base: Drop QString-std::string conversion functions from Tools
Convenience helpers function Tools::toStdString and Tools::fromStdString
were implemented for Qt4 or older to perform utf8 aware conversion as
QString::toStdString/QString::fromStdString were using toAscii/fromAscii
internally (see https://dreamswork.github.io/qt4/classQString.html).

Since Qt5 QString uses toUtf8/fromUTf8, which makes the helper functions
obsolete (see https://doc.qt.io/qt-5/qstring.html#fromStdString).
2024-12-02 23:30:53 -05:00
Benjamin Bræstrup Sayoc
e025b1bfe2 [TechDraw] Translations and grammer (#16301)
Co-authored-by: WandererFan <WandererFan@gmail.com>
2024-12-02 12:27:39 -05:00
wandererfan
997479c6c2 [TD]prevent use of non-exist/hidden tab in exports 2024-11-29 12:28:25 -05:00
wandererfan
c8f858a289 [TD]prevent crash on attempt to print hidden page 2024-11-29 12:28:25 -05:00
wandererfan
b9c798ca53 [TD]prevent fail on auto switch to hidden tab 2024-11-29 12:28:25 -05:00
wandererfan
cab84840b5 [TD]add preference for auto workbench switch 2024-11-29 12:28:25 -05:00
wandererfan
2ff1a2b6de [TD]fix area calculation 2024-11-25 17:49:21 +01:00
Benjamin Bræstrup Sayoc
52fe0eec53 [TechDraw] Return logic simplification (#16504)
* [TechDraw] AppTechDrawPy.cpp return logic simplification

* [TechDraw] CosmeticExtension.cpp return logic simplification

* [TechDraw] DrawBrokenView.cpp return logic simplification

* [TechDraw] HatchLine.cpp return logic simplification

* [TechDraw] LineGenerator.cpp return logic simplification

* [TechDraw] Preferences.cpp return logic simplification

* [TechDraw] ShapeExtractor.cpp return logic simplification

* [TechDraw] MDIViewPage.cpp return logic simplification

* [TechDraw] QGILeaderLine.cpp return logic simplification

* [TechDraw] QGIRichAnno.cpp return logic simplification

* [TechDraw] QGTracker.cpp return logic simplification
2024-11-18 16:14:47 -03:00
luzpaz
a633be7342 Fix various typos
Found via codespell.
2024-11-15 20:18:46 +01:00
Max Wilfinger
665bee5e5a Merge pull request #15957 from hasecilu/fix/capitalization
TechDraw: Fix capitalization of 2D and 3D
2024-11-15 18:37:47 +01:00
Max Wilfinger
e8b7fac134 Merge pull request #16535 from WandererFan/translationFixes317And335
[TD] Translation fixes (fix #317 fix #335)
2024-11-15 18:36:44 +01:00
PaddleStroke
cd9e155078 Techdraw: Fix assembly exploded view (#17726) 2024-11-11 17:53:34 +01:00
Yorik van Havre
56a897cc96 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
WandererFan
8b45901c5e [TD]handle short&wide hatch area (#17630)
* [TD]handle short&wide hatch area

* [TD]sync .h and .cpp parameter names
2024-11-04 18:01:33 +01:00
wandererfan
ea528ecdb9 [TD]fix scaling of large hatch tiles 2024-11-03 10:00:50 -05:00
wandererfan
02ae2bdd3f [TD]remove spurious mouseReleaseEvent (fix #17519) 2024-10-28 09:47:40 -05:00
wandererfan
cc2ba4c67d [TD]fix line style regression from #17331 2024-10-28 09:47:14 -05:00
wandererfan
c01146555d [TD]handle cut profiles with only a single edge 2024-10-28 09:46:41 -05:00
wandererfan
06500011f2 [TD]do not mark document as changed after print 2024-10-28 09:46:10 -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
wandererfan
b867a63038 [TD]Fix leader line style (fix #17307) 2024-10-21 17:57:52 +02:00
Syres916
fdb2bc4326 [TechDraw] Fix error for some compilers 2024-10-15 14:19:05 +02:00
Yorik van Havre
d79015a908 crowdin translations 2024-10-14 17:56:08 +02:00
Yorik van Havre
a698c75581 updated ts files 2024-10-14 17:56:08 +02:00
WandererFan
227cd14022 [TD]Fix bad circles (fix #16980) (#17182)
* [TD]fix spurious messages in GeometryMatcher

* [TD]fix closed circle test (fix #16980)
2024-10-14 17:47:04 +02:00
wandererfan
17e9f10ca7 [TD]throttle over aggressive dimension autocorrect 2024-10-14 17:45:53 +02:00
wmayer
a54a7862f4 TD: Fix compiler warnings
This fixes the compiler warning: unused parameter 'mode' [-Wunused-parameter]

It's a regression of #16889 to not initialize the class member m_createMode any more that causes UB,
i.e. whenever m_createMode is accessed it may return an unexpected value.
2024-10-07 17:40:32 +02:00
wandererfan
ddad57f20c [TD]fix parallel edge test (fix #16851)
- missing normalization before test
2024-10-07 17:34:11 +02:00
WandererFan
a2c3a1a542 [TD]Fix auto correct msg missing16892 (#16909)
* [TD]fix bad return code on auto-correct fail

* [TD]prevent changing references in property editor

- this is a "shoot yourself in the foot" practice
2024-09-30 18:20:47 +02:00
wandererfan
faad9fd432 [TD]fix no dim repair on area (fix #16894) 2024-09-30 18:13:28 +02:00
wandererfan
0d342c67a1 [TD]fix solid line detail highlight not shown 2024-09-30 18:01:43 +02:00
Yorik van Havre
eec3fe4c5d Merge pull request #16889 from WandererFan/fixProjConvention16788
[TD]Fix proj convention (fix #16788, fix #16785)
2024-09-30 18:00:43 +02:00
wandererfan
e1f5d3b8a5 [TD]fix bad default value (fix #16783) 2024-09-30 11:44:53 -04:00
Yorik van Havre
37857a8dad Merge pull request #16639 from WandererFan/balloonDrag15388
[TD]Balloon origin drag modifiers (fix #15388)
2024-09-30 17:40:23 +02:00
wandererfan
98906c5edf [TD]fix handling of projection convention (fix #16788 #16785) 2024-09-28 10:39:30 -04:00
wandererfan
d77ce6b78e [TD]add preference methods for Projection Group 2024-09-28 10:39:18 -04:00
wandererfan
1f825fb13c [TD]fix crash on bad selection (fix #16727) 2024-09-24 10:07:51 -05:00
Yorik van Havre
3395a8d4a7 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
3x380V
2443f3ebb4 TechDraw: Buggy Wayland custom cursors workaround (#16740)
* Gui: Minor polishing of cursor regression fix

* TD: Buggy Wayland custom cursors workaround

Until Qt v6.6 displaying custom cursors on Wayland is broken,
so add a workaround. See also QTBUG-95434.

Fix is the same as 094c1b10 ("Gui: Buggy Wayland custom cursors workaround")
plus subsequent fixes.
2024-09-23 17:43:10 +02:00
WandererFan
c9beae7ef3 [TD] Fix win file spec backslash (fix #16646) (#16689)
* [TD]add method to clean win filespecs

- '\' in strings passed to Python as filespecs is interpreted as
  an escape of the following character.
- replace '\' with '/'

* [TD]remove '\' from filespecs before use
2024-09-23 17:40:05 +02:00
wandererfan
8a4342e6e1 [TD]fix BrokenView selection (fix #16567) 2024-09-23 10:36:51 -05:00
wandererfan
a35ba33433 [TD]respect camera direction preference (fix #16593) 2024-09-23 09:23:42 -05:00
wandererfan
9ee4b6d5db [TD]fix torus render (fix #16646) 2024-09-23 09:21:00 -05:00
wandererfan
22a65908b9 [TD]fix double pdf file on win (fix #16538) 2024-09-23 09:18:47 -05:00
Roy-043
15cc47a11c Correct tree icon for TechDraw_AreaDimension 2024-09-22 16:58:52 -05:00
Yorik van Havre
b97362bf0a 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