|
@@ -13,15 +13,13 @@ class VolumeThreeDistanceCal extends Calculator<LWHStraightLine, double> {
|
|
|
void calculate() {
|
|
|
if (ref.feature == null) return;
|
|
|
|
|
|
- final outputMeta = ref.meta.outputs.first;
|
|
|
- final outputItem = createOutput(outputMeta.name, 0, outputMeta.unit);
|
|
|
final l = _pickChildOutput(ref.l);
|
|
|
final w = _pickChildOutput(ref.w);
|
|
|
final h = _pickChildOutput(ref.h);
|
|
|
|
|
|
- String description;
|
|
|
final feature = ref.feature!;
|
|
|
final viewport = feature.hostVisualArea!.viewport!;
|
|
|
+
|
|
|
if (l != null && w != null && h != null) {
|
|
|
final value = GeneralFormulas.volumeWithCoefficient(
|
|
|
l.value,
|
|
@@ -30,14 +28,7 @@ class VolumeThreeDistanceCal extends Calculator<LWHStraightLine, double> {
|
|
|
GeneralFormulas.VolumeCofficient,
|
|
|
);
|
|
|
updateFloatValue(value);
|
|
|
- outputItem.value = value;
|
|
|
- description = "${ref.description} ${roundDouble(value)}cm³";
|
|
|
- } else {
|
|
|
- description = ref.description;
|
|
|
}
|
|
|
-
|
|
|
- outputItem.updateDescription(description: description);
|
|
|
- output = outputItem;
|
|
|
}
|
|
|
|
|
|
OutputItem? _pickChildOutput(StraightLine item) {
|