Commit Graph

38231 Commits

Author SHA1 Message Date
Roy-043
6d353393ff Gui: put SolidWorks navigation style in A-Z order
#19568 adds the SolidWorks navigation style. In the Gui the new style appeared at the bottom of the list below 'Touchpad'. This PR restores the A-Z order of the list.
2025-02-27 15:03:27 -03:00
Roy-043
0ca76cc464 Draft: Fix error in #19738 (#19896)
My bad. Goes to show that even 'simple' PRs must be tested.
2025-02-27 14:06:01 +01:00
Gaël Écorchard
71dc06cf90 Fix error on missing attribute IfcProject.Declares (#19398)
* [BIM] Use relative imports

Also fix other issues with imports.

Signed-off-by: Gaël Écorchard <gael@km-robotics.cz>

* [BIM] Avoid two bare except

Signed-off-by: Gaël Écorchard <gael@km-robotics.cz>

* [BIM] Replace not ... in with ... not in

Also fix whitespace between functions.

Signed-off-by: Gaël Écorchard <gael@km-robotics.cz>

* [BIM] Fix error with missing IFC2X3.IfcProject.Declares

Fix `entity instance of type 'IFC2X3.IfcProject' has no attribute 'Declares'`.

Signed-off-by: Gaël Écorchard <gael@km-robotics.cz>

---------

Signed-off-by: Gaël Écorchard <gael@km-robotics.cz>
Co-authored-by: Gaël Écorchard <gael@km-robotics.cz>
2025-02-27 13:58:13 +01:00
Roy-043
9d700d9826 BIM: fix ArchAxis index errors
Fixes #19577

Apparently the ViewObject can be updated before the Shape of the objects has been changed. To catch this the number of edges is checked in the `onChanged` method of the ViewObject.

There was an additional index error if the Limit property was not zero.
2025-02-27 11:15:26 +01:00
Roy-043
2a645d36b8 Draft: Fix error in #19738
My bad. Goes to show that even 'simple' PRs must be tested.
2025-02-27 10:41:54 +01:00
Chris Hennes
b74ead4ffa Merge pull request #19886 from chennes/tdAddMissingPrecomp
TD: Adding missing PCH include
2025-02-27 03:58:52 +00:00
xtemp09
4d4073c042 [Spreadsheet] Remove prepended apostrophe if cell content is copied into clipboard (#19781)
* [Spreadsheet] Remove prepended apostrophe if cell content is copied into
clipboard

Closes #10058.
2025-02-26 21:27:55 -06:00
Chris Hennes
5217c2864b Spacemouse: Add #include <chrono> 2025-02-26 21:21:58 -06:00
Chris Hennes
c6fef04ab0 TD: Adding missing PCH include 2025-02-26 17:41:27 -06:00
Furgo
56f0f64015 Do not decrease reference counting for string 2025-02-26 13:36:45 +00:00
Chris Hennes
cf477695f9 Merge pull request #19671 from kadet1090/placement-indicator
Gui: Add Show Placement helper
2025-02-25 17:40:58 +00:00
PaddleStroke
bf40ed1376 FEM Update PreCompiled.h to fix build 2025-02-25 16:58:25 +00:00
Benjamin Bræstrup Sayoc
755229df23 Build: suppress warnings from 3rd party libraries
Warnings from 3rd parties are not relevant and are only polluting the warning output. Marking these libraries as SYSTEM suppresses warning.

https://gcc.gnu.org/onlinedocs/cpp/Invocation.html#index-I
https://gcc.gnu.org/onlinedocs/cpp/System-Headers.html
2025-02-25 14:39:05 +00:00
Benjamin Bræstrup Sayoc
b5885936d3 TechDraw: extract QGIDatumLabel 2025-02-25 14:25:31 +00:00
tritao
742627868e Gui: Fix regression in SelectionObserverPython::removeObserver. 2025-02-25 14:21:48 +00:00
Max Wilfinger
b07caa732e Remove hack around geometry visibility in active sketch.
Revert #14386 and #16378
2025-02-24 22:09:37 +00:00
Furgo
c0569a35b8 Add-On Manager: collapse up-level vendor_path reference for better legibility (#19828) 2025-02-24 12:10:26 -06:00
mosfet80
6ae36bc1e7 [Mod] clean Idf.py 2025-02-24 17:22:39 +00:00
Chris Hennes
30d5e0198f 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
Roy-043
bf5e28a502 Draft: fix alignment of sketches in SVG and legacy DXF export
Fixes #5990
Supersedes #13652

This solution only works for sketches. The export of other planar objects remains the same.

This is similar to the way the C++ DXF exporter handles things. What is different here is that if multiple sketches are exported they are assumed to have the same normal, and their position relative to each other is preserved.
2025-02-24 17:13:51 +00:00
Roy-043
074807c378 Draft: change 'Filled' to 'Make face' in UI
Fixes #19715.

The related parameter has been renamed as well and other references to 'fill mode' have been updated.
2025-02-24 17:10:13 +00:00
Roy-043
14f15c4a50 Assembly: fix doCommand code in CommandExportASMT.py
See:
https://forum.freecad.org/viewtopic.php?t=94952
2025-02-24 17:06:28 +00:00
André Althaus
84d850afc9 Always update the element map version if it's not valid or unknown
_Ver can contain "?" after loading and in some circumstances this is not
cleared (often by setValue()) before saving (MultiPattern children or empty Part::Feature).
When saved the same "?" is then written again to the file causing the
recomputing dialog to pop up again and again.

This not only checks for an empty _Ver but also explicitly for "?" and
then regenerating the version if necessary.
2025-02-24 17:00:18 +00:00
Andrew Shkolik
a6c92e19f6 Surface - Fill boundary curves not honor SplitCurve edge if it's part of BSpline 2025-02-24 16:59:31 +00:00
Benjamin Bræstrup Sayoc
bf1f99c070 TechDraw: hard type enums, part 3 (#19418)
* Remove magic number and hard type enums in LineNameEnum.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.

* Remove magic number and hard type enums in QGIFace.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.

* Remove magic number and hard type enums in Enums.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.

* Remove magic number and hard type enums in QGVPage.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.

* Remove magic number and hard type enums in TaskSurfaceFinishSymbols.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.

* Remove magic number and hard type enums in QGTracker.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-24 11:58:05 -05:00
theepicviolin
38797d1fa4 Add SolidWorks navigation style (#19568) 2025-02-24 10:57:00 -06:00
mosfet80
0d359a515b 3rd party: Updated json lib (#19617)
Serialize empty tuple into '[]'
Optimize binary get_number implementation by reading multiple bytes at once
fix: integer parsed as float when EINTR set in errno
2025-02-24 10:53:47 -06:00
ᴩʜᴏɴᴇᴅʀᴏɪᴅ
cf21e9a542 [ Doxygen ] Improved Parameter Group - Copy & Insert (#19563) 2025-02-24 10:52:34 -06:00
Chris Hennes
c3381617f2 Merge pull request #19084 from tritao/gui-selection-viewproviderfeaturepy
Gui: Provide `ViewProviderFeaturePython` selection callbacks
2025-02-24 16:46:36 +00:00
Chris Hennes
479716d4c5 Merge pull request #19426 from marioalexis84/fem-ccx_vtk
Fem: Add frd format converter to VTK
2025-02-24 16:43:07 +00:00
Chris Hennes
5f35875c46 Merge pull request #19516 from tritao/tools-python-bindings-gen
Tools: Introduce a new Python-based C++ bindings generator
2025-02-24 16:39:24 +00:00
Joao Matos
cc6ffb44de Core: Move PyCXX library to src/3rdParty. 2025-02-24 16:36:06 +00:00
sliptonic
01dbe102f2 Merge pull request #19725 from chennes/cmakeUpdates2025
CMake: Clean up policies
2025-02-24 17:33:10 +01:00
Kacper Donat
2ee47b4f1d Gui: Add Show Placement utility 2025-02-24 17:30:27 +01:00
Kacper Donat
cc7d067478 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
9e2865a8d4 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
7078982660 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
62432046bf Gui: Fix empty sketch plane rendering 2025-02-24 17:30:27 +01:00
Kevin Martin
41f09db9e1 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
2780c9b13e Merge pull request #19397 from kadet1090/three-point-lighting
Add three-point lighting
2025-02-24 16:22:34 +00:00
mosfet80
ab8f178e0e 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
0aed23ca81 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
df2c6637e6 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
e55f0cef4b Add-On Manager: generalize removal of non-compatible pip options for the snap package (#19814) 2025-02-24 09:38:47 -06:00
Furgo
b48952a281 Add-On Manager: list correct vendor path for snaps (#19816) 2025-02-24 09:36:07 -06:00
tritao
b1a24deac6 Gui: Provide ViewProviderFeaturePython selection callbacks
Adds support for Python-based selection callbacks to
`ViewProviderFeaturePython` objects.

It follows the same conventions as `SelectionObserverPython`, follows an
example:

```python
    def setPreselection(self, document, object, element):
        print("setPreselection: %s.%s.%s"%(document, object, element))

    def removePreselection(self, document, object, element):
print("removePreselection: %s.%s.%s"%(document, object,
element))

    def addSelection(self, document, object, element, position):
print("addSelection: %s.%s.%s at %s"%(document, object, element,
str(position)))

    def removeSelection(self,document, object, element):
        print("removeSelection: %s.%s.%s"%(document, object, element))

    def setSelection(self,doc):
        sel = FreeCADGui.Selection.getSelection(doc)
        print("setSelection: %s"%sel)

    def clearSelection(self,doc):
        print("clearSelection\n")
```
2025-02-24 15:02:38 +00:00
Chris Hennes
2c485cf998 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
2f35f1c561 Base: Add fromPercent and toPercent helpers 2025-02-23 22:51:13 +01:00
Kacper Donat
7f984811e8 Gui: Add 3 point lighting 2025-02-23 22:51:13 +01:00
Roy-043
2aaf67029b 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