Commit Graph

39658 Commits

Author SHA1 Message Date
Chris Hennes
8d110b3b0b Merge pull request #18354 from CalligaroV/pd-hole-restore-missing-refineShapeIfActive
[PartDesign] Hole: restore missing call to FeatureAddSub::refineShapeIfActive()
2024-12-16 11:41:50 -05:00
marioalexis84
d1e65a47f3 Fem: Add smoothing filter extension to contours filter (#18088)
* Fem: Add smoothing filter extension to contours filter
2024-12-16 10:40:02 -06:00
wmayer
8fdbdccd8f Core: Move LCS migration warning to Std_Open command 2024-12-16 11:34:39 -05:00
Benjamin Nauck
a2c980f7d6 Revert "Address the poor performance of the existing unique-name generation (#17944)"
This reverts commit 83202d8ad6.

# Conflicts:
#	src/Base/Tools.cpp
#	src/Base/Tools.h
2024-12-16 17:31:43 +01:00
Roy-043
844d88fb7a BIM: Fix ArchReference problem caused by TNP code
Due to TNP code Document.xml can contain (for example)` <Part ElementMap="0.4" file="Box001.Shape.brp"/>` instead of `<Part file="Box001.Shape.brp"/>`.
2024-12-16 15:23:47 +01:00
wmayer
e698c73a3a Part: Fix crash due to infinite recursion 2024-12-15 16:20:30 +01:00
wmayer
aa228f2b32 Core: Fix false-positive in migrateXAxisPlacement()
Use a looser tolerance to compare the rotations of the axes and planes of the coordinate system
2024-12-15 11:34:03 +01:00
Furgo
e458526279 Disable external zipios usage for Debian builds 2024-12-14 10:49:32 -05:00
Jacob Oursland
e3d81eaf69 CI: Enable GitHub Problem Matchers for compiler warnings. 2024-12-14 10:46:06 -05:00
Chris Hennes
7c1d984b7a App: Fix encoding of Datums.cpp 2024-12-14 14:31:41 +01:00
Chris Hennes
b25b83c1a5 Addon Manager: Support case of repo=None in worker 2024-12-13 20:29:19 -05:00
Chris Hennes
1500264079 Base: Add missing PCH include to ServiceProvider 2024-12-13 20:28:42 -05:00
Chris Hennes
f663e4fce4 Gui: Rename variable to eliminate macro conflict
Windows.h defines 'near' and 'far' macros, and they are actually used in the Inventor codebase (so we can't just undefine them).
2024-12-13 20:28:18 -05:00
wmayer
5a6535d908 Fix several compiler warnings:
* Fix [-Wsign-compare]
* Fix [-Wc++20-designator]: designated initializers are a C++20 extension
* Fix [-Wunused-parameter]
2024-12-13 20:28:04 -05:00
Chris Hennes
c80bb958f3 Merge pull request #18332 from Ondsel-Development/core_LCS3
Core Datums: Card4 : implement part subclasses.
2024-12-13 15:59:10 -05:00
Chris Mayo
21411fcf3a Remove LibPack FLANN comment
cMake/UseLibPack10x.cmake was removed in:
e0220e7830 ("Remove unused cMakes", 2022-02-22)
2024-12-13 21:19:36 +01:00
Chris Hennes
032a70140e CI: Remove readability-identifier-length check (#18403) 2024-12-13 16:23:50 -03:00
marioalexis
8ad0395e21 Gui: Add missing header <optional> 2024-12-13 13:53:15 -05:00
PaddleStroke
fa8b273f7d Merge branch 'main' into core_LCS3 2024-12-13 18:48:35 +01:00
Andrea
f5a4ec01f8 [Mod] Clean AssemblyObject.cpp
Removed dead code

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

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

.
2024-12-13 12:34:46 -05:00
kwahoo2
a4c85232c9 Gui: add method to select objects with a 3D ray (#16789)
* Implementation of ray picking method for 3d picking

* Ray picking logic moved to C++

(cherry picked from commit ed23214c0bce7b70fd1003a7c4612e2d0d7da4cb)

* formatting, do not return unecessary dict keys, near plane clipping
2024-12-13 11:32:37 -06:00
Vincent Belpois
d4b7d074ee Sketcher: Fix double RMB to quite polyline after closed shape 2024-12-13 12:30:41 -05:00
mosfet80
29d685b452 Clean ViewProviderAssembly.cpp 2024-12-13 12:27:40 -05:00
Yorik van Havre
9efa615fb4 BIM: Fixed shape loading - fixes #18391 2024-12-13 12:22:04 -05:00
David Kaufman
1955f28053 [CAM] implement multipass profile operations (#17326)
* implement multipass profile operations

* [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>
2024-12-13 11:20:32 -06:00
wmayer
00f6fbeaa3 PD: Fix possible crash in up to shape 2024-12-13 12:15:49 -05:00
wmayer
e7e410323e Sketch: Fix possible crash in BSpline::splineValue
There is an underflow of an unsigned int in the calling instance that sets the parameter 'p' to 2**32-1.
But the size of the passed vector is 0. To fix the crash first check if p is less then the size of the vector.

See: https://forum.freecad.org/viewtopic.php?t=92815
2024-12-13 12:08:31 -05:00
WandererFan
f12999724b [TD]respect locale for date autofill (#18132)
* [TD]respect locale for date autofill

* [TD]fix merge conflict

* Apply suggestions from code review

---------

Co-authored-by: Chris Hennes <chennes@pioneerlibrarysystem.org>
2024-12-13 11:07:54 -06:00
PaddleStroke
7620e0a958 TaskAttacher: Refactoring 2024-12-13 18:04:10 +01:00
PaddleStroke
e517400ed9 LCS migration : replace warning by a QMessageBox. 2024-12-13 18:04:10 +01:00
PaddleStroke
1ce8f2c859 AssemblyObject: Use std::unordered_set instead of vector. 2024-12-13 18:04:10 +01:00
PaddleStroke
024fee7f97 Assembly: Enable the use of App::Datums 2024-12-13 18:04:10 +01:00
PaddleStroke
5d02008227 Remove PartDesign Datums commands from the UI. 2024-12-13 18:04:10 +01:00
PaddleStroke
4066100a79 Attacher.cpp: Remove special handling of App::Datums since it is already done in Part::Feature::getTopoShape 2024-12-13 18:04:10 +01:00
PaddleStroke
c5fbbb3830 SubShapeBinder: Add support for point. 2024-12-13 18:04:10 +01:00
PaddleStroke
9504b7e569 PartDesign: Enable the use of the core datums as references. 2024-12-13 18:04:10 +01:00
PaddleStroke
e76b638298 Task attacher: Handle initial selection when no refs. 2024-12-13 18:04:10 +01:00
PaddleStroke
deb6ebd276 TaskAttacher: Fix the string maker such that it does not show TNP string. 2024-12-13 18:04:10 +01:00
PaddleStroke
a6efacdf24 TaskAttacher: Make sure hierarchy is respected when adding references. 2024-12-13 18:04:10 +01:00
PaddleStroke
0a9a97fc63 Run precommit on TaskAttacher.cpp 2024-12-13 18:04:10 +01:00
PaddleStroke
32bf49cb8a Part: AttachExtension: Refactor to remove code duplicates. 2024-12-13 18:04:10 +01:00
PaddleStroke
48dbdacdbd Part: add datum objects and commands to create them. 2024-12-13 18:04:10 +01:00
PaddleStroke
fc56730648 Core: Datums: Fix axis placement and add migration script. 2024-12-13 18:04:10 +01:00
Kacper Donat
aed305da64 Base: Add Services and ServiceProvider
This is intended to be used for intra-module communication. Modules can
specify service that are then implemented by other modules. This way
we can use features from for example part in Core without relying on the
Part module explicitly.

Base does provide Service definition - which is basically an abstract
class with pure virtual methods. This service then can be implemented
in other modules and accessed in runtime via ServiceProvider class that
stores all implementations.

ServiceProvider does store multiple implementations so in theory it is
possible to use it to provide granular implementations. For example,
part can provide CenterOfMass service that provides center of mass for
part features, mesh can implement another one for meshes and then we can
iterate over all implementations and find one that can provide center of
2024-12-13 12:01:13 -05:00
Syres916
752b5dcf68 [Gui] Tree, set FontSize on start of application 2024-12-13 11:58:24 -05:00
LarryWoestman
f1e67c9641 CAM: fixed A, B, and C axis handling; added relevant tests (#18103)
* CAM:  fixed A, B, and C axis handling; added relevant tests

* [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>
2024-12-13 10:55:47 -06:00
Kevin Martin
83202d8ad6 Address the poor performance of the existing unique-name generation (#17944)
* Address the poor performance of the existing unique-name generation

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:

Create UniqueNameManager to keep a list of existing names organized in
a manner that eases unique-name generation. This class essentially acts
as a set of names, with the ability to add and remove names and check if
a name is already there, with the added ability to take a prototype name
and generate a unique form for it which is not already in the set.

Eliminate Tools::getUniqueName

Make DocumentObject naming use the new UniqueNameManager class

Make DocumentObject Label naming use the new UniqueNameManager class.
Labels are not always unique; unique labels are generated if the
settings at the time request it (and other conditions). Because of this
the Label management requires additionally keeping a map of counts
for labels which already exist more than once.
These collections are maintained via notifications of value changes on
the Label properties of the objects in the document.

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 would be simpler if existing
fill-container methods all used this.
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.

The unit tests for Tools:getUniqueName have been changed to test
UniqueNameManager.makeUniqueName instead.
This revealed a small regression insofar as passing a prototype name
like "xyz1234" to the old code would yield "xyz1235" whether or
not "xyz1234" already existed, while the new code will return the next
name above the currently-highest name on the "xyz" model, which could
be "xyz" or "xyz1".

* Correct wrong case on include path

* Implement suggested code changes
Also change the semantics of visitProperties to not have any short-circuit return

* Remove reference through undefined iterator

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

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

* Fix up some comments for DOxygen

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-12-13 10:54:46 -06:00
xtemp09
b1f93bc51e [Spreadsheet] Enable zoom in Spreadsheet (#16130)
* [Spreadsheet] Enable zoom in Spreadsheet

Closes #6094. This commit also fixes page tab order of Spreadsheet
settings in Preferences.

* Spreadsheet: apply clang-format

---------

Co-authored-by: Chris Hennes <chennes@pioneerlibrarysystem.org>
2024-12-13 10:52:51 -06:00
Chris Hennes
0416ec1b4e Merge pull request #18405 from FreeCAD/pre-commit-ci-update-config
[pre-commit.ci] pre-commit autoupdate
2024-12-13 11:52:03 -05:00
marioalexis
c02aa87a35 Fem: Make it possible to run CalculiX with one core - fixes #18339 2024-12-13 11:50:59 -05:00