diff --git a/modeling-cmds/openapi/api.json b/modeling-cmds/openapi/api.json index 5ae5b533..55b1f678 100644 --- a/modeling-cmds/openapi/api.json +++ b/modeling-cmds/openapi/api.json @@ -416,7 +416,7 @@ "properties": { "dimension": { "nullable": true, - "description": "The explicitly defined dimension. Only required if the measurement is not automatically calculated.", + "description": "The explicitly defined dimension. Only required if the measurement is not automatically calculated.", "type": "number", "format": "double" }, @@ -430,14 +430,12 @@ ] }, "tolerance": { + "nullable": true, "description": "The tolerance of the dimension", "type": "number", "format": "double" } - }, - "required": [ - "tolerance" - ] + } }, "AnnotationMbdControlFrame": { "description": "Parameters for defining an MBD Geometric control frame", @@ -491,7 +489,7 @@ "maxLength": 1 }, "tolerance": { - "description": "Tolerance value - the total tolerance of the geometric control. The unit is based on the drawing standard.", + "description": "Tolerance value - the total tolerance of the geometric control. The unit is based on the drawing standard.", "type": "number", "format": "double" } diff --git a/modeling-cmds/src/shared.rs b/modeling-cmds/src/shared.rs index 91cf8a22..18293b98 100644 --- a/modeling-cmds/src/shared.rs +++ b/modeling-cmds/src/shared.rs @@ -400,7 +400,8 @@ pub struct AnnotationMbdControlFrame { pub symbol: MbdSymbol, /// Diameter symbol (if required) whether the geometric control requires a cylindrical or diameter tolerance pub diameter_symbol: Option, - /// Tolerance value - the total tolerance of the geometric control. The unit is based on the drawing standard. + /// Tolerance value - the total tolerance of the geometric control. + /// The unit is based on the drawing standard. pub tolerance: f64, /// Feature of size or tolerance modifiers pub modifier: Option, @@ -422,10 +423,12 @@ pub struct AnnotationMbdControlFrame { pub struct AnnotationMbdBasicDimension { /// Type of symbol to use for this dimension (if required) pub symbol: Option, - /// The explicitly defined dimension. Only required if the measurement is not automatically calculated. + /// The explicitly defined dimension. + /// Only required if the measurement is not automatically calculated. pub dimension: Option, /// The tolerance of the dimension - pub tolerance: f64, + #[serde(default, skip_serializing_if = "Option::is_none")] + pub tolerance: Option, } /// Parameters for defining an MBD Basic Dimension Annotation state which is measured between two positions in 3D