Commit Graph

30397 Commits

Author SHA1 Message Date
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
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
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
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
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
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
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
mosfet80
4698639206 clean QGSPage.cpp
-removed unused variable

-clean code
2025-02-23 09:17:53 -05:00
wandererfan
f1d10268e2 [TD]fix page selection from list 2025-02-23 09:16:33 -05:00
wandererfan
f831b34378 [TD]prevent quiet no-result on no page 2025-02-23 09:16:33 -05:00
WandererFan
a2827acf7e 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
f86bc82709 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
bae98e071d 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
8e868c3c1f [TD]lint removal 2025-02-23 09:15:47 -05:00
wandererfan
1a7ed84278 [TD]fix maximize tab on view insertion 2025-02-23 09:15:47 -05:00
WandererFan
0c7245dba2 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
d5317ead9e [TD]fix bad formatting 2025-02-23 09:14:23 -05:00
WandererFan
0026766183 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
713e6e6462 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
ae38fb51e2 [TD]lint removal 2025-02-23 09:14:23 -05:00
wandererfan
9ee3bd5629 {TD]Set Arrow end property at Dimension level. 2025-02-23 09:14:23 -05:00
Chris Hennes
86e8355478 CAM: Remove C++14 workaround for boost 2025-02-22 20:48:44 -06:00
Chris Hennes
99b088e94e Mesh: Remove explicit C++17 requirement 2025-02-22 20:48:44 -06:00
Chris Hennes
f92fcbd089 Addon Manager: Fix pip usage on Snap and Appimage 2025-02-22 12:02:06 -06:00
marioalexis
5042b94463 Fem: Add metadata info to blocks 2025-02-22 14:46:50 -03:00
marioalexis
e84eb920dc Fem: Add frd format converter to VTK 2025-02-22 14:46:50 -03:00
Colin Rawlings
f74efa319c 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
Kacper Donat
12a69fe296 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
xtemp09
e1512dc009 [Spreadsheet] Fix popup close issue (#19676)
* [Spreadsheet] Fix popup close issue
2025-02-19 15:49:11 -06:00
Roy-043
5087c1949f 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
Yorik van Havre
463c7f72a1 BIM: Do not change important pref options without user's consent - fixes #19163 2025-02-19 12:27:32 -03:00
Benjamin Bræstrup Sayoc
dda05369c4 Base: remove unneeded includes 2025-02-18 11:07:57 -06:00
Furgo
e7763236bc Fix one last instance of NativeIFC 2025-02-18 13:22:23 +01:00
Furgo
6d48d6fe39 Use correct case 2025-02-18 13:22:23 +01:00
Furgo
aad16b2391 Improve legibility of NativeIFC in preferences 2025-02-18 13:22:23 +01:00
JULIEN MASNADA
065c5cff22 [BIM] SH3DImporter: miscellaneous improvments (#19335)
* Fix duplicated groups

* Fixed windows spaning several floors

* Fixing doorOrWindow positioning. Allowing to DEBUG_GEOMETRY

* Fixed default color for floor and ground

* Fixed some windows positioning issue

* Fixed invalid modification of wall array. Changed default window type to allow opening

* fixed some import failures. Added some new windows

* Fixed some more edge cases

* Use doc transaction. Fixed import of room based on self-intersecting polygon.

* Added default furniture color. Fixed wall reference face to fix slab creation

* Replace Debug setting by DebugGeometry

* Fixed corner cases when importing Door & Furniitures

* Fix emissive color and shininess

* Remove external package dependency

* Fixed furniture placement and transformation

* Make sure lights are properly imported

* Fixed duplicated camera and ground when merging
2025-02-18 11:45:40 +01:00
luzpaz
a4f2b2882d FEM: Misc. uniformity fix in CreateLabels.py 2025-02-18 07:59:17 +01:00
Benjamin Nauck
145af5cddc Make modulo require units to be same or dimensionless
Fixes #19517
2025-02-17 11:31:17 -06:00
Florian Foinant-Willig
e1e75082ed TechDraw: Add a format spec. to round a value 2025-02-17 12:18:26 -05:00
Benjamin Bræstrup Sayoc
e2446c4076 Remove magic number and hard type enums in DrawBrokenView.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-17 12:16:49 -05:00
Benjamin Bræstrup Sayoc
79fdfb2cad Remove magic number and hard type enums in CenterLine.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-17 12:16:49 -05:00
Benjamin Bræstrup Sayoc
f115ed4bb1 Remove magic numbers and hard type enums in DimensionFormatter.h.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-17 12:16:49 -05:00