Commit Graph

44 Commits

Author SHA1 Message Date
tetektoza
246c4a1f0b Gui: Render constraint text and arrowheads above geometry lines
Add Z offset for arrowheads and explicitly enable depth testing for
constraint lines in SoDatumLabel. This ensures constraint lines render
below geometry (respecting zConstr level) while text and arrowheads
render on top for better visibility and selection.
2026-01-06 20:07:25 +01:00
pre-commit-ci[bot]
9fe130cd73 All: Reformat according to new standard 2025-11-11 13:49:01 +01:00
Markus Reitböck
a72a0d6405 Gui: 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-14 09:47:03 +02:00
mosfet80
fbfe3a59bf Clean SoDatumLabel.cpp (#23217)
* Clean SoDatumLabel.cpp

removed unused variables

* Update SoDatumLabel.cpp
2025-08-24 23:00:29 -05:00
Kacper Donat
14413f5f9f Sketcher: Fix dimension extension overshoot length 2025-08-13 22:43:58 +02:00
Matthias Danner
3918d7ffae Fix drawing of angle constraints beyond the centerpoint and for negative angles 2025-08-05 23:41:30 +02:00
tetektoza
0228cf8e55 Sketcher: Make ArcLength constraint more interactable 2025-08-02 19:54:00 +02:00
tetektoza
2e04577bb9 Sketcher: Make symmetric constraint more interactable 2025-08-02 19:54:00 +02:00
tetektoza
434afeb26d Sketcher: Make angle constraint more interactable 2025-08-02 19:54:00 +02:00
tetektoza
2db3b8013e Sketcher: Make radius/diameter constraint more interactable 2025-08-02 19:53:48 +02:00
tetektoza
79b88c3d66 Sketcher: Make distance constraint more interactable
As the title says, this patch aligns selectability to what we actually
draw, so from now on extension lines and arrowheads will be also
selectable.
2025-08-02 19:52:33 +02:00
matthiasdanner
57f251d742 Sketcher: Display arc angle and length constraints beyond center point (#22651)
* Allow arc segment length and angle constraints to go past the center point

* fix angle helper lines

* fix linter warning

* fix arc length calculation

---------

Co-authored-by: Matthias Danner <28687794+matthiasdanner@users.noreply.github.com>
2025-07-25 13:57:21 +02:00
matthiasdanner
d3887d09a4 Sketcher: Add second arc helper on diameter constraint (#22579)
* add second arc helper on diameter constraint

* fix linter warnings

---------

Co-authored-by: Matthias Danner <28687794+matthiasdanner@users.noreply.github.com>
2025-07-20 19:46:49 +02:00
xtemp09
0a9a16ffe3 [GUI] Remove dark fringe around letters (#21536)
Closes #12394

Co-authored-by: Kacper Donat <kacper@kadet.net>
2025-06-22 21:24:51 -05:00
matthiasdanner
d7bdb2c19a Sketcher: Fix Arrow Direction of Angle Arrows (#21645)
* Fix Arrow Direction of Angle Arrows

* Fix huge Space of angle box in negative angles

* Swap the direction vectors for the arrows
2025-06-02 12:22:24 +02:00
Chris Hennes
cfb6368026 Gui: Eliminate double->float truncations
Our GUI code uses a mix of floats and doubles to represent floating
point numbers, and in a few places interchanges them in a way that
causes an invisible loss of precision. Change the double precision
"default" values to float defaults, and use the appropriate value for
pi.
2025-05-13 08:37:06 +02:00
Benjamin Nauck
f22f3705db Use Base::toDegrees() instead of manually converting 2025-04-15 07:16:39 +02:00
Benjamin Nauck
247a188f34 Gui: Fix operator mistake in previous c++constant refactoring 2025-04-07 11:13:36 +02:00
Benjamin Nauck
b6d6c8837f Gui: Add #include <limits> where used 2025-03-31 23:50:37 +02:00
Benjamin Nauck
b625e81a3e Gui: Use std::numeric_limits and std::numbers instead of defines 2025-03-29 13:32:38 +01:00
Chris Hennes
21c07cabc5 FreeCAD: Compiler warning fixes 2025-03-19 10:13:34 +01:00
PaddleStroke
61801fd727 Sketcher: Fix negative angle rendering negative bug 2025-03-13 15:28:23 +01:00
Florian Foinant-Willig
3e561a031b Fix Arc length look for angle > pi
and factorize some code
2024-12-09 11:51:02 -05:00
wmayer
636fa43c99 MSVC: Fix warnings and build failure 2024-06-12 10:36:58 -05:00
Florian Foinant-Willig
7f1936bc65 Gui: fix SoDatumLabel arrow disappear 2024-05-20 11:19:56 -05:00
wmayer
1a01ca17dd Gui: refactor SoDatumLabel::GLRender() 2024-05-16 21:24:57 -04:00
wmayer
a2003d4a08 Gui: fix linter warnings in SoDatumLabel 2024-05-16 21:24:57 -04:00
wmayer
f85e33b538 Gui: Fix possible crashes with SoDatumLabel
There are possible crashes in the methods:
* SoDatumLabel::getLabelTextCenter()
* SoDatumLabel::generatePrimitives()

The two methods expect three points but do not check that they are defined. Depending on the use case of the SoDatumLabel only
two points may be defined. Accessing a third point is undefined behaviour.
2024-05-16 21:24:57 -04:00
Florian Foinant-Willig
e2086ce1c7 Sketcher: ArcLength GUI 2024-03-25 22:32:20 +01:00
Florian Foinant-Willig
54fdeb4ba9 Core: Fix unselectable area in SoDatumLabel 2024-03-11 12:24:00 -05:00
PaddleStroke
718a287447 SoDatumLabel: Add arrowheads to angles. And improve arrowhead rendering. 2024-02-01 14:27:07 +01:00
Paddle
3b9a1f7949 SoDatumLabel : introduce distance arc helpers. 2024-01-19 11:13:09 +01:00
Paddle
ef2a723a32 Draw arc helpers for radius constraints. 2023-11-24 15:07:35 +01:00
Paddle
74a01c0d1b Improve angle constraint rendering. 2023-11-24 15:07:35 +01:00
Abdullah Tahiri
dca052bd9d Fix Compiler warnings of previous merged PRs 2023-11-08 15:20:13 +01:00
mos
55abfa201b removed unused variable 2023-11-06 11:19:52 -06:00
Paddle
ce4cb6eea7 Adds SoDatumLabel::getLabelTextCenter() to get the externalize the finding of position of text center. 2023-10-13 19:03:45 +02:00
wmayer
24cb532182 Gui: Remove bounding box computation from SoDatumLabel::GLRender() 2023-09-17 19:27:12 +02:00
Paddle
a13b05d877 SoDatumLabel: Make the textOffset persistent. 2023-09-17 13:05:53 +02:00
wmayer
ad10a01ad9 Gui: determine the bounding box of an SoDatumLabel outside its GLRender() method 2023-09-13 16:56:53 +02:00
wmayer
e09d8aaba6 Gui: modernize C++: use range-based for loop 2023-08-14 19:42:18 +02:00
Paddle
246014dddd TaskImage: fix issues 2023-04-12 16:48:08 +02:00
Paddle
68ed314604 TaskImage: use SoDatumLabel instead of basic line. 2023-04-12 16:48:07 +02:00
Paddle
271e3bec4a Move SoDatumLabel from Sketcher to Core so that it can be reused anywhere. 2023-04-12 16:48:07 +02:00