def print_curvature_sensor(): emb3DMatrixPrinting.move_y(sensor_width/2) emb3DMatrixPrinting.move_x(ClosedLoopActuator_ActuatorOnly.bladder_spacing*(num_bladders-0.5)+(curvature_sensor_length_offset+2)) emb3DMatrixPrinting.print_mode(print_height_abs = curvature_layer_bottom, print_speed = 20) emb3DPGlobals.g.feed(curvature_sensor_print_speed) #for meander in xrange(2): emb3DMatrixPrinting.move_x(-1*ClosedLoopActuator_ActuatorOnly.bladder_spacing*(num_bladders-0.5)-(curvature_sensor_length_offset+2)) emb3DMatrixPrinting.move_y(-1*curvature_sensor_width) emb3DMatrixPrinting.move_x(ClosedLoopActuator_ActuatorOnly.bladder_spacing*(num_bladders-0.5)+(curvature_sensor_length_offset+2)) #emb3DMatrixPrinting.move_y(-1*curvature_sensor_width/5) #emb3DMatrixPrinting.move_x(-1*ClosedLoopActuator_ActuatorOnly.bladder_spacing*(num_bladders-0.5)-(curvature_sensor_length_offset+2)) #emb3DMatrixPrinting.move_y(-1*curvature_sensor_width/5) #emb3DMatrixPrinting.move_x(ClosedLoopActuator_ActuatorOnly.bladder_spacing*(num_bladders-0.5)+(curvature_sensor_length_offset+2)) emb3DMatrixPrinting.travel_mode()
def print_better_spokes(): emb3DMatrixPrinting.move_x(-ClosedLoopActuator_ActuatorOnly.bladder_spacing + ClosedLoopActuator_ActuatorOnly.bladder_width + connector_offset) emb3DMatrixPrinting.move_y(-ClosedLoopActuator_ActuatorOnly.spacer_length/2 + top_y_offset) #first moving left on lower value y side for spokes in range(num_bladders): emb3DMatrixPrinting.print_mode(print_height_abs = connector_print_height, print_speed = spoke_print_speed) if (spokes != 0): emb3DPGlobals.g.move(z = top_print_height - connector_print_height) else: # if first one, print shorter spoke for inlet emb3DPGlobals.g.move(z = fancy_sensor_inlet_print_height- connector_print_height) emb3DMatrixPrinting.travel_mode() emb3DPGlobals.g.move(x= -2* connector_offset - ClosedLoopActuator_ActuatorOnly.bladder_width) emb3DMatrixPrinting.print_mode(print_height_abs = connector_print_height, print_speed = spoke_print_speed) emb3DPGlobals.g.move(z = top_print_height- connector_print_height) emb3DMatrixPrinting.travel_mode() ### Edited on 2015.10.22 ###### ## why is the code below different than the previous g.move(x = ...) move? #emb3DPGlobals.g.move(x = -ClosedLoopActuator_ActuatorOnly.spacer_spacing + 2*connector_offset + ClosedLoopActuator_ActuatorOnly.bladder_width) emb3DPGlobals.g.move(x= -2* connector_offset - ClosedLoopActuator_ActuatorOnly.bladder_width) ############################### emb3DPGlobals.g.move(x = ClosedLoopActuator_ActuatorOnly.spacer_spacing - 2* connector_offset - ClosedLoopActuator_ActuatorOnly.bladder_width) #emb3DMatrixPrinting.print_mode(print_height_abs = top_print_height, print_speed = spoke_print_speed) emb3DPGlobals.g.move(y = ClosedLoopActuator_ActuatorOnly.spacer_length - 2*top_y_offset) #emb3DMatrixPrinting.travel_mode() #then moving right on higher value y side for spokes in range(num_bladders): emb3DMatrixPrinting.print_mode(print_height_abs = connector_print_height, print_speed = spoke_print_speed) emb3DPGlobals.g.move(z = top_print_height - connector_print_height) emb3DMatrixPrinting.travel_mode() if (spokes == 0): emb3DMatrixPrinting.print_mode(print_height_abs = top_print_height, print_speed = spoke_print_speed) emb3DPGlobals.g.move(y = -(ClosedLoopActuator_ActuatorOnly.spacer_length - 2*top_y_offset)) emb3DMatrixPrinting.travel_mode() emb3DPGlobals.g.move(y = ClosedLoopActuator_ActuatorOnly.spacer_length - 2*top_y_offset) emb3DPGlobals.g.move(x= 2* connector_offset + ClosedLoopActuator_ActuatorOnly.bladder_width) emb3DMatrixPrinting.print_mode(print_height_abs = connector_print_height, print_speed = spoke_print_speed) if (spokes != num_bladders-1): emb3DPGlobals.g.move(z = top_print_height - connector_print_height) else:# if first one, print shorter spoke for inlet emb3DPGlobals.g.move(z = fancy_sensor_inlet_print_height- connector_print_height) emb3DMatrixPrinting.travel_mode() emb3DPGlobals.g.move(x = ClosedLoopActuator_ActuatorOnly.spacer_spacing - 2* connector_offset - ClosedLoopActuator_ActuatorOnly.bladder_width)
def print_contact_sensor_inlet(): ## move these variables up to the top of the script: additional_y_offset_for_inlets = 2 inlet_height_offset = 5 # before 20151005, this was equal to 4 pre_inlet_print_speed = 2 ## emb3DMatrixPrinting.move_x(ClosedLoopActuator_ActuatorOnly.bladder_spacing*(num_bladders-0.5)+(curvature_sensor_length_offset+2) + inlet_length_sensor) emb3DMatrixPrinting.move_y(sensor_width/2 + additional_y_offset_for_inlets) emb3DMatrixPrinting.print_mode(print_height_abs = contact_layer_bottom - inlet_height_offset, print_speed = 20) emb3DPGlobals.g.feed(sensor_inlet_print_speed) emb3DPGlobals.g.move(x = -1 * inlet_length_sensor) emb3DPGlobals.g.feed(pre_inlet_print_speed) emb3DPGlobals.g.move(z = inlet_height_offset) #emb3DPGlobals.g.move(y = -1 * additional_y_offset_for_inlets) emb3DMatrixPrinting.travel_mode() emb3DPGlobals.g.move(x = inlet_length_sensor, y = -1*sensor_width - 2 * additional_y_offset_for_inlets) emb3DMatrixPrinting.print_mode(print_height_abs = contact_layer_bottom - inlet_height_offset, print_speed = 20) emb3DPGlobals.g.feed(sensor_inlet_print_speed) emb3DPGlobals.g.move(x = -1 * inlet_length_sensor) #emb3DPGlobabls.g.move(y = additional_y_offset_for_inlets) emb3DPGlobals.g.feed(pre_inlet_print_speed) emb3DPGlobals.g.move(z = inlet_height_offset) emb3DMatrixPrinting.travel_mode()
def print_spacer_void_layer(length, width): emb3DPGlobals.g.feed(spacer_print_speed) emb3DMatrixPrinting.move_y(length/2.0) emb3DPGlobals.g.feed(spacer_print_speed * edge_reduction_factor) emb3DMatrixPrinting.move_x(width) emb3DPGlobals.g.feed(spacer_print_speed) emb3DMatrixPrinting.move_y(-1*length) emb3DPGlobals.g.feed(spacer_print_speed * edge_reduction_factor) emb3DMatrixPrinting.move_x(-1*width) emb3DPGlobals.g.feed(spacer_print_speed) emb3DMatrixPrinting.move_y(length/2.0)
def print_spacer_void_layer(length, width): emb3DPGlobals.g.feed(spacer_print_speed) emb3DMatrixPrinting.move_y(length / 2.0) emb3DPGlobals.g.feed(spacer_print_speed * edge_reduction_factor) emb3DMatrixPrinting.move_x(width) emb3DPGlobals.g.feed(spacer_print_speed) emb3DMatrixPrinting.move_y(-1 * length) emb3DPGlobals.g.feed(spacer_print_speed * edge_reduction_factor) emb3DMatrixPrinting.move_x(-1 * width) emb3DPGlobals.g.feed(spacer_print_speed) emb3DMatrixPrinting.move_y(length / 2.0)
def print_contact_sensor(): ## move these variables up to the top of the script: additional_y_offset_for_inlets = 2 inlet_height_offset = 5 # before 20151005, this was equal to 4 ## emb3DMatrixPrinting.move_x(ClosedLoopActuator_ActuatorOnly.bladder_spacing*(num_bladders-0.5)+(curvature_sensor_length_offset+2)) emb3DMatrixPrinting.move_y(sensor_width/2 + additional_y_offset_for_inlets) emb3DMatrixPrinting.print_mode(print_height_abs = contact_layer_bottom, print_speed = 20) emb3DPGlobals.g.feed(curvature_sensor_print_speed) emb3DMatrixPrinting.move_y(-1*additional_y_offset_for_inlets) #for meander in xrange(2): emb3DMatrixPrinting.move_x(-1*ClosedLoopActuator_ActuatorOnly.bladder_spacing*(num_bladders-0.5)-(curvature_sensor_length_offset+2)) emb3DMatrixPrinting.move_y(-1*curvature_sensor_width) emb3DMatrixPrinting.move_x(ClosedLoopActuator_ActuatorOnly.bladder_spacing*(num_bladders-0.5)+(curvature_sensor_length_offset+2)) #emb3DMatrixPrinting.move_y(-1*curvature_sensor_width/5) #emb3DMatrixPrinting.move_x(-1*ClosedLoopActuator_ActuatorOnly.bladder_spacing*(num_bladders-0.5)-(curvature_sensor_length_offset+2)) #emb3DMatrixPrinting.move_y(-1*curvature_sensor_width/5) #emb3DMatrixPrinting.move_x(ClosedLoopActuator_ActuatorOnly.bladder_spacing*(num_bladders-0.5)+(curvature_sensor_length_offset+2)) emb3DMatrixPrinting.move_y(-1*additional_y_offset_for_inlets) emb3DMatrixPrinting.travel_mode()
def print_void_layer(length, width): emb3DMatrixPrinting.move_y(length/2.0) emb3DMatrixPrinting.move_x(width) emb3DMatrixPrinting.move_y(-1*length) emb3DMatrixPrinting.move_x(-1*width) emb3DMatrixPrinting.move_y(length/2.0)
def print_void_layer(length, width): emb3DMatrixPrinting.move_y(length / 2.0) emb3DMatrixPrinting.move_x(width) emb3DMatrixPrinting.move_y(-1 * length) emb3DMatrixPrinting.move_x(-1 * width) emb3DMatrixPrinting.move_y(length / 2.0)