This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
T5 | |
G17 | |
G21 | |
G90 | |
S7000 | |
M03 | |
G00 Z5 | |
G00 X9.602 Y48.74 | |
G00 Z2 | |
F100 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import cadquery as cq | |
from Helpers import show | |
# remake of the wikiedia example of a CSG intersect: | |
# https://en.wikipedia.org/wiki/Constructive_solid_geometry#Workings | |
sphere = cq.Workplane("XY").sphere(7.5).translate((5, 5, 5)) | |
box = cq.Workplane("XY").box(10, 10, 10) | |
def copy(obj): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
import six | |
from collections import defaultdict | |
# ================= LIBRARY CODE ================= | |
# ---- Registration | |
registered_operations = defaultdict(dict) | |
def register(obj_type, name, keys=('result',)): | |
assert issubclass(obj_type, ObjectType), "bad object type: %r" % obj_type | |
assert isinstance(name, six.string_types), "bad name: %r" % name |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import cadquery | |
from Helpers import show | |
helical_radius = 6.0 | |
core_radius = 4.0 | |
pitch = 2.0 # length per revolution | |
length = 12.0 | |
def helical_path(p, l, r): | |
wire = cadquery.Wire.makeHelix(p, l, r, angle=0) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import cadquery as cq | |
from Helpers import show | |
import Part | |
pitch = 2 | |
depth = 1 | |
height = 10 | |
radius = 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
class BaseVector(object): | |
def cross(self, v): | |
print("base vector cross") | |
def dot(self, v): | |
print("base vector dot") | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
__pycache__ |
OlderNewer