6 changed files with 179 additions and 7 deletions
@ -0,0 +1,17 @@ |
|||||
|
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 |
||||
|
|
||||
|
xps_height = 200 |
||||
|
xps_width = 300 |
||||
|
xps_thickness = 10 |
||||
|
|
||||
|
pb_width = 330 |
@ -0,0 +1,80 @@ |
|||||
|
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 cq_gears import ( |
||||
|
SpurGear, |
||||
|
Worm, |
||||
|
HerringboneGear, |
||||
|
RackGear, |
||||
|
HerringboneRackGear, |
||||
|
BevelGear, |
||||
|
BevelGearPair, |
||||
|
) |
||||
|
|
||||
|
turn_width = 5 |
||||
|
turn_length = 150 |
||||
|
turn_height = 45 |
||||
|
|
||||
|
servo_diameter = 4.6 |
||||
|
servo_height = 12 |
||||
|
|
||||
|
screw_diameter = 3.2 |
||||
|
screw_head_diameter = 5.6 |
||||
|
|
||||
|
spur_gear = SpurGear(module=1.0, teeth_number=19, width=5.0, bore_d=5.0) |
||||
|
|
||||
|
drive_result = cq.Workplane("XY").gear(spur_gear) |
||||
|
|
||||
|
drive_result = drive_result.cylinder(turn_length, turn_width) |
||||
|
|
||||
|
turn_shaft_height = 10 |
||||
|
turn_shaft_width = 8 |
||||
|
|
||||
|
turn_result = cq.Workplane("XY").box(turn_length, turn_height, turn_width) |
||||
|
|
||||
|
turn_result = ( |
||||
|
turn_result.faces(">Z[0]") |
||||
|
.workplane() |
||||
|
.move(-(turn_length / 3.5), 0) |
||||
|
.rect(32.2-(screw_head_diameter*2)+4, 37.9-(screw_head_diameter*2)+4, forConstruction=True) |
||||
|
.vertices() |
||||
|
.cskHole(screw_diameter, screw_head_diameter, 83, depth=None) |
||||
|
) |
||||
|
|
||||
|
turn_result = ( |
||||
|
turn_result.faces(">Z[0]") |
||||
|
.workplane() |
||||
|
.move((turn_length / 3.5), 0) |
||||
|
.rect(32.2-(screw_head_diameter*2)+4, 37.9-(screw_head_diameter*2)+4, forConstruction=True) |
||||
|
.vertices() |
||||
|
.cskHole(screw_diameter, screw_head_diameter, 83, depth=None) |
||||
|
) |
||||
|
|
||||
|
turn_result = ( |
||||
|
turn_result.faces(">Z[0]") |
||||
|
.workplane(offset=5) |
||||
|
.center(0, 0) |
||||
|
.cylinder(turn_shaft_height, turn_shaft_width/2) |
||||
|
) |
||||
|
|
||||
|
turn_result = ( |
||||
|
turn_result.faces(">Z[1]") |
||||
|
.workplane(offset=(turn_shaft_height-(servo_height/2))) |
||||
|
.center(0, 0) |
||||
|
.cylinder(servo_height, servo_diameter/2, combine="cut") |
||||
|
) |
||||
|
|
||||
|
try: |
||||
|
show_object(turn_result) |
||||
|
except NameError: |
||||
|
pass |
||||
|
|
||||
|
cq.exporters.export(turn_result, "/home/deck/model_files/robot_turn_part.step") |
@ -0,0 +1,51 @@ |
|||||
|
from cadquery import exporters |
||||
|
from cq_warehouse.extensions import Workplane |
||||
|
from cq_warehouse.fastener import * |
||||
|
from cq_warehouse.thread import * |
||||
|
from cqmore.polygon import regularPolygon, star |
||||
|
import cadquery as cq |
||||
|
import cqmore |
||||
|
|
||||
|
bottom_radius = 5 |
||||
|
|
||||
|
inner_screw_nsides = 6 |
||||
|
|
||||
|
Workplane = cqmore.extend(Workplane) |
||||
|
|
||||
|
simple = False |
||||
|
|
||||
|
screw = ButtonHeadScrew( |
||||
|
size="M4-0.7", fastener_type="iso7380_1", length=10 * MM, simple=simple |
||||
|
) |
||||
|
|
||||
|
nut_result = ( |
||||
|
Workplane() |
||||
|
.makePolygon(star(outerRadius=bottom_radius, innerRadius=bottom_radius, n=8)) |
||||
|
.extrude(5) |
||||
|
) |
||||
|
|
||||
|
scaled_screw = screw.scale(1.01) |
||||
|
|
||||
|
screw_result = ( |
||||
|
Workplane() |
||||
|
#.makePolygon(star(outerRadius=bottom_radius, innerRadius=13, n=8)) |
||||
|
#.extrude(8) |
||||
|
.union(scaled_screw) |
||||
|
) |
||||
|
|
||||
|
nut_result = nut_result.workplane(offset=3).threadedHole( |
||||
|
screw, 5.5, simple=simple |
||||
|
) |
||||
|
|
||||
|
box = Workplane().box(190, 100, 100) |
||||
|
box = box.workplane(offset=0).move(10, 0).box(190, 90, 90, combine="cut") |
||||
|
box = box.workplane(offset=0).move(50, 0).hole(7) |
||||
|
|
||||
|
try: |
||||
|
show_object(scaled_screw) |
||||
|
#show_object(box) |
||||
|
#show_object(nut_result) |
||||
|
except NameError: |
||||
|
pass |
||||
|
|
||||
|
cq.exporters.export(screw_result, "/home/deck/model_files/robot_turn_part.step") |
@ -0,0 +1,22 @@ |
|||||
|
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 |
||||
|
|
||||
|
Workplane = cqmore.extend(Workplane) |
||||
|
|
||||
|
result = Workplane().makePolygon(regularPolygon(nSides=3, radius=35, thetaStart=0, thetaEnd=360)).extrude(50) |
||||
|
|
||||
|
try: |
||||
|
show_object(result) |
||||
|
except NameError: |
||||
|
pass |
||||
|
|
||||
|
cq.exporters.export(result, "/home/deck/model_files/webcam_stand.step") |
Loading…
Reference in new issue