Example #1
0
def cut_curvelist_with_start(prev_p, curve_list, rapid_safety_space, current_start_depth, depth, clearance_height, start_point):
    start_x,start_y = start_point
    first = True
    for curve in curve_list:
        raise_cutter = True
        if first == True:
            direction = "on"
            radius = 0.0
            offset_extra = 0.0
            roll_radius = 0.0
            roll_on = 0.0
            roll_off = 0.0
            step_down = math.fabs(depth)
            extend_at_start = 0.0;
            extend_at_end = 0.0
            kurve_funcs.make_smaller(curve, start = area.Point(start_x,start_y))
            kurve_funcs.profile(curve, direction, radius, offset_extra, roll_radius, roll_on, roll_off, rapid_safety_space, clearance_height, current_start_depth, step_down, depth, extend_at_start, extend_at_end)
        else:
            s = curve.FirstVertex().p
            if (s.x == prev_p.x and s.y == prev_p.y) or feed_possible(prev_p, s):
                raise_cutter = False

        prev_p = cut_curve(curve, raise_cutter, first, prev_p, rapid_safety_space, current_start_depth, depth, clearance_height)
        first = False

    return prev_p
Example #2
0
def cut_curvelist2(
    curve_list, rapid_safety_space, current_start_depth, depth, clearance_height, keep_tool_down_if_poss, start_point
):
    p = area.Point(0, 0)
    start_x, start_y = start_point
    first = True
    for curve in curve_list:
        need_rapid = True
        if first == True:
            direction = "on"
            radius = 0.0
            offset_extra = 0.0
            roll_radius = 0.0
            roll_on = 0.0
            roll_off = 0.0
            rapid_safety_space
            step_down = math.fabs(depth)
            extend_at_start = 0.0
            extend_at_end = 0.0
            kurve_funcs.make_smaller(curve, start=area.Point(start_x, start_y))
            kurve_funcs.profile(
                curve,
                direction,
                radius,
                offset_extra,
                roll_radius,
                roll_on,
                roll_off,
                rapid_safety_space,
                clearance_height,
                current_start_depth,
                step_down,
                depth,
                extend_at_start,
                extend_at_end,
            )
        else:
            s = curve.FirstVertex().p
            if keep_tool_down_if_poss == True:

                # see if we can feed across
                if feed_possible(p, s):
                    need_rapid = False
            elif s.x == p.x and s.y == p.y:
                need_rapid = False

        cut_curve(curve, need_rapid, p, rapid_safety_space, current_start_depth, depth)
        first = (
            False
        )  # change to True if you want to rapid back to start side before zigging again with unidirectional set
    rapid(z=clearance_height)
Example #3
0
def profile(curve_name, profileparams,startparams):
    feedrate_hv(profileparams['verticalfeedrate'],profileparams['horizontalfeedrate'])
    side = profileparams['side']
    tool_diameter = profileparams['tooldiameter']
    offset_extra = profileparams['offset_extra']
    roll_radius = profileparams['roll_radius']
    roll_on = profileparams['roll_on']
    roll_off = profileparams['roll_off']
    rapid_safety_space = profileparams['rapid_safety_space']
    clearance = profileparams['clearance']
    start_depth = profileparams['start_depth']
    step_down = profileparams['step_down']
    final_depth = profileparams['final_depth']
    extend_at_start = profileparams['extend_at_start']
    extend_at_end = profileparams['extend_at_end']
    lead_in_line_len = profileparams['lead_in_line_len']
    lead_out_line_len = profileparams['lead_out_line_len']

    if startparams['startpt']:
        kurve_funcs.make_smaller( curve_name, start = area.Point(startparams['startptX'] ,startparams['startptY']))
    
    kurve_funcs.profile(curve_name, side, tool_diameter/2, offset_extra, roll_radius, roll_on, roll_off, rapid_safety_space, clearance, start_depth, step_down, final_depth,extend_at_start,extend_at_end,lead_in_line_len,lead_out_line_len )