Commit Graph

96 Commits

Author SHA1 Message Date
Markus Reitböck
63ab3de853 TechDraw: use CMake to generate precompiled headers on all platforms
"Professional CMake" book suggest the following:

"Targets should build successfully with or without compiler support for precompiled headers. It
 should be considered an optimization, not a requirement. In particular, do not explicitly include a
 precompile header (e.g. stdafx.h) in the source code, let CMake force-include an automatically
 generated precompile header on the compiler command line instead. This is more portable across
 the major compilers and is likely to be easier to maintain. It will also avoid warnings being
 generated from certain code checking tools like iwyu (include what you use)."

Therefore, removed the "#include <PreCompiled.h>" from sources, also
there is no need for the "#ifdef _PreComp_" anymore
2025-09-23 00:50:59 +02:00
Chris Hennes
952485dcbb Merge pull request #19907 from benj5378/getAttribute
Base: make getAttribute template
2025-05-12 10:39:55 -05:00
Benjamin Bræstrup Sayoc
2b6e73c29d Everywhere: clean up getAttribute conversions 2025-05-09 15:54:57 +02:00
Benjamin Bræstrup Sayoc
2b1aec0041 Base: make getAttribute template 2025-05-09 15:54:57 +02:00
bofdahof
ba2c2ca5ad Console: rename PascalCase named methods to camelCase 2025-05-06 17:50:21 +02:00
captain0xff
13d31711f3 remove gp_* conversion code from TechDraw workbench 2025-03-11 05:21:58 +05:30
Chris Hennes
d9ab6c1645 Merge pull request #19753 from benj5378/tag
TechDraw: centralize tag functionality
2025-03-03 10:36:24 -06:00
Benjamin Bræstrup Sayoc
b7f56a219f Move Tag to separate translation unit
- Avoid code duplication
- Reduces compile time
2025-02-21 13:01:28 +01:00
Benjamin Bræstrup Sayoc
934e9fb683 Remove unused function assignTag 2025-02-21 11:25:52 +01:00
Kacper Donat
13fbab9e42 Base: Move App::Color to Base
Every basic data type is stored in Base module, color is standing out as
one that does not. Moving it to Base opens possibilities to integrate it
better with the rest of FreeCAD.
2025-02-17 21:10:26 +01:00
Benjamin Bræstrup Sayoc
97b34f9c57 Remove magic number and hard type enums in Geometry.h
- Remove currently present magic numbers
- Hard type enums, so magic numbers can no longer be introduced. We don't want people to introduce magic numbers.
2025-02-17 12:16:49 -05:00
Benjamin Bræstrup Sayoc
9f8f6b1f56 [TechDraw] Use templates instead of duplicate code: toGp 2025-02-08 22:35:57 +01:00
wmayer
7d492c9f64 Building: Boost dependency errors
Fixes #15999
2024-08-22 18:50:24 -05:00
wandererfan
2caf34c466 [TD]fix crash on Cosmetic line > 10m 2024-08-19 12:34:53 -04:00
bgbsww
42eb4fdda6 Guard all uses of basic_random_generator for thread safety 2024-06-10 11:10:57 -05:00
WandererFan
50f970efd7 [TD]Cosmetic function overhaul (#14216)
* [TD]Cosmetic geometry and tools update

- all cosmetics to store geometry in same form
- all cosmetics to survive scaling and rotation
- extension functions to survive scaling and rotation

* [TD]overhaul leader point storage and editing

- add py routine makeLeader(points)

* [TD]add leader conversion utility

* [TD]Set Leader RotateWithView default to true

* [TD]fix intersection vertex position

* [TD]add CosmeticEdge::makeLineFromCanonicalPoints

* [TD]fix 2 Extension tools

- positioning in DrawCosmeticCircle
- mishandling of points in execLineParallelPerpendicular

* [TD]Remove duplicate constexpr

* [TD]fix 2x Cosmetic arc tools

* [TD]refactor LineFormat out of Cosmetic

* [TD]move cosmetic appearance settings to LineFormat

* [TD]remove 2 unused methods

* [TD]apply format to blue line & circle tools

* [TD]fix ballon arrowhead does not rotate with view

* [TD]fix CosmeticCircle3Points

* [TD]allow multiple cosmetic object deletions

* [TD]fix extend/shorten centerline
2024-05-23 09:41:42 -04:00
wandererfan
b719478824 [TD]fix thread line alignment 2024-03-14 21:45:16 -04:00
wandererfan
57d747a83c [TD]fix line number not saved for cosmetic edge 2024-01-22 20:02:54 -05:00
wandererfan
023dd8ed8a [TD]fix location of CV on rotated views 2023-12-24 12:27:25 -05:00
wandererfan
d4e1731716 [TD]Standard Line Styles - Gui components 2023-12-01 11:27:29 -05:00
wandererfan
70d89b7437 [TD]Standard Line Styles - App components 2023-12-01 11:27:29 -05:00
pavltom
0657ecf3e3 [TechDraw] - Cosmetic circle fixes 2023-10-20 12:18:30 -04:00
wandererfan
098757b360 [TD]fix omission in splitting GeometryObject 2023-08-19 17:18:42 -04:00
wandererfan
9084bfd81a [TD]Rotate CosmeticEdge with View 2023-08-19 17:18:42 -04:00
Benjamin Bræstrup Sayoc
576aba95a2 [TechDraw] Improve Cosmetic.cpp typing
Make type safe by using const keywords when appropriate and improve memory handling by using references when appropriate.
2023-08-19 13:28:53 -04:00
wandererfan
41817c188f [TD]split GeometryObject 2023-08-18 15:18:42 -04:00
Benjamin Bræstrup Sayoc
6df0a20214 [TechDraw] Simplify return logic
Easy warmup
2023-04-11 13:00:45 -04:00
Benjamin Bræstrup Sayoc
3794897699 [TechDraw] Simplify return logic 2023-04-10 23:34:05 -04:00
Benjamin Bræstrup Sayoc
5d05acc87e [TechDraw] Simplify retrievement of user preferences
for all TechDraw files
2023-04-10 23:34:05 -04:00
Benjamin Bræstrup Sayoc
0bfae905d9 [TechDraw] Move CenterLine into own file 2023-04-06 13:51:35 -04:00
Benjamin Bræstrup Sayoc
1f0ba98de5 [TechDraw] Move CosmeticVertex into own file 2023-04-06 13:51:35 -04:00
Abdullah Tahiri
ee0c3ad5c1 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
704fb894a5 [TD]getters and setters for geometry
- make attributes private (or protected) and use
  getters and setters instead of accessing attributes
  directly.
2023-02-28 08:15:06 -05:00
Uwe
01c7df9f4f [TD] A* - C*: remove unused includes
- also sort includes
- also sort PreCompiled.h
2022-10-03 23:05:36 +02:00
marioalexis
87dfe33833 TechDraw: Replace C cast 2022-09-18 11:06:51 -05:00
wandererfan
2dfc8667b6 [TD]default LineFormat ctor 2022-09-07 16:06:54 -04:00
wandererfan
aa2b1b8392 [TD]CI clang warnings 2022-09-05 17:48:38 -04:00
wandererfan
6bb936e87c [TD]cosmetic vertex size consistency 2022-08-28 13:13:20 -04:00
berniev
f4ffd15864 Mod: redundant void 2 2022-08-08 10:27:50 +02:00
Benjamin Bræstrup Sayoc
f30c30b06f [TechDraw] Simplify code getting default line weights 2022-08-02 16:13:01 -04:00
Uwe
7b4e5d7522 [TD] remove more superfluous nullptr checks 2022-07-20 02:32:52 +02:00
Uwe
36add10c86 [TD] App: remove some superfluous nullptr checks 2022-07-19 02:03:50 +02:00
Benjamin Bræstrup Sayoc
f7c236a071 [TechDraw] Gather rotation calculations in a single function 2022-07-16 16:00:10 -04:00
Benjamin Bræstrup Sayoc
dd4e7ff159 [TechDraw] Improve readability of Cosmetic.cpp 2022-07-16 16:00:10 -04:00
Benjamin Bræstrup Sayoc
6356459ab6 [TechDraw] Refactor CosmeticEdge constructors
Use constructor delegation and default parameters for CosmeticEdge
2022-07-16 16:00:10 -04:00
Benjamin Bræstrup Sayoc
a5e10cc49b [TechDraw] Use constructor delegation for CosmeticEdge 2022-07-16 16:00:10 -04:00
Benjamin Bræstrup Sayoc
95f1c6f240 [TechDraw] Use default parameters for LineFormat constructor 2022-07-16 16:00:10 -04:00
Wanderer Fan
1c97b3d5df [TD]fix ExtendShorten handling of CenterLine 2022-04-23 18:43:27 -04:00
Uwe
19c8a76c62 [TD] App Headers: remove unused header - part 3/3 2022-03-25 01:13:34 +01:00
wmayer
e8f9c8a1d3 TD: modernize C++11
* use nullptr
2022-03-23 19:26:14 +01:00