Beispiel #1
0
        super(Stud, self).__init__(**kwargs)
        self.radius = radius
        self.height = height
        self.rubber_radius = rubber_radius
        self.rubber_height = rubber_height
        self.rubber_position = rubber_position

    def part_model(self):
        stud = \
     color([0.7, 0.7, 0.7])(
        translate([0,0,-self.height])(
        cylinder(r=self.radius, h=2*self.height)
        )
        )
        return stud

    def mount_holes(self):
        return None

    def mount_holes_2d(self):
        return circle(r=self.radius, segments=self.segments)


if __name__ == '__main__':
    from pinball.playfield import Playfield

    pf = Playfield(400, 600)
    pf.append(Stud(), [200, 30])

    scad_render_to_file(pf.assembly(), '/tmp/stud_example.scad')
Beispiel #2
0
class VerticalUpKicker(BallHole):
    #TODO: Implement this in SolidPinball
    pass


class BallDrain(BallHole):
    #TODO: Implement this in SolidPinball
    pass


#TODO: SolidPinball: implement the PopBumper body 3d-model
#TODO: SolidPinball: implement the Slingshot assembly 3d-model (including rubber and 3 posts automatically)
#TODO: SolidPinball: implement the 3d-model of the StardupTargets metal part

pf = Playfield(pf_width, pf_height)
pf.append_parts([
    {
        'part': Rollover(),
        'position': [74.5, 360]
    },
    {
        'part': Rollover(),
        'position': [37.4, 320]
    },
    {
        'part': Rollover(),
        'position': [520.4, 360]
    },
    {
        'part': Rollover(),