5 changed files with 218 additions and 38 deletions
@ -0,0 +1,56 @@ |
|||||
|
from cadquery import exporters |
||||
|
from cq_warehouse.extensions import Workplane |
||||
|
import cadquery as cq |
||||
|
|
||||
|
result = Workplane() |
||||
|
|
||||
|
hole_diameter = 7.1 |
||||
|
hole_radius = hole_diameter / 2.0 |
||||
|
|
||||
|
hole_dist_from_side = 12 |
||||
|
|
||||
|
holder_thickness = 12 |
||||
|
|
||||
|
bar_width = 51 |
||||
|
bar_thickness = 55 |
||||
|
|
||||
|
case_thickness = 40 |
||||
|
|
||||
|
result = result.box( |
||||
|
bar_width + holder_thickness * 3, bar_thickness + holder_thickness, holder_thickness * 3 |
||||
|
) |
||||
|
result = ( |
||||
|
result.workplane(offset=0) |
||||
|
.center(5, -6) |
||||
|
.box(bar_width, bar_thickness, holder_thickness * 3, combine="cut") |
||||
|
) |
||||
|
|
||||
|
result = ( |
||||
|
result.workplane() |
||||
|
.move(bar_width + bar_thickness - 24, 6) |
||||
|
.box( |
||||
|
bar_width + holder_thickness * 3, |
||||
|
bar_thickness + holder_thickness, |
||||
|
holder_thickness * 3, |
||||
|
) |
||||
|
) |
||||
|
|
||||
|
result = ( |
||||
|
result.workplane() |
||||
|
.move(bar_width + bar_thickness - 24, 12) |
||||
|
.box( |
||||
|
case_thickness, |
||||
|
bar_thickness, |
||||
|
holder_thickness * 3, |
||||
|
combine="cut" |
||||
|
) |
||||
|
) |
||||
|
|
||||
|
|
||||
|
|
||||
|
try: |
||||
|
show_object(result) |
||||
|
except NameError: |
||||
|
pass |
||||
|
|
||||
|
cq.exporters.export(result, "/home/deck/model_files/hakko_hooks.step") |
@ -0,0 +1,36 @@ |
|||||
|
from cadquery import exporters |
||||
|
from cq_warehouse.extensions import Workplane |
||||
|
from cq_warehouse.fastener import * |
||||
|
from cq_warehouse.thread import * |
||||
|
from cqmore.curve import archimedeanSpiral, circle |
||||
|
from cqmore.polygon import regularPolygon, star |
||||
|
from cqmore.polyhedron import polarZonohedra, Polyhedron, superellipsoid |
||||
|
from svg_path import addSvgPath |
||||
|
from svgpathtools import svg2paths |
||||
|
import cadquery as cq |
||||
|
import cqmore |
||||
|
from math import ceil, floor |
||||
|
|
||||
|
Workplane = cqmore.extend(Workplane) |
||||
|
Workplane.addSvgPath = addSvgPath |
||||
|
|
||||
|
hole_diameter = 3.66 |
||||
|
hole_radius = hole_diameter / 2.0 |
||||
|
screw_dist = 76 |
||||
|
bracket_height = 5 |
||||
|
|
||||
|
result = Workplane() |
||||
|
result = result.box(60, bracket_height, 7) |
||||
|
result = result.workplane(offset=-bracket_height + 4).box(60, 1.2, 7, combine="cut") |
||||
|
result = result.workplane(offset=-bracket_height+2.38).move(0, 4).box(100, 5, 2) |
||||
|
result = result.workplane(offset=(bracket_height/2)-1).move(0, 5.5).box(100, 2, 6) |
||||
|
|
||||
|
holes = Workplane("XZ").workplane(offset=-6).move(-37, 1).line(screw_dist, 0, forConstruction=True).vertices().cylinder(4, hole_radius) |
||||
|
|
||||
|
result = result.cut(holes) |
||||
|
|
||||
|
cq.exporters.export(result, "/home/deck/model_files/ssd_bracket.step") |
||||
|
try: |
||||
|
show_object(result) |
||||
|
except NameError: |
||||
|
pass |
Loading…
Reference in new issue