Commit Graph

32181 Commits

Author SHA1 Message Date
Abdullah Tahiri
d86686029c Sketcher: TaskSketcherElements - Very Basic Layer Management
============================================================

This class needs quite some rework, as it is mixing model-view model and item model.

Eventually, the whole needs to be moved to a QTreeWidget for layers' implementation.

This commit:
1. Moves back implementation only class item to the cpp file.
2. Adds a contextual submenu to change the selection from one layer to another in the
naive fixed 3 layer implementation.
3. Adds checkboxes to hide geometry.

It is the minimal modification to enable a user work with the 3 layer implementation.
2023-03-02 20:42:48 +01:00
Abdullah Tahiri
d1be41efe0 ViewProvider: 3 fixed visual layers implementation
==================================================

Naive 3 layer implementation to enable the removal of current rendering order.

Layers is conceived to be much more powerful, when combining User Layers, which
work at structural level (conceptually grouping of geometry by the user) and visual
layers (which control the representation of parts of User layers).

However, that implementation will take quite some time and effort to get it right.

This commit enables 3 layers:
1. Normal layer (legacy one)
2. Discontinuous layer (experimental layer which discontinuous edges)
3. Hidden layer (a normal layer which is hidden)

One geometry can be added to one and only one visual layer at a given time.

So this enables to hide geometry (by assigning it to the hidden layer), which is
useful for selection when lines are overlapping, acting as a work-around for the
rendering order. It also allows to rework the rendering order (without the user
being affected), which is also necessary for the final visual layers implementation.
2023-03-02 20:42:48 +01:00
Abdullah Tahiri
dbdd04e05b Sketcher: Elements Widget - Add Visual Layer metadata 2023-03-02 20:42:48 +01:00
Abdullah Tahiri
630ed6b470 Utils: setSafeGeomLayerId 2023-03-02 20:42:48 +01:00
Abdullah Tahiri
b6b897c0bf Utils: getGeoIdsOfEdgesFromNames 2023-03-02 20:42:48 +01:00
Abdullah Tahiri
93143c680c EditCoinManager: Refactor and extend layer support to use VisualLayerList property and ViewProviderSketchGeometryExtension 2023-03-02 20:42:48 +01:00
Abdullah Tahiri
16b029f729 EditCoinManager: Apply Visual Configuration configuration 2023-03-02 20:42:48 +01:00
Abdullah Tahiri
57bad38993 ViewProviderSketch: update geometry layer configuration on visual layer property change 2023-03-02 20:42:48 +01:00
Abdullah Tahiri
5caaf174d4 Sketcher: EditModeCoinManager - support to update layer configuration
=====================================================================

- Refactor scenograph creation to enable local update
- Support to perform a local update
2023-03-02 20:42:48 +01:00
Abdullah Tahiri
f2d6b287ab Sketcher: ViewProviderSketch
============================

Adding PropertyVisualLayerList to ViewProviderSketch
2023-03-02 20:42:48 +01:00
Abdullah Tahiri
6a3d751352 Sketcher: PropertyVisualLayerList
=================================

This is a property (intended for ViewProviderSketch), containing a list of visual layer configurations.

This property enables to define and serialise the configuration of visual layers, as well as reacting to
changes to it.
2023-03-02 20:42:48 +01:00
Abdullah Tahiri
e0a5d3d017 Sketcher: VisualLayer
=====================

New class allowing to define a VisualLayer:
- whether it is visible or not.
- the line width to be used by coin for this layer.
- the line pattern to be used by coin for this layer.
2023-03-02 20:42:48 +01:00
Abdullah Tahiri
c2e0c86d93 Utils: New Function to retrieve the VisualLayerId 2023-03-02 20:42:48 +01:00
Abdullah Tahiri
873e34cd6e Sketcher: Extend ViewProviderSketchGeometryExtension to hold the VisualLayerId
==============================================================================

In the Layers implementation there are User Layers, which have no direct impact on visualisation,
and allow to group conceptually related geometry into logical entities, and Visual Layers, which
define how geometries are visualised (or even whether they are visualised or not).

For User Layers, SketchObject is responsible for the definition of the layers, and SketcherGeometryExtension
is responsible for indicating the User Layer to which a geometry belongs (via a LayerId field).

For Visual Layers, ViewProviderSketch is responsible for the definition of the visual layers, and
ViewProviderSketchGeometryExtension is responsible for indicating the visual layer to which a geometry belongs.

With this commit, ViewProviderSketchGeometryExtension:
- takes over the responsibility of carrying a visual layer Id.
- is extended to be persistent and serialise the Id.
- is extended to be accesible from Python.
2023-03-02 20:42:48 +01:00
wmayer
a7c37aacb0 Part: Compute center of gravity for compounds
* If the compound contains solids then other shape types like faces or edges are ignored
* If the compound contains no solids but faces then edges are ignored
* If the compound contains no faces but edges then vertexes are ignored
2023-03-02 19:34:18 +01:00
berniev
8c6735b79a test fmt library is basically working 2023-03-02 11:08:23 +01:00
Chris Hennes
24446e5e2d Addon Manager: Correct typo 2023-03-01 21:21:37 -06:00
Chris Hennes
3cd82103de Merge pull request #8585 from mosfet80/removeGZstream
remove unused GZstream library interface files
2023-03-01 13:28:04 -06:00
mosfet80
d50f1c9b3e Merge branch 'master' into removeGZstream 2023-03-01 19:43:56 +01:00
Andrew
ace46189c2 remove unused FDstream file 2023-03-01 12:28:00 -06:00
wmayer
5774721284 Test: expected failure of Rotation::setValue() in unit tests 2023-03-01 18:43:15 +01:00
wmayer
c770e1b677 Mod: catch exception raised by Rotation::setValue 2023-03-01 18:43:15 +01:00
wmayer
f195c3a0ca Base: catch exception raised by Rotation::setValue 2023-03-01 18:43:15 +01:00
wmayer
3ca5e80ea9 Part: fix TopoShapeListTest 2023-03-01 14:51:47 +01:00
wandererfan
10fd7db620 [Part]add test for PropertyTopoShapeList 2023-03-01 14:24:40 +01:00
wandererfan
c6fd9a1532 [Part]use sharedptr for Restore 2023-03-01 14:24:40 +01:00
wandererfan
2f357a58c7 [Part]PropertyTopoShapeList changes from review 2023-03-01 14:24:40 +01:00
wandererfan
483238cc7f [Part]add PropertyTopoShapeList 2023-03-01 14:24:40 +01:00
wmayer
3d59883be5 Tests: add test of a matrix without rotation part to raise an exception 2023-02-28 22:28:21 +01:00
wmayer
a23d862b2b Base: fix/ignore some clang-tidy warnings 2023-02-28 15:17:06 +01:00
wmayer
7abf48f34d Tests: add test to parse string to get quantity 2023-02-28 15:17:06 +01:00
wmayer
545aa0eed9 Base: make static const predefined quantities 2023-02-28 15:17:06 +01:00
wmayer
752e33d340 Base: fix Lint warnings in Quantity 2023-02-28 15:17:06 +01:00
wandererfan
704fb894a5 [TD]getters and setters for geometry
- make attributes private (or protected) and use
  getters and setters instead of accessing attributes
  directly.
2023-02-28 08:15:06 -05:00
Adrian Insaurralde Avalos
662473b11f Improve NaviCube font matching on linux 2023-02-28 10:01:33 +01:00
Yorik van Havre
1366e066b4 Merge pull request #8698 from Jolbas/draftvecutil
Return pure rotation from getPlaneRotation()
2023-02-28 09:45:57 +01:00
Yorik van Havre
ab023a4779 Merge pull request #8688 from Roy-043/Arch-Arch_SectionPlane-improve-handling-of-non-solids
[Arch] Arch_SectionPlane improve handling of non-solids
2023-02-28 09:43:16 +01:00
Yorik van Havre
217aace518 Merge pull request #8686 from yorikvanhavre/translations
Crowdin translations
2023-02-28 09:37:32 +01:00
Yorik van Havre
89d23d7437 Merge pull request #8607 from Roy-043/Arch-fix-Arch_Schedule-recompute-issue
[Arch] fix Arch_Schedule recompute issue
2023-02-28 09:36:57 +01:00
Yorik van Havre
5b208f6998 Merge pull request #8626 from yorikvanhavre/remove-six
Arch, Draft: Remove use of six module
2023-02-28 09:35:52 +01:00
Jolbas
202a6ca6b8 return pure rotation from getPlaneRotation() 2023-02-28 01:07:56 +01:00
Uwe
8f4c9d811b [Mesh] [Spread] fix compilation with PCH
- add 2 missing includes to be able to compile with precompiled headers
2023-02-27 23:09:58 +01:00
Chris Hennes
acbf7e6f80 App: Minor loop cleanup in Property.h
As discussed in PR #8683
2023-02-27 23:07:27 +01:00
Chris Hennes
42a910982d Spreadsheet: Fix unintended copies 2023-02-27 15:58:32 -06:00
wmayer
c8a35d85fe Base: fix pow() of Quantity 2023-02-27 22:13:08 +01:00
Roy-043
7d0101513e [Arch] Arch_SectionPlane improve handling of non-solids update 2023-02-27 20:30:31 +01:00
Chris Hennes
ae943476de Spreadsheet: Remove legacy file 2023-02-27 13:23:06 -06:00
wmayer
75fedd8146 Base: handle several Lint warnings 2023-02-27 20:07:01 +01:00
wmayer
b41ba49c5d Tests: add more unit tests 2023-02-27 20:07:01 +01:00
wmayer
57eb7a5b07 Base: add missing != operator to Quantity 2023-02-27 20:07:01 +01:00