Tolerance Object

The tolerance object describes a geometric tolerance or dimension defined by the digital thread model. A tolerance object describes the ID, name, type, and value of each tolerance, as well as any modifiers, datums, or status information.

{
  "id":		int,
  "type":	string,
  "name":	string,
  "tolTypeName": string,
  "toleranceType": string,
  "value":	double,
  "unit":	string,
  "faces":	int[],
  "range":	{"flag": bool, "lower": double, "upper": double},
  "rangeName":	string,
  "modifiers":	string[],
  "modName":	string
  "children":	tolerance[],
  "status":	string
}
Property Type Description
id string The unique identifier for the Tolerance.
type string The specific type of the tolerance. The type string will be one of "tolerance" or "datum".
name string The tolerance name, if any.
tolTypeName string A full name of the STEP tolerance type.
tolType string A short identifier for the STEP tolerance type.
value double Numeric value for the tolerance value or nominal value of a dimension.
unit string Name of the unit for the value.
faces int[] An array of integer ids for the geometry faces that the tolerance is applied to.
range object An object with a boolean flag value, and upper and lower numeric values. Typically only applied to dimensions, as geometric tolerances completely define their tolerance zone with the base value.
rangeName string This is the range value formatted as a string.
modifiers string[] An array of string identifiers for the various modifiers attached to the tolerance.

A partial list of modifiers that may appear on tolerances include:

  • "any_cross_section" (ACS)
  • "common_zone" (CZ)
  • "each_radial_element" (EACH RADIAL ELEMENT)
  • "free_state" Ⓕ
  • "least_material_requirement" Ⓛ
  • "line_element" (LE)
  • "major_diameter" (MD)
  • "maximum_material_requirement" Ⓜ
  • "minor_diameter" (LD)
  • "not_convex" (NC)
  • "pitch_diameter" (PD)
  • "reciprocity_requirement" Ⓡ
  • "separate_requirement" (SEP REQT)
  • "statistical_tolerance" <ST>
  • "tangent_plane" Ⓣ

A partial list of modifiers that may be specified for datums include:

  • "any_cross_section" [ACS]
  • "any_longitudinal_section" [ALS]
  • "basic" BSC
  • "contacting_feature" [CF]
  • "degree_of_freedom_constraint_u" [u]
  • "degree_of_freedom_constraint_v" [v]
  • "degree_of_freedom_constraint_w" [w]
  • "degree_of_freedom_constraint_x" [x]
  • "degree_of_freedom_constraint_y" [y]
  • "degree_of_freedom_constraint_z" [z]
  • "distance_variable" [DV]
  • "free_state" Ⓕ
  • "least_material_requirement" Ⓛ
  • "line" [SL]
  • "major_diameter" [MD]
  • "maximum_material_requirement" Ⓜ
  • "minor_diameter" [LD]
  • "orientation" [><]
  • "pitch_diameter" [PD]
  • "plane" [PL]
  • "point" [SP]
  • "translation" Ⓑ
modName string This is the modifiers array formatted as a string.
children object The children array contains nested tolerance objects that describe any datums that apply to the tolerance. The type will be "datum" and the name field will identify the datum.
status string The status returns a string characterizing the measured value of the tolerance.
  • “tolerance red” if the measured value of the tolerance exceeds the defined value
  • “tolerance green” if the measured value is within the defined value (or range for a dimension tolerance)
  • “tolerance none” if there is no measured value.

For example, the following describes a surface profile tolerance with several datums:

{
  "id":85366,
  "type":"tolerance",
  "name":"Surface Profile Tolerance",
  "tolTypeName":"Surface Profile Tolerance",
  "toleranceType":"Surface",
  "value":0.2,
  "unit":"mm",
  "faces":[],
  "range":{"flag":false,
	   "lower":2.2250738585072014e-308,
	   "upper":0},
  "rangeName":"",
  "modifiers":[],
  "children":[{"type":"datum", "name":"A", "id":83082, "faces":[85388]},
	      {"type":"datum", "name":"B", "id":83085, "faces":[85399]},
	      {"type":"datum", "name":"C", "id":83088, "faces":[85408]}],
  "status":"tolerance none"
}