|
@@ -1,5 +1,5 @@
|
|
|
import 'package:fis_common/logger/logger.dart';
|
|
|
-import 'package:fis_measure/interfaces/process/items/item.dart';
|
|
|
+import 'package:fis_measure/interfaces/process/items/item_metas.dart';
|
|
|
import 'package:fis_measure/interfaces/process/items/terms.dart';
|
|
|
import 'package:fis_measure/process/primitives/trace.dart';
|
|
|
import 'package:fis_measure/process/primitives/urm_measure/urm_curvature_measure.dart';
|
|
@@ -42,29 +42,17 @@ class URMCurveCurvatureLineCal extends Calculator<Trace, double> {
|
|
|
if (feature is! TraceCurvatureLineFeature) return;
|
|
|
feature.autoLinePoints =
|
|
|
urmApplication.urmPointsToDPoints(result.resultDPoints);
|
|
|
- if (feature.refItem.parent is URMCurvatureMeasure) {
|
|
|
- IMeasureItem? parent = feature.refItem.parent;
|
|
|
- var revert =
|
|
|
- parent?.meta.description == URMCurvatureMeasure.revertRatioName;
|
|
|
- if (revert) {
|
|
|
- for (var output in ref.meta.outputs) {
|
|
|
- if (output.name == URMCurvatureMeasure.revertRatioName) {
|
|
|
- output.unit = VidUsUnit.None;
|
|
|
- feature.updateFloatValue(
|
|
|
- output, 1 / result.resultData, output.unit);
|
|
|
- }
|
|
|
- }
|
|
|
- } else {
|
|
|
- for (var output in ref.meta.outputs) {
|
|
|
- if (output.name == URMCurvatureMeasure.ratioName) {
|
|
|
- output.unit = VidUsUnit.None;
|
|
|
- feature.updateFloatValue(
|
|
|
- output, result.resultData, output.unit);
|
|
|
- }
|
|
|
+ ItemMeta? meta = feature.refItem.meta;
|
|
|
+ var revert = meta.name == URMCurvatureMeasure.revertRatioName;
|
|
|
+ if (revert) {
|
|
|
+ for (var output in ref.meta.outputs) {
|
|
|
+ if (output.name == MeasureTerms.URMCurvature) {
|
|
|
+ output.unit = VidUsUnit.None;
|
|
|
+ feature.updateFloatValue(
|
|
|
+ output, 1 / result.resultData, output.unit);
|
|
|
}
|
|
|
}
|
|
|
} else {
|
|
|
-
|
|
|
for (var output in ref.meta.outputs) {
|
|
|
if (output.name == MeasureTerms.URMCurvature) {
|
|
|
output.unit = VidUsUnit.None;
|