Commit Graph

94 Commits

Author SHA1 Message Date
wmayer
bd0a3122b6 Mesh: C++ core guidelines 2023-09-26 11:20:35 +02:00
wmayer
15b11bc360 Mesh: Apply clang-format 2023-09-23 14:03:11 +02:00
wmayer
e613167d8d Mesh: modernize C++: use default member init 2023-08-23 00:55:03 +02:00
wmayer
5177007994 Mesh: modernize C++: use equals default 2023-08-21 18:39:59 +02:00
wmayer
375cb9a0fe Mesh: modernize C++: use range-based for loop 2023-08-15 10:56:30 +02:00
wmayer
d150fa7164 modernize C++: avoid bind
In many cases std::bind() is kept because the code is much simpler
2023-08-08 21:10:16 +02:00
Andrew
bf57f49a2e clean Mod/Mesh from #if 0 2023-03-27 11:22:21 +02:00
wmayer
787a37be82 Gui: fix View3DInventorViewer's getViewProviderByPath, getViewProviderByPathFromTail, getViewProvidersOfType
The View3DInventorViewer only contains the top-level view providers which caused unexpected behaviour when using the three methods above. Thus, in client code they haven't been used any more.
Now the methods internally invoke the corresponding methods of the document. This allows it in client code to directly call the appropriate methods again (LoD).
2022-12-12 16:41:58 +01:00
Uwe
113dce72d7 [Mesh] Gui: ViewProvider*: remove unused includes
- also some sorting
2022-12-04 17:25:24 +01:00
luz paz
390e09db32 Mesh: remove trailing whitespace 2022-11-14 21:37:03 -06:00
wmayer
b3372a5205 Gui: [skip ci] fix several warnings reported by GH Actions 2022-11-06 15:53:18 +01:00
Uwe
6a68da4871 [Gui][Mod]: uniform spin button step size to 5%
- as discussed here: https://github.com/FreeCAD/FreeCAD/pull/7103 we have different transparency spin button step sizes. This PR uniforms them all to 5%.
2022-11-06 14:27:55 +01:00
wmayer
c7b427e697 Mesh: use PropertyMaterial in view provider 2022-10-23 23:31:04 +02:00
wmayer
f88305e93b Mesh: support to add transparencies to a mesh 2022-10-22 23:31:12 +02:00
marioalexis
9eadb9fbc5 Mesh: Replace C cast 2022-09-18 11:06:51 -05:00
wmayer
01c3f1b636 Mesh: [skip ci] fix minor issues 2022-09-02 13:37:24 +02:00
wmayer
086ce2d34c Mesh: add support of thumbnails of 3MF format 2022-09-01 16:49:00 +02:00
berniev
2d4c5a4cfb Mod: use emplace_back 2022-08-05 10:36:16 +02:00
Uwe
2d2ad11e14 [Mesh] remove superfluous nullptr checks 2022-07-18 02:37:33 +02:00
wmayer
e7a9081097 Mesh: replace boost::bind with std::bind 2022-06-21 15:23:47 +02:00
wmayer
0a4488462c Mesh: reduce the use of const_cast in Mesh module 2022-06-21 12:20:37 +02:00
wmayer
a5ff515804 Mesh: issue #6131: Colors set prior to saving aren't retained when re-opening file
Note: A mesh feature must have a PropertyColorList property with the name FaceColors or VertexColors. The colors won't be set when loading a project but in the context-menu there is the function 'Display colors'
2022-05-17 16:43:53 +02:00
wmayer
f1025b1448 Mesh: replace several reinterpret_cast with static_cast 2022-05-17 14:33:44 +02:00
Zheng, Lei
3ef438eaf0 Fix mixed line endings 2022-04-26 12:52:55 -05:00
Chris Hennes
702238a99c Mesh: PR6497 move return statement to new line 2022-03-29 12:36:30 -05:00
wmayer
58a719e207 Base: move ILogger sub-classes to their own source files in order to reduce including stream classes in client code 2022-03-06 10:13:47 +01:00
wmayer
853454a139 Mesh: modernize C++11
* remove redundant void-arg
* use nullptr
* replace deprecated headers
2022-01-26 18:05:02 +01:00
wmayer
1d9ba918ac Mesh: [skip ci] rename MeshAlgorithm::GetMeshBorder to MeshAlgorithm::GetFacetBorder 2021-09-29 19:38:52 +02:00
wmayer
33f3fa6865 Mesh: define the typenames FacetIndex and PointIndex to distinguish between facet and point related indexes 2021-09-14 23:01:29 +02:00
wmayer
a849f9f932 Mesh: [skip ci] in ViewProviderMesh::highlightSegments change material binding only if colors list is non-empty 2021-03-28 11:27:04 +02:00
luz paz
68eba58e64 Mesh: Uniformity fixes [skip ci]
* Sort Mesh.qrc
* Capital Case .svg files
* Rename Tree_Mesh.svg to Mesh_Tree.svg
* Make appropriate changes in the source regarding said name changes
2020-12-13 17:08:22 +01:00
luz paz
69d4258f76 Mesh: Issue #0004473: Expose openCommand() to translation
Continuing the work to expose the undo/redo functionality to translation. This commit does so for the Mesh Wb.  
Ticket: https://tracker.freecadweb.org/view.php?id=4473
2020-12-01 14:53:35 +01:00
wmayer
d4c0baba0c C++11: replace deprecated function std::bind2nd with lambda functions 2020-10-15 14:46:02 +02:00
carlopav
d4a727e771 Mesh: grouped view properties in ViewProviderMesh 2020-08-21 12:36:46 +02:00
wmayer
584a1bf442 LGTM: [skip ci] fix: Resource not released in destructor 2020-07-25 14:48:59 +02:00
wmayer
f3b460e42e boost: fix for boost < 1.60 2020-06-15 19:38:39 +02:00
wmayer
4ec45b545e boost 1.73.0: The practice of declaring the Bind placeholders (_1, _2, ...) in the global namespace is deprecated 2020-06-12 17:51:33 +02:00
David James McCorrie
31ac21e065 Mesh: [skip-ci] Fixed wrong Coin3d off-screen renderer backround color type object SbColor -> SbColor4f 2019-12-15 15:33:03 +01:00
wmayer
d17b3c68d1 Mesh: In ViewProviderMesh::getVisibleFacets replace SoFCOffscreenRenderer with SoQtOffscreenRenderer to due issues with Indirect GLX on recent Linux systems [skip ci] 2019-12-10 15:03:46 +01:00
wmayer
42196ead39 implement algorithmic solution to determine whether triangle is visible 2019-12-09 20:06:48 +01:00
asapelkin
e951094af9 use emplace_back instead of push_back where justified 2019-11-21 14:48:09 +01:00
wmayer
a47dd26e07 [skip ci] make mesh/points cutting working for nested view providers 2019-11-09 11:58:54 +01:00
wmayer
f2bd624c63 make mesh picking working for view providers underneath a Part container 2019-11-09 11:16:23 +01:00
wmayer
acd6cb005a [skip ci] tmp. disable viewer selection for several interactive commands in Mesh workbench 2019-11-07 19:23:06 +01:00
Zheng, Lei
45fd865fc0 Gui: refactor bounding box selection style
Previously, box style selection is rendered using customized
SoBoxSelectionRenderAction, which does not support selection context,
i.e. it does not work with Link.

This patch implements context aware bound box rendering inside
SoFCSelectionRoot, SoFCSelection and SoFCPathAnnotation (for always on
top rendering). The box rendering in SoBoxSelectionRenderAction is
disabled on construction. Box style selection can be enabled for
individual object through property SelectionStyle (moved from
ViewProviderGeometryObject to ViewProviderDocumentObject), or globally
through Parameter BaseApp/Preferences/View/ShowSelectionBoundingBox.

In addition, the parameter BaseApp/Preferences/View/UseNewSelection is
used to override selection model reported from
ViewProvider::useNewSelectionModel(). The reason being that, the same
parameter is already used to toggle selection model inside
SoFCSelection. This avoids inconsistency of selection model choice
between view provider and the SoFCSelection node inside. Note that if
the parameter 'UseNewSelection' is set to false, those view providers
that choose old selection model will not work with Link.
2019-10-08 09:56:09 +02:00
wmayer
db8ec7c10e fix mesh cutting 2019-09-24 23:26:08 +02:00
wmayer
bc131c3b0d support to show color per face 2019-09-24 21:37:11 +02:00
wmayer
830ddc75ca Add command to show mesh segments 2019-07-04 16:56:02 +02:00
wmayer
d37d7455d0 fix double vs. float problem to solve problems in Mesh.nearestFacetOnRay 2019-01-08 19:13:50 +01:00
wmayer
4c67a5c3c6 workaround to correctly render annotation flags if NaviCube is shown 2018-12-20 17:52:35 +01:00