Setting The Toolpath Entry

So I ordered a drag knife and starting and finishing on a straight edge seems important to a quality cut. I made a simple rectangle with rounded corners and viewed the gcode in a viewer and it wants to start on a corner. Any way to tell it to start on an edge?

Part of my strategy is to do a “waste cut” that is a straight line for the sole purpose of aligning the blade for the real cut, but this seems pointless if the blade is starting in the corner.

This might depend on what program you used to create the GCode.

For example, in VCarve Desktop it’s the “Start At” option on the profile toolpath, which lets you select an edge as a start point.

Assuming you are using Carbide Create, the thread below should be interesting, we discussed workarounds to “force” the entry point in toolpaths (because CC won’t let you select it arbitrarily)

For Carbide Create the most expedient thing to do is a no offset toolpath for an open path — just arrange the begin / end points so that they go past each other by a reasonable length.

I was looking into this… and don’t know how to create an open toolpath in cc. So, if I just want to cut out a rectangle with rounded corners, I just draw a rectangle with fillet (normally). How would I make that an open toolpath.

One other complaint I have is that you can’t view which direction that the cut will travel or change it.

I should clarify… I can draw lines etc and they will be open toolpaths, but don’t know how you would convert my rounded rectangle closed path into an open one where I can start on a straight and go past the start as it finishes.

If you want to just do rectangles with rounded corners, I can send or post our terminal script we wrote for dragknife cutting that starts on a straight edge at the midway point of the top edge of the cut. All of our cuts are left to right and use the Donek D3 (modified).

This can be done in Inkscape and then imported into CC. Simplistic instructions:

  1. Create a rectangle
  2. Add the Chamfer/Fillet path effect and adjust to suit
  3. Object-To-Path the chamfered rectangle
  4. In node editing mode (F2) select two nodes that form an edge and add a node between them
  5. “Break path” on the new node
  6. Select one of the two new nodes and nudge it left or right with the arrow keys to create the overlap
  7. Save and import into CC
1 Like

I will have to look into Inkscape. I messed around with NC Viewer and was able to manually edit the paths (nice to see the visual next to the code), but that would be a pain if I have to tweek anything in cc and have to manually edit again.

Did you see my reply?

Oh… I did not! Would love to get the script… it has got to be easier than editing manually. However, my shapes are slightly more complicated than rectangles. I am a software guy, so might be able to edit if it doesn’t apply directly.

#!/bin/bash

# This program is a helper tool in order to generate gcode files

bladeWidth=0.7
cornerRadius=5.0
zDepth=0.0

echo
echo
echo "Enter width or diameter in mm."
read width

if [ -n "$width" ] && [ $width != '0' ]
then
    echo "Enter depth in mm, or return for circular shape."
    read depth

    if [ -n "$depth" ] && [ $depth != '0' ]
    then

	# Rectangular Shape

	widthDivided=$(bc <<< "scale=3; $width/2")
	depthDivided=$(bc <<< "scale=3; $depth/2")
	
	bladeDivided=$(bc <<< "scale=3; $bladeWidth / 2")
	computedCorner=$(bc <<< "scale=3; $bladeDivided + $cornerRadius")

	widthSegment=$(bc <<< "scale=3; $width - $cornerRadius")
	depthSegment=$(bc <<< "scale=3; $depth - $cornerRadius")

	overallWidth=$(bc <<< "scale=3; $width + $bladeDivided")
	overallDepth=$(bc <<< "scale=3; $depth + $bladeDivided")

	echo %>> /Users/$USER/Desktop/Job.nc
        echo G90>> /Users/$USER/Desktop/Job.nc
        echo G17>> /Users/$USER/Desktop/Job.nc
        echo G21>> /Users/$USER/Desktop/Job.nc
        echo G28 G91 Z0>> /Users/$USER/Desktop/Job.nc
        echo G90>> /Users/$USER/Desktop/Job.nc
        echo G54>> /Users/$USER/Desktop/Job.nc
        
	echo G0 X${widthDivided} Y${overallDepth}>> /Users/$USER/Desktop/Job.nc
        echo G0 Z${zDepth}>> /Users/$USER/Desktop/Job.nc
        echo G1 X${widthSegment} F1000>> /Users/$USER/Desktop/Job.nc
        echo G2 X${overallWidth} Y${depthSegment} I0 J-${computedCorner}>> /Users/$USER/Desktop/Job.nc
        echo G1 Y${cornerRadius}>> /Users/$USER/Desktop/Job.nc
        echo G2 X${widthSegment} Y-${bladeDivided} I-${computedCorner} J0>> /Users/$USER/Desktop/Job.nc
        echo G1 X${cornerRadius}>> /Users/$USER/Desktop/Job.nc
        echo G2 X-${bladeDivided} Y${cornerRadius} I0 J${computedCorner}>> /Users/$USER/Desktop/Job.nc
        echo G1 Y${depthSegment}>> /Users/$USER/Desktop/Job.nc
        echo G2 X${cornerRadius} Y${overallDepth} I${computedCorner} J0>> /Users/$USER/Desktop/Job.nc
        echo G1 X${widthDivided}>> /Users/$USER/Desktop/Job.nc
        
	echo G0 Z20>> /Users/$USER/Desktop/Job.nc
        echo M30>> /Users/$USER/Desktop/Job.nc
	echo %>> /Users/$USER/Desktop/Job.nc
    else

	# Circular Shape

	widthDivided=$(bc <<< "scale=3; $width/2")
	
	bladeDivided=$(bc <<< "scale=3; $bladeWidth / 2")

	computedRadius=$(bc <<< "scale=3; $widthDivided + $bladeDivided")

	overallWidth=$(bc <<< "scale=3; $width + $bladeDivided")

	echo %>> /Users/$USER/Desktop/Job.nc
        echo G90>> /Users/$USER/Desktop/Job.nc
        echo G17>> /Users/$USER/Desktop/Job.nc
        echo G21>> /Users/$USER/Desktop/Job.nc
        echo G28 G91 Z0>> /Users/$USER/Desktop/Job.nc
        echo G90>> /Users/$USER/Desktop/Job.nc
        echo G54>> /Users/$USER/Desktop/Job.nc
        
	echo G0 X${widthDivided} Y${overallWidth}>> /Users/$USER/Desktop/Job.nc
        echo G0 Z${zDepth}>> /Users/$USER/Desktop/Job.nc

	echo G2 X${widthDivided} Y-${bladeDivided} I0 J-${computedRadius} F1000>> /Users/$USER/Desktop/Job.nc
	echo X${widthDivided} Y${overallWidth} I0 J${computedRadius}>> /Users/$USER/Desktop/Job.nc
        
	echo G0 Z20>> /Users/$USER/Desktop/Job.nc
        echo M30>> /Users/$USER/Desktop/Job.nc
	echo %>> /Users/$USER/Desktop/Job.nc
    fi
else
    exit 1
fi

The above script will let you create a nc file without having to do any design, CAD/CAM work and you can load right into Carbide Motion. Saves alot of time.

2 Likes

@myersd08 Did it work?

I actually had to push pause on my project so haven’t had a chance to test it. I will let you know (hopefully soon)!