Пример #1
0
 def Prepare(self):
     self.name = 'Sample'
     self.ProbeMeasure = Procedures.Touch_Probe_A3200_MeasureGrid(
         MyApparatus, MyExecutor)
     self.ProbeCorrect = Procedures.Touch_Probe_A3200_EnableCalibration(
         MyApparatus, MyExecutor)
     self.ProbeStopCorrect = Procedures.Touch_Probe_A3200_DisableCalibration(
         MyApparatus, MyExecutor)
     self.Camera = Procedures.Camera_Capture_ImageXY(
         MyApparatus, MyExecutor)
     self.Cleaner = Procedures.Aerotech_A3200_AirClean(
         MyApparatus, MyExecutor)
     self.Pause = Procedures.Data_User_Input_Options(
         MyApparatus, MyExecutor)
     self.testMaterial = Procedures.ROSEDA_TestMaterial(
         MyApparatus, MyExecutor)
     self.rparameters = Make_TPGen_Data(mat0)
Пример #2
0
GenTP.setGenerator('TemplateTPGen')
GenTP.setParameters()  # Creates the parameter structure for TPGen
TP_gen = MyApparatus['information']['ProcedureData']['Toolpath_Generate']
TP_gen['parameters']['tiph'] = 4
TP_gen['parameters']['length'] = 5

# Create instances of the procedures that will be used
# Procedures that will almost always be used at this level
AlignPrinter = Procedures.User_FlexPrinter_Alignments_Align(
    MyApparatus, MyExecutor)
CalInk = Procedures.User_InkCal_Calibrate(MyApparatus, MyExecutor)
PrintTP = Procedures.Toolpath_Print(MyApparatus, MyExecutor)
Planner = Procedures.Planner_Combinatorial(MyApparatus, MyExecutor)
GenTP = Procedures.Toolpath_Generate(MyApparatus, MyExecutor)
SnapPic = Procedures.Camera_Capture_Image(MyApparatus, MyExecutor)
SnapPicXY = Procedures.Camera_Capture_ImageXY(MyApparatus, MyExecutor)

# Do the experiment
AlignPrinter.Do({'primenoz': 'n' + mat0})
CalInk.Do({'material': mat0})
print('Generating toolpath')
GenTP.Do()
# Let's assume that you just want to take a picture where ever the camera  is
# This procedure needs a time to wait after motion for the camer to settle
# and the name of the camera (it doesn't autofind the camera because there
# could easily be several)
SnapPic.Do({'file': 'Data//image.png', 'camera_name': 'camera'})
print('Printing toolpath')
PrintTP.Do()
# Now, let's take a picture at the center of the what we printed.  We can use
# information from the toolpath generator to determine the center.