Hex Bolt Product
This example shows how to create a Smart Quote product to support configuration of a hex bolt with several materials and different quality inspections depending on choices.
Items
Create one Item per Material
Pages
- Compliance
- Material
- Dimensions
Attributes
Page: Compliance - COMPLIANCE (Data Type: TEXT. Entry Type: DROPDOWN)
Page: Material - MATERIAL (Data Type: TEXT. Entry Type: DROPDOWN)
The MATERIAL attribute should have multiple valid value sets that depend on the selection of COMPLIANCE attribute
Page: Dimensions - LEN (Data Type: DIM. Entry Type: ENTRY) - DIAM (Data Type: DIM. Entry Type: ENTRY)
Page: Options - COATING (Data Type: TEXT. Entry Type: DROPDOWN)
3. Manufacturing Tasks (One Time Setup for a Location)
Below are the core production tasks required to form and thread a bolt, typically preceding quality inspections (BSL). These are needed in the Rules, so we are setting them up now.
| Task # | Name | Description |
|---|---|---|
| 10 | CUT_STOCK | Cut raw bar stock to the required blank length. |
| 20 | FORGE_HEAD | Hot-forge or cold-form the bolt head to required hex dimensions. |
| 30 | TRIM_FLASH | Trim excess flash from forging to achieve clean head geometry. |
| 40 | PUNCH_MARK | Apply head markings (grade, manufacturer ID, lot code). |
| 50 | MACHINE_POINT | Machine or form the bolt point (chamfer, dog point, etc.). |
| 60 | THREAD_ROLL | Roll threads to specified pitch and length using thread-rolling dies. |
| 70 | HEAT_TREAT | Quench + temper to achieve required mechanical properties. |
| 80 | STRAIGHTEN | Straighten bolt shank after heat treat to meet runout requirements. |
| 90 | CLEAN_DEBURR | Shot blast, tumble, or deburr to remove scale and sharp edges. |
| 100 | PLATING_OR_COATING | Apply required coating (zinc, cadmium, Xylan, etc.). |
| 110 | BAKE_EMBRITTLEMENT | Bake to relieve hydrogen per ASTM F1941 (if plated). |
| 120 | FINAL_CLEAN_OIL | Final cleaning, rust-preventative oiling, and packaging prep. |
Rule Groups
- Validation (Priority 10)
- Calculations (Priority 20)
- Process (Priority 30)
- Quality (Priority 40)
Rules
Add Material (Group: Calculations / PRIO: 100)
The following rule calculates the weight and adds the material as a line item. Note how the volume is calculated using the geometric formulas from section 1.
$$V_{total} = V_{shank} + V_{head}$$ $$V_{total} = 0.589 + 0.118 \approx 0.707 \text{ in}^3$$
when
var config = Configurator();
var mat = Attribute_TXT(a => a.NameIs("MATERIAL"));
var diam = Attribute_DIM(a => a.NameIs("DIAM"));
var len = Attribute_DIM(a => a.NameIs("LEN"));
then
// note: mat.Get() gets the value of the MATERIAL attribute..which is the selected value from the Valid Values list. It must match exactly the part number in the Item catalog (Configurator will error if it doesnt)
// note: UOM here is LB...which must match UOM of the Item
// Weight (lb) for Carbon Steel (Density = 0.283 lb/in³):
config.AddAttribute(mat.Get(),
(
Math.PI * Math.Pow(diam.IN()/2.0, 2) * len.IN()
+
((3.0 * Math.Sqrt(3.0) / 2.0) * Math.Pow((1.5 * diam.IN()) / 2.0, 2)) * (0.65 * diam.IN())
)
* 0.283
);
Cut to Length (Group: Process / PRIO: 90)
This rule calculates the required raw stock length and adds the CUT_STOCK task to the router.
when
var len = Attribute_DIM(a => a.NameIs("LEN"));
then
// Add the CUT_STOCK task (Task #10)
// We add 0.25" to the finished length for facing/point machining
config.AddTask("CUT_STOCK").Detail($"Cut to {len.IN() + 0.25} inches. Includes 0.25in overage");
Forge Head (Group: Process / PRIO: 80)
This rule adds the forging and trimming tasks based on the diameter of the bolt.
when
var diam = Attribute_DIM(a => a.NameIs("DIAM"));
then
config.AddTask("FORGE_HEAD").Detail("Forge Head").Time(0.01m);
config.AddTask("TRIM_FLASH").Detail("Trim Flash").Time(0.01m);
config.AddTask("PUNCH_MARK").Detail("Punch Mark").Time(0.01m);
Threading and Finishing (Group: Process / PRIO: 70)
Additional tasks are added to complete the manufacturing process.
when
var diam = Attribute_DIM(a => a.NameIs("DIAM"));
var len = Attribute_DIM(a => a.NameIs("LEN"));
then
config.AddTask("MACHINE_POINT").Detail("Machine Point").Time(0.01m);
config.AddTask("THREAD_ROLL").Detail("Roll Threads").Time(0.01m);
config.AddTask("HEAT_TREAT").Detail("Heat Treat").Time(0.01m);
Straightening (Group: Process / PRIO: 65)
Additional tasks are added to complete the manufacturing process.
when
var len = Attribute_DIM(a => a.NameIs("LEN") && len.IN() > 6);
then
config.AddTask("STRAIGHTEN").Detail("Straighten").Time(0.01m);
Deburr (Group: Process / PRIO: 62)
Additional tasks are added to complete the manufacturing process.
when
var len = Attribute_DIM(a => a.NameIs("LEN") && len.IN() > 6);
then
config.AddTask("STRAIGHTEN").Detail("Machine Point").Time(0.01m);
Plating and Coating (Group: Process / PRIO: 60)
If a coating is required, we add the plating task and the hydrogen embrittlement bake.
when
var config = Configurator();
var coating = Attribute_TXT(a => a.NameIs("COATING") && !a.ValueIs("PLAIN"));
then
config.AddTask("PLATING_OR_COATING");
// High-strength bolts (Grade 8 / B7) usually require baking
config.AddTask("BAKE_EMBRITTLEMENT");
Clean and Oil (Group: Process / PRIO: 50)
when
var config = Configurator();
then
config.AddTask("CLEAN_DEBURR");
config.AddTask("FINAL_CLEAN_OIL");