JSON Mapping Documentation

This page details how fields from an imported JSON file are mapped to the fields in the CostMater UI.

Component Details

Basic information about the component.

JSON Field PathUI FieldNotes
FileComponent NameThe filename from the JSON is used as the component name.
ShapeType.TypeShapee.g., "Flat" is mapped to the "Flat" shape.
Material.TypeMateriale.g., "MS" is mapped to the "MS" material. "Aluminum" is mapped to "AL".
Dimensions.LengthDimensions - LengthFor most shapes, this maps to `Length`.
Dimensions.WidthDimensions - WidthFor most shapes, this maps to `Width`.
Dimensions.ThicknessDimensions - ThicknessMapped directly for applicable shapes like `Plate`.
Dimensions.BarLengthDimensions - Bar LengthUsed for `Angle` and `Round Bar` shapes.
Dimensions.DiameterDimensions - DiameterUsed for `Round Bar` shape.

Shape-Specific Mappings: Round Bar

Mapping for the "Round Bar" shape type.

JSON Field PathUI FieldDescription
Dimensions.DiameterDimensions - DiameterThe diameter of the round bar.
Dimensions.BarLengthDimensions - Bar LengthThe overall length of the bar.

Shape-Specific Mappings: Angle

Mapping for the "Angle" shape type.

JSON Field PathUI FieldDescription
Dimensions.LengthDimensions - Leg AThe length of the first leg of the angle.
Dimensions.WidthDimensions - Leg BThe length of the second leg of the angle.
Dimensions.ThicknessDimensions - ThicknessThe material thickness for the angle shape.
Dimensions.BarLengthDimensions - Bar LengthThe overall length of the angle bar.

Shape-Specific Mappings: Rectangular Bar

Mapping for the "Rectangular Bar" shape type.

JSON Field PathUI FieldDescription
Dimensions.LengthDimensions - LengthThe length of the bar's cross-section.
Dimensions.WidthDimensions - WidthThe width of the bar's cross-section.
Dimensions.BarLengthDimensions - Bar LengthThe overall length of the bar.

Shape-Specific Mappings: Round Tube

Mapping for the "Round Tube" shape type.

JSON Field PathUI FieldDescription
Dimensions.OuterDiameterDimensions - Outer ØThe outer diameter of the tube.
Dimensions.InnerDiameterDimensions - Inner ØThe inner diameter of the tube.
Dimensions.LengthDimensions - Bar LengthThe overall length of the tube.

Shape-Specific Mappings: Rectangular Tube

Mapping for the "Rectangular Tube" shape type.

JSON Field PathUI FieldDescription
Dimensions.LengthDimensions - LengthThe length of the tube's cross-section.
Dimensions.WidthDimensions - WidthThe width of the tube's cross-section.
Dimensions.ThicknessDimensions - ThicknessThe thickness of the tube's wall.
Dimensions.BarLengthDimensions - Bar LengthThe overall length of the tube.

Shape-Specific Mappings: Square Bar

Mapping for the "Square Bar" shape type.

JSON Field PathUI FieldDescription
Dimensions.LengthDimensions - SideThe length of the square's side.
Dimensions.BarLengthDimensions - Bar LengthThe overall length of the bar.

Shape-Specific Mappings: Square Tube

Mapping for the "Square Tube" shape type.

JSON Field PathUI FieldDescription
Dimensions.LengthDimensions - SideThe length of the tube's side.
Dimensions.ThicknessDimensions - ThicknessThe thickness of the tube's wall.
Dimensions.BarLengthDimensions - Bar LengthThe overall length of the tube.

Features & Operations

Details on how manufacturing features are mapped to operations.

Laser Cutting Operations

JSON Field PathUI OperationNotes
Features.LaserCuts.CutsLaser Cutting ProfileEach item in this array creates one Laser Cutting profile. The `Shape` (e.g. "Slot") is used as the profile type.
...Cuts[].Details.LengthProfile Length/BaseMapped to the primary length dimension of the profile.
...Cuts[].Details.WidthProfile WidthMapped to the width dimension of the profile.

Bending Operations

JSON Field PathUI OperationNotes
Features.Bending.No_of_BendsSimple BendCreates a single "Simple Bend" entry with the specified count.
Features.Bends.BendsDimensional BendEach item in the array creates one "Dimensional Bend" operation.
...Bends[].LengthBend LengthMapped to the "Length" input for the bend.

Drilling Operations

JSON Field PathUI OperationNotes
Features.Machining.Machining.DrillingDrilling OperationEach item in this array creates a "Drilling" machining operation.
...Drilling[].DiameterDiameterMapped to the "Diameter" input for the drilling operation.

Milling Operations

JSON Field PathUI OperationNotes
Features.Milling.Milling.PocketMillingPocket MillingEach item in the array creates a "Pocket Milling" operation.
Features.Milling.Milling.SlotMillingSlot MillingEach item in the array creates a "Slot Milling" operation.
...Milling[].LengthLengthMapped to the "Length" input for the operation.
...Milling[].WidthWidthMapped to the "Width" input for the operation.

Turning Operations

JSON Field PathUI OperationNotes
Features.Machining.Machining.StepTurningStep TurningEach item in this array creates a "Step Turning" operation.
Features.Machining.Machining.FaceTurningFace TurningEach item in this array creates a "Face Turning" operation.
Features.Machining.Machining.IDTurningID TurningEach item in this array creates an "ID Turning" operation.
Features.Machining.Machining.ODTurningOD TurningEach item in this array creates an "OD Turning" operation.
...[].CutLengthLengthMapped to the operation's "Length" input.
...[].BeforeDiameterStart ØMapped to the operation's "Start Ø" input.
...[].AfterDiameterEnd ØMapped to the operation's "End Ø" input.

Other Machining Operations

JSON Field PathUI OperationNotes
Features.Machining.Machining.ThreadingThreadingEach item in this array creates a "Threading" operation.
...Threading[].CutLength or ...Threading[].LengthLengthMapped to the operation's "Length" input.
...Threading[].Diameter or ...Threading[].MajorDiameter or ...Threading[].ThreadMajorDiameterMajor ØMapped to the operation's "Major Ø" input.
...Threading[].PitchPitchMapped to the operation's "Pitch" input. If not present, defaults from settings based on material.
Features.Machining.Machining.ChamferChamferEach item in this array creates a "Chamfer" operation.
...Chamfer[].LengthLengthMapped to the operation's "Length" input.
...Chamfer[].DiameterDiameterMapped to the operation's "Diameter" input.
...Chamfer[].AngleCommentsThe angle is not used in cost calculation but is saved in the comments for reference.

Unmapped Fields

This is a list of known fields in the JSON that are intentionally not mapped, along with the reason.

JSON Field PathReason for Not Mapping
Dimensions.OuterDiameter / InnerDiameterDiameter fields are only applicable for round shapes (e.g., Round Bar, Round Tube). They are ignored if the base `ShapeType` is not round.
Features.Bends.Bends[].Angle (deg)The application does not use the bend angle in its cost calculations.
Features.Bends.Bends[].RadiusBend radius is not a factor in the current cost calculation logic.
Features.Milling.Milling[].DepthCutting depth is calculated automatically based on tool, material, and pass type (Rough/Finish), not set by direct input.
Features.Machining.Machining.Drilling[].DepthThe `Depth` is marked "Unavailable" in the source JSON. The app will default to a length of 0.
...Location or ...PositionThe X, Y, Z coordinate data for features is not used in cost calculations.
ManufacturingMethodThere is no field in the UI to store the manufacturing method.
Logic, Confidence, Source, etc.Metadata fields from the JSON are ignored as they are not relevant to cost estimation.