CADucopia Offset Calculator version 0.1
The CADucopia Offset Calculator is a RhinoScript that calculates a number, an offset, that can be used to create a 2D contour curve to cut parts out of flat sheet, clean up walls and contours, etc. It does this from an arbitrary cutter profile and depth of cut.
Installation
1) Download the installation file. Note where you saved it to your hard disk.
2) In Rhino, from the menu Tools / RhinoScript / Load …
3) Press Add… browse to where you saved the file, select Filename: CADucopia Offset Calculator vxx yymmdd.rvb (note: vxx yymmdd will be the version x.x and build date year month day, respectively) and press Open.
4) Select CADucopia Offset Calculator vxx yymmdd.rvb (which should now appear in the list); press Load; press Close.
5) If you would like the script to Load automatically every time you start Rhino, from the menu Tools / Options … / Rhino Options / RhinoScript / Startup Scripts to load when Rhino starts press the New dashed box icon then “…” button; browse to where you saved the file, select Filename: CADucopia Offset Calculator vxx yymmdd.rvb, press Open then press OK.
If you do not do this step, the next time you start Rhino from the menu Tools / RhinoScript / Load … select CADucopia Offset Calculator vxx yymmdd.rvb (which should appear in the list if added previously); press Load; press Close.
Use
To run the script: from the menu Tools / RhinoScript / Run … select CADucopiaOffsetCalculator from the list and press OK.
(Note: if added in a previous session but not set up to Load automatically when Rhino starts, see Installation item 5.)
Upon running the script you will be asked to select the cutter’s profile and then input, at the command line, the depth of cut, a positive real value greater than zero. The CADucopia Offset Calculator will then calculate and display the offset.
A horizontal line from the Z axis, and a vertical line from the X axis, to the point where the depth of cut intersects the cutter’s profile will be displayed temporarily to give you a visual indication of where the offset was calculated. To get these lines to stand out, before running the CADucopia Offset Calculator change the current layer to a layer whose color contrasts with the cutter profile layer’s color.
The offset value will also be copied to the clipboard so that it can be pasted onto the command line if, for example, a Rhino Offset command is run subsequently.
Advanced: Rhino commands like _Offset, _Circle, etc., may be run while the CADucopia Offset Calculator is running, so after clicking the CADucopia Offset Calculator message box OK button, run the Rhino command in the usual way (by entering it at the command line, pressing the button corresponding to it, etc.), press Ctrl v to paste the offset value from the clipboard, then continue with the prompts of the Rhino command you are running. Afterwards (if you haven’t escaped out of the command by pressing Esc), you will be back in the CADucopia Offset Calculator prompting you to enter another Depth of Cut or Enter if you’re done. This is useful if you have multiple Depths of Cut for the same cutter and you wish to work with the offset value of each of them without having to rerun the CADucopia Offset Calculator each time.
Modeling the Cutter’s Profile
The CADucopia Offset Calculator uses the cutter’s profile, a polycurve (defined in the Rhino Front view, i.e. X,Z view). The cutter’s profile should be a continuous polycurve corresponding to right half of the cutter’s profile as seen perpendicular to the cutting axis starting from the tip (usually, but not necessarily, X=0, Z=0) and subsequent segments of the polycurve should be above the X axis and to the right of the Z axis, i.e. X and Z greater than or equal to zero (if you were to draw a bounding box about the cutter’s profile, the lower left corner of the box will be at X=0, Z=0 and the upper right hand corner X>0 and Z>0). If the cutter does not have left right symmetry, e.g. flycutter, model the cutter’s profile corresponding to the maximum of the cutter’s radius at a given value of Z.
This may be a little difficult to visualize so here are a couple of cutters to illustrate the idea. If you like, you can actually cut/paste the individual examples below onto the Rhino command line (note: “;” precedes a comment not a command).
If you work in inches try:
; inch example 1
; 2.5 inch 0.25 inch flat tipped endmill
_BringViewportToTop Front
_Polyline
0,0
0.125,0
0.125,2.5
Enter
; inch example 2
; 1.5 inch 7.5 degree 0.005 inch flat tipped conical cutter
_BringViewportToTop Front
_Polyline
0,0
0.0025,0
0.0625,0.455745
0.0625,1.5
Enter
If you work in millimeters try:
; mm example 1
; 63.5 mm 3.175 mm flat tipped endmill
_BringViewportToTop Front
_Polyline
0,0
3.175,0
3.175,63.5
Enter
; mm example 2
; 38.1 mm 7.5 degree 0.127 mm flat tipped conical cutter
_BringViewportToTop Front
_Polyline
0,0
0.0635,0
1.5875,11.575923
1.5875,38.1
Enter
Disclaimer
This script is made available without any guarantee of fitness for any application. There is no warrantee expressed or implied.
info@CADucopia.com
copyright 2006 CADucopia, LLC