Allow user to define a custom minimum deviation for the tessellation

This commit is contained in:
wmayer
2018-11-09 13:42:38 +01:00
parent f6a9cfaad3
commit 9fde41ff19
2 changed files with 10 additions and 0 deletions

View File

@@ -241,6 +241,12 @@ ViewProviderPartExt::ViewProviderPartExt()
("User parameter:BaseApp/Preferences/Mod/Part");
NormalsFromUV = hPart->GetBool("NormalsFromUVNodes", NormalsFromUV);
// Let the user define a custom lower limit but a value less than
// OCCT's epsilon is not allowed
double lowerLimit = hPart->GetFloat("MinimumDeviation", tessRange.LowerBound);
lowerLimit = std::max(lowerLimit, Precision::Confusion());
tessRange.LowerBound = lowerLimit;
App::Material mat;
mat.ambientColor.set(0.2f,0.2f,0.2f);
mat.diffuseColor.set(r,g,b);