コード例 #1
0
def init_G(strFile):
    print "Initializing G..."
    global g
    g = G(
        print_lines=False,
        outfile=strFile,
        # header = r"\\vfiler1.seas.harvard.edu\group0\jlewis\User Files\Fitzgerald\SoftRobots\MeCodeFiles\header.txt",
        # footer = r"\\vfiler1.seas.harvard.edu\group0\jlewis\User Files\Fitzgerald\SoftRobots\MeCodeFiles\footer.txt"
    )
    g.rename_axis(z=CorrectedMultiMaterial.cur_tool)
    CorrectedMultiMaterial.change_tool(CorrectedMultiMaterial.cur_tool_index)
    return g
コード例 #2
0
def init_G(strFile):
    print "Initializing G..."
    global g
    g = G(
        print_lines=False,
        outfile=strFile,
        # header = r"\\vfiler1.seas.harvard.edu\group0\jlewis\User Files\Fitzgerald\SoftRobots\MeCodeFiles\header.txt",
        # footer = r"\\vfiler1.seas.harvard.edu\group0\jlewis\User Files\Fitzgerald\SoftRobots\MeCodeFiles\footer.txt"
    )
    g.rename_axis(z=CorrectedMultiMaterial.cur_tool)
    CorrectedMultiMaterial.change_tool(CorrectedMultiMaterial.cur_tool_index)
    return g
def print_pneunet():

    # The order of these commands is essential to keeping correct alignment and
    # connections between components. Start with initiating alignment and setting
    # print heights.
    emb3DMatrixPrinting.set_default_travel_height(mold_top, 15)
    ClosedLoopActuator_ActuatorOnly.set_print_heights(second_layer_bottom)
    ClosedLoopActuatorSensors.set_print_heights(sensor_layer_bottoms)
    CorrectedMultiMaterial.set_cur_tool()  # start with A
    CorrectedMultiMaterial.offset_tools()  # align all tips

    # The printing should start with the print nozzle on the centerline of the
    # mold and 15 mm to the right of the mold's left edge. Set this (X,Y)
    # position as (0,0) with POSOFFSET X Y and swap to Material B:
    emb3DPGlobals.g.abs_move(x=start_pos[0], y=start_pos[1])
    CorrectedMultiMaterial.new_change_tool(1)  # switch to B
    ClosedLoopActuatorSensors.print_curvature_sensor()

    # At this point, the curvature sensor should be done, and the tip out of the
    # mold. Call a long dwell; hit pause on the CNC Operator Software, and prepare
    # the next layer of the mold.
    emb3DPGlobals.g.dwell(30)

    # Coming into the new matrix, print the inlets for the curvature sensor:
    ClosedLoopActuatorSensors.print_curvature_sensor_inlet()

    # Now ,move back to the temporary (X=0, Y=0) position and begin printing the
    # actuator in the new matrix material; start with the actuator spacers.
    CorrectedMultiMaterial.new_change_tool(0)  # switch to A
    emb3DPGlobals.g.abs_move(x=start_pos[0], y=start_pos[1])
    ClosedLoopActuator_ActuatorOnly.print_bladder_spacers(
    )  # use A to print spacers

    # Now start printing the proprioceptive sensor:
    CorrectedMultiMaterial.new_change_tool(1)  # switch to B
    ClosedLoopActuatorSensors.print_connectors()  # use B to print connectors

    # Print the bladders of the actuator:
    CorrectedMultiMaterial.new_change_tool(0)  # change to A
    ClosedLoopActuator_ActuatorOnly.print_bladders()  #use C to print bladders

    # Finish printing the proprioceptive sensor:
    CorrectedMultiMaterial.new_change_tool(1)  #change back to B
    ClosedLoopActuatorSensors.print_better_spokes()  #use B for spokes
    ClosedLoopActuatorSensors.print_fancy_sensor_inlet(
    )  #use B for fancy sensor inlet
    ClosedLoopActuatorSensors.print_tops()  #use B for tops

    # Print the busline and inlet for the actuator:
    CorrectedMultiMaterial.new_change_tool(0)  #change to A
    ClosedLoopActuator_ActuatorOnly.print_bladder_bus_line(
    )  #use C for bladder bus line
    ClosedLoopActuator_ActuatorOnly.print_bus_line_inlet(
    )  #use C for bladder bus line inlet

    # At this point, the curvature sensor, prioceptive sensor, and actuator
    # should be done. The tip should be out of the mold. Call a long dwell; hit
    # pause on the CNC Operator Software, and prepare the next layer of the mold.
    emb3DPGlobals.g.abs_move(x=start_pos[0], y=start_pos[1])
    emb3DPGlobals.g.dwell(30)

    # Print the contact sensor:
    CorrectedMultiMaterial.new_change_tool(1)  #change to B
    ClosedLoopActuatorSensors.print_contact_sensor_inlet(
    )  #use B for sensor inlet
    CorrectedMultiMaterial.new_change_tool(0)  #change to A
    emb3DPGlobals.g.abs_move(x=start_pos[0], y=start_pos[1])
    CorrectedMultiMaterial.new_change_tool(1)  #change back to B

    ClosedLoopActuatorSensors.print_contact_sensor()  #use B for sensor
    CorrectedMultiMaterial.new_change_tool(0)  #end with A
    emb3DPGlobals.g.abs_move(x=start_pos[0], y=start_pos[1])
    # Return to the temporary (X=0, Y=0) position and remove all position and
    # tool offsets:
    CorrectedMultiMaterial.remove_tool_offset()
def print_pneunet():

    # The order of these commands is essential to keeping correct alignment and 
    # connections between components. Start with initiating alignment and setting
    # print heights.
    emb3DMatrixPrinting.set_default_travel_height(mold_top, 15)
    ClosedLoopActuator_ActuatorOnly.set_print_heights(second_layer_bottom)
    ClosedLoopActuatorSensors.set_print_heights(sensor_layer_bottoms)              
    CorrectedMultiMaterial.set_cur_tool() # start with A 
    CorrectedMultiMaterial.offset_tools() # align all tips
    
    # The printing should start with the print nozzle on the centerline of the
    # mold and 15 mm to the right of the mold's left edge. Set this (X,Y) 
    # position as (0,0) with POSOFFSET X Y and swap to Material B:
    emb3DPGlobals.g.abs_move(x = start_pos[0], y = start_pos[1])
    CorrectedMultiMaterial.new_change_tool(1) # switch to B
    ClosedLoopActuatorSensors.print_curvature_sensor()
    
    # At this point, the curvature sensor should be done, and the tip out of the
    # mold. Call a long dwell; hit pause on the CNC Operator Software, and prepare
    # the next layer of the mold.
    emb3DPGlobals.g.dwell(30)
    
    # Coming into the new matrix, print the inlets for the curvature sensor:
    ClosedLoopActuatorSensors.print_curvature_sensor_inlet()
    
    # Now ,move back to the temporary (X=0, Y=0) position and begin printing the
    # actuator in the new matrix material; start with the actuator spacers.
    CorrectedMultiMaterial.new_change_tool(0) # switch to A
    emb3DPGlobals.g.abs_move(x = start_pos[0], y = start_pos[1])
    ClosedLoopActuator_ActuatorOnly.print_bladder_spacers() # use A to print spacers
    
    # Now start printing the proprioceptive sensor:
    CorrectedMultiMaterial.new_change_tool(1) # switch to B
    ClosedLoopActuatorSensors.print_connectors() # use B to print connectors
    
    # Print the bladders of the actuator:
    CorrectedMultiMaterial.new_change_tool(0) # change to A
    ClosedLoopActuator_ActuatorOnly.print_bladders() #use C to print bladders
    
    # Finish printing the proprioceptive sensor:
    CorrectedMultiMaterial.new_change_tool(1) #change back to B
    ClosedLoopActuatorSensors.print_better_spokes()  #use B for spokes
    ClosedLoopActuatorSensors.print_fancy_sensor_inlet() #use B for fancy sensor inlet
    ClosedLoopActuatorSensors.print_tops() #use B for tops
    
    # Print the busline and inlet for the actuator:
    CorrectedMultiMaterial.new_change_tool(0) #change to A
    ClosedLoopActuator_ActuatorOnly.print_bladder_bus_line() #use C for bladder bus line
    ClosedLoopActuator_ActuatorOnly.print_bus_line_inlet() #use C for bladder bus line inlet
    
    # At this point, the curvature sensor, prioceptive sensor, and actuator
    # should be done. The tip should be out of the mold. Call a long dwell; hit 
    # pause on the CNC Operator Software, and prepare the next layer of the mold.
    emb3DPGlobals.g.abs_move(x = start_pos[0], y = start_pos[1])
    emb3DPGlobals.g.dwell(30)
    
    # Print the contact sensor:
    CorrectedMultiMaterial.new_change_tool(1) #change to B
    ClosedLoopActuatorSensors.print_contact_sensor_inlet() #use B for sensor inlet
    CorrectedMultiMaterial.new_change_tool(0) #change to A
    emb3DPGlobals.g.abs_move(x = start_pos[0], y = start_pos[1])
    CorrectedMultiMaterial.new_change_tool(1) #change back to B
    
    ClosedLoopActuatorSensors.print_contact_sensor() #use B for sensor
    CorrectedMultiMaterial.new_change_tool(0) #end with A    
    emb3DPGlobals.g.abs_move(x = start_pos[0], y = start_pos[1])
    # Return to the temporary (X=0, Y=0) position and remove all position and 
    # tool offsets:
    CorrectedMultiMaterial.remove_tool_offset()