# @author Arnaud Morin # SPDX-License-Identifier: Apache-2.0 # import cadquery as cq from math import sqrt def camera_mount(): cam = (cq.Workplane("XZ") .box(17, 17, 10, centered=(True, True, False)) .faces(">Y") .workplane() .rect(17, 17) .workplane(offset=8) .rect(14, 14) .loft(combine=True)) # Round the loft's four corners. corners = cq.selectors.BoxSelector((-10, 1, -10), (10, 8, 10)) cam = cam.edges(corners).fillet(6.0) # Lens hole cam = cam.faces(">Y").workplane().hole(12) # Camera pocket cam = cam.faces("