Beispiel #1
0
    def __make_bracket(self):
        l = self.profile_data['lbracket'][self.bracket_type]['l']

        script_dir = os.path.dirname(os.path.realpath(__file__))
        profile_dxf_file = open(script_dir + self.profile_dxf)
        bracket = fso.Extrusion(dxf_file=profile_dxf_file, l=l)

        # bracket = fso.Extrusion(profile=self.profile_dxf,l=l)
        self.add_obj(bracket)
Beispiel #2
0
    def __make_laser_sensor_short_range(self):
        profile = self.parameters['profile']
        l = self.parameters['z']
        lssr = fso.Extrusion(profile=profile, l=l)
        lssr.set_color(self.parameters['color'], recursive=True)

        if self.parameters['show_laser_beam']:
            laser_beam = fso.Cylinder(r=self.parameters['laser_beam_r'],
                                      l=self.parameters['laser_beam_l'])
            laser_beam.rotate(angle=math.pi / 2, axis=[1, 0, 0])
            laser_beam.set_color(self.parameters['laser_beam_color'])
            laser_beam_tx = self.parameters['laser_beam_tx']
            laser_beam_ty = -self.parameters['laser_beam_l'] / 2
            laser_beam_tz = 0
            laser_beam.translate([laser_beam_tx, laser_beam_ty, laser_beam_tz])
            lssr |= laser_beam

        self.add_obj(lssr)
Beispiel #3
0
 def __make_submersible_mount(self):
     profile = self.parameters['profile']
     l = self.parameters['z']
     submersible_mount = fso.Extrusion(profile=profile, l=l)
     self.add_obj(submersible_mount)
Beispiel #4
0
 def __make_pillowblock(self):
     profile = self.parameters['profile']
     l = self.parameters['z']
     pillowblock = fso.Extrusion(profile=profile, l=l)
     self.add_obj(pillowblock)
Beispiel #5
0
 def __make_loadcell(self):
     profile = self.parameters['profile']
     l = self.parameters['z']
     loadcell = fso.Extrusion(profile=profile, l=l)
     self.add_obj(loadcell)