steve/miniature-linear-guide
HIWIN MGN miniature linear guideway, sizes 7, 9, 12 and 15: rail (MGNR) or block (MGN-C / MGN-H).
Shaft support: SK8 to SK40 upright and SHF10 to SHF40 flanged, for round linear shafts.
| 1 | """Shaft support, SK (upright, foot on the XY plane, shaft along Y) and SHF (flange on the XY plane, shaft along Z), with the shaft |
| 2 | centred on the origin's axis. Fit dimensions come from the table in the README. The clamp's slit and clamp hole sizes are proportions, for |
| 3 | looks. detail = "simple" leaves out the slit and clamp hole.""" |
| 4 | import cadquery as cq |
| 5 | from steve import Model |
| 6 | |
| 7 | designation = "SK8" # Shaft support |
| 8 | detail = "full" # full: with the clamp's slit and hole; simple: bore and mounting holes only |
| 9 | |
| 10 | # type: (bore D, centre height h, half width E, width W, thickness L, height F, foot G, top width P, hole pitch B, hole S, clamp screw). |
| 11 | # Motion-and-Drives, SK steel shaft supports technical specifications, revision 12.03.2021, |
| 12 | # https://cdn.shopify.com/s/files/1/0509/9690/4105/files/SK_supports_technical_specification.pdf |
| 13 | SK = { |
| 14 | "SK8": (8, 20, 21, 42, 14, 32.8, 6, 18, 32, 5.5, 4), "SK10": (10, 20, 21, 42, 14, 32.8, 6, 18, 32, 5.5, 4), |
| 15 | "SK12": (12, 23, 21, 42, 14, 37.5, 6, 20, 32, 5.5, 4), "SK16": (16, 27, 24, 48, 16, 44, 8, 25, 38, 5.5, 4), |
| 16 | "SK20": (20, 31, 30, 60, 20, 51, 10, 30, 45, 6.6, 5), "SK25": (25, 35, 35, 70, 24, 60, 12, 38, 56, 6.6, 6), |
| 17 | "SK30": (30, 42, 42, 84, 28, 70, 12, 44, 64, 9, 6), "SK35": (35, 50, 49, 98, 32, 82, 15, 50, 74, 11, 8), |
| 18 | "SK40": (40, 60, 57, 114, 36, 96, 15, 60, 90, 11, 8), |
| 19 | } |
| 20 | # type: (bore D, width W, length L, flange T, height F, boss G, hole pitch B, hole S, clamp screw). |
| 21 | # Motion-and-Drives, SHF steel shaft supports technical specifications, revision 12.03.2021, |
| 22 | # https://cdn.shopify.com/s/files/1/0509/9690/4105/files/SHF_supports_technical_specification.pdf |
| 23 | SHF = { |
| 24 | "SHF10": (10, 43, 10, 5, 24, 20, 32, 5.5, 4), "SHF12": (12, 47, 13, 7, 28, 25, 36, 5.5, 4), "SHF16": (16, 50, 16, 8, 31, 28, 40, 5.5, 4), |
| 25 | "SHF20": (20, 60, 20, 8, 37, 34, 48, 7, 5), "SHF25": (25, 70, 25, 10, 42, 40, 56, 7, 5), "SHF30": (30, 80, 30, 12, 50, 46, 64, 9, 6), |
| 26 | "SHF35": (35, 92, 35, 14, 58, 50, 72, 12, 8), "SHF40": (40, 102, 40, 16, 67, 56, 80, 12, 10), |
| 27 | } |
| 28 | |
| 29 | model = Model() |
| 30 | if designation in SK: |
| 31 | D, h, E, W, L, F, G, P, B, S, screw = SK[designation] |
| 32 | root = 0.1 * P # a small sloped root under the column, for looks |
| 33 | with model.sketch("body_sketch", on="XZ", name="Body") as sk: |
| 34 | sk.polyline("body", [(-W / 2, 0), (W / 2, 0), (W / 2, G), (P / 2 + root, G), (P / 2, G + root), (P / 2, F), (-P / 2, F), (-P / 2, G + root), (-P / 2 - root, G), (-W / 2, G)], closed=True) |
| 35 | model.extrude("body", "body_sketch", distance=L, both=True, name="Body") |
| 36 | with model.sketch("bore_sketch", on="XZ", name="Bore") as sk: |
| 37 | sk.circle("bore_circle", (0, h), D / 2) |
| 38 | model.extrude("bore", "bore_sketch", distance=L + 1, both=True, op="cut", name="Bore") |
| 39 | with model.sketch("holes_sketch", on="XY", name="Mounting holes") as sk: |
| 40 | sk.circle("hole_left", (-B / 2, 0), S / 2) |
| 41 | sk.circle("hole_right", (B / 2, 0), S / 2) |
| 42 | model.extrude("holes", "holes_sketch", distance=G, op="cut", name="Mounting holes") |
| 43 | if detail == "full": |
| 44 | slit = 0.05 * P |
| 45 | with model.sketch("slit_sketch", on="XZ", name="Clamp slit") as sk: |
| 46 | sk.rect("slit_rect", (-slit / 2, h), (slit / 2, F + 1)) |
| 47 | model.extrude("slit", "slit_sketch", distance=L + 1, both=True, op="cut", name="Clamp slit") |
| 48 | clamp_z = (h + D / 2 + F) / 2 |
| 49 | with model.sketch("clamp_sketch", on="YZ", name="Clamp hole") as sk: |
| 50 | sk.circle("clamp_circle", (0, clamp_z), screw / 2) |
| 51 | model.extrude("clamp_hole", "clamp_sketch", distance=P + 1, both=True, op="cut", name="Clamp hole") |
| 52 | model.note("centre_height", f"Centre height h = {h} +/-0.02, half width E = {E} +/-0.05 (maker's table)") |
| 53 | else: |
| 54 | D, W, L, T, F, G, B, S, screw = SHF[designation] |
| 55 | r = (W - B) / 2 |
| 56 | R = G / 2 |
| 57 | # the flange: the boss's circle and the two ears, joined by straight sides |
| 58 | flange = (cq.Workplane("XY").moveTo(-B / 2, -r).lineTo(0, -R).lineTo(B / 2, -r).threePointArc((W / 2, 0), (B / 2, r)) |
| 59 | .lineTo(0, R).lineTo(-B / 2, r).threePointArc((-W / 2, 0), (-B / 2, -r)).close().extrude(T)) |
| 60 | body = flange.union(cq.Workplane("XY").circle(R).extrude(L), clean=False) |
| 61 | top = F - R |
| 62 | ear = 0.2 * G |
| 63 | body = body.union(cq.Workplane("XY").workplane(offset=T).center(0, (R * 0.7 + top) / 2).rect(2 * ear, top - R * 0.7).extrude(L - T), clean=False) |
| 64 | body = body.cut(cq.Workplane("XY").workplane(offset=-1).circle(D / 2).extrude(L + 2)) |
| 65 | for x in (-B / 2, B / 2): |
| 66 | body = body.cut(cq.Workplane("XY").workplane(offset=-1).center(x, 0).circle(S / 2).extrude(T + 2)) |
| 67 | if detail == "full": |
| 68 | slit = 0.05 * G |
| 69 | body = body.cut(cq.Workplane("XY").workplane(offset=T).center(0, (D / 2 * 0.9 + top + 1) / 2).rect(slit, top + 1 - D / 2 * 0.9).extrude(L - T + 1)) |
| 70 | body = body.cut(cq.Workplane("YZ").center((R + top) / 2, (T + L) / 2).circle(screw / 2).extrude(2 * ear + 1, both=True)) |
| 71 | model.add("body", body, name="Body") |
| 72 | model.material("steel-generic", color="#6d7075") |
| 73 | result = model.result() |
| 74 |
| 1 | name = "steve/shaft-support" |
| 2 | version = "1.0.0" |
| 3 | runtime = "steve" |
| 4 | license = "MIT" |
| 5 | summary = "Shaft support: SK8 to SK40 upright and SHF10 to SHF40 flanged, for round linear shafts." |
| 6 | description = """Shaft supports for round linear shafts: SK upright clamp blocks and SHF flanged clamps. Fit dimensions from the maker's tables; the clamp's slit and screw hole are proportions, for looks. See the README.""" |
| 7 | tags = ["shaft-support", "sk", "shf", "linear-shaft", "motion", "metric"] |
| 8 | |
| 9 | [parameters.designation] |
| 10 | type = "choice" |
| 11 | default = "SK8" |
| 12 | choices = ["SK8", "SK10", "SK12", "SK16", "SK20", "SK25", "SK30", "SK35", "SK40", "SHF10", "SHF12", "SHF16", "SHF20", "SHF25", "SHF30", "SHF35", "SHF40"] |
| 13 | label = "Type" |
| 14 | |
| 15 | [parameters.detail] |
| 16 | type = "choice" |
| 17 | default = "full" |
| 18 | choices = ["full", "simple"] |
| 19 | label = "Detail" |
| 20 | description = "full: with the clamp's slit and screw hole. simple: bore and mounting holes only." |
| 21 | |
| 22 | [[presets]] |
| 23 | id = "SHF10" |
| 24 | title = "SHF10 shaft support, 10 mm" |
| 25 | params = { designation = "SHF10" } |
| 26 | aliases = ["SHF10", "shaft diameter=10 mm; support style=SHF; generic clamping/flange envelope", "SHF10 shaft support", "10 mm shaft support", "10mm shaft support", "10mm shaft holder", "SHF10 support"] |
| 27 | standard = "Motion-and-Drives" |
| 28 | |
| 29 | [[presets]] |
| 30 | id = "SHF12" |
| 31 | title = "SHF12 shaft support, 12 mm" |
| 32 | params = { designation = "SHF12" } |
| 33 | aliases = ["SHF12", "shaft diameter=12 mm; support style=SHF; generic clamping/flange envelope", "SHF12 shaft support", "12 mm shaft support", "12mm shaft support", "12mm shaft holder", "SHF12 support"] |
| 34 | standard = "Motion-and-Drives" |
| 35 | |
| 36 | [[presets]] |
| 37 | id = "SHF16" |
| 38 | title = "SHF16 shaft support, 16 mm" |
| 39 | params = { designation = "SHF16" } |
| 40 | aliases = ["SHF16", "shaft diameter=16 mm; support style=SHF; generic clamping/flange envelope", "SHF16 shaft support", "16 mm shaft support", "16mm shaft support", "16mm shaft holder", "SHF16 support"] |
| 41 | standard = "Motion-and-Drives" |
| 42 | |
| 43 | [[presets]] |
| 44 | id = "SHF20" |
| 45 | title = "SHF20 shaft support, 20 mm" |
| 46 | params = { designation = "SHF20" } |
| 47 | aliases = ["SHF20", "shaft diameter=20 mm; support style=SHF; generic clamping/flange envelope", "SHF20 shaft support", "20 mm shaft support", "20mm shaft support", "20mm shaft holder", "SHF20 support"] |
| 48 | standard = "Motion-and-Drives" |
| 49 | |
| 50 | [[presets]] |
| 51 | id = "SHF25" |
| 52 | title = "SHF25 shaft support, 25 mm" |
| 53 | params = { designation = "SHF25" } |
| 54 | aliases = ["SHF25", "shaft diameter=25 mm; support style=SHF; generic clamping/flange envelope", "SHF25 shaft support", "25 mm shaft support", "25mm shaft support", "25mm shaft holder", "SHF25 support"] |
| 55 | standard = "Motion-and-Drives" |
| 56 | |
| 57 | [[presets]] |
| 58 | id = "SK8" |
| 59 | title = "SK8 shaft support, 8 mm" |
| 60 | params = { designation = "SK8" } |
| 61 | aliases = ["SK8 shaft support", "8 mm shaft support", "8mm shaft support", "8mm shaft holder", "SK8 support", "SK8 shaft support, 8 mm", "SK8", "shaft diameter=8 mm; support style=SK; generic clamping/flange envelope", "SK8 SC8UU 8 mm shaft support"] |
| 62 | standard = "Motion-and-Drives" |
| 63 | |
| 64 | [[presets]] |
| 65 | id = "SK10" |
| 66 | title = "SK10 shaft support, 10 mm" |
| 67 | params = { designation = "SK10" } |
| 68 | aliases = ["SK10", "shaft diameter=10 mm; support style=SK; generic clamping/flange envelope", "SK10 shaft support", "10 mm shaft support", "10mm shaft support", "10mm shaft holder", "SK10 support"] |
| 69 | standard = "Motion-and-Drives" |
| 70 | |
| 71 | [[presets]] |
| 72 | id = "SK12" |
| 73 | title = "SK12 shaft support, 12 mm" |
| 74 | params = { designation = "SK12" } |
| 75 | aliases = ["SK12", "shaft diameter=12 mm; support style=SK; generic clamping/flange envelope", "SK12 shaft support", "12 mm shaft support", "12mm shaft support", "12mm shaft holder", "SK12 support"] |
| 76 | standard = "Motion-and-Drives" |
| 77 | |
| 78 | [[presets]] |
| 79 | id = "SK16" |
| 80 | title = "SK16 shaft support, 16 mm" |
| 81 | params = { designation = "SK16" } |
| 82 | aliases = ["SK16", "shaft diameter=16 mm; support style=SK; generic clamping/flange envelope", "SK16 shaft support", "16 mm shaft support", "16mm shaft support", "16mm shaft holder", "SK16 support"] |
| 83 | standard = "Motion-and-Drives" |
| 84 | |
| 85 | [[presets]] |
| 86 | id = "SK20" |
| 87 | title = "SK20 shaft support, 20 mm" |
| 88 | params = { designation = "SK20" } |
| 89 | aliases = ["SK20", "shaft diameter=20 mm; support style=SK; generic clamping/flange envelope", "SK20 shaft support", "20 mm shaft support", "20mm shaft support", "20mm shaft holder", "SK20 support"] |
| 90 | standard = "Motion-and-Drives" |
| 91 | |
| 92 | [[presets]] |
| 93 | id = "SK25" |
| 94 | title = "SK25 shaft support, 25 mm" |
| 95 | params = { designation = "SK25" } |
| 96 | aliases = ["SK25", "shaft diameter=25 mm; support style=SK; generic clamping/flange envelope", "SK25 shaft support", "25 mm shaft support", "25mm shaft support", "25mm shaft holder", "SK25 support"] |
| 97 | standard = "Motion-and-Drives" |
| 98 | |
| 99 | [[presets]] |
| 100 | id = "SK30" |
| 101 | title = "SK30 shaft support, 30 mm" |
| 102 | params = { designation = "SK30" } |
| 103 | aliases = ["SK30 shaft support", "30 mm shaft support", "30mm shaft support", "30mm shaft holder", "SK30 support"] |
| 104 | standard = "Motion-and-Drives" |
| 105 | |
| 106 | [[presets]] |
| 107 | id = "SK35" |
| 108 | title = "SK35 shaft support, 35 mm" |
| 109 | params = { designation = "SK35" } |
| 110 | aliases = ["SK35 shaft support", "35 mm shaft support", "35mm shaft support", "35mm shaft holder", "SK35 support"] |
| 111 | standard = "Motion-and-Drives" |
| 112 | |
| 113 | [[presets]] |
| 114 | id = "SK40" |
| 115 | title = "SK40 shaft support, 40 mm" |
| 116 | params = { designation = "SK40" } |
| 117 | aliases = ["SK40 shaft support", "40 mm shaft support", "40mm shaft support", "40mm shaft holder", "SK40 support"] |
| 118 | standard = "Motion-and-Drives" |
| 119 | |
| 120 | [[presets]] |
| 121 | id = "SHF30" |
| 122 | title = "SHF30 shaft support, 30 mm" |
| 123 | params = { designation = "SHF30" } |
| 124 | aliases = ["SHF30 shaft support", "30 mm shaft support", "30mm shaft support", "30mm shaft holder", "SHF30 support"] |
| 125 | standard = "Motion-and-Drives" |
| 126 | |
| 127 | [[presets]] |
| 128 | id = "SHF35" |
| 129 | title = "SHF35 shaft support, 35 mm" |
| 130 | params = { designation = "SHF35" } |
| 131 | aliases = ["SHF35 shaft support", "35 mm shaft support", "35mm shaft support", "35mm shaft holder", "SHF35 support"] |
| 132 | standard = "Motion-and-Drives" |
| 133 | |
| 134 | [[presets]] |
| 135 | id = "SHF40" |
| 136 | title = "SHF40 shaft support, 40 mm" |
| 137 | params = { designation = "SHF40" } |
| 138 | aliases = ["SHF40 shaft support", "40 mm shaft support", "40mm shaft support", "40mm shaft holder", "SHF40 support"] |
| 139 | standard = "Motion-and-Drives" |
| 140 | |
| 141 | [[presets]] |
| 142 | id = "SK8-simple" |
| 143 | title = "SK8, simple (no clamp slit)" |
| 144 | params = { designation = "SK8", detail = "simple" } |
| 145 | aliases = ["SK8 simple"] |
| 146 | standard = "Motion-and-Drives" |
| 147 |
Clamp blocks for round linear shafts. SK stands upright with its foot on the XY plane and the shaft along Y, centred at height h. SHF has its flange on the XY plane and the shaft along Z through the origin.
Bore, heights, widths, thicknesses, hole pitch and hole diameters are the table's. SK states h +/-0.02 and E +/-0.05, carried as a note.
Proportions, for looks only: the clamp slit's width, the clamp hole's height, the small root under the SK column, and the width of the SHF clamp block. None changes a fit dimension. The clamp screw isn't modelled; its hole is the fastening screw's nominal size.
Other makers' SK and SHF blocks are usually close to these but not always identical: check the drawing of the one you buy. SHF8 isn't in this table, so it isn't offered.
| 1 | # Shaft support |
| 2 | |
| 3 | Clamp blocks for round linear shafts. SK stands upright with its foot on the XY plane and the shaft along Y, centred at height h. SHF has its flange on the XY plane and the shaft along Z through the origin. |
| 4 | |
| 5 | ## Source |
| 6 | |
| 7 | - SK: Motion-and-Drives, *SK steel shaft supports technical specifications*, revision 12.03.2021, <https://cdn.shopify.com/s/files/1/0509/9690/4105/files/SK_supports_technical_specification.pdf> |
| 8 | - SHF: Motion-and-Drives, *SHF steel shaft supports technical specifications*, revision 12.03.2021, <https://cdn.shopify.com/s/files/1/0509/9690/4105/files/SHF_supports_technical_specification.pdf> |
| 9 | |
| 10 | Bore, heights, widths, thicknesses, hole pitch and hole diameters are the table's. SK states h +/-0.02 and E +/-0.05, carried as a note. |
| 11 | |
| 12 | **Proportions, for looks only:** the clamp slit's width, the clamp hole's height, the small root under the SK column, and the width of the SHF clamp block. None changes a fit dimension. The clamp screw isn't modelled; its hole is the fastening screw's nominal size. |
| 13 | |
| 14 | Other makers' SK and SHF blocks are usually close to these but not always identical: check the drawing of the one you buy. SHF8 isn't in this table, so it isn't offered. |
| 15 |
Shaft supports for round linear shafts: SK upright clamp blocks and SHF flanged clamps. Fit dimensions from the maker's tables; the clamp's slit and screw hole are proportions, for looks. See the README.
Clamp blocks for round linear shafts. SK stands upright with its foot on the XY plane and the shaft along Y, centred at height h. SHF has its flange on the XY plane and the shaft along Z through the origin.
Bore, heights, widths, thicknesses, hole pitch and hole diameters are the table's. SK states h +/-0.02 and E +/-0.05, carried as a note.
Proportions, for looks only: the clamp slit's width, the clamp hole's height, the small root under the SK column, and the width of the SHF clamp block. None changes a fit dimension. The clamp screw isn't modelled; its hole is the fastening screw's nominal size.
Other makers' SK and SHF blocks are usually close to these but not always identical: check the drawing of the one you buy. SHF8 isn't in this table, so it isn't offered.
Select a requirement to show its faces in the 3D view; edges aren’t marked there. This build’s 3D preview doesn’t map its faces, so a requirement’s faces can’t be shown there. Requirements are written in the part’s code and compiled by the steve runtime at each build; nothing is exported as a file.
HIWIN MGN miniature linear guideway, sizes 7, 9, 12 and 15: rail (MGNR) or block (MGN-C / MGN-H).
Trapezoidal lead screw with a real thread: Tr8, Tr10, Tr12 and Tr16, leads 2 to 8 mm, any length.
Ball screw end support: BK and BF rectangular, FK and FF round, 6 to 40 mm shafts.
Linear bushing block SC6UU to SC30UU (also sold as SCS8UU and so on), shafts 6 to 30 mm.