""" Flat limb strip cutout — the 316L sheet blank before any bending. A tapered hexagon, widest at center, symmetric taper to tips. 3 bolt holes at center. Thickness from sheet stock (3.5mm at center tapering to 1.4mm at tips — but this is a flat cutout so we use a single sheet thickness and show the WIDTH taper only). Run in Blender: Scripting workspace > Open > Run Script """ import bpy import bmesh import math def clear_scene(): bpy.ops.object.select_all(action='SELECT') bpy.ops.object.delete() def make_material(name, color, metallic=0.0, roughness=0.5): mat = bpy.data.materials.new(name) mat.use_nodes = True bsdf = mat.node_tree.nodes["Principled BSDF"] bsdf.inputs["Base Color"].default_value = (*color, 1.0) bsdf.inputs["Metallic"].default_value = metallic bsdf.inputs["Roughness"].default_value = roughness return mat def main(): clear_scene() steel = make_material("316L_FullHard", (0.08, 0.08, 0.08), metallic=0.8, roughness=0.4) # Taper profile from doc (distance from center in mm, half-width in mm) # Symmetric — we define one side and mirror. # Center: 44mm wide (half = 22) # 140mm: 40mm wide (half = 20) # 250mm: 32mm wide (half = 16) # 350mm: 24mm wide (half = 12) # 500mm: 20mm wide (half = 10) # # Thickness taper (for the Z extrusion at each section): # Center: 3.5mm # 140mm: 3.0mm # 250mm: 2.2mm # 350mm: 1.8mm # 500mm: 1.4mm # Profile points: (y_mm, half_width_mm, thickness_mm) profile = [ (0, 22.0, 3.5), (50, 21.5, 3.35), (100, 20.8, 3.15), (140, 20.0, 3.0), (180, 18.4, 2.7), (220, 17.2, 2.4), (250, 16.0, 2.2), (280, 14.6, 2.05), (310, 13.2, 1.9), (350, 12.0, 1.8), (380, 11.2, 1.7), (420, 10.6, 1.55), (460, 10.2, 1.45), (500, 10.0, 1.4), ] # Build mesh: for each Y station, create a rectangular cross-section # (width varies, thickness varies). Full strip is symmetric about Y=0. bm = bmesh.new() # Build both halves: negative Y then positive Y all_stations = [] for y_mm, hw_mm, th_mm in reversed(profile): if y_mm > 0: all_stations.append((-y_mm, hw_mm, th_mm)) for y_mm, hw_mm, th_mm in profile: all_stations.append((y_mm, hw_mm, th_mm)) # Scale to meters for y_mm, hw_mm, th_mm in all_stations: y = y_mm / 1000.0 hw = hw_mm / 1000.0 th = th_mm / 1000.0 # Four corners of cross-section at this Y station bm.verts.new((-hw, y, 0)) bm.verts.new(( hw, y, 0)) bm.verts.new(( hw, y, th)) bm.verts.new((-hw, y, th)) bm.verts.ensure_lookup_table() n = len(all_stations) # Side faces for i in range(n - 1): base = i * 4 for j in range(4): v0 = bm.verts[base + j] v1 = bm.verts[base + (j + 1) % 4] v2 = bm.verts[base + 4 + (j + 1) % 4] v3 = bm.verts[base + 4 + j] bm.faces.new([v0, v1, v2, v3]) # Cap ends bm.faces.new([bm.verts[0], bm.verts[1], bm.verts[2], bm.verts[3]]) last = (n - 1) * 4 bm.faces.new([bm.verts[last+3], bm.verts[last+2], bm.verts[last+1], bm.verts[last]]) mesh = bpy.data.meshes.new("Limb_Strip_Flat") bm.to_mesh(mesh) bm.free() obj = bpy.data.objects.new("Limb_Strip_Flat", mesh) bpy.context.scene.collection.objects.link(obj) obj.data.materials.append(steel) # Smooth shading for f in obj.data.polygons: f.use_smooth = True # Subdivision for smoothness mod = obj.modifiers.new("Subsurf", 'SUBSURF') mod.levels = 2 mod.render_levels = 3 # --- Bolt holes (3x M6, 30mm spacing at center) --- for offset_mm in [-30, 0, 30]: bpy.ops.mesh.primitive_cylinder_add( radius=0.00325, # 6.5mm clearance hole / 2 depth=0.006, # through the thickness location=(0, offset_mm / 1000.0, 0.00175)) hole = bpy.context.active_object hole.name = f"BoltHole_{offset_mm}" # Boolean difference mod = obj.modifiers.new(f"Hole_{offset_mm}", 'BOOLEAN') mod.operation = 'DIFFERENCE' mod.object = hole bpy.context.view_layer.objects.active = obj bpy.ops.object.modifier_apply(modifier=f"Hole_{offset_mm}") bpy.data.objects.remove(hole) bpy.ops.object.select_all(action='DESELECT') obj.select_set(True) bpy.context.view_layer.objects.active = obj print("Flat limb strip cutout created.") print("1000mm total length, tapered width (44mm center -> 20mm tips),") print("tapered thickness (3.5mm center -> 1.4mm tips), 3x M6 bolt holes.") print("This is the blank before press-brake recurve forming.") if __name__ == "__main__": main()