Cliff
2008-08-12 14:11:39 UTC
Hello,
I run a script to create a bunch of points that define a fancy curve.
I am bringing them into solidworks, drawing a spline to them, then
exporting a drawing to dwg or dxf and using mastercam to generate the
gcode. Preferably, I dont want to keep doing the step of hand-drawing
a spline to fit each point, because I want to use a lot of points to
define the curve precisely.
Lots of points just make lots of little ripples, usually.I run a script to create a bunch of points that define a fancy curve.
I am bringing them into solidworks, drawing a spline to them, then
exporting a drawing to dwg or dxf and using mastercam to generate the
gcode. Preferably, I dont want to keep doing the step of hand-drawing
a spline to fit each point, because I want to use a lot of points to
define the curve precisely.
If you know the underlying type of geometry you are trying to
deal with you can do better much of the time.
Sadly, an involute curve does not have an exact form as a
spline (which has a polyynomial basis).
http://www.ingentaconnect.com/content/klu/366/2007/00000023/00000003/00000060?crawler=true
[
In numerous instances, accurate algorithms for approximating the original
geometry is required. One typical example is a circle involute curve which
represents the underlying geometry behind a gear tooth. The circle involute
curves are by definition transcendental and cannot be expressed by algebraic
equations, and hence it cannot be directly incorporated into commercial CAD
systems. In this paper, an approximation algorithm for circle involute curves in
terms of polynomial functions is developed. The circle involute curve is
approximated using a Chebyshev approximation formula (Press et al. in Numerical
recipes, Cambridge University Press, Cambridge, 1988), which enables us to
represent the involute in terms of polynomials, and hence as a Bézier curve. In
comparison with the current B-spline approximation algorithms for circle
involute curves, the proposed method is found to be more accurate and compact,
and induces fewer oscillations.
]
From "Numerical Recipes" (a decent enough book) a programmer
could probably help you and there was (last I looked) at least
one Web Site dedicated to this book: http://www.nr.com/forum/
The book (I have an original copy) is is/may be online too:
http://www.nr.com/
I've been told that the (original ?) C version has some errors though.
IIRC I kept the FORTRAN version.
I was thinking that if I could get the script to export to a text file
format that allows a spline to be defined, I could bring THAT file
format directly into mastercam and generate the gcode from it.
Is there such a text file format that defines splines? I was
thinking of using DWG but it isnt a text file, so I would have trouble
getting the points into it.
Is there a better way to do this?
Thanks,
-Mike
Perhaps some of the real SolidWorks experts/programmers can advise?format that allows a spline to be defined, I could bring THAT file
format directly into mastercam and generate the gcode from it.
Is there such a text file format that defines splines? I was
thinking of using DWG but it isnt a text file, so I would have trouble
getting the points into it.
Is there a better way to do this?
Thanks,
-Mike
BTW, IF you can write fancy CNC macros AND your control supports some
"fancy" functions you can probably do no better than a CNC control macro
on this one ..... but you'll need some math <g>.
--
Cliff
Cliff