Commit Graph

7 Commits

Author SHA1 Message Date
wmayer
dfa202c234 Sketcher: fix build failures with MinGW 2021-12-30 15:12:56 +01:00
wmayer
e01ab89317 Sketcher: fix build failures with MSVC 2021-12-30 14:54:37 +01:00
Abdullah Tahiri
69c31dce82 Sketcher: GeoList improvements
==============================

- Constructor from const vector reference is not allowed to take ownership (as it should not delete the const pointer). The ownership parameter is removed.

- Factory method for const objects cannot either. So the ownership parameter is also removed.
2021-12-27 21:03:51 +01:00
Abdullah Tahiri
501ebfe921 Sketcher: GeoList - Fix bug in index conversion 2021-12-27 21:03:51 +01:00
Abdullah Tahiri
24cd3cb7b7 Sketcher: GeoList Improvements
==============================

- Improve GeoList to support GeoElementId input
- Support VertexId to GeoElementId conversion
- GeoListModel gets separate getGeometry and getGeometryFacade naked pointers
- Sketcher: GeoList - make index mappings mutable
- Improve documentation
2021-12-11 17:02:00 +01:00
Abdullah Tahiri
44567167ff Sketcher: Convert PointPos into an enum CLASS 2021-12-11 16:17:21 +01:00
Abdullah Tahiri
feba33a9b8 Sketcher: Create GeoList class
==============================

Class for managing internal and external geometry as a single object. This is a light-weight alternative to
passing the whole SketchObject.

It reflects the format used in getCompleteGeometry of SketchObject and Sketch solver facade class, while providing
several convenient conversion functions to map indices.

Internal and external geometries are present in a single geometry vector one after the other.

The index of the geomlist (all layers) and the GeoId can be converted from each other at needed
using the member fuctions (and sometimes the static member functions).

Internal implementation is as a template GeoListModel<T>.

The following types are instantiated. Specialisation is provided where necessary.

GeoList = GeoListModel<Part::Geometry *>;
GeoListFacade = GeoListModel<std::unique_ptr<const Sketcher::GeometryFacade>>;

This enables to use the lighter GeoList were sufficient, while enabling off-the-shelf replacement
when switching to a GeoListFacade is necessary.
2021-12-07 16:30:53 +01:00