Exemplo n.º 1
0
 def addHoleyCalibration(self):
     #add extend chains
     
     measureOutChains                                = MeasureOutChains()
     self.listOfCalibrationSteps.append(measureOutChains)
     
     #add set z
     adjustZCalibrationDepth                         = AdjustZCalibrationDepth()
     self.listOfCalibrationSteps.append(adjustZCalibrationDepth)
     
     #add Cut
     CommonDict=dict()
     cw=HoleyCalCut(CommonDict)
     self.listOfCalibrationSteps.append(cw)
     
     #add Holey Calibration Measurements
     hcm=HoleyCalMeasurements(CommonDict)
     self.listOfCalibrationSteps.append(hcm)
     
     #add Holey Calibration.  
     hco=HoleyCalOptimize(CommonDict)
     self.listOfCalibrationSteps.append(hco)
     
     self.addAfterCalSteps()
     
     self.loadNextStep()
Exemplo n.º 2
0
 def addTriangularCalibration(self):
     #add rotation radius guess
     rotationRadiusGuess = RotationRadiusGuess()
     self.listOfCalibrationSteps.append(rotationRadiusGuess)
     
     #add extend chains
     measureOutChains = MeasureOutChains()
     self.listOfCalibrationSteps.append(measureOutChains)
     
     #add set z
     adjustZCalibrationDepth = AdjustZCalibrationDepth()
     self.listOfCalibrationSteps.append(adjustZCalibrationDepth)
     
     #add triangular kinematics
     triangularCalibration = TriangularCalibration()
     self.listOfCalibrationSteps.append(triangularCalibration)
     
     self.addAfterCalSteps()
     
     self.loadNextStep()
Exemplo n.º 3
0
    def addSteps(self):
        '''
        
        This function will be called when the ComputeCalibrationSteps step is reached. It will compute which steps are needed for a 
        given frame configuration and add them to the list
        
        '''
        
        if App.get_running_app().data.config.get('Advanced Settings', 'chainOverSprocket') == 'Top':
            #if we're using the top system no extra steps are needed
            pass
        else:
            #if we're using the bottom method we need to remove the chain now and put it back at 12 o'clock
            
            removeChains                                 = RemoveChains()
            self.listOfCalibrationSteps.append(removeChains)
            
            setTo12                                     = SetSprocketsVertical()
            self.listOfCalibrationSteps.append(setTo12)
            
        
        if App.get_running_app().data.config.get('Advanced Settings', 'kinematicsType') == 'Triangular':
            #Put step with choice of Holey Calibration vs. Triangular Calibration
            ChoiceWid=ChooseHoleyOrTriangularCalibration()
            ChoiceWid.chooseHoleyCalibration=self.addHoleyCalibration
            ChoiceWid.chooseTriangularCalibration=self.addTriangularCalibration
            ChoiceWid.listOfCalibrationSteps=self.listOfCalibrationSteps
            ChoiceWid.done=self.done
            self.listOfCalibrationSteps.append(ChoiceWid)
            
#            #add rotation radius guess
#            rotationRadiusGuess                         = RotationRadiusGuess()
#            self.listOfCalibrationSteps.append(rotationRadiusGuess)
#            
#            #add extend chains
#            measureOutChains                                = MeasureOutChains()
#            self.listOfCalibrationSteps.append(measureOutChains)
#            
#            #add set z
#            adjustZCalibrationDepth                         = AdjustZCalibrationDepth()
#            self.listOfCalibrationSteps.append(adjustZCalibrationDepth)
#            
#            #add triangular kinematics
#            triangularCalibration                       = TriangularCalibration()
#            self.listOfCalibrationSteps.append(triangularCalibration)
        else:
            
            #add extend chains
            measureOutChains                                = MeasureOutChains()
            self.listOfCalibrationSteps.append(measureOutChains)
            
            #add set z
            adjustZCalibrationDepth                         = AdjustZCalibrationDepth()
            self.listOfCalibrationSteps.append(adjustZCalibrationDepth)
            
            #Ask for guess of attachment spacing
            distBetweenChainBrackets                    = DistBetweenChainBrackets()
            self.listOfCalibrationSteps.append(distBetweenChainBrackets)
            #Do quadrilateral test cut
            quadTestCut                                 = QuadTestCut()
            self.listOfCalibrationSteps.append(quadTestCut)
        
        
            #one last review
            reviewMeasurements                          = ReviewMeasurements()
            self.listOfCalibrationSteps.append(reviewMeasurements)
            
            #add finish step
            finish              = Finish()
            finish.done         = self.done
            self.listOfCalibrationSteps.append(finish)
 def addSteps(self):
     '''
     
     This function will be called when the ComputeCalibrationSteps step is reached. It will compute which steps are needed for a 
     given frame configuration and add them to the list
     
     '''
     
     if App.get_running_app().data.config.get('Advanced Settings', 'chainOverSprocket') == 'Top':
         #if we're using the top system no extra steps are needed
         pass
     else:
         #if we're using the bottom method we need to remove the chain now and put it back at 12 o'clock
         
         removeChains                                 = RemoveChains()
         self.listOfCalibrationSteps.append(removeChains)
         
         setTo12                                     = SetSprocketsVertical()
         self.listOfCalibrationSteps.append(setTo12)
         
     
     if App.get_running_app().data.config.get('Advanced Settings', 'kinematicsType') == 'Triangular':
         #add rotation radius guess
         rotationRadiusGuess                         = RotationRadiusGuess()
         self.listOfCalibrationSteps.append(rotationRadiusGuess)
         
         #add extend chains
         measureOutChains                                = MeasureOutChains()
         self.listOfCalibrationSteps.append(measureOutChains)
         
         #add set z
         adjustZCalibrationDepth                         = AdjustZCalibrationDepth()
         self.listOfCalibrationSteps.append(adjustZCalibrationDepth)
         
         #add triangular kinematics
         triangularCalibration                       = TriangularCalibration()
         self.listOfCalibrationSteps.append(triangularCalibration)
     else:
         
         #add extend chains
         measureOutChains                                = MeasureOutChains()
         self.listOfCalibrationSteps.append(measureOutChains)
         
         #add set z
         adjustZCalibrationDepth                         = AdjustZCalibrationDepth()
         self.listOfCalibrationSteps.append(adjustZCalibrationDepth)
         
         #Ask for guess of attachment spacing
         distBetweenChainBrackets                    = DistBetweenChainBrackets()
         self.listOfCalibrationSteps.append(distBetweenChainBrackets)
         #Do quadrilateral test cut
         quadTestCut                                 = QuadTestCut()
         self.listOfCalibrationSteps.append(quadTestCut)
         
         #App.get_running_app().data.message_queue.put("Message: You have chosen a configuration which is not currently supported by the calibration process. Check back soon")
         #self.done()
     
     #one last review
     reviewMeasurements                          = ReviewMeasurements()
     self.listOfCalibrationSteps.append(reviewMeasurements)
     
     #add finish step
     finish              = Finish()
     finish.done         = self.done
     self.listOfCalibrationSteps.append(finish)