Commit Graph

107 Commits

Author SHA1 Message Date
Benjamin Bræstrup Sayoc
7bc9304a21 [TechDraw] Use templates instead of duplicate code: formatVector 2025-02-08 22:35:57 +01:00
Benjamin Bræstrup Sayoc
1d7e7c86a0 [TechDraw] Use templates instead of duplicate code: toGp 2025-02-08 22:35:57 +01:00
Ladislav Michl
0ee3c9f8e6 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
WandererFan
a1ff05f382 [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
e852052df8 [TD]Fix section snapping (fix #15961) (#15450)
* [TD]Add view snapping preferences

* [TD]fix section snapping algo

- snap sections to section normal line.
- snap views to other views in X&Y

* [TD]fix snapping to ProjectionGroups
2024-09-02 18:41:25 +02:00
wandererfan
131956e201 [TD]fix crash on Cosmetic line > 10m 2024-08-19 12:34:53 -04:00
wandererfan
d2d93458e9 [TD]fix dimension autocorrect
- autocorrect was not handling scaled and rotated reference geometry
  properly.
2024-05-05 20:38:14 -04:00
wandererfan
d611611055 [TD]fix crash on corrupt reference 2024-04-17 18:42:16 -04:00
luzpaz
a3d72167b6 TD: Remove incorrect TODO
Closes #13410
2024-04-13 17:15:35 +02:00
wandererfan
74556bced8 [TD]handle odd projection cs in broken view 2024-04-12 13:41:46 -04:00
wandererfan
33a3c84d92 [TD]implement BrokenView 2024-04-06 15:25:23 -04:00
wandererfan
2712a98d47 [TD]fix ComplexSection with ViewDirection == Z 2024-03-25 21:22:04 -04:00
pavltom
aac48eb2f9 [TechDraw] Issue #5903 - Autofill template information 2024-03-23 08:56:47 -04:00
wandererfan
f03461a85a [TD]spelling in comments 2023-11-26 16:42:06 -05:00
wandererfan
037165f1b7 [TD]add 2 utility methods
- toAppSpace converts qt point to app view coords
- angleWithX(Base::Vector3d) returns [0,2pi]
2023-11-11 07:48:03 -05:00
wandererfan
a51c54e7f0 [TD]allow centerline deletion with Del 2023-09-27 12:24:21 -04:00
wandererfan
01256623ff [TD]allow cosmetic deletion via DEL 2023-09-15 11:46:37 -04:00
wandererfan
44c40067b2 [TD]Fix section of section 2023-08-20 12:25:12 -04:00
wandererfan
a51e46775f [TD]fix 10013 detail of sketch 2023-08-20 12:25:12 -04:00
wandererfan
3e164a5700 [TD]split GeometryObject 2023-08-18 15:18:42 -04:00
wandererfan
49a9442d61 [TD]add label translation for Page and Template 2023-08-17 19:23:29 -04:00
wandererfan
07a6c62aef [TD]fix unwanted inversion in edge scrubbing 2023-04-16 16:34:09 -04:00
Benjamin Bræstrup Sayoc
15fe52a04b [TechDraw] Simplify retrievement of user preferences
for all TechDraw files
2023-04-10 23:34:05 -04:00
edi271
28def30592 Move getTrianglePoint to DrawUtil 2023-04-05 08:23:47 -04:00
Benjamin Bræstrup Sayoc
5329cede7f Improve readability of DrawUtil.cpp 2023-03-31 08:45:05 -04:00
Abdullah Tahiri
c604d1741d Console/ILogger: Refactor and extension
=======================================

Refactor:
 - Substitute the use of variadic templates with parameter packs.
 - Use recently incorporated external library "fmt" to handle printf like formating.
 - Extensive cleaning of pragmas and unnecessary forward declarations.
 - Parameter packs and libfmt provide a much stronger type checking now, so
   conversions that are by standard implicit as bool to int need an explicit static_cast
   to avoid compilation warnings.

Extension:
 - Include a notifier field, so that the originator of the message can be provided. E.g. Document#DocumentObject
 - Include a new type of message called CriticalMessage, this message is intended to have
   special behaviour in the future. Namely, it will be used to notify forward compatilibity issues.
   It will be used to substitute the current signal/slot mechanism.
 - Include two new types of messages for user notifications (Notification and TranslatedNotification). This messages
   will be use to convey UI notifications intended for the user (such as non-intrusive message about the usage of a tool). There
   are two versions to mark whether the string provided as a message is already translated or not. When using the console system for
   notifications, these notifications may originate from the App or the Gui. In the former, it is generally the case that the strings
   of messages are not (yet) translated (but they can be marked with QT_TRANSLATE_NOOP). In the latter, often the messages to be provided
   are already translated.

Python support for CriticalMessage, Notification and TranslatedNofification, including shortcuts:

    Crt = FreeCAD.Console.PrintCritical
    Ntf = FreeCAD.Console.PrintNotification
    Tnf = FreeCAD.Console.PrintTranslatedNotification
2023-03-07 16:13:23 +01:00
wandererfan
72df799770 [TD]apply tester feedback on DimRepair 2023-01-18 17:48:22 -05:00
wandererfan
12db3618df [TD]remove obsolete log messages 2023-01-13 12:15:33 -05:00
Uwe
f8db7e9187 [TD] remove unused headers (#8155)
* [TD] remove unused headers

- also some sorting
- also improve readability by not using an abbreviation (we consistently don't abbreviate class names)
2023-01-09 14:55:22 +01:00
Uwe
ce4a916875 [TD] minor fixes
- typos and code formatting as reported by the CI
- some more re-sorting
2023-01-09 12:02:50 +01:00
Uwe
e42f46a47b [TD] attempt to fix compilation with PCH after #8141
- also resort includes
2023-01-09 11:26:51 +01:00
wandererfan
664b2560ad [TD]fix wrong calculation of 3d two edge angle 2023-01-07 16:32:03 -05:00
wandererfan
1b547dff72 [TD]Refactor Dimensions for 3d upgrade
- separate validation, geometry and reference handling into
  individual files
- improve 3d reference geometry handling
- eliminate duplicate dim creation code

- add Dimension reference repair dialog

- Refactor formatting out of DrawViewDimension

- move dimension repaint control to ViewProvider
2023-01-07 16:32:03 -05:00
wmayer
3c4375986e TD: [skip ci] fix build failure with boost >= 1.78 on Windows 2022-12-08 22:11:33 +01:00
wandererfan
99f67b8a40 [TD]SectionView/ComplexSection - preview, direction selection
- add preview/live update to TaskSectionView & TaskComplexSection
- add view direction selector to uis
- use SectionNormal as Direction.  Make Direction read-only
- simplify section line end point calculation
- section group command in toolbar
- make section and complex section icons consistent
- fix compsolid cutting tool
- terminology: single/piecewise to offset/aligned
2022-10-28 08:47:45 -04:00
wandererfan
5ddc6ce789 [TD]Complex Section - initial implementation 2022-10-28 08:47:45 -04:00
Uwe
16abb8d548 [TD] DrawUtil: remove unused includes
- also sort includes
- also move a definition to it
- also adapt two Gui files accordingly
2022-10-08 03:35:59 +02:00
wmayer
82866db0ca Mod: replace QRegExp with QRegularExpression 2022-10-07 14:03:53 +02:00
wandererfan
a85f751668 [TD]encode Xml characters in spreadsheet 2022-10-04 08:16:36 -04:00
Benjamin Bræstrup Sayoc
1d4c607bff [TechDraw] Fix bug in DrawUtil::isZeroEdge
Bug originating from e80e8bf731
2022-09-07 09:44:09 -04:00
wandererfan
2f363e4f17 [TD]New face finder algo 2022-09-05 19:52:34 -04:00
wandererfan
acf17905ed [TD]CI clang warnings 2022-09-05 17:48:38 -04:00
wmayer
5014bab534 Mod: replace std::ifstream/std::ofstream with Base::ifstream/Base::ofstream 2022-08-21 12:46:53 +02:00
berniev
b796a0d376 Mod: use empty 2022-08-06 19:30:13 +02:00
Benjamin Bræstrup Sayoc
86dfd0a862 [TechDraw] Simplify code getting default line weights 2022-08-02 16:13:01 -04:00
wmayer
e48a3a8cea Mod: [skip ci] fix warning: [-Wreturn-std-move] 2022-07-29 18:55:10 +02:00
Benjamin Bræstrup Sayoc
e80e8bf731 [TechDraw] Improve readability of DrawUtil.cpp 2022-07-16 16:00:43 -04:00
Wanderer Fan
460d153d6c [TD]Include CosmeticLines in Dxf 2022-06-30 08:50:07 -04:00
Wanderer Fan
913fb21502 [TD]fix misplaced section line
- BRepBndLib::Add results in wrong bbox center.
- replaced with BRepBndLib::AddOptimal
2022-03-03 09:31:29 -05:00
Wanderer Fan
309a1455cb [TD]Fix 4486 allow detail view of Base with no solids 2022-02-01 09:15:00 -05:00