1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = {
9 "stacks": [
10 "Shaft end play: + housing depth 50 ±0.1; - bearing width 20 ±0.05; - spacer 19.8 +0.05/-0; - bearing width 10 ±0.03; gap 0.05 to 0.5",
11 "Pin in slot: + slot 10.2 to 10.3; - pin 10 g6; - position 0.1; clearance min 0",
12 {
13 "title": "Lid gap",
14 "dimensions": [
15 {
16 "name": "box height",
17 "nominal": 80,
18 "tolerance": "±0.3",
19 "sign": "+",
20 },
21 {
22 "name": "insert height",
23 "nominal": 76,
24 "tolerance": "±0.2",
25 "sign": "-",
26 "distribution": "uniform",
27 },
28 {
29 "name": "gasket",
30 "nominal": 3,
31 "tolerance": "+0.2/-0.1",
32 "sign": "-",
33 "cpk": 1.33,
34 },
35 ],
36 "requirement": {
37 "min": 0.2,
38 "max": 1.8,
39 },
40 },
41 ],
42 "fits": [
43 "30 H7/g6",
44 "25 H7/p6",
45 "40 H7/k6",
46 ],
47}
48
49
50run = client.actor("jumblemog/tolerance-stackup-analyzer").call(run_input=run_input)
51
52
53print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
54for item in client.dataset(run.default_dataset_id).iterate_items():
55 print(item)
56
57