Skip to content
Snippets Groups Projects
Commit 5cabe6fb authored by Alexander Rose's avatar Alexander Rose
Browse files

fix auto structure-quality for coarse models

parent 42239c30
No related branches found
No related tags found
No related merge requests found
......@@ -7,6 +7,7 @@ Note that since we don't clearly distinguish between a public and private interf
## [Unreleased]
- Fix edge-case in `Structure.eachUnitPair` with single-element units
- Fix 'auto' structure-quality for coarse models
## [v3.25.0] - 2022-11-16
......
......@@ -75,7 +75,7 @@ export type QualityThresholds = typeof DefaultQualityThresholds
export function getStructureQuality(structure: Structure, tresholds: Partial<QualityThresholds> = {}): VisualQuality {
const t = { ...DefaultQualityThresholds, ...tresholds };
let score = structure.elementCount * t.elementCountFactor;
if (structure.isCoarseGrained) score *= t.coarseGrainedFactor;
if (structure.isCoarseGrained || structure.isCoarse) score *= t.coarseGrainedFactor;
if (score > t.lowestElementCount) {
return 'lowest';
} else if (score > t.lowerElementCount) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment