
65abae2e-ab94-4b0f-8f39-45b546e5165d

import cadquery as cq # --------------------------------------------------- # 1. Base rectangle: 30 mm wide × 9 mm deep × 9 mm high # --------------------------------------------------- base = cq.Workplane("XY").box(30, 9, 9, centered=[True, True, False]) # --------------------------------------------------- # 2. Central raised section: 19 × 9 × 9 mm # --------------------------------------------------- rect_section = ( cq.Workplane("XY") .workplane(offset=9) # sits on top of base .box(19, 9, 9, centered=[True, True, False]) ) # --------------------------------------------------- # 3. Semicircle dome: radius 11 mm, thickness 9 mm # --------------------------------------------------- dome = ( cq.Workplane("XY") .workplane(offset=18) # 9 (base) + 9 (rect) = 18 mm .circle(11) .extrude(11, both=True) ) # Cut dome into semicircle shape dome = dome.intersect( cq.Workplane("XY") .box(19, 9, 11, centered=[True, True, False]) .translate((0, 0, 18))
2K·PBR·v3.0-20250812







