Sketcher: Do not consider missing external geometry to be an error (#16590)

* Do not consider missing external geometry to be an error; highlight in conflict color.
This commit is contained in:
bgbsww
2024-09-18 16:18:11 -04:00
committed by GitHub
parent a54a9e2e1e
commit 27ca64a201
3 changed files with 93 additions and 3 deletions

View File

@@ -44,6 +44,7 @@
#include "EditModeGeometryCoinConverter.h"
#include "EditModeGeometryCoinManager.h"
#include "ViewProviderSketchCoinAttorney.h"
#include "Mod/Sketcher/App/ExternalGeometryFacade.h"
using namespace SketcherGui;
@@ -414,7 +415,15 @@ void EditModeGeometryCoinManager::updateGeometryColor(const GeoListFacade& geoli
}
}
else if (geometryLayerParameters.isExternalSubLayer(t)) {
color[i] = drawingParameters.CurveExternalColor;
auto geom = geolistfacade.getGeometryFacadeFromGeoId(GeoId);
auto egf = ExternalGeometryFacade::getFacade(geom->clone());
auto ref = egf->getRef();
if (egf->testFlag(ExternalGeometryExtension::Missing)) {
color[i] = drawingParameters.InvalidSketchColor;
}
else {
color[i] = drawingParameters.CurveExternalColor;
}
for (int k = j; j < k + indexes; j++) {
verts[j].getValue(x, y, z);
verts[j] = SbVec3f(x, y, viewOrientationFactor * zExtLine);