Log Sawing Patterns

[Home]   [Puzzles & Projects]    [Delphi Techniques]   [Math topics]   [Library]   [Utilities]




Search WWW

Search DelphiForFun.org

As of October, 2016, Embarcadero is offering a free release of Delphi (Delphi 10.1 Berlin Starter Edition ).     There are a few restrictions, but it is a welcome step toward making more programmers aware of the joys of Delphi.  They do say "Offer may be withdrawn at any time", so don't delay if you want to check it out.  Please use the feedback link to let me know if the link stops working.


Support DFF - Shop

 If you shop at Amazon anyway,  consider using this link. 


We receive a few cents from each purchase.  Thanks


Support DFF - Donate

 If you benefit from the website,  in terms of knowledge, entertainment value, or something otherwise useful, consider making a donation via PayPal  to help defray the costs.  (No PayPal account necessary to donate via credit card.)  Transaction is secure.

Mensa Daily Puzzlers

For over 15 years Mensa Page-A-Day calendars have provided several puzzles a year for my programming pleasure.  Coding "solvers" is most fun, but many programs also allow user solving, convenient for "fill in the blanks" type.  Below are Amazon  links to the two most recent years.

Mensa 365 Puzzlers  Calendar 2017

Mensa 365 Puzzlers Calendar 2018

(Hint: If you can wait, current year calendars are usually on sale in January.)


Feedback:  Send an e-mail with your comments about this program (or anything else).

Search DelphiForFun.org only




Problem Description

12" Cant from 24" Log

Here's a program which displays potential log sawing patterns for band milling.

Background & Techniques

One form of band mill is the horizontal band saw, probably the most common type for small individual sawmills and serious hobbyists.  I recently cut a large red oak for firewood but was so impressed with its beauty that I'm considering joining the "serious hobbyist" ranks.   I've been browsing the web reading forums and viewing online videos from manufacturers, etc., half hoping that the desire will pass if I wait awhile.  These mills mount the bandsaw on a carriage which slides over the log on rails.  The saw is adjustable up and down to control the depth of cut and the log is physically turned to saw a different side. There seem to be a number of different strategies for sawing and this program explores my understanding of a few of them. One strategy is cut boards from all four sides of a log to leave a rectangular "cant" or large beam.   Having never actually operated or even seen one of these mills, I made some guesses about the parameters and implemented the math and graphics to calculate and display the resulting boards. Three strategies have been  implemented so far.  Each takes as input:

bulletlog diameter,
bulletboard thickness,
bulletbandsaw blade thickness, and
bulletminimum board width to cut.

The sawing strategies are:

bulletAll boards: Slice boards from top to bottom.
bulletMaximum cant: Determine the largest square cant which can be sawn from log of a given diameter and cut boards from the outside edges  
bulletCant of given width: Determine the largest rectangular cant which can be sawn from log of a given diameter and cant width and cut boards from the outside edges.

For sawing cants, it seems that cutting from the edges of the cant to the edge of the log would maximize the board widths obtained, but I'm not sure f this is feasible.  The option is included to saw boards in either direction, "bark to cant" or "cant to bark".

Two other strategies I've seen mentioned online, but haven't implemented yet, are "Box" sawing where the log is turned 90 degrees after each board is cut, and "Quarter" sawing where the log is quartered and boards are cut from each quarter  turning the flitch 90 degrees clockwise then counter clockwise after each board. 

It also seems that logs with elliptical cross sections should be considered in the real world. Adding major and minor diameters would be a straightforward enhancement.  

I look forward to getting feedback from viewers with real sawing experience.         

Non-programmers are welcome to read on, but may want to jump to bottom of this page to download the executable program now.

Programmer's Notes:

The math required to determine the length of a horizontal line (the saw blade) which intersects a circle (the log) at a given distance from the top edge is a straightforward application of Pythagorean Theorem, see WidthFunc for the code.   

The tricky part was making our rectangular boards fit within the log.  If we are cutting from top to bottom in the upper half of the log, the top edge of the board will determine its width, in the bottom half of the log the bottom edge of the board will determine the width.  In cutting cants, the board may be cut from the outside of the log toward the center or from the cant surface toward the outside of the log which complicates the determination of which surface of the determines the usable width.  After spending a day or more trying to handle all of the permutations, I finally capitulated and just always calculate maximum width of both the top and bottom board surface and use the smaller as the width of that board.  All of this applies to the on-edge boards cut from the left and right if we just replace "top" and "bottom" references with "left" and "right".  Remember that the band saw only cuts horizontally and these "on-edge" boards are actually cut from the top and bottom after rotating the log by 90 degrees.    

Procedure "Makeboards" handles the iteration between "Start" and "Stop" distances from the top or left edge, incrementing by the specified board thickness "Thick, plus blade thickness (Blade) for each board.   If Stop is smaller than Start, the boards are generated upwards or towards the left edge.   Dimensions and location of generated baords are displayed in Memo1, the TMemo that initially holds the introductory text.  They are displayed by calls to procedure DrawBoard which scales the board size and location using the ScaleIt function with a pixels per inch scaling factor, Scale, generated when the "Saw it" button is clicked. Drawboard used the TImage, Image1, to display rectangles representing the generated boards.  The log outline is generated by a call to the DrawLog procedure during the setup when the SawBtn is clicked.

Addendum June 17, 2010:  Version 1.1 corrects a couple of minorl problems:

bulletTrying to cut a cant wider than log diameter was not diagnosed and caused an error.
bulletDisplayed top and left distances to cant surface were reversed 

September 19, 2015: Finally revisiting the program  to fix a small bug which subtract blade thickness twice for top and left side cuts when cutting around a fixed width cant.  This erroneously made the cutting pattern appear asymmetrical.  I also added ability to save and reload parameters by name reference.  This may be convenient for users; it surely is a big time saver for me when testing the program.  Version 1.2 posted today implements these changes.

November 29, 2017:

Version 4 of the Log Sawing program was posted today.  It is a major rewrite of the original, hopefully for the better.   Differences are:

  1. Cut points are now correctly pecified as height above the saw bed.
  2. All cant cutting patterns now start at a whole number of boards above the cant.
  3. Faces are numbered clockwise as "1","2", "3", and "4", assuming that faces will be cut by rotating counter-clockwise.       
  4. The cutting pattern for each face is shown in a separate image with the log rotated so that the cut face is up.  See sample after first rotation at right.
  5. The cutting options radio group  has been rolled into the "cant width" input item.  Cant width of zero will flat cut the entire log as boards.  Width at or above the log diameter will cut the largest possible square cant.  "Box cutting", rotating the cant after each board, and quarter sawing may be added as future enhancements.  
  6. Displayed dimensions may be as decimal (one decimal point) or fractional (16ths in lowest terms).  

Running/Exploring the Program 

bulletDownload  executable
bulletDownload source (to recompile, one-time download of any recent version of the DFF Library zip file is required).
bulletDownload DFF Library Source  (Current version DFFLibV15

Suggestions for Further Explorations

Additional sawing strategies
.Major and minor diameters for elliptical cross sections.
Original:  June 15, 2010

Modified:  May 15, 2018

  [Feedback]   [Newsletters (subscribe/view)] [About me]
Copyright 2000-2018, Gary Darby    All rights reserved.