What's new
What's new

Formula Driven Spline Creation

warner

Aluminum
Joined
Aug 29, 2006
Location
New Hampshire
Currently working with Surfcam. I'd like to know if there is a way to create a spline (or complex curvature) by using the mathematical formula for that curve and the number of desired data points (or resolution of the curve). Of course, one can do the math and enter all the data points manually, but who has time for that? None of the cam systems allow direct interaction with the algorithm(s) they use for spline generation, probably because most do not generate curves in this fashion and/or they want to keep that part proprietary, but I'm in a position where having this feature would be vastly helpful in saving time. Anyone know of a fix (besides a new system)?
 
More of a cad question? but first, splines are not independent functions unless special case (line, arc, parabola...) they are step functions. How they are defined is dependent on style, Bezier, interpolate, control point (a special Bezier). Are you asking how to generate a cad spline from a function? solve for a few points, take derivative at same point and set slope of control point to the same. Or import a plot of same, which will likely be poly lines, use interpolate spline and hit a few points. In a very odd way less points is usually more accurate than more, Simpsons approximation theory. Then have your cad convert spline to arcs with whatever accuracy you set. import the arcs into your cam. controllers are good at arcs, they ultimately convert arcs to point cloud (lines) at drive resolution- reducing un needed maths and round off errors.
or have excel, basic, c, fortran, et al generate g-gode line segments and paste it into your program?
 
Do you have SolidWorks?
if you can get the points in an excel format you can the generate the spline in SolidWorks then open the SW file directly in surfcam, well maybe, are you using surfcam traditional or the new surfcam rebranded edgecam?

lenny
 
Sorry for the multiple users on this, account was locked when I updated an email address.

I have Traditional and opening SW files in Surfcam is something I do all the time, but I do not have SW myself. Looks like it may be time to invest in that package too. In fact, I already have the points generated in an excel sheet, I simply don't want to have to create each point graphically 'by hand'. To address Memphisjed's reply, deviation from the parabola will ruin the directive of the part, so approximations are not acceptable. And since the slope is not constant, taking an average will induce too much error.
 
,

, I simply don't want to have to create each point graphically 'by hand'. ,

You can cut and paste the points from excel into a notepad file and then save it as a CDL file. You will have to format the notepad data to match the cdl format. Depending on how many points your dealing with it could be tedious.

If you create a spline from data points depending on the way the system creates the spline you might not get the slope you desire at the first and last point
 
deviation from directive? :confused:

I just did x^4 from 0 to 1 with arc approximation. 10 arcs is .002 std deviation, moving to twenty cad generated arcs is .00007 deviation. The point cloud lines for the same, 1200+-. It is old school way of getting accuracy with less data (pre computer).

There are also graphing math programs that export to svg/dxf.
 
I thought I'd be losing accuracy with your approximation, ie deviating too much from the desired part geometry derived by the original function. I'd be interested in knowing what math programs will export to dxf. Searching it up...
 








 
Back
Top