Commit Graph

362 Commits

Author SHA1 Message Date
tetektoza
c3f00556d4 Gui: Add hidden anchor object to root for transparency (#26590)
* Gui: Add hidden anchor object to the root for transparency

Image planes with transparency failed to render correctly in empty scenes
because OpenInventor's two-pass transparency rendering requires at least
one opaque object to properly initialize the depth buffer.

The fix adds a zero-scaled cube with no material node (making it use
OpenGL's default opaque material) to each image plane's scene graph.
This hidden object:
- Acts as a depth buffer anchor for transparent rendering
- Is invisible (scaled to 0,0,0)
- Has negligible performance impact

This matches the workaround already used in the rotation center indicator
and resolves the issue where image transparency only worked when the
rotation center, grid, or other opaque objects were visible.

* Gui: Exclude hidden anchor from bounding box calculations

Prevents the hidden anchor from affecting "fit all" and other bounding box
operations by wrapping it in `SoSkipBoundingGroup`.
2026-01-03 04:06:26 +00:00
Yash Suthar
f7dc91f9c3 Core: fix "Save Image" giving dark area as compare to viewport
Signed-off-by: Yash Suthar <yashsuthar983@gmail.com>
2025-12-14 14:49:58 +01:00
pre-commit-ci[bot]
9fe130cd73 All: Reformat according to new standard 2025-11-11 13:49:01 +01:00
tetektoza
5242020eca Gui: Use assignment to auto in if statement
Co-authored-by: Kacper Donat <kadet1090@gmail.com>
2025-10-20 20:21:02 +02:00
tetektoza
2e4fc31dba Gui: Add navigation modes to distinguish which nav mode requires CTRL 2025-10-20 20:18:28 +02:00
tetektoza
706ae8472f Gui: Add additional handling for Clarify Selection's long press
This patch adds handling for different contexts that Clarify Selection's
long press may occur in. For example, different navigation styles,
transform tool, or dragger presence.

This way we are sure that the context menu for Clarify Selection won't
be popping up for the user when using one of the above-mentioned
contexts.

Also, this adds handling for different navigation styles, to accept
CTRL+LMB as the long press mouse-key combos, instead of just
long-pressing LMB, as in those navigation styles LMB is mostly used as
rotation.
2025-10-20 20:18:28 +02: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
Chris Hennes
5d50e4ed7e Merge pull request #22340 from maxwxyz/3d-nav-cursors
Gui: Change navigation cursors to SVG
2025-09-07 19:11:14 -05:00
tetektoza
d3ce061d5e Gui: Allow long press timeout for Clarify Selection to be configurable 2025-09-05 02:05:52 +02:00
tetektoza
b780cf923f Part/Gui: Rename Pick Geometry tool to Clarify Selection
Co-authored-by: realthunder <realthunder@users.noreply.github.com>
2025-09-03 01:24:58 +02:00
tetektoza
3c5131e051 Gui: Add support for toggling PickGeometry with long-press LMB
Co-authored-by: realthunder <realthunder@users.noreply.github.com>
2025-09-03 01:24:58 +02:00
tetektoza
c856c9ea01 Core/Gui: Render primitives on top of the scene in PickGeometry
+ added some better grouping for items, which are assigned per object
  right now. For example, if we exceed 10 items per object it gets an
  additional group.

Co-authored-by: realthunder <realthunder@users.noreply.github.com>
2025-09-03 01:24:58 +02:00
tetektoza
5d49b4b108 Core: Respect highlighting for preselection too
Co-authored-by: realthunder <realthunder@users.noreply.github.com>
2025-09-03 01:24:57 +02:00
Kacper Donat
bc8caa49ed Gui: Show Axis Cross on top 2025-09-01 23:07:53 +02:00
Max Wilfinger
f10631fc11 Gui: Use BitmapFactory for generating cursors 2025-08-30 11:23:07 +02:00
Max Wilfinger
082241e88a Gui: Change navigation cursors to SVG 2025-08-30 11:23:07 +02:00
PaddleStroke
24a4598eda Core: Fit all : Do not process SoSkipBoundingGroup 2025-08-11 10:38:26 -05:00
theo-vt
be24c6bbf3 Sketcher: Sketch autoscale (#21084)
* Working scale prototype

* Call viewAll to fit geometries in the viewport post-scaling

* Exclude angle dimensions

* Scale the viewport rather than calling viewAll

* Scale dimension annotation along geometries

* Early return when counting more than one dimensional constraint

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Disable sketch autoscale if there are external geometries in the sketch

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Add a setting to disable the feature _ and eventually parametrize

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Check for objects in the viewport in the sketch's ancestry to decide wheter or not to autoscale

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* More consistent camera scaling

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Check for visual indicator in the whole document

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Find visible items in nested assemblies

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Check visual elements in assemblies nested in assemblies

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Set the dimension even if the scaling fails

* Allow constraints that interact with the origin axis/root

* Remove unused variable

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Misc fixes from review

* [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>
2025-06-09 18:31:44 +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
bofdahof
ba2c2ca5ad Console: rename PascalCase named methods to camelCase 2025-05-06 17:50:21 +02:00
Bas Ruigrok
7b46ac4cd6 Use longest edge in face for horizontal/vertical alignment (#20374)
* App: Add second direction to getCameraAlignmentDirection()

* Part: Find longest face edge for horizontal/vertical alignment

* Gui: Use longest face edge for horizontal/vertical alignment

* App: Improve horizontal/vertical alignment for Datums and LCS
2025-04-14 11:20:49 -05:00
Chris Hennes
95fbd95950 Merge pull request #20496 from hyarion/refactor/cppify-constants 2025-03-29 18:43:40 -05:00
Benjamin Nauck
b625e81a3e Gui: Use std::numeric_limits and std::numbers instead of defines 2025-03-29 13:32:38 +01:00
Andrea
9cfc345448 Remove old Coin code <=3
ubuntu 22.04 use libcoin v 4. https://launchpad.net/ubuntu/jammy/+package/libcoin-dev
2025-03-29 12:16:09 +01:00
Bas Ruigrok
de3853e837 Gui: Align to selection using a smaller rotation 2025-03-22 11:35:46 -05:00
Chris Hennes
21c07cabc5 FreeCAD: Compiler warning fixes 2025-03-19 10:13:34 +01:00
Chris Hennes
44908ad721 Merge pull request #19428 from tritao/base-tracy-profiler
Base: Add Tracy frame profiling support.
2025-03-14 04:12:05 +00:00
Joao Matos
0feab195ac Base: Add build support and instrumentation for the Tracy profiler. 2025-03-14 03:41:30 +00:00
Andrea
2d4ab5af20 REMOVE old QT<= 5.14 code
Ubuntu 22.04  use qt 1.15.3.
In the code is still used qt code <5.10.
A cleanup was done by removing qT code version used in ubuntu 18.04.
2025-03-05 09:32:06 +01:00
Chris Hennes
1a2070c36f Merge pull request #19636 from kadet1090/color-in-base
Base: Move App::Color to Base
2025-03-02 16:36:40 -06:00
Joao Matos
80d4cf9f40 Gui: Remove QtOpenGL.h. 2025-02-25 23:03:51 +00:00
Joao Matos
c3e5069190 Gui: Cleanup Qt OpenGL usings in QtOpenGL.h.
Previously the code defined compatiblity usings in `QtOpenGL.h` header,
which I think was added for backwards compatiblity with previous Qt
OpenGL widgets.

As far as I can tell, this is not necessary anymore, and can be cleaned
up.
2025-02-25 23:03:51 +00:00
Chris Hennes
9db06a5c87 Merge pull request #19719 from Rexbas/navicube-accumulative-animation
Gui: Accumulate orientation for NaviCube flat button animations
2025-02-24 17:15:45 +00:00
Kacper Donat
8dbc4042b3 Gui: Add 3 point lighting 2025-02-23 22:51:13 +01:00
Bas Ruigrok
ec041c0859 Gui: Return animation from setCameraOrientation and translateCamera 2025-02-21 21:57:00 +01:00
Adrian Insaurralde
9966806eda Fix spnav not enabled by default on linux after #19226 and #19407 2025-02-17 23:58:13 -03: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
Syres916
99eed953c3 [Gui] fix the FPS text visibilty issues raised in #19371 (#19385)
* [Gui] fix the FPS text visibilty issues
* [Gui] code efficiency based on suggestions
* [Gui] update color parameter
* [Gui] Fix Lint feedback
* [Gui] check if string is empty
2025-02-11 13:16:29 -06:00
Karliss
ea0105e966 Workaround for transparency problems on wayland.
Reset alpha channel value to 1 at the end of 3d  rendering. The way Qt handles OpenGL widgets with transparent pixels in their final output is inconsistent.
2025-02-11 07:59:28 -06:00
Chris Hennes
5869fdb95f Merge pull request #19420 from tritao/gui-selection-refactor
Gui: Selection code cleanups
2025-02-10 10:56:23 -06:00
tritao
359f832dfb Gui: Check if document exists in View3DInventorViewer::setOverrideMode. 2025-02-10 10:33:22 -06:00
Chris Hennes
d4d74a4464 Merge pull request #19433 from tritao/gui-general-code-cleanups
Gui: General code cleanups
2025-02-06 11:33:44 -06:00
tritao
02ab2deac7 Gui: Reorganize the navigation files into a top Navigation folder. 2025-02-05 20:21:00 -06:00
tritao
4260bd6fa4 Gui: Minor cleanups. 2025-02-05 22:13:07 +00:00
tritao
1d789a7972 Gui: Rename SoFCHighlightAction to preselect terminology. 2025-02-05 13:14:00 +00:00
tritao
589ff46a58 Gui: Rename SoFCUnifiedSelection::selectionRole for clarity. 2025-02-05 00:25:56 +00:00
Chris Hennes
5766974067 Merge pull request #16995 from benj5378/axisColors
[Gui] Axis colors changeable
2025-02-03 18:11:46 +01:00
Chris Hennes
58d64e2442 GUI: Disable legacy spnav code when legacy is false
We don't ever want to connect to both libspnav and NavLib
2025-02-03 12:03:34 -05:00
Benjamin Bræstrup Sayoc
44e3a94f29 [Gui] Make axis colors of corner axis changeable 2025-01-24 15:45:43 +01:00
Kacper Donat
c95c4e8fe4 Gui: Fix render order of datum planes 2025-01-20 11:38:57 -05:00