Commit Graph

140 Commits

Author SHA1 Message Date
Benjamin Nauck
7b22027b90 Add template based Document::countObjectsOfType
Also convert code to use this new method
2025-01-14 14:23:46 +01:00
Benjamin Nauck
08c9a191e2 Add template based SelectionSingleton::countObjectsOfType
Also convert code to use this new method
2025-01-13 18:55:15 +01:00
Roy-043
8c5a87e894 Part: Rename new datum commands
Fixes #18853.
2025-01-06 20:28:00 +01:00
PaddleStroke
48dbdacdbd Part: add datum objects and commands to create them. 2024-12-13 18:04:10 +01:00
Snow Faerie
8bc062b6e8 Fix and add menu accelerators (#15532)
* Fix and add menu accelerators: menus common to all workbenches

I use menu accelerators fairly often, so I find it very frustrating when
they are missing, or worse, they don't work due to the same letter being
assigned to several commands.

This patch adds accelerators to lots of menu entries missing them and
fixes broken accelerators.

Wherever possible, standard accelerator keys are used:
https://doc.qt.io/qt-5/accelerators.html

This commit covers accelerator fixes that are common to all workbenches.
Accelerator fixes for specific workbenches will be done in separate
commits.

* Add missing accelerators: Spreadsheet workbench
2024-12-13 10:39:30 -06:00
FEA-eng
b9ca034261 Update Command.cpp 2024-11-15 11:56:46 -05:00
Eric Price
03cb520215 Part: bugfix #17468 recursively unpack compounds for boolean fuse (#17469)
* fix #17468  recursively unpack compounds for boolean fuse

* fix and into &&, add ctest case for multifuse with compounds and recursive compounds

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

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

* remove unneeded duplicated code - allow Part::Common to be created with a single object (compound or shape) - will result in Unity and possibly a warning message

* prevent endless loop in case of endless recursive compounds as suggested in chat

* Update src/Mod/Part/App/FeaturePartFuse.cpp

Co-authored-by: Benjamin Nauck <benjamin@nauck.se>

* implemented suggestion by wwmayer

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Benjamin Nauck <benjamin@nauck.se>
2024-11-11 17:51:56 +01:00
Max Wilfinger
7d21d9edb8 Fix source string typos mentioned on Crowdin (#15261) 2024-07-08 17:18:31 -05:00
David Carter
8b5a3b1124 Material: Appearance Updates 2
Improves the use of the ShapeAppearance property for the Part workbench.

    removes DiffuseColor property
        adds Python compatibility using custom attributes
        transitions DiffuseColor to ShapeAppearance on open
    Improved UI elements for setting object appearance, and appearance per face
    Lays the foundation for future texture support
2024-06-01 19:57:16 -05:00
André Althaus
9b4c4ce60c Replace the yellow Part primitive toolbar icons with the blue tree icons 2024-05-19 12:12:48 +02:00
hlorus
7ff4da5a27 [Part/PD] Remove measure tools 2024-04-29 09:27:22 -04:00
wmayer
9b7a7b9756 Part: fix Part_RefineShape and Part_Section 2024-04-09 22:15:51 +02:00
David Carter
495a96a0f5 Material: Material appearance
Uses new material system for appearance

Each feature object now has a property called ShapeMaterial that
describes its physical properties. If it has a shape, it has a
material.

The ShapeColor attribute is replaced by a ShapeAppearance attribute.
This is a material list that describes all appearance properties, not
just diffuse color. As a list in can be used for all elements of a
shape, such as edges and faces.

A new widget is provided to allow the user to select materials in a
consistent fashion. It can also launch the material editor with its
more advanced capabilities.
2024-04-04 07:39:58 -05:00
wmayer
2c4fbc5427 Part: make GUI for ProjectOnSurface feature 2024-03-26 15:54:13 +01:00
bgbsww
8abd09398a Add support for OCCT 7.8.0 (#11909) 2024-01-09 19:47:25 -06:00
Adrián Insaurralde Avalos
ed61cbfe91 fix #9348 - Improve Part_Measure_Clear_All tooltip 2023-10-17 17:46:56 +02:00
wmayer
56820718c5 Core: Revert superfluous changes made with PR #9521 2023-10-09 15:06:45 +02:00
AgCaliva
4a504437d3 merge master via cli 2023-09-16 02:12:58 -03:00
AgCaliva
280e5e3987 Fixing DOMDocument redefinition 2023-09-16 00:38:41 -03:00
wandererfan
9905572116 [Part]add scale command & feature 2023-09-07 18:21:56 +02:00
wmayer
312975edba Part: modernize C++: use range-based for loop 2023-08-16 21:56:32 -05:00
wmayer
96aabe113e modernize C++: raw string literal 2023-08-07 19:51:15 -06:00
wmayer
0460563da0 Part: fixes #9549: Part Fuse not working inside Part container 2023-05-15 23:40:51 +02:00
Chris Hennes
5605f43b49 Part: Translate offset toolbar dropdown 2023-04-25 12:12:02 +02:00
Andrew
b916c387fb Clean Mod/Part. remove old OCC <7.3 and #if 0 code. 2023-03-26 21:17:18 +02:00
Uwe
49a7a60311 [Part] [skip ci] update a tooltip
- since FC 0.20 we require OCC 7.4
2023-02-03 12:15:28 -06:00
luz paz
6e542b6fad Part: remove trailing whitespace 2022-11-15 14:19:30 -06:00
marioalexis
34f070cf9b Part: Replace C cast 2022-09-18 11:06:51 -05:00
berniev
da9ebc572f Mod: redundant void 2 2022-08-08 10:27:50 +02:00
berniev
b796a0d376 Mod: use empty 2022-08-06 19:30:13 +02:00
berniev
2d4c5a4cfb Mod: use emplace_back 2022-08-05 10:36:16 +02:00
wmayer
8444484677 Part: Fix several clazy issues:
* Maybe you meant to call Primitive::onChanged() instead [-Wclazy-skipped-base-method]
* Maybe you meant to call Primitive::mustExecute() instead [-Wclazy-skipped-base-method]
* Missing reference in range-for with non trivial type [-Wclazy-range-loop-reference]
* Use multi-arg instead [-Wclazy-qstring-arg]
* Use midRef() instead [-Wclazy-qstring-ref]
2022-07-25 08:31:18 +02:00
andrea
93525ff7eb removed references to OCC<7 2022-06-25 14:29:24 +02:00
wmayer
6b2882e01f Part: support of box selection in shape builder task panel 2022-06-21 15:30:31 +02:00
mwganson
26e4a3345b Part: Link support -- replace TopoShape.getSubShape() with Part::Feature::getTopoShape(obj, elementname, true).getShape() in order to support use of App::Link sublinks. 2022-05-27 03:52:17 +02:00
wmayer
afebe07514 Part: optimize hasShapesInSelection() by avoiding performing a possibly expensive transformation
See also: https://forum.freecadweb.org/viewtopic.php?p=592445#p592445
2022-05-02 17:19:49 +02:00
mwganson
a55758f0ab Part: reversed -- fix so it works with App::Links and App::Parts 2022-04-16 02:55:29 +02:00
wmayer
9eac35cf5d Gui: clean-up Selection API
Replace the int of the 'resolve' argument of several functions with a proper enum class.
* This avoids the inconsistencies in client code where often true/false is passed when an int is expected
* This avoids the use of magic numbers like 0, 1, 2 or the undocumented 3
2022-04-09 17:03:43 +02:00
mwganson
731ed820b5 Part:Improve support for Links 2022-04-08 17:42:42 +02:00
Chris Hennes
0a65575c2c Part: PR6497 move return statement to new line 2022-03-29 12:37:00 -05:00
wmayer
068c0e5a98 Part: modernize C++11
* use nullptr
2022-03-23 19:26:14 +01:00
Uwe
d1fc159f4c [Part] change sGroup for Section Cut
as discussed here: https://forum.freecadweb.org/viewtopic.php?p=577536#p577536
2022-03-09 11:43:23 +01:00
wmayer
1ca7429705 Gui: Optimize includes to reduce compile time 2022-03-07 20:29:18 +01:00
Uwe
67a0966398 [Part] remove some unused includes and sorting 2022-02-21 04:29:28 +01:00
marioalexis
f9c4c88768 Part: Part_SectionCut command active only if view is View3DInventor class 2022-02-15 10:19:15 +01:00
Uwe
a3b6c272ed [Part] add icon for sectionCut feature 2022-02-15 01:49:34 +01:00
wmayer
5cb2c315a2 Part: section cut window is not bound to 3d viewer widget 2022-02-13 19:33:19 +01:00
marioalexis
fc6e870a67 Part: Move Part_SectionCut command to Part menu item list 2022-02-08 12:09:09 +01:00
Uwe
bb204842f2 [Part] feature to make persistent section cut views (#4118)
* [Part] feature to make persistent section cut views

* one aim is to have a feature to make real cuts, not hollow ones like with clipping
* the second one is to have a persistent view, so an object in the tree that can be further exported, meshed etc.

For a detailed description with examples see https://forum.freecadweb.org/viewtopic.php?f=17&t=52441
2022-02-05 01:57:57 +01:00
Uwe
4c2dc83202 [Part] sort includes
to keep the overview and to reduce diff of a pending PR

also uniform the include path specification
2022-02-01 02:51:41 +01:00