Sketcher: Points color reflect their construction state. Remove Vertex color.

This commit is contained in:
PaddleStroke
2024-03-22 13:38:14 +01:00
committed by Yorik van Havre
parent 81fcfa1dbe
commit f5da655429
8 changed files with 38 additions and 89 deletions

View File

@@ -75,6 +75,7 @@ void EditModeGeometryCoinConverter::convert(const Sketcher::GeoListFacade& geoli
coinMapping.CurvIdToGeoId[l].emplace_back();
}
coinMapping.PointIdToGeoId.emplace_back();
coinMapping.PointIdToPosId.emplace_back();
coinMapping.PointIdToVertexId.emplace_back();
}
@@ -86,6 +87,7 @@ void EditModeGeometryCoinConverter::convert(const Sketcher::GeoListFacade& geoli
// empty layer.
Points[0].emplace_back(0., 0., 0.);
coinMapping.PointIdToGeoId[0].push_back(-1); // root point
coinMapping.PointIdToPosId[0].push_back(Sketcher::PointPos::start);
coinMapping.PointIdToVertexId[0].push_back(-1);
// VertexId is the reference used for point selection/preselection
@@ -150,6 +152,23 @@ void EditModeGeometryCoinConverter::convert(const Sketcher::GeoListFacade& geoli
for (int i = 0; i < numberPoints; i++) {
coinMapping.PointIdToGeoId[coinLayer].push_back(geoId);
Sketcher::PointPos pos;
if (i == 0) {
if (pointmode == PointsMode::InsertMidOnly) {
pos = Sketcher::PointPos::mid;
}
else {
pos = Sketcher::PointPos::start;
}
}
else if (i == 1) {
pos = Sketcher::PointPos::end;
}
else {
pos = Sketcher::PointPos::mid;
}
coinMapping.PointIdToPosId[coinLayer].push_back(pos);
coinMapping.PointIdToVertexId[coinLayer].push_back(vertexCounter++);
}