Skip to content

COMPONENTS / CORNER-BRACKET

CornerBracket

24 mm plywood corner bracket with four exact recessed M5 fixing seats

Built in SolidCraft 0.49.0 58 commands

Model preview

CornerBracket SolidCraft build

One shared CornerBracket is reused by the standalone model and wooden HUB75 assemblies. Its native outline includes the 0.6 mm arm-tip relief, with inner R4 fillet, broad-face chamfers and four local triangular arm-tip wedge cuts kept editable. Four fixing seats use separate flat head recess, 90° transition, through-bore and 0.2 mm edge-relief features instead of one oversized countersink.

Key dimensions: 24 mm width, 12 mm wall, 60 mm arms; four Ø5.4 bores with Ø10.4 × 1 mm head seats

Open in SolidCraft Web

The editable .sc model is loaded directly from the accepted build branch.

Arm-tip relief review

Dedicated durable build views expose the horizontal and vertical wedge corrections.

Horizontal arm tip CornerBracket horizontal arm-tip wedge relief
Vertical arm tip CornerBracket vertical arm-tip wedge relief

SCPF source

The exact SCPF Python source declared by this build variant.

scpf/model.py
"""Shared CornerBracket with the preserved OpenSCAD fixing geometry.

The standalone component and wooden HUB75 assemblies import this exact class.
The 2D XZ profile carries the 0.6 mm arm-tip print relief, while native
SolidCraft features add the inside R4 fillet, broad-face chamfers and four
recessed M5 clearance seats.
"""
from math import sqrt

from scpf import CountersinkHole, Edges, Hole, Polygon2D, Sketch, component


@component
class CornerBracket:
    arm_width = 24.0
    arm_height = 12.0
    horizontal_arm_length = 60.0
    vertical_arm_length = 60.0

    outer_corner_chamfer = 6.0
    arm_end_chamfer = 3.0
    side_edge_chamfer = 2.0
    elephant_foot_relief = 0.6
    inside_corner_radius = 4.0

    plywood_thickness = 12.0
    bolt_offset = 12.0
    bolt_spacing = 18.0
    bolt_y_offset = 0.0
    bolt_diameter = 5.0
    bolt_clearance = 0.4
    head_diameter = 10.0
    head_clearance = 0.4
    head_recess = 1.0
    bolt_hole_edge_relief = 0.2

    def _bolt_seat(
        self,
        body,
        *,
        outside,
        direction,
        countersink_entry,
        inside,
        inside_direction,
    ):
        """Apply one preserved flat-bottom screw-head seat as native features."""
        through_d = self.bolt_diameter + self.bolt_clearance
        head_d = self.head_diameter + self.head_clearance
        wall_depth = self.arm_height - self.head_recess

        # The OpenSCAD reference intentionally separates these operations.
        # Do not replace them with one oversized countersink: the first 1 mm is
        # cylindrical, then a 90-degree cone transitions to the through bore.
        body = body + Hole(
            d=head_d,
            depth=self.head_recess,
            direction=direction,
        ).at(*outside)

        body = body + CountersinkHole(
            d=through_d,
            countersink_d=head_d,
            countersink_angle=90,
            depth=wall_depth,
            direction=direction,
        ).at(*countersink_entry)

        # Shallow flat edge reliefs are separate from the head seat itself.
        body = body + Hole(
            d=head_d + 2 * self.bolt_hole_edge_relief,
            depth=self.bolt_hole_edge_relief,
            direction=direction,
        ).at(*outside)
        body = body + Hole(
            d=through_d + 2 * self.bolt_hole_edge_relief,
            depth=self.bolt_hole_edge_relief,
            direction=inside_direction,
        ).at(*inside)
        return body

    def build(self):
        w = self.arm_height
        h = self.horizontal_arm_length
        v = self.vertical_arm_length
        end = self.arm_end_chamfer
        outer = self.outer_corner_chamfer
        ef = self.elephant_foot_relief

        # Preserve the OpenSCAD base_profile_2d() topology. The two 0.6 mm tip
        # reliefs belong in this profile; a sweep-edge chamfer across the whole
        # 24 mm width is not geometrically equivalent.
        points = [
            ("i_corner", (0, 0)),
            ("tip_hor_relief", (h - ef, 0)),
            ("o_hor_tip", (h, ef)),
            ("o_hor_bevel", (h, w - end)),
            ("o_hor", (h - end, w)),
            ("o_corner", (-w + outer, w)),
            ("o_vert", (-w, w - outer)),
            ("o_vert_bevel", (-w, -v + end)),
            ("o_vert_end", (-w + end, -v)),
            ("tip_vert_relief", (-ef, -v)),
            ("v_tip", (0, -v + ef)),
        ]

        with Sketch(name="Profile", plane="XZ") as sketch:
            Polygon2D(points, plane="XZ", world=True)

        body = sketch.extrude(self.arm_width, sym=True)

        body = body.fillet(
            self.inside_corner_radius,
            edges=Edges.from_vertices("i_corner"),
        )
        # The two tiny tip-relief diagonals deliberately use `tip_*` names,
        # not `o_*`: including them in the 2 mm side chamfer makes the native
        # blend rails overrun those 0.6 mm faces. OpenSCAD treats that local
        # junction separately in arm_tip_relief_cuts().
        body = body.chamfer(
            self.side_edge_chamfer,
            edges=Edges.from_profile("o_*", sides="both"),
        )
        # Broad-face elephant-foot relief starts on the inside horizontal edge;
        # SolidCraft's tangent propagation carries it around the R4 corner.
        body = body.chamfer(
            self.elephant_foot_relief,
            edges=Edges.from_profile("i_corner", sides="both"),
        )

        # Preserve OpenSCAD arm_tip_relief_cuts(): one triangular prism at the
        # horizontal and vertical arm tip on each printable broad face.
        #
        # The positive-Y cutters use the reference rotations directly. The
        # mirrored negative-Y cutters use the mirrored local Sketch frame and
        # a negative extrusion direction, which is the exact reflected prism
        # without expanding the cutter into hand-written world coordinates.
        s2 = sqrt(2) / 2
        cut_length = self.side_edge_chamfer * sqrt(2) + 2
        wedge_points = [
            (-self.elephant_foot_relief - 1, -1),
            (1, -1),
            (1, self.elephant_foot_relief + 1),
        ]
        wedge_frames = (
            (
                "Horizontal tip relief +Y",
                (
                    self.horizontal_arm_length - self.side_edge_chamfer - s2,
                    self.arm_width / 2 + s2,
                    0,
                ),
                (90, 0, 45),
                cut_length,
            ),
            (
                "Horizontal tip relief -Y",
                (
                    self.horizontal_arm_length - self.side_edge_chamfer - s2,
                    -(self.arm_width / 2 + s2),
                    0,
                ),
                (90, 0, -45),
                -cut_length,
            ),
            (
                "Vertical tip relief +Y",
                (
                    0,
                    self.arm_width / 2 - self.side_edge_chamfer - s2,
                    -self.vertical_arm_length - s2,
                ),
                (0, 45, 90),
                cut_length,
            ),
            (
                "Vertical tip relief -Y",
                (
                    0,
                    -(self.arm_width / 2 - self.side_edge_chamfer - s2),
                    -self.vertical_arm_length - s2,
                ),
                (180, 45, -90),
                -cut_length,
            ),
        )
        for name, origin, rotation, distance in wedge_frames:
            with Sketch(
                name=name,
                plane="XY",
                origin=origin,
                rotation=rotation,
            ) as wedge:
                Polygon2D(wedge_points)
            body = body - wedge.extrude(distance)

        first = self.plywood_thickness + self.bolt_offset
        second = first + self.bolt_spacing
        y = self.bolt_y_offset

        for x in (first, second):
            body = self._bolt_seat(
                body,
                outside=(x, y, w),
                direction=(0, 0, -1),
                countersink_entry=(x, y, w - self.head_recess),
                inside=(x, y, 0),
                inside_direction=(0, 0, 1),
            )

        for z in (-first, -second):
            body = self._bolt_seat(
                body,
                outside=(-w, y, z),
                direction=(1, 0, 0),
                countersink_entry=(-w + self.head_recess, y, z),
                inside=(0, y, z),
                inside_direction=(-1, 0, 0),
            )

        return body
SolidCraft command sequence 58 generated operations · expand to inspect
  1. parameters.add
    {
       "expression": "24",
       "name": "arm_width",
       "unit": "mm"
    }
    
  2. parameters.add
    {
       "expression": "60",
       "name": "horizontal_arm_length",
       "unit": "mm"
    }
    
  3. parameters.add
    {
       "expression": "0.6",
       "name": "elephant_foot_relief",
       "unit": "mm"
    }
    
  4. parameters.add
    {
       "expression": "12",
       "name": "arm_height",
       "unit": "mm"
    }
    
  5. parameters.add
    {
       "expression": "3",
       "name": "arm_end_chamfer",
       "unit": "mm"
    }
    
  6. parameters.add
    {
       "expression": "6",
       "name": "outer_corner_chamfer",
       "unit": "mm"
    }
    
  7. parameters.add
    {
       "expression": "60",
       "name": "vertical_arm_length",
       "unit": "mm"
    }
    
  8. parameters.add
    {
       "expression": "4",
       "name": "inside_corner_radius",
       "unit": "mm"
    }
    
  9. parameters.add
    {
       "expression": "2",
       "name": "side_edge_chamfer",
       "unit": "mm"
    }
    
  10. parameters.add
    {
       "expression": "10",
       "name": "head_diameter",
       "unit": "mm"
    }
    
  11. parameters.add
    {
       "expression": "0.4",
       "name": "head_clearance",
       "unit": "mm"
    }
    
  12. parameters.add
    {
       "expression": "1",
       "name": "head_recess",
       "unit": "mm"
    }
    
  13. parameters.add
    {
       "expression": "12",
       "name": "plywood_thickness",
       "unit": "mm"
    }
    
  14. parameters.add
    {
       "expression": "12",
       "name": "bolt_offset",
       "unit": "mm"
    }
    
  15. parameters.add
    {
       "expression": "0",
       "name": "bolt_y_offset",
       "unit": "mm"
    }
    
  16. parameters.add
    {
       "expression": "5",
       "name": "bolt_diameter",
       "unit": "mm"
    }
    
  17. parameters.add
    {
       "expression": "0.4",
       "name": "bolt_clearance",
       "unit": "mm"
    }
    
  18. parameters.add
    {
       "expression": "0.2",
       "name": "bolt_hole_edge_relief",
       "unit": "mm"
    }
    
  19. parameters.add
    {
       "expression": "18",
       "name": "bolt_spacing",
       "unit": "mm"
    }
    
  20. sketch.create
    {
       "name": "Profile",
       "plane": "XZ"
    }
    
  21. sketch.line
    {
       "closed": true,
       "ids": [
          "i_corner",
          "tip_hor_relief",
          "o_hor_tip",
          "o_hor_bevel",
          "o_hor",
          "o_corner",
          "o_vert",
          "o_vert_bevel",
          "o_vert_end",
          "tip_vert_relief",
          "v_tip"
       ],
       "points": [
          [
             0,
             0
          ],
          [
             "horizontal_arm_length - (elephant_foot_relief)",
             0
          ],
          [
             "horizontal_arm_length",
             "-(elephant_foot_relief)"
          ],
          [
             "horizontal_arm_length",
             "-(arm_height - (arm_end_chamfer))"
          ],
          [
             "horizontal_arm_length - (arm_end_chamfer)",
             "-(arm_height)"
          ],
          [
             "(-(arm_height)) + (outer_corner_chamfer)",
             "-(arm_height)"
          ],
          [
             "-(arm_height)",
             "-(arm_height - (outer_corner_chamfer))"
          ],
          [
             "-(arm_height)",
             "-((-(vertical_arm_length)) + (arm_end_chamfer))"
          ],
          [
             "(-(arm_height)) + (arm_end_chamfer)",
             "vertical_arm_length"
          ],
          [
             "-(elephant_foot_relief)",
             "vertical_arm_length"
          ],
          [
             0,
             "-((-(vertical_arm_length)) + (elephant_foot_relief))"
          ]
       ]
    }
    
  22. sketch.finish
  23. solid.extrude
    {
       "body_name": "CornerBracket",
       "direction": "symmetric",
       "distance": "arm_width"
    }
    
  24. solid.fillet
    {
       "body": "CornerBracket",
       "edges": [
          [
             0,
             0,
             -0
          ]
       ],
       "radius": "inside_corner_radius"
    }
    
  25. solid.chamfer
    {
       "body": "CornerBracket",
       "distance": "side_edge_chamfer",
       "edges": [
          [
             60,
             -12,
             4.8
          ],
          [
             58.5,
             -12,
             10.5
          ],
          [
             25.5,
             -12,
             12
          ],
          [
             -9,
             -12,
             9
          ],
          [
             -12,
             -12,
             -25.5
          ],
          [
             -10.5,
             -12,
             -58.5
          ],
          [
             -4.8,
             -12,
             -60
          ],
          [
             60,
             12,
             4.8
          ],
          [
             58.5,
             12,
             10.5
          ],
          [
             25.5,
             12,
             12
          ],
          [
             -9,
             12,
             9
          ],
          [
             -12,
             12,
             -25.5
          ],
          [
             -10.5,
             12,
             -58.5
          ],
          [
             -4.8,
             12,
             -60
          ]
       ]
    }
    
  26. solid.chamfer
    {
       "body": "CornerBracket",
       "distance": "elephant_foot_relief",
       "edges": [
          [
             29.7,
             -12,
             -0
          ],
          [
             29.7,
             12,
             -0
          ]
       ]
    }
    
  27. sketch.create
    {
       "name": "Horizontal tip relief +Y",
       "plane": {
          "origin": [
             57.292893218813454,
             12.707106781186548,
             0
          ],
          "x_dir": [
             0.7071067811865476,
             0.7071067811865475,
             0
          ],
          "y_dir": [
             0,
             0,
             1
          ]
       }
    }
    
  28. sketch.line
    {
       "closed": true,
       "ids": [
          "a",
          "b",
          "c"
       ],
       "points": [
          [
             "(-(elephant_foot_relief)) - 1 mm",
             -1
          ],
          [
             1,
             -1
          ],
          [
             1,
             "elephant_foot_relief + 1 mm"
          ]
       ]
    }
    
  29. sketch.finish
  30. solid.extrude
    {
       "direction": "positive",
       "distance": "side_edge_chamfer * 1.41421 + 2 mm",
       "operation": "cut",
       "targets": [
          "CornerBracket"
       ]
    }
    
  31. sketch.create
    {
       "name": "Horizontal tip relief -Y",
       "plane": {
          "origin": [
             57.292893218813454,
             -12.707106781186548,
             0
          ],
          "x_dir": [
             0.7071067811865476,
             -0.7071067811865475,
             0
          ],
          "y_dir": [
             0,
             0,
             1
          ]
       }
    }
    
  32. sketch.line
    {
       "closed": true,
       "ids": [
          "a",
          "b",
          "c"
       ],
       "points": [
          [
             "(-(elephant_foot_relief)) - 1 mm",
             -1
          ],
          [
             1,
             -1
          ],
          [
             1,
             "elephant_foot_relief + 1 mm"
          ]
       ]
    }
    
  33. sketch.finish
  34. solid.extrude
    {
       "direction": "negative",
       "distance": "side_edge_chamfer * 1.41421 + 2 mm",
       "operation": "cut",
       "targets": [
          "CornerBracket"
       ]
    }
    
  35. sketch.create
    {
       "name": "Vertical tip relief +Y",
       "plane": {
          "origin": [
             0,
             9.292893218813452,
             -60.707106781186546
          ],
          "x_dir": [
             0,
             0.7071067811865476,
             -0.7071067811865475
          ],
          "y_dir": [
             -1,
             0,
             0
          ]
       }
    }
    
  36. sketch.line
    {
       "closed": true,
       "ids": [
          "a",
          "b",
          "c"
       ],
       "points": [
          [
             "(-(elephant_foot_relief)) - 1 mm",
             -1
          ],
          [
             1,
             -1
          ],
          [
             1,
             "elephant_foot_relief + 1 mm"
          ]
       ]
    }
    
  37. sketch.finish
  38. solid.extrude
    {
       "direction": "positive",
       "distance": "side_edge_chamfer * 1.41421 + 2 mm",
       "operation": "cut",
       "targets": [
          "CornerBracket"
       ]
    }
    
  39. sketch.create
    {
       "name": "Vertical tip relief -Y",
       "plane": {
          "origin": [
             0,
             -9.292893218813452,
             -60.707106781186546
          ],
          "x_dir": [
             0,
             -0.7071067811865476,
             -0.7071067811865475
          ],
          "y_dir": [
             -1,
             0,
             0
          ]
       }
    }
    
  40. sketch.line
    {
       "closed": true,
       "ids": [
          "a",
          "b",
          "c"
       ],
       "points": [
          [
             "(-(elephant_foot_relief)) - 1 mm",
             -1
          ],
          [
             1,
             -1
          ],
          [
             1,
             "elephant_foot_relief + 1 mm"
          ]
       ]
    }
    
  41. sketch.finish
  42. solid.extrude
    {
       "direction": "negative",
       "distance": "side_edge_chamfer * 1.41421 + 2 mm",
       "operation": "cut",
       "targets": [
          "CornerBracket"
       ]
    }
    
  43. solid.hole
    {
       "depth": "head_recess",
       "diameter": "head_diameter + (head_clearance)",
       "direction": [
          0,
          0,
          -1
       ],
       "position": [
          "plywood_thickness + (bolt_offset)",
          "bolt_y_offset",
          "arm_height"
       ],
       "targets": [
          "CornerBracket"
       ]
    }
    
  44. solid.hole
    {
       "cs_angle": 90,
       "cs_diameter": "head_diameter + (head_clearance)",
       "depth": "arm_height - (head_recess)",
       "diameter": "bolt_diameter + (bolt_clearance)",
       "direction": [
          0,
          0,
          -1
       ],
       "position": [
          "plywood_thickness + (bolt_offset)",
          "bolt_y_offset",
          "arm_height - (head_recess)"
       ],
       "targets": [
          "CornerBracket"
       ],
       "type": "countersink"
    }
    
  45. solid.hole
    {
       "depth": "bolt_hole_edge_relief",
       "diameter": "(head_diameter + (head_clearance)) + (bolt_hole_edge_relief * 2)",
       "direction": [
          0,
          0,
          -1
       ],
       "position": [
          "plywood_thickness + (bolt_offset)",
          "bolt_y_offset",
          "arm_height"
       ],
       "targets": [
          "CornerBracket"
       ]
    }
    
  46. solid.hole
    {
       "depth": "bolt_hole_edge_relief",
       "diameter": "(bolt_diameter + (bolt_clearance)) + (bolt_hole_edge_relief * 2)",
       "direction": [
          0,
          0,
          1
       ],
       "position": [
          "plywood_thickness + (bolt_offset)",
          "bolt_y_offset",
          0
       ],
       "targets": [
          "CornerBracket"
       ]
    }
    
  47. solid.hole
    {
       "depth": "head_recess",
       "diameter": "head_diameter + (head_clearance)",
       "direction": [
          0,
          0,
          -1
       ],
       "position": [
          "(plywood_thickness + (bolt_offset)) + (bolt_spacing)",
          "bolt_y_offset",
          "arm_height"
       ],
       "targets": [
          "CornerBracket"
       ]
    }
    
  48. solid.hole
    {
       "cs_angle": 90,
       "cs_diameter": "head_diameter + (head_clearance)",
       "depth": "arm_height - (head_recess)",
       "diameter": "bolt_diameter + (bolt_clearance)",
       "direction": [
          0,
          0,
          -1
       ],
       "position": [
          "(plywood_thickness + (bolt_offset)) + (bolt_spacing)",
          "bolt_y_offset",
          "arm_height - (head_recess)"
       ],
       "targets": [
          "CornerBracket"
       ],
       "type": "countersink"
    }
    
  49. solid.hole
    {
       "depth": "bolt_hole_edge_relief",
       "diameter": "(head_diameter + (head_clearance)) + (bolt_hole_edge_relief * 2)",
       "direction": [
          0,
          0,
          -1
       ],
       "position": [
          "(plywood_thickness + (bolt_offset)) + (bolt_spacing)",
          "bolt_y_offset",
          "arm_height"
       ],
       "targets": [
          "CornerBracket"
       ]
    }
    
  50. solid.hole
    {
       "depth": "bolt_hole_edge_relief",
       "diameter": "(bolt_diameter + (bolt_clearance)) + (bolt_hole_edge_relief * 2)",
       "direction": [
          0,
          0,
          1
       ],
       "position": [
          "(plywood_thickness + (bolt_offset)) + (bolt_spacing)",
          "bolt_y_offset",
          0
       ],
       "targets": [
          "CornerBracket"
       ]
    }
    
  51. solid.hole
    {
       "depth": "head_recess",
       "diameter": "head_diameter + (head_clearance)",
       "direction": [
          1,
          0,
          0
       ],
       "position": [
          "-(arm_height)",
          "bolt_y_offset",
          "-(plywood_thickness + (bolt_offset))"
       ],
       "targets": [
          "CornerBracket"
       ]
    }
    
  52. solid.hole
    {
       "cs_angle": 90,
       "cs_diameter": "head_diameter + (head_clearance)",
       "depth": "arm_height - (head_recess)",
       "diameter": "bolt_diameter + (bolt_clearance)",
       "direction": [
          1,
          0,
          0
       ],
       "position": [
          "(-(arm_height)) + (head_recess)",
          "bolt_y_offset",
          "-(plywood_thickness + (bolt_offset))"
       ],
       "targets": [
          "CornerBracket"
       ],
       "type": "countersink"
    }
    
  53. solid.hole
    {
       "depth": "bolt_hole_edge_relief",
       "diameter": "(head_diameter + (head_clearance)) + (bolt_hole_edge_relief * 2)",
       "direction": [
          1,
          0,
          0
       ],
       "position": [
          "-(arm_height)",
          "bolt_y_offset",
          "-(plywood_thickness + (bolt_offset))"
       ],
       "targets": [
          "CornerBracket"
       ]
    }
    
  54. solid.hole
    {
       "depth": "bolt_hole_edge_relief",
       "diameter": "(bolt_diameter + (bolt_clearance)) + (bolt_hole_edge_relief * 2)",
       "direction": [
          -1,
          0,
          0
       ],
       "position": [
          0,
          "bolt_y_offset",
          "-(plywood_thickness + (bolt_offset))"
       ],
       "targets": [
          "CornerBracket"
       ]
    }
    
  55. solid.hole
    {
       "depth": "head_recess",
       "diameter": "head_diameter + (head_clearance)",
       "direction": [
          1,
          0,
          0
       ],
       "position": [
          "-(arm_height)",
          "bolt_y_offset",
          "-((plywood_thickness + (bolt_offset)) + (bolt_spacing))"
       ],
       "targets": [
          "CornerBracket"
       ]
    }
    
  56. solid.hole
    {
       "cs_angle": 90,
       "cs_diameter": "head_diameter + (head_clearance)",
       "depth": "arm_height - (head_recess)",
       "diameter": "bolt_diameter + (bolt_clearance)",
       "direction": [
          1,
          0,
          0
       ],
       "position": [
          "(-(arm_height)) + (head_recess)",
          "bolt_y_offset",
          "-((plywood_thickness + (bolt_offset)) + (bolt_spacing))"
       ],
       "targets": [
          "CornerBracket"
       ],
       "type": "countersink"
    }
    
  57. solid.hole
    {
       "depth": "bolt_hole_edge_relief",
       "diameter": "(head_diameter + (head_clearance)) + (bolt_hole_edge_relief * 2)",
       "direction": [
          1,
          0,
          0
       ],
       "position": [
          "-(arm_height)",
          "bolt_y_offset",
          "-((plywood_thickness + (bolt_offset)) + (bolt_spacing))"
       ],
       "targets": [
          "CornerBracket"
       ]
    }
    
  58. solid.hole
    {
       "depth": "bolt_hole_edge_relief",
       "diameter": "(bolt_diameter + (bolt_clearance)) + (bolt_hole_edge_relief * 2)",
       "direction": [
          -1,
          0,
          0
       ],
       "position": [
          0,
          "bolt_y_offset",
          "-((plywood_thickness + (bolt_offset)) + (bolt_spacing))"
       ],
       "targets": [
          "CornerBracket"
       ]
    }
    

Build information

Build scope
main
Build variant
corner-bracket
Physical owner
corner-bracket
Built source
1f2fdb32d67d9af42779500c949f2900ee59c7ae
Forge
v0.23.0 ·
SolidCraft
0.49.0
Runtime
ghcr.io/brainboxemb/cad-solidcraft:v0.3.6