Skip to content

Instantly share code, notes, and snippets.

@medicationforall
Last active November 16, 2025 02:18
Show Gist options
  • Select an option

  • Save medicationforall/3532c9a25685bf694195670945a28846 to your computer and use it in GitHub Desktop.

Select an option

Save medicationforall/3532c9a25685bf694195670945a28846 to your computer and use it in GitHub Desktop.
import cadquery as cq
from cadqueryhelper import Base
class Boiler(Base):
def __init__(self):
super().__init__()
#paramters
self.length = 30
self.width = 25
self.height = 60
#shapes
def make_outline(self):
outline = cq.Workplane("XY").box(
self.length,
self.width,
self.height
)
self.outline = outline
def make(self):
super().make()
self.make_outline()
def build_outline(self):
super().build()
part = cq.Workplane("XY")
if self.outline:
part = part.add(self.outline)
return part
def build(self):
super().build()
part = cq.Workplane("XY")
if self.outline:
part = part.add(self.outline)
return part
#---------------------
bp_floor = Boiler()
bp_floor.make()
ex_floor = bp_floor.build()
show_object(ex_floor)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment