Formula Driven Spline Creation
Likes:  0

# Thread: Formula Driven Spline Creation

1. Aluminum
Join Date
Aug 2006
Country
UNITED STATES
State/Province
New Hampshire
Posts
72
Post Thanks / Like
Likes (Given)
0
2

## Formula Driven Spline Creation

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)?

2. Cast Iron
Join Date
Jan 2019
Country
UNITED STATES
State/Province
Tennessee
Posts
467
Post Thanks / Like
Likes (Given)
145
121
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?

3. 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

4. Plastic
Join Date
Jun 2015
Country
UNITED STATES
State/Province
New Hampshire
Posts
3
Post Thanks / Like
Likes (Given)
0
0
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.

5. Stainless
Join Date
Sep 2008
Country
UNITED STATES
State/Province
California
Posts
1,674
Post Thanks / Like
Likes (Given)
1102
974
Originally Posted by Alan Warner
,

, 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

6. Titanium
Join Date
Apr 2018
Country
UNITED KINGDOM
Posts
2,203
Post Thanks / Like
Likes (Given)
0
1009
APT is quite happy to use formulae for defining a surface. Directly. No inputting outputting cutting or pasting required.

7. Cast Iron
Join Date
Jan 2019
Country
UNITED STATES
State/Province
Tennessee
Posts
467
Post Thanks / Like
Likes (Given)
145
121
deviation from directive?

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.

8. Plastic
Join Date
Jun 2015
Country
UNITED STATES
State/Province
New Hampshire
Posts
3
Post Thanks / Like
Likes (Given)
0
0
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...