Commit Graph

203 Commits

Author SHA1 Message Date
tritao
65466d580b Gui: Reorganize the selection files into a top Selection folder. 2025-02-03 17:56:57 +01:00
Benjamin Nauck
dd6aa9f3c7 Prefer to use BaseClass's isDerivedFrom<T> over non template or Base::Type's
Regex based changes, manually verified
2025-01-27 16:08:18 +01:00
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
Kacper Donat
651cefde4d Gui: Use getObject<T>() helpers in classes
This commit is generated using regex based find and replace:

```
s/[\w:]+_cast\s*<([^>]+)\*>\s*\(\s*getObject\(\s*\)\)/getObject<$1>/
s/[\w:]+_cast\s*<([^>]+)\*>\s*\(\s*([^)]*)\s*->\s*getObject\(\s*\)\)/$2->getObject<$1>()/
```

To regenerate if needed.
2024-12-06 18:29:39 +01:00
Benjamin Nauck
fdfb9fd2c6 Reuse Std_Delete shortcut instead of hardcoding Delete (#16682)
* Reuse Std_Delete shortcut in TaskBooleanParameters

* Reuse Std_Delete shortcut in TaskDressUpParameters

* Reuse Std_Delete shortcut in TaskLoftParameters

* Reuse Std_Delete shortcut in TaskPipeParameters

* Reuse Std_Delete shortcut in TaskSapeBinder

* Reuse Std_Delete shortcut in TaskTransformedParameters

* Reuse Std_Delete shortcut in TaskExtrudeParameters

* Reuse Std_Delete shortcut in TaskSections

* Reuse Std_Delete shortcut in MaterialSave

* Reuse Std_Delete shortcut in Array2D

* Reuse Std_Delete shortcut in TaskFemConstraint

* [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-09-23 10:53:39 -05:00
wmayer
80670094eb Clean-up code and improve formatting 2024-06-17 16:30:25 +02: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
wmayer
4185605d5e clang/gcc: Add build option FREECAD_WARN_ERROR to force to make warnings into errors 2024-05-29 13:37:07 +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
c0f151104a Surface: use of TaskDialog::addTaskBox 2024-03-26 15:57:20 +01:00
Chris Hennes
aaa0db3867 Merge pull request #11231 from DeflateAwning/http-cleanup
Find and replace http://freecad to https://freecad
2023-11-06 11:16:13 -06:00
DeflateAwning
c847a3d516 Change http to https in SVGs
Find and replace:
http:\/\/(.{0,10})freecad
https://$1freecad
Include: *.svg
2023-10-29 22:32:59 -06:00
Florian Foinant-Willig
6fb3984322 Surface: modernize type checking 2023-10-23 18:08:22 +02:00
liukaiwen
4f8fe8fd4a [cmake] some definitions do not matter build now 2023-09-27 18:17:14 +08:00
pre-commit-ci[bot]
222a2520b1 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2023-09-12 13:02:35 -04:00
Chris Hennes
217674de04 Surface: Final application of pre-commit 2023-09-04 08:18:51 -05:00
wmayer
4919fa18ff Surface: apply clang format 2023-09-04 07:21:32 -05:00
tomate44
f3463fe5a7 BlendCurve: cleanup properties instantiation 2023-08-31 10:42:40 +02:00
tomate44
81670321b8 BlendCurve: add documentation of properties 2023-08-31 10:42:40 +02:00
tomate44
2df068b3c5 BlendCurve: fix auto-update of properties 2023-08-31 10:42:40 +02:00
tomate44
cdf998343f Surface: allow instant update of BlendCurve properties 2023-08-31 10:42:40 +02:00
wmayer
6bdff0f477 Surface: modernize C++: use default member init 2023-08-23 00:55:03 +02:00
wmayer
fecc939611 Surface: modernize C++: use equals default 2023-08-22 11:16:10 +02:00
wmayer
30d98dd417 Surface: modernize C++: use range-based for loop 2023-08-15 17:20:01 +02:00
tomate44
9587393ca3 Surface: fix BlendCurve relative size
values independent of the number of control points are more intuitive
2023-08-07 09:53:00 -06:00
wmayer
d244dcf2da modernize C++: use nullptr 2023-08-05 11:23:12 -06:00
wmayer
39e53e5eb0 Mods: modernize C++: redundant void arg 2023-08-05 16:50:31 +02:00
wmayer
30249e6550 Sketch: modernize C++: use override 2023-08-04 17:09:53 +02:00
tomate44
6d1e88db07 Surface: Fix Blend Curve icon name
and remove unused BlendSurface code
2023-05-29 10:53:01 +02:00
luzpaz
129d5882a7 Migrate domain name from freecadweb to freecad (#9352)
* Migrate domain name from freecadweb to freecad
* Migrate src/Mod/Material files
* Migrate Stylesheet related files
* Migrate *.svg files
* Migrate miscellaneous files
* Migrate some build files
* Migrate recently added TD AR_IRAM template files

Closes #6415
2023-04-24 15:19:20 -05:00
wmayer
5163c1a2f4 Surface: fix -Wclazy-connect-by-name 2023-04-05 00:44:13 +02:00
wmayer
0363ebdf8f Surface: replace slots with member function pointers 2023-02-03 00:21:38 +01:00
luzpaz
0e67943ea3 Surface: fix header uniformity 2023-01-22 20:31:45 +01:00
wmayer
9b5505fb34 Surface: move to new style connect() 2023-01-13 15:21:37 +01:00
wmayer
af33cdabe5 Surface: fix crash when canceling filling dialog 2022-12-23 11:56:00 +01:00
wmayer
6d535f834d Surface: use a single button group for all task boxes 2022-12-20 19:17:10 +01:00
wmayer
e8cba4dda9 Surface: add external enumerators 2022-12-20 19:17:10 +01:00
wmayer
c8dd58fc20 Surface: remove unneeded includes 2022-12-20 16:22:59 +01:00
Ajinkya Dahale
f0f72d9ce3 [Surface] Allow modal adding/removal of geometric entities 2022-12-20 15:42:46 +01:00
Uwe
97ee8b847f [Surface] enable precompiled headers
- also remove double code
2022-12-08 03:26:59 +01:00
Uwe
58d8b36dfd [Surface] Gui:: remove unused includes
- also some sorting
2022-12-08 01:32:38 +01:00
Uwe
3b1580136b [Surface] App:: remove unused includes
- also some sorting
2022-12-08 00:34:08 +01:00
Chris Hennes
2f7be9e782 cMake: Add support for compiling against Qt6 (#7647)
Removes the BUILD_QT5 flag and adds a new FREECAD_QT_VERSION option,
which can be set to either "Auto" (default), 5, or 6. Auto detects which
version of Qt is installed on the system and chooses it. If both version
are installed, Qt5 is used.

Note that this DOES NOT implement compiling against Qt6, it only adds
the necessary cMake infrastructure to begin work on the source code
changes that will be required.
2022-10-31 09:24:09 -05:00
wmayer
f35f77e98e Mod: [skip ci] fix some MSVC warnings 2022-09-05 13:45:22 +02:00
wmayer
c3279b82b4 Mod: modernize C++: replace 'typedef' with 'using' 2022-08-29 23:21:15 +02:00
wmayer
65b22c2f51 Surface: [skip ci] fix minor issues found by code checkers 2022-08-24 18:47:48 +02:00
wmayer
52845b8c4c Surface: add unit test for blend curve 2022-08-24 14:37:10 +02:00
Jonas Bähr
a1776d3e74 Fix build on MacOS-X 10.14: missing Xerces include dir
This undoes most of the Xerces related part of the commits listed below.
The issue resolved here is that the Xerces include dir *is* set in the
CMakeLists.txt of src/Base, but it got removed from various App and Gui
dirs in src/Mod. If those now include a header from src/Base, which
itself includes xercesc, the build fails using Apple clang version 11.0.0
(clang-1100.0.33.17) on Mojave, configured using cmake 3.22.1, with
errors like the following:

In file included from .../src/Mod/Part/App/FeaturePartBoolean.cpp:34:
In file included from .../src/App/Application.h:33:
.../src/Base/Parameter.h:54:10: fatal error: 'xercesc/util/XercesDefs.hpp' file not found
 #include <xercesc/util/XercesDefs.hpp>
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.

Finally, a full list of the commits that introduced this spurious include
dir optimization for reference:
- Drawing: commit 96ad045b91
- Image: commit dde71a21d5
- Import: commit c9d28b542f
- Inspection: commit d41f55f382
- Mesh: commit 19072b0538
- Part: commit fe213a48f0
- PartDesign: commit b037d8e240
- Path: commit f23fa31f42
- Points: commit bec723ba17
- Raytracing: commit 08d4ac63a3
- ReverseEnginering: commit 5ca787cb0e
- Robot: commit bad4809a1c
- Sketcher: commit 3c96daf105
- Spreadsheet: commit 66e8a2bef3
- Start: commit c9dee5e70a
- Surface: commit 6b04215be6
- TechDraw: commit 5e6699e48d
- Test: commit ea5b45b92c
- Web: commit ee6d631531
2022-08-24 07:40:04 +02:00
wmayer
eb1f30d327 Surface: several improvements
* fix crash because of incomplete inheritance of BlendPoint and BlendCurve -> do not inherit from BaseClass
  as consequebce make destructor non-virtual and remove getPyObject
* pass std::vector by const reference
* remove unneeded includes
* use more suitable Python exception types
* when returning with null from Python handler then set an exception
* harmonize file guards
* several optimizations or simplifications
* use modern C++
* harmonize command name
* fix copyright note
2022-08-23 16:51:55 +02:00