Expose product length calculation through MCP
This commit is contained in:
@@ -7,6 +7,7 @@ from typing import Any
|
||||
from roll_calculation import (
|
||||
ArticleRepository,
|
||||
calculate_material_weight,
|
||||
calculate_product_length,
|
||||
calculate_roll,
|
||||
get_article,
|
||||
transport_roll_inputs_from_roll_calculation,
|
||||
@@ -41,6 +42,26 @@ def calculate_material_weight_result(
|
||||
)
|
||||
|
||||
|
||||
def calculate_product_length_result(
|
||||
*,
|
||||
target_roll_diameter_mm: float,
|
||||
core_diameter_mm: float,
|
||||
thickness_mm: float,
|
||||
thickness_stddev_mm: float | None = None,
|
||||
width_m: float | None = None,
|
||||
area_weight_g_m2: float | None = None,
|
||||
) -> dict[str, Any]:
|
||||
"""Delegate target-diameter product-length calculation to the domain."""
|
||||
return calculate_product_length(
|
||||
target_roll_diameter_mm=target_roll_diameter_mm,
|
||||
core_diameter_mm=core_diameter_mm,
|
||||
thickness_mm=thickness_mm,
|
||||
thickness_stddev_mm=thickness_stddev_mm,
|
||||
width_m=width_m,
|
||||
area_weight_g_m2=area_weight_g_m2,
|
||||
)
|
||||
|
||||
|
||||
def calculate_roll_diameter_result(
|
||||
*,
|
||||
article_number: str | None = None,
|
||||
|
||||
Reference in New Issue
Block a user