Sketcher: External: Change style to : defining are solid lines. Non-defining dashed. Both use external color.

This commit is contained in:
PaddleStroke
2024-11-12 11:38:35 +01:00
committed by WandererFan
parent 1d0373f40f
commit 50c4e2b4e1
5 changed files with 29 additions and 18 deletions

View File

@@ -22,11 +22,34 @@
#include "PreCompiled.h"
#include "Mod/Sketcher/App/ExternalGeometryFacade.h"
#include "EditModeCoinManagerParameters.h"
using namespace SketcherGui;
int GeometryLayerParameters::getSubLayerIndex(const int geoId,
const Sketcher::GeometryFacade* geom) const
{
bool isConstruction = geom->getConstruction();
bool isInternal = geom->isInternalAligned();
bool isExternal = geoId <= Sketcher::GeoEnum::RefExt;
if (isExternal) {
auto egf = Sketcher::ExternalGeometryFacade::getFacade(geom->clone());
if (egf->testFlag(Sketcher::ExternalGeometryExtension::Defining)) {
// Defining external are added to the Normal sublayers because they
// share the same line style.
return static_cast<int>(SubLayer::Normal);
}
}
return static_cast<int>(isExternal ? SubLayer::External
: isInternal ? SubLayer::Internal
: isConstruction ? SubLayer::Construction
: SubLayer::Normal);
}
SbColor DrawingParameters::InformationColor(0.0f, 1.0f, 0.0f); // #00FF00 -> ( 0,255, 0)
SbColor DrawingParameters::CreateCurveColor(0.5f, 0.5f, 0.5f); // ##7f7f7f -> (127,127,127)
SbColor DrawingParameters::CrossColorH(0.8f, 0.4f, 0.4f); // #CC6666 -> (204,102,102)