piecad.projectbox.pc API documentation
Description: ProjectBox Components …

# Module `piecad.projectbox.pc`

ProjectBox Components.

Each component returns a pair: '(shape, hole)' If a shape or hole is not needed for the component, return `None` for that piece.

Most components are centered.

## Functions

`def bme280(wall)`
  Expand source code

      def bme280(wall):
          shape = union(
              difference(
                  cube([12+4, 16+4, 3], center=True),
                  cube([12, 16, 3], center=True),
              ).translate([0, 0, 3/2]),
              difference(
                  cube([16, 2, 5]).translate([-8, -8-2, 3]),
                  cube([3, 3, 2]).translate([-3/2, -8-2, 4]),
              ),
              difference(
                  cube([16, 2, 5]).translate([-8, 8, 3]),
                  cube([3, 3, 2]).translate([-3/2, 8, 4]),
              ),
              pb.wedge(5, 2).translate([-8, 8, 3]),
              pb.wedge(8, 2).translate([-8, -8-2, 0]),
              pb.wedge(5, 2).translate([8-2, 8, 3]),
              pb.wedge(8, 2).translate([8-2, -8-2, 0]),
          )
          hole = pb.hole(3/2, wall).translate([(11.5/2)-3.5, 0, 0])
          return (shape, hole)

`def usb_breakout(wall)`
  Expand source code

      def usb_breakout(wall):
          tp = pb.tap_post(6, 3).rotate([0, 90, 90])
          shape = compose(
              tp.translate([-7, -4, 0]),
              tp.translate([-7, 4, 0]))
          hole = pb.horizontal_slot_hole(8, 3, wall).translate([0, 6+2+1.5, 0])
          return (shape, hole)