Skip to content

Instantly share code, notes, and snippets.

from build123d import *
with BuildPart() as p:
Box(160,50,6)
chamfer(p.part.edges().group_by(Axis.Z)[0].filter_by(Axis.X),3)
chamfer(p.part.edges().filter_by(Axis.Z),4.5)
with BuildSketch() as s:
with GridLocations(6,0,25,1):
SlotOverall(38,2.5,rotation=90)
extrude(amount=10,both=True,mode=Mode.SUBTRACT)
with BuildSketch(Plane.XZ.offset(25)) as s2:
@medicationforall
medicationforall / jersey_barrier_example.py
Last active May 29, 2023 01:08
jersey_barrier_example.py
import cadquery as cq
def jersey_shape(
width = 10,
height = 10,
base_height = 2,
middle_width_inset = -2,
middle_height = 2,
top_width_inset = -1
):
import random
import cadquery as cq
from cadqueryhelper import irregular_grid
from cqindustry import Walkway
from cqterrain import tile as terrain_tile
#ig = irregular_grid(
# height=3,
# union_grid=False,
# max_height=10
import cadquery as cq
import math
import random
def custom_item(length, width, height):
log('custom item')
return (
cq.Workplane("XY")
.box(length-1, width-1, height)
.chamfer(0.5)
import cadquery as cq
import math
# Making an obelisk in cadquery and cq-editor
def pillar(
points=[(0,0),(0,12.5),(2,12.5) ,(4,4), (4,0)],
extrude=10,
faces=4,
intersect=True