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
FROM ubuntu:16.04 | |
ARG ftp_proxy=${ftp_proxy} | |
ARG http_proxy=${http_proxy} | |
ARG https_proxy=${https_proxy} | |
ADD . /code | |
# apt.conf (for optional proxy info) | |
ADD apt.conf /etc/apt/apt.conf |
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__ |
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
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
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
#!/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 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): |