Browse Source

adding multiple files

master
wes 10 months ago
parent
commit
fd7f45b8a8
  1. 14
      belt_rivets.py
  2. 17
      double_laptop_stand.py
  3. 80
      robot_chassis.py
  4. 51
      robot_steering.py
  5. 2
      threaded_tool_holder.py
  6. 22
      webcam_stand.py

14
belt_rivets.py

@ -21,9 +21,9 @@ inner_diameter = 5
outer_diameter = 7
thickness = 3
rivet_inner_diameter = 5
rivet_outer_diameter = 7
rivet_thickness = 2
rivet_inner_diameter = 1.5
rivet_outer_diameter = 2.5
rivet_thickness = 3
logo = Workplane().circle(outer_diameter).extrude(thickness)
logo = logo.faces(">Z[0]").circle(inner_diameter+0.9).extrude(thickness, combine="cut")
@ -45,14 +45,16 @@ rivet = Workplane().circle(rivet_outer_diameter).extrude(rivet_thickness)
rivet = rivet.faces(">Z[0]").circle(rivet_inner_diameter+0.9).extrude(rivet_thickness, combine="cut")
rivet = rivet.faces(">Z[0]").circle(rivet_inner_diameter).extrude(rivet_thickness)
rivet = rivet.faces(">Z[1]").center(0,0).cylinder(rivet_thickness+2, rivet_inner_diameter-1, combine="cut")
rivet = rivet.workplane(offset=1.0).circle(rivet_outer_diameter+1).extrude(1)
rivet_outer = Workplane().circle(rivet_inner_diameter+1).extrude(rivet_thickness)
rivet_outer = rivet_outer.faces(">Z[0]").circle(rivet_inner_diameter).extrude(rivet_thickness, combine="cut")
rivet_outer = rivet_outer.workplane(offset=1.0).circle(rivet_outer_diameter+4).extrude(1)
rivet_outer = rivet_outer.workplane(offset=1.0).circle(rivet_outer_diameter+1).extrude(1)
cq.exporters.export(rivet, "/home/deck/model_files/rivet_inner.step")
cq.exporters.export(rivet_outer, "/home/deck/model_files/rivet_outer.step")
try:
show_object(rivet)
except NameError:
pass

17
double_laptop_stand.py

@ -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

80
robot_chassis.py

@ -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")

51
robot_steering.py

@ -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")

2
threaded_tool_holder.py

@ -31,7 +31,7 @@ screw_result = (
.union(scaled_screw)
)
nut_result = nut_result.workplane(offset=9.4).threadedHole(
nut_result = nut_result.workplane(offset=9.3).threadedHole(
screw, 13, simple=simple
)

22
webcam_stand.py

@ -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…
Cancel
Save