Commit Graph

159 Commits

Author SHA1 Message Date
wmayer
10d6a90be5 Mod: [skip ci] fix some MSVC warnings 2022-09-05 13:45:22 +02:00
wmayer
312c8f68e4 Mod: modernize C++: replace 'typedef' with 'using' 2022-08-29 23:21:15 +02:00
wmayer
e56e35cf6a Surface: [skip ci] fix minor issues found by code checkers 2022-08-24 18:47:48 +02:00
wmayer
c7d6f7ab87 Surface: add unit test for blend curve 2022-08-24 14:37:10 +02:00
Jonas Bähr
46cee50bd5 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 f4411478d106ba9f4827754a50efa53bd7767a66
- Image: commit e3476815c04c571199779bd1e444b950e6398025
- Import: commit b7b264e52c8fd97e83987c4ce42ce563170c8918
- Inspection: commit 1f64d8b1b8fcabe983c6e5e624d65766b4429ea0
- Mesh: commit 5a8fed0720d681cdbb9fedc840d2532c4f2f6042
- Part: commit 26bb65f11f4b51e5e47b65b2d6049ece10705a83
- PartDesign: commit f4e49f2aecf08f2337e84510ed019b7fa4b685a3
- Path: commit e3d9cc98577d2073297d55ffd8de28dd50f8444c
- Points: commit 09f3e867cdccd31294cced4e3c73015d3add3f4a
- Raytracing: commit 7b92dedc53f09e2ce8365408f3003e5700aebfc8
- ReverseEnginering: commit eeacc51ad0cd82e5f17d63207f78f79eb20bf9a9
- Robot: commit 4d06684cbd0328e4f43c78b5dab7e7fcebab148d
- Sketcher: commit 079125665495a08a7e2e2a4f01da406128dca625
- Spreadsheet: commit 514097954e95c04a7ec9d7e8ec1afc3aac3dd8d
- Start: commit 2ea2bb0dc393d7b8b41e9137c6d4ae40ce29719d
- Surface: commit 272268dd6c0b460ae9aeecdf371495ea26aa044d
- TechDraw: commit c70fdc3e0aa6b409626a6fa6b7266d05f3338c6d
- Test: commit 49a07b121e08e9bf3fef0f414a8da5602533592e
- Web: commit a93a23d7e4da13b2d5c37ac087b2dcf41aae197d
2022-08-24 07:40:04 +02:00
wmayer
c2b9eceec1 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
Matteo-Grellier
3b839551da [Surface]: Change to BaseClass 2022-08-23 16:51:16 +02:00
Matteo-Grellier
83ee62bca4 [Surface]: Implementation of BlenCurve. 2022-08-23 16:51:16 +02:00
tomate44
6ec601dade Surface: Various fixes 2022-08-23 16:51:16 +02:00
wmayer
c87e1cc1c2 clang: fix warnings [-Winconsistent-missing-override] 2022-08-09 17:36:25 +02:00
berniev
71dc5ead2f Mod: Use override etc 2 2022-08-09 12:52:26 +02:00
berniev
f4ffd15864 Mod: redundant void 2 2022-08-08 10:27:50 +02:00
berniev
47ac049e14 Mod: use emplace_back 2022-08-05 10:36:16 +02:00
wmayer
985f0a9132 Surface: Fix several clazy issues:
* Missing reference in range-for with non trivial type [-Wclazy-range-loop-reference]
* Use multi-arg instead [-Wclazy-qstring-arg]
2022-07-25 10:01:49 +02:00
Uwe
7b4e014263 [Robot etc.] remove superfluous nullptr checks 2022-07-18 02:54:09 +02:00
andrea
c66aadeb60 removed references to OCC<7 2022-06-25 14:29:24 +02:00
wmayer
c5bab68332 Gui: add convenience functions to SelectionFilterGate 2022-04-19 15:04:14 +02:00
Chris Hennes
fc4371f0d9 Surface: PR4556 Step 3: sort QGridLayout by row-col 2022-03-28 10:43:23 -05:00
wmayer
10e65e9141 Surface: include header with export macros 2022-03-24 20:41:34 +01:00
wmayer
3268179b7b Surface: modernize C++11
* use nullptr
2022-03-23 19:26:14 +01:00
Uwe
bfb18671fc [Surface] remove Python.h and Xerces 2022-03-20 22:46:47 +01:00
wmayer
0f9768fb33 Fix coverity issue:
* CID 332682: Resource leak
* CID 350607: Resource leak
* CID 332677: Resource leak
2022-03-14 11:35:04 +01:00
Uwe
554635cc7d [Gui] rename the Qt header list 2022-03-07 20:35:38 +01:00
wmayer
8f786ea6ef Gui: Optimize includes to reduce compile time 2022-03-07 20:29:18 +01:00
wmayer
ada653e591 Add Global.h headers to modules 2021-12-18 14:06:40 +01:00
Tobias Frost
c61c7e7d7b Fixes SurfaceExtend icon not being found.
Before this patch, ViewProviderExtend::getIcon() returned "Surface_Extend",
which does not exist; The icon file is "Surface_ExtendFace".
2021-10-22 09:44:55 +02:00
wmayer
167e11596a Surface: [skip ci] only try to build surface if at least two boundary curves are used 2021-10-21 18:23:03 +02:00
luz paz
a03e92da03 Fix various typos
Found via `codespell -q 3 -L aci,ake,aline,alle,alledges,alocation,als,ang,anid,apoints,ba,beginn,behaviour,bloaded,bottome,byteorder,calculater,cancelled,cancelling,cas,cascade,centimetre,childs,colour,colours,commen,connexion,currenty,dof,doubleclick,dum,eiter,elemente,ende,feld,finde,findf,freez,hist,iff,indicies,initialisation,initialise,initialised,initialises,initialisiert,inout,ist,kilometre,lod,mantatory,methode,metres,millimetre,modell,nd,noe,normale,normaly,nto,numer,oder,ontop,orgin,orginx,orginy,ot,pard,parms,pres,programm,que,recurrance,rougly,seperator,serie,sinc,strack,substraction,te,thist,thru,tread,uint,unter,vertexes,wallthickness,whitespaces -S ./.git,*.po,*.ts,./ChangeLog.txt,./src/3rdParty,./src/Mod/Assembly/App/opendcm,./src/CXX,./src/zipios++,./src/Base/swig*,./src/Mod/Robot/App/kdl_cp,./src/Mod/Import/App/SCL,./src/WindowsInstaller,./src/Doc/FreeCAD.uml,./build/doc/SourceDocu`
2021-10-10 14:55:48 -04:00
Mateusz Skowroński
9ade68e9bf Fix CMake warning: qt5_make_output_file is not part of the official API, and might be removed in Qt 6. 2021-04-19 15:10:53 +02:00
wmayer
bd587a8a45 Surface: re-implement closed() in TaskFilling 2021-02-05 16:37:00 +01:00
Chris Hennes
a6b689f57c Fix Surface task panel shortcut use to use Widget context
The Delete key shortcut of the three different panels in the
Surface Workbench TaskFilling sidebar conflicted between
the panels if multiple were showing. This is resolved by
making the QAction's context the widget, rather than the window.
2021-02-01 19:40:33 -06:00
bitacovir
e5135dc820 [UI] Replace SVG icons for Surface WB commands 2021-01-25 16:23:54 -03:00
luz paz
67890c94f1 Surface: Issue #0004473: Expose openCommand() to translation
Continuing the work to expose the undo/redo functionality to translation. This commit does so for the Surface Wb.  
Ticket: https://tracker.freecadweb.org/view.php?id=4473
2020-12-01 14:53:35 +01:00
luz paz
ae48d4afb2 Surface: Fix header uniformity, whitespace, and doxygen header 2020-11-19 13:41:43 +01:00
tomate44
0ffa0279c6 Surface: prevent GeomFillSurface to produce C0 rational BSpline surface 2020-11-06 07:52:40 +01:00
vocx-fc
36f103d74c Surface, MeshPart: update CurveOnMesh command tooltip and task panel
* Add new icon `MeshPart_CurveOnMesh`, which is the same as
the `Surface_CurveOnMesh` icon but in green color.
The surface icon is used in the Surface Workbench, while the MeshPart
version is currently not used.
* Make the tooltip of the command shorter; the longer instructions
are added in the `TaskCurveOnMesh` task panel.
2020-10-19 13:18:12 +02:00
vocx-fc
0f5d6ea096 Surface: updated task panel for Surface_Filling
`Fill Surface` becomes `Boundaries`. A label is added
explaining that it is possible to reorder the items
in the list of boundary edges.
2020-10-19 13:18:12 +02:00
vocx-fc
6834a41a60 Surface: update tooltip of Filling 2020-10-19 13:18:12 +02:00
wmayer
f53871780c Surface: automatically start "Add edge" mode when starting the fill surface tool. Moving the order of edges is supported now. 2020-10-13 17:32:20 +02:00
wmayer
43638ec0a5 Surface: rename TaskFillingUnbound to TaskFillingEdge 2020-10-13 16:23:58 +02:00
vocx-fc
6e4cc131a2 Surface: better titles for the task panels, and tooltips 2020-10-13 15:53:32 +02:00
vocx-fc
c0d1e90920 Surface, MeshPart: add more information to the CurveOnMesh command
In the Surface Workbench, the command is called `Surface_CurveOnMesh`
and the only thing it does is call the corresponding command
in the MeshPart Workbench, where it is defined
under the name `MeshPart_CurveOnMesh`.

Currently the MeshPart Workbench is not exposed on the graphical user
interface but it is loaded at startup, and its commands
are in fact used from the Mesh Workbench and, in this case,
the Surface Workbench.

Also improve the tooltip of the other commands in the Surface Workbench:
`Cut`, `Filling`, `GeomFillSurface`, `ExtendFace`, and `Sections`.
The `Cut` command does not do anything at this moment
so it is not visible in the interface.
2020-10-13 15:14:12 +02:00
vocx-fc
e99b46de88 Surface: new icon for existing Surface_CurveOnMesh command
Add this command to the Surface toolbar.
2020-10-13 15:09:12 +02:00
vocx-fc
7750c4dfbf Surface: ViewProviderExtend for Surface::Extend object
This is created by the Surface_ExtendFace command.
2020-10-13 14:52:02 +02:00
vocx-fc
3ec05cefcb Surface: new Extend icon for existing Surface_ExtendFace command
The icon is added to the `.qrc` resource file.

The command is added to the Surface toolbar.
2020-10-13 14:42:20 +02:00
luz paz
df93939be3 Fix various typos [skip-ci]
Found via `codespell v2.0.dev0`  
```
codespell -q 3 -L aci,ake,aline,alle,alledges,alocation,als,ang,anid,ba,beginn,behaviour,bloaded,byteorder,calculater,cancelled,cancelling,cas,cascade,centimetre,childs,colour,colours,commen,connexion,currenty,dof,doubleclick,dum,eiter,elemente,ende,feld,finde,findf,freez,hist,iff,indicies,initialisation,initialise,initialised,initialises,initialisiert,ist,kilometre,lod,mantatory,methode,metres,millimetre,modell,nd,noe,normale,normaly,nto,numer,oder,orgin,orginx,orginy,ot,pard,pres,programm,que,recurrance,rougly,seperator,serie,sinc,strack,substraction,te,thist,thru,tread,uint,unter,vertexes,wallthickness,whitespaces -S ./.git,*.po,*.ts,./ChangeLog.txt,./src/3rdParty,./src/Mod/Assembly/App/opendcm,./src/CXX,./src/zipios++,./src/Base/swig*,./src/Mod/Robot/App/kdl_cp,./src/Mod/Import/App/SCL,./src/WindowsInstaller,./src/Doc/FreeCAD.uml
```
2020-10-08 18:21:15 +02:00
vocx-fc
0ff058ca94 Surface: Vertices instead of Vertexes in the task panel 2020-09-30 12:32:36 +02:00
vocx-fc
c6d2d37773 Surface: new Sections icon
The `Surface_Sections` command was recently introduced in v0.19
(9c34952, c6fb8df) so its icon is updated as well.
2020-09-30 12:32:36 +02:00
vocx-fc
6a9c644383 Surface: upgraded Surface icons
The `Surface_Workbench` icon is the same as `Surface_Surface`,
which is now an SVG and not XPM.
The lines are thicker and the colors have been adjusted
with a gradient, instead of being solid and plain looking.

Also the following were updated: `BSplineSurface`,
`BezierSurface`, `Cut`, `Filling`, `Sewing.

The `BezierSurface`, `Cut`, and `Sewing` icons are not currently used
in the workbench, but they were still updated in case
a future command uses them.
2020-09-30 12:32:36 +02:00
vocx-fc
1d486dc669 Surface: new SVG icon for the workbench, rename others
Replace the hard-coded XPM icon in `InitGui.py` for the workbench
with an SVG file, which at this time is identical to the `Surface` icon.
Change `CMakeLists.txt` to properly install this new icon.

Rename all icons, so that all have the `Surface_` prefix.

Use the new icon names in the viewproviders and task panels.
2020-09-30 12:32:36 +02:00