Last active
November 16, 2025 02:18
-
-
Save medicationforall/3532c9a25685bf694195670945a28846 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 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