Using Algebra Functions in CNC Woodworking

      A discussion of how algebraic functions can be useful in CNC work, along with some specific mathematical code expressions. June 17, 2009

I seem to remember a while back somebody had posted a list of algebraic functions that were usable by Busellato's Genesis software. Does anyone have a complete list of allowable operators that can be used?

Forum Responses
(CNC Forum)
From contributor L:
Here’s some information I found from a discussion I read a while back that may help.

“In our Genesis manual it explains about several trigometric functions that are available for usage, but I discovered that there were more functions than were documented. Is there a complete list of all the functions available? Two that I cannot find in the manual but are very useful are the integer and absolute functions. Here is what I've found so far.”

Sin ( ) or s( ) sine
asin( ) or as( ) arcsin
cos( ) or c( ) cosine
acos( ) or ac( ) arcosine
tan( ) or t( ) tangent
atan( ) or at( ) arctangent
sqrt( ) square root

int( ) or i( ) integer value
abs( ) absolute value
q( ) square root (same as sqrt( ))
p( ) power or squared
pi value of pi (3.142)

Undocumented (unknown what there results are for) :
f( )
v( )
sr( )
cr( )
tr( )
x( )
y( )
z( )

“I know that myself or most people will never use some or any of these, but it would have been nice of them to include everything available for our use - who knows how it may impact an individual’s usage.”

“Can anybody add to this list or clarify the unknowns?”

Response: “your list is nearly complete. Below are a few more.”

v( ) returns the inverse of an argument as 1/X
sr( ) returns the sine of an argument in radians
cr( ) returns the cosine of an argument in radians
tr( ) returns the tangent of an argument in radians

From contributor D:
Would you like to share how your using algebraic functions in the custom woodworking business?

I know that complex motions are better defined by sin(x), cos(x), tan(x), 1/x, abs(x), arcsin(x), e^(x)Cos(2x)/2, ect., but does the average CNC programmer actually see these functions in his/her work? ACAD has arc functions that are B-Spline in nature, very different, although scaleable just as the aforementioned are scaleable.

From contributor H:
I'm a bit baffled here too. I draw in Autocad and apply tool paths with CAM software. I would never try to set up tool paths mathematically. I know programs like Cadcode to this type of thing so you can speed up the process of cutting similar parts of different sizes. Is that what you are doing, or are you developing G-code from geometrical requirements?

I had some arc wizards written for me that allow us to input radius, chord length etc. type of information and G-code is automatically created for cutting our curved blanks. Are you creating programs/wizards such as that?

From contributor L:
Genesis has the ability to use these algebraic functions in parametric programming. An equation is written in the variables to compute direction of a cut, start point, or end point. I use "sqrt" to compute the hypotenuse of a triangle, and "atan" to compute trajectory of a cut in parametric programs that I run.

From contributor D:
“Atan” will compute theta - rise over run.

From contributor M:
I am unsure if the debate or question is "how" or "why"? There are instances where parametrically programming with controls equipped for it, is dramatically more efficient than the Cad to Cam to machine process. In fact the redrawing and reposting of code steps can be omitted all together. It is a very application-specific process. It works best when your process can be standardized to a point that, for instance, field measurements can be entered into variables directly in a CNC program and all geometric properties, points of tangency and discreet attributes or features are recalculated on the spot, within the control. The trigonometric/algebraic functions are used to insure all proportional relationships are maintained. This is very application and business orientation specific.

However I have helped customers with parametrics in the following examples;
Fluted components
Rafter Tails
Cabinet Components
Panel Components

This just names a few. I hope this doesn't make this topic more "murky".

From contributor D:
If anything you have helped clarify where we can start using algebraic functions in the woodwork industry - this is great news.

From contributor J:
"There are instances where parametrically programming with controls equipped for it, is dramatically more efficient than the Cad to Cam to machine process. In fact the redrawing and reposting of code steps can be omitted all together."

Contributor M is correct. This is a good reason to understand G-code, and why I have debated for it here in the past. However, you should also have an understanding of basic programming skills and some creativity. That being said, I've seen so many poor CAD drawings created by people who didn't understand drafting, but knew the basics of how to draw a line with a CAD program. So, don't let a lack of knowledge prevent you from attempting it.

From contributor C:
I have written a number of parametric programs that use geometric formulae. Works for me, and the results are flexible programs that make products that others cannot duplicate.

From the original questioner:
Contributor L you nailed it twice. Your first response is exactly what I was looking for. Your second response is exactly what I was going to say to contributor D. Yes I plan to use the info for parametric programs. Why should I have to draw then program similar parts with subtle size changes, when I can have one program that my operator can simply insert a variable or two in a matter of a few seconds and then be ready to run? In addition I also use “if” statements along with simple variables for many other existing parametric programs.

Would you like to add information to this article?
Interested in writing or submitting an article?
Have a question about this article?

Have you reviewed the related Knowledge Base areas below?
  • KnowledgeBase: Knowledge Base

  • KnowledgeBase: Computerization

  • KnowledgeBase: Computerization: CNC Machinery and Techniques

    Would you like to add information to this article? ... Click Here

    If you have a question regarding a Knowledge Base article, your best chance at uncovering an answer is to search the entire Knowledge Base for related articles or to post your question at the appropriate WOODWEB Forum. Before posting your message, be sure to
    review our Forum Guidelines.

    Questions entered in the Knowledge Base Article comment form will not generate responses! A list of WOODWEB Forums can be found at WOODWEB's Site Map.

    When you post your question at the Forum, be sure to include references to the Knowledge Base article that inspired your question. The more information you provide with your question, the better your chances are of receiving responses.

    Return to beginning of article.

    Refer a Friend || Read This Important Information || Site Map || Privacy Policy || Site User Agreement

    Letters, questions or comments? E-Mail us and let us know what you think. Be sure to review our Frequently Asked Questions page.

    Contact us to discuss advertising or to report problems with this site.

    To report a problem, send an e-mail to our Webmaster

    Copyright © 1996-2016 - WOODWEB ® Inc.
    All rights reserved. No part of this publication may be reproduced in any manner without permission of the Editor.
    Review WOODWEB's Copyright Policy.

    The editors, writers, and staff at WOODWEB try to promote safe practices. What is safe for one woodworker under certain conditions may not be safe for others in different circumstances. Readers should undertake the use of materials and methods discussed at WOODWEB after considerate evaluation, and at their own risk.

    WOODWEB, Inc.
    335 Bedell Road
    Montrose, PA 18801

    Contact WOODWEB

  • WOODWEB - the leading resource for professional woodworkers

      Home » Knowledge Base » Knowledge Base Article