class LaneGuideAssembly(PinballPart): #create an Assembly class?! #TODO: add mount screws def __init__(self, **kwargs): super(LaneGuideAssembly,self).__init__(**kwargs) self.lguide = LaneGuide() self.p1 = Post() self.p2 = Post() def part_model(self): return \ union()( self.laneguide(), self.posts() ) def mount_holes(self): return None def laneguide(self): return \ translate([0, 0, 14])( self.lguide.part_model() ) def posts(self): return \ union()( translate([0, self.lguide.length/2+1.5])( self.p1.part_model() ), translate([0, -self.lguide.length/2-1.5])( self.p2.part_model() ) )
class LaneGuideAssembly(PinballPart): #create an Assembly class?! #TODO: add mount screws def __init__(self, **kwargs): super(LaneGuideAssembly, self).__init__(**kwargs) self.lguide = LaneGuide() self.p1 = Post() self.p2 = Post() def part_model(self): return \ union()( self.laneguide(), self.posts() ) def mount_holes(self): return None def laneguide(self): return \ translate([0, 0, 14])( self.lguide.part_model() ) def posts(self): return \ union()( translate([0, self.lguide.length/2+1.5])( self.p1.part_model() ), translate([0, -self.lguide.length/2-1.5])( self.p2.part_model() ) )
'part': LaneGuideAssembly(), 'position': [310, 920] }, { 'part': RoundStandupTarget(), 'position': [40, 820], 'rotation': 30 }, { 'part': NarrowStandupTarget(), 'position': [80, 840] }, { 'part': WideStandupTarget(), 'position': [120, 820], 'rotation': -30 }, { 'part': Post(), 'position': [360, 500] } ]) #This exports the design to a .scad file that you can render with OpenSCAD #Available for download at www.openscad.org scad_render_to_file(pf.assembly(), '/tmp/playfield_assembly_example.scad') # You may also try this to render only the playfield wood with the holes you need: # Exporting it to an STL file you can CNC mill your own pinball playfield! scad_render_to_file(pf.wood(), '/tmp/playfield_wood_example.scad')
def __init__(self, **kwargs): super(LaneGuideAssembly,self).__init__(**kwargs) self.lguide = LaneGuide() self.p1 = Post() self.p2 = Post()
def __init__(self, **kwargs): super(LaneGuideAssembly, self).__init__(**kwargs) self.lguide = LaneGuide() self.p1 = Post() self.p2 = Post()