Commit Graph

61 Commits

Author SHA1 Message Date
Max Wilfinger
8ff5a1f688 Fix source string typos mentioned on Crowdin (#15261) 2024-07-08 17:18:31 -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
d4e1731716 [TD]Standard Line Styles - Gui components 2023-12-01 11:27:29 -05:00
Benjamin Bræstrup Sayoc
90f22b4eba [TechDraw] CenterLine should use enums 2023-08-18 10:22:17 -04:00
wandererfan
f88297bbb5 [TD]fix pathological centerline for points 2023-07-06 19:20:08 -04:00
wandererfan
4ccb566b7d [TD]fix #9471 - prevent impossible centerline 2023-05-07 10:00:00 -04:00
luzpaz
38a01939e0 Migrate domain name from freecadweb to freecad (#9352)
* Migrate domain name from freecadweb to freecad
* Migrate src/Mod/Material files
* Migrate Stylesheet related files
* Migrate *.svg files
* Migrate miscellaneous files
* Migrate some build files
* Migrate recently added TD AR_IRAM template files

Closes #6415
2023-04-24 15:19:20 -05: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
wmayer
25beef481c TD: move to new style connect() 2023-02-01 01:33:34 +01:00
luzpaz
91a336b659 TechDraw: header uniformity + trailing whitespace 2023-01-21 20:11:08 -05:00
wandererfan
437457e996 [TD]remove obsolete log messages 2023-01-13 12:15:33 -05:00
Uwe
7e70d28761 [TD] Task*, part 2/2: remove unused includes
- also some sorting
- also take care of PreCompiled.h
2022-12-07 19:49:05 +01:00
Uwe
c8b51fb79c [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
wandererfan
aa2b1b8392 [TD]CI clang warnings 2022-09-05 17:48:38 -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
5486c9808d [TD] remove some more superfluous nullptr checks 2022-07-20 02:53:48 +02:00
Uwe
15ec3e2cda [TD] Gui: remove more superfluous nullptr checks 2022-07-19 03:40:32 +02:00
Benjamin Bræstrup Sayoc
ec2dc0f495 [TechDraw] Improve readability of TaskCenterLine.cpp 2022-07-15 11:31:11 -04:00
Wanderer Fan
22a00cffda [TD]fix extra undo on TaskCenterLine cancel 2022-05-11 09:57:53 -04:00
wmayer
ccc0d54d97 TD: [skip ci] activate PCH of TechDraw (Gui) and use forward declarations
For MSVC this reduces compile time by ~20%
2022-03-25 13:54:47 +01:00
Uwe
5757cdf2ad [TD] remove a single-header file 2022-03-25 04:11:53 +01:00
wmayer
e8f9c8a1d3 TD: modernize C++11
* use nullptr
2022-03-23 19:26:14 +01:00
Wanderer Fan
d4c5074ee5 [TD]remove redundant edits from 9 Task dialogs 2022-01-22 14:51:20 -05:00
Wanderer Fan
28c5890bc9 [TD] avoid memory leaks by using shared_ptr
TD geometry objects are sometimes double deleted.  This
change uses shared_ptr instead of raw pointers to manage
deletions.
2022-01-07 13:34:20 -05:00
luz paz
4d21ffa904 Fix various typos 2021-07-31 09:46:50 +02:00
wmayer
d34a8cad32 TD: fix -Wunused-private-field 2021-06-12 11:00:53 +02:00
donovaly
2bc5ac2e4b [TD] fix centerline crashes and bugs
the PR fixes the following things:
- change the way centerlines between 2 lines are calculated. The current implementation leads to many bugs and even crashes (e.g. when the 2 selected lines are parallel ones of a square). There are different forum threads from the last 1.5 years.
The new endpoint line sorting is the one described here: https://forum.freecadweb.org/viewtopic.php?f=35&start=20&t=44255&sid=989a668890f954c13ef81e4a04ee6912#p501179

- as consequence the erroneous and misleading line end flipping can go and is removed (only used internally)

- when creating a new centerline, you see it immediately

- when creating a new or editing an existing centerline and press Cancel, the creation/editing is aborted

- fix crash when the 2 selected lines are bot horizontal and one tries to create a vertical centerline

- fix crash when changing the orientation  of an existing centerline and the result would be invalid

- cleanup the code a bit
2021-05-15 05:21:29 +02:00
Alexander Golubev
197a0692d3 TD: fix center line style settings
forum thread: https://forum.freecadweb.org/viewtopic.php?f=35&t=57783
2021-04-17 11:39:13 +02:00
luz paz
751399892a [TD] icon uniformity for ActiveView and FaceCenterLine commands
Renamed SVGs, saved as plain svg, updated appropriate areas in the source code
2021-04-05 14:41:30 +02:00
donovaly
691eaa6e8f [TD] make pointers to the UI std::unique_ptr
as noted in https://github.com/FreeCAD/FreeCAD/pull/4271#discussion_r554673632
the pointer to the UI should be a unique pointer.

This PR does this for all TD dialogs that don't already use a unique_ptr.
2021-01-19 19:24:27 +01:00
donovaly
4bae944950 [TD] make LineGroup selectable
At the moment one has to specify the LineGroup as string. But one doesn't know what groups exist. So one has to check the Wiki, learn there where the groups are defined and then open the definition file with a text editor.

This PR simplifies this by reading the existing groups out of the definition file and fill the combobox accordingly.
It also give the user info what the selected LineGroup defines via the tooltip.

A nice side effect is that no typos can occur since you don't have to enter the LineGroup name as text.
2020-12-03 17:24:49 +01:00
luz paz
89664642fb TD: Issue #0004473: Expose openCommand() to translation
Continuing the work to expose the undo/redo functionality to translation. This commit does so for the TechDraw Wb.  
Ticket: https://tracker.freecadweb.org/view.php?id=4473
2020-12-01 14:53:35 +01:00
luz paz
ae71abd1cc TechDraw: Header uniformity and whitespace fixes 2020-11-14 16:59:51 +01:00
wmayer
983939b32d Coverity: Uninitialized scalar/pointer field 2020-07-20 17:34:30 +02:00
wmayer
0a6929a122 Coverity: Dereference after null check 2020-07-20 17:34:25 +02:00
wmayer
1ae38aea04 PVS: V522 There might be dereferencing of a potential null pointer 2020-07-18 10:59:27 +02:00
wandererfan
6734bffcc6 [TD]Eliminate replace fcns for Cosmetic objs 2020-05-16 07:42:45 -04:00
wandererfan
a3029fec74 [TD]Centralize preference getters 2020-04-24 11:13:49 -04:00
wandererfan
f59188e5e4 [TD]fix crash on bad centerline selection 2020-04-17 10:11:24 -04:00
donovaly
61551c3eef [TD] TaskCenterLine add missing unit initialization
next try because PR #3275 cannot be merged.
2020-03-28 20:53:19 -04:00
donovaly
d483cacfb1 [TD] Centerline dialog refurbish
- group the radio buttons
- make edit dialog apply immediately
2020-03-23 09:24:25 -04:00
wandererfan
26ea08e8c5 [TD]Fix handling of CL flip parameter 2020-03-21 09:40:22 -04:00
donovaly
00e5c48b3c [TD] cleanup and fixes for Centerlines
- merge the flip Ends option to the main dialog
- use a QuantitySpinBox with angular unit for the angle
- store the state of the flipping correctly
- cleanup UI of dialog to avoid vertical whitespace
2020-03-19 09:33:31 -04:00
donovaly
909b702995 [TD] improve dialogs
- DlgPrefsTechDraw3.ui: improve wording as discussed
- TaskCL2Lines.ui: morph option to QCheckBox
- TaskCenterLine.cpp: the Aligned option is not available for face mode
- TaskCenterLine.ui: use same default line style as in prefs
- TaskCenterLine.ui: correct tooltip for align option
2020-03-18 09:52:42 -04:00
wandererfan
5f1f5f2195 [TD]fix bad preference keys
- GeomHatch color, centerline color, ortho balloon
  filled triangle end
2020-03-17 08:45:26 -04:00
wandererfan
8cbcd243e6 [TD]Py routines for CenterLines 2019-12-16 20:36:10 -05:00
wandererfan
ee3abc840b [TD]Fix crash on same end points 2019-07-19 20:17:20 -04:00
wandererfan
cb10b651ea [TD]Py functions for CenterLines and formatting 2019-07-19 20:17:20 -04:00