Commit Graph

40368 Commits

Author SHA1 Message Date
Kacper Donat
569ddc345b Gui: Add Show Placement utility 2025-02-24 17:30:27 +01:00
Kacper Donat
076ab800ff Gui: SoFrameLabel text color from base color support
This adds support for obtaining text color from the state of the graph
(base color) to SoFrameLabel nodes.
2025-02-24 17:30:27 +01:00
Kacper Donat
0a0c5f828e Gui: Add SoFCPlacementIndicatorKit node
This adds SoFCPlacementIndicatorKit - a node that can be used to
show position of object to the user. It can be configured in various
ways so it should be a good base for future unification of features like
this across the application.
2025-02-24 17:30:27 +01:00
Kacper Donat
8fc78d8ff6 Base: Add Vector3*::Unit* axis constants
This is simple helper that can be used to replace hardcoded values of
base axis with properly labeled ones.
2025-02-24 17:30:27 +01:00
Kacper Donat
caf6156181 Gui: Fix empty sketch plane rendering 2025-02-24 17:30:27 +01:00
Kevin Martin
edb8e4c937 Address performance of existing unique-name generation (Part 2) (#18676)
As described in Issue 16849, the existing Tools::getUniqueName method
requires calling code to form a vector of existing names to be avoided.

This leads to poor performance both in the O(n) cost of building such a
vector and also getUniqueName's O(n) algorithm for actually generating
the unique name (where 'n' is the number of pre-existing names).

This has  particularly noticeable cost in documents with large numbers
of DocumentObjects because generating both Names and Labels for each new
object incurs this cost. During an operation such as importing this
results in an O(n^2) time spent generating names.

The other major cost is in the saving of the temporary backup file,
which uses name generation for the "files" embedded in the Zip file.
Documents can easily need several such "files" for each object in the
document.

This update includes the following changes to use the newly-added
UniqueNameManager as a replacement for the old Tools::getUniqueName
method and deletes the latter to remove any temptation to use it as
its usage model breeds inefficiency:

Eliminate Tools::getUniqueName, its local functions, and its unit tests.

Make DocumentObject naming use the new UniqueNameManager class.

Make DocumentObject Label naming use the new UniqueNameManager class.
This needs to monitor DocumentObject Labels for changes since this
property is not read-only. The special handling for the Label
property, which includes optionally forcing uniqueness and updating
links in referencing objects, has been mostly moved from
PropertyString to DocumentObject.

Add Document::containsObject(DocumentObject*) for a definitive
test of an object being in a Document. This is needed because
DocumentObjects can be in a sort of limbo (e.g. when they are in the
Undo/Redo lists) where they have a parent linkage to the Document but
should not participate in Label collision checks.

Rename Document.getStandardObjectName to getStandardObjectLabel
to better represent what it does.

Use new UniqueNameManager for Writer internal filenames within the zip
file.

Eliminate unneeded Reader::FileNames collection. The file names
already exist in the FileList collection elements. The only existing
use for the FileNames collection was to determine if there were any
files at all, and with FileList and FileNames being parallel
vectors, they both had the same length so FileList could be used
for this test..

Use UniqueNameManager for document names and labels. This uses ad hoc
UniqueNameManager objects created on the spot on the assumption that
document creation is relatively rare and there are few documents, so
although the cost is O(n), n itself is small.

Use an ad hoc UniqueNameManager to name new DymanicProperty entries.
This is only done if a property of the proposed name already exists,
since such a check is more-or-less O(log(n)), almost never finds a
collision, and avoids the O(n) building of the UniqueNameManager.
If there is a collision an ad-hoc UniqueNameManager is built
and discarded after use.
The property management classes have a bit of a mess of methods
including several to populate various collection types with all
existing properties. Rather than introducing yet another such
collection-specific method to fill a UniqueNameManager, a
visitProperties method was added which calls a passed function for
each property. The existing code (e.g. getPropertyMap) would be
simpler if they all used this but the cost of calling a lambda
for each property must be considered. It would clarify the semantics
of these methods, which have a bit of variance in which properties
populate the passed collection, e.g. when there are duplicate names..
Ideally the PropertyContainer class would keep a central directory of
all properties ("static", Dynamic, and exposed by ExtensionContainer and
other derivations) and a permanent UniqueNameManager. However the
Property management is a bit of a mess making such a change a project
unto itself.
2025-02-24 10:23:53 -06:00
Chris Hennes
bd3133a5f2 Merge pull request #19397 from kadet1090/three-point-lighting
Add three-point lighting
2025-02-24 16:22:34 +00:00
mosfet80
24fa7c0166 Clean StartupProcess.cpp (#19642)
Co-authored-by: Benjamin Nauck <benjamin@nauck.se>
Co-authored-by: Chris Hennes <chennes@pioneerlibrarysystem.org>
2025-02-24 10:21:26 -06:00
Andrew
5c7a65bdb9 fixes #19582 Sketcher - cannot project BSpline from another sketch (#19700)
Also fixes some other types of external geo

---------

Co-authored-by: Andrew Shkolik <andrew.shkolik@selerix.com>
Co-authored-by: realthunder <realthunder.dev@gmail.com>
2025-02-24 10:17:24 -06:00
Kaung Zin Hein
0b2610f1af Gui: "Open File Location/Reveal in Finder" in Tree view (#19805)
* Add: barebone openFileLocation on linux
* Feat: Add handling for different types of os
* Fix: Use preprocessors
* Fix: directive typo

---------

Signed-off-by: Kaung Zin Hein <83657429+Zen-cronic@users.noreply.github.com>
2025-02-24 10:15:28 -06:00
Furgo
faa8c5b080 Add-On Manager: generalize removal of non-compatible pip options for the snap package (#19814) 2025-02-24 09:38:47 -06:00
Furgo
3428bb655b Add-On Manager: list correct vendor path for snaps (#19816) 2025-02-24 09:36:07 -06:00
Chris Hennes
51613a5b56 Merge pull request #19253 from Jonezzzzz/SketcherGroupCommandsFix
Sketcher: Fixed Inconsistency between button tooltips and labeling for shortcuts.
2025-02-23 22:20:07 +00:00
Kacper Donat
36195d1981 Base: Add fromPercent and toPercent helpers 2025-02-23 22:51:13 +01:00
Kacper Donat
8dbc4042b3 Gui: Add 3 point lighting 2025-02-23 22:51:13 +01:00
Roy-043
4e5bd67291 Assembly: Make 2 menu texts more consistent
Menu texts in the Assembly WB are in title case without articles.

The following menu texts did not follow that 'standard':
* Insert a new part
* Create a Fixed Joint
2025-02-23 13:39:25 -06:00
Adrian Insaurralde
3ebd6ed88d CI: fix assembly unit tests executable name 2025-02-23 13:23:25 -06:00
Syres916
1d465c22c0 [Gui] Expression dialog OK, capitalised and Alt+O shortcut applied 2025-02-23 16:51:04 +01:00
mosfet80
0f11cbdaaa clean QGSPage.cpp
-removed unused variable

-clean code
2025-02-23 09:17:53 -05:00
wandererfan
06d81c73ce [TD]fix page selection from list 2025-02-23 09:16:33 -05:00
wandererfan
6d1559afb6 [TD]prevent quiet no-result on no page 2025-02-23 09:16:33 -05:00
WandererFan
112c83bea7 Update src/Mod/TechDraw/Gui/ViewProviderPage.cpp
Co-authored-by: Benjamin Bræstrup Sayoc <benj5378@outlook.com>
2025-02-23 09:15:47 -05:00
WandererFan
19ca270456 Update src/Mod/TechDraw/Gui/ViewProviderPage.cpp
Co-authored-by: Benjamin Bræstrup Sayoc <benj5378@outlook.com>
2025-02-23 09:15:47 -05:00
WandererFan
81e81843db Update src/Mod/TechDraw/Gui/ViewProviderPage.cpp
Co-authored-by: Benjamin Bræstrup Sayoc <benj5378@outlook.com>
2025-02-23 09:15:47 -05:00
wandererfan
346851b687 [TD]lint removal 2025-02-23 09:15:47 -05:00
wandererfan
8c4315ba20 [TD]fix maximize tab on view insertion 2025-02-23 09:15:47 -05:00
WandererFan
abb57f10b6 Update src/Mod/TechDraw/Gui/QGIViewDimension.cpp
Co-authored-by: Benjamin Bræstrup Sayoc <benj5378@outlook.com>
2025-02-23 09:14:23 -05:00
wandererfan
4c39987df4 [TD]fix bad formatting 2025-02-23 09:14:23 -05:00
WandererFan
022dde80f1 Update src/Mod/TechDraw/Gui/QGIViewDimension.cpp
Co-authored-by: Benjamin Bræstrup Sayoc <benj5378@outlook.com>
2025-02-23 09:14:23 -05:00
WandererFan
d928750026 Update src/Mod/TechDraw/Gui/QGIViewDimension.cpp
Co-authored-by: Benjamin Bræstrup Sayoc <benj5378@outlook.com>
2025-02-23 09:14:23 -05:00
wandererfan
812976f9df [TD]lint removal 2025-02-23 09:14:23 -05:00
wandererfan
b084d7fadb {TD]Set Arrow end property at Dimension level. 2025-02-23 09:14:23 -05:00
bofdahof
6f84cd5971 current src path no longer required 2025-02-22 20:48:30 -06:00
Jacob Oursland
8fa089ba9c CMake: Remove unsupported DEPENDS args to CMake macros. 2025-02-22 20:41:15 -06:00
Chris Hennes
d70b33a87c Addon Manager: Fix pip usage on Snap and Appimage 2025-02-22 12:02:06 -06:00
GHDE
bce3a3ce65 fixed openExternalLinks in DlbAbout (FreeCAD#16423) 2025-02-22 12:00:39 -06:00
Andrea
364ee7c295 update conda
switch to last 24 version
fix:
https://github.com/conda/conda-libmamba-solver/releases
2025-02-22 17:37:24 +01:00
Colin Rawlings
3f4093aaed Add check that the solid_name is valid
Avoid errors when hovering on the menu's label
2025-02-21 14:22:40 -06:00
bofdahof
0058b0d61c Remove OpenCascade Community Edition 2025-02-21 14:21:21 -06:00
Chris Hennes
ece24371f9 Merge pull request #19660 from adrianinsaval/fix-spnav-regression
Fix spnav not enabled by default on linux after #19226 and #19407
2025-02-21 14:20:55 -06:00
bofdahof
11ed923503 Remove second vtk listing. See #19607 2025-02-21 14:18:10 -06:00
Chris Hennes
3bd1a3f6b0 Merge pull request #19739 from kadet1090/is-null-or-empty
Base: Add isNullOrEmpty string helper
2025-02-21 13:49:10 -06:00
Joao Matos
6452050808 CMake: Update minimum Python version to 3.10 2025-02-21 09:45:13 -06:00
Kacper Donat
55dfa203a8 Update src/App/Application.cpp
Co-authored-by: Benjamin Nauck <benjamin@nauck.se>
2025-02-21 15:04:43 +01:00
Kacper Donat
cc2efa90f8 Base: Add isNullOrEmpty string helper
This adds isNullOrEmpty string helper that cheks if string is... well
null or empty. It is done to improve readability of the code and better
express intent.
2025-02-21 15:04:43 +01:00
Lukas Neubert
8c8179feb9 readme: fix discord invite 2025-02-21 08:06:16 +01:00
Alfredo Monclus
13ffd95469 style: simplify fx icon to be more legible at small sizes 2025-02-20 19:59:56 +01:00
lorenz
dcaf752b16 add option to disable check for pivy at build-time (#19718)
Co-authored-by: João Matos <joao@tritao.eu>
2025-02-20 08:32:58 -03:00
xtemp09
cc313b84fa [Spreadsheet] Fix popup close issue (#19676)
* [Spreadsheet] Fix popup close issue
2025-02-19 15:49:11 -06:00
Roy-043
af96e50eea Draft: improve upgrade and downgrade
Fixes #16333.
Follow-up of #19487.

* The functions have been made nesting-aware. New objects are put in the same container (Group, Part) as the original objects. As a consequence for some operations the original objects must be in the same container as well.
* New objects receive the visual properties of the original objects. This is not always perfect. For example when upgrading to multiple wires there is currently no check to see which edge came from which orginal object. The fact that the `format_object` function is called from the Draft `make*` functions is problematic here. If construction mode is active `make_wire` puts new objects in the construction group and we don't always want that. This has been solved with a workaround (see 'cludge' in the code).
* The 'de-parametrize' downgrade option has also been enabled for features of PartDesign Bodies that have the `Profile` property.
* Before deleting objects there is a check to see if they are in use elsewhere (`InList` check). Base objects of arrays are not deleted if they are visible. If a PartDesign Body, or an object inside a Body is selected, the whole Body is deleted.
* The force options did not work for functions that take a single object.
* The `getShapeFromMesh` function in ArchCommands.py could return a solid that was not closed. A check for that has been added.
2025-02-19 18:06:12 +01:00