What's new
What's new

Anyone program contours with NURBS?

BluishInventor

Aluminum
Joined
Jul 7, 2020
I'd like to know more about how this works as it seems that you need a post that can output NURBS geometery or movements based on them. For Fanuc, this is a G6.2. I understand that it essentially replaces line-arc movements with splines, but that's where my knowledge ends.

How does one actually produce code for such a move?
 
Your CAM software has to have NURBS output available in the operation and, as you mentioned, you also need a post that supports outputting nurbs data.

I have not used it in NX but I recall when it became available a long time ago and I it's used for high speed machining applications.
 
Nurbs Interpolation is a thing and I experimented with it in the late 90's. We came to the conclusion that it wasn't worth the effort. A post that supports it was not obtainable then mostly because nobody knew what I was talking about. Today even, you might have problems getting proper code to output because, again, not many people will know how to get a post to output the proper code.
In reality, I was able to hand code a single line of code that fit a surface that I was using to experiment with. I was using Unigraphics at the time and analyzing a surface gave me the info needed to construct a single NURBS line of code. I had a small block of steel with a wavy surface to cut and it worked. I just repeated that single line of code after moving the Y axis each time. Came out pretty nice but the amount of work that went into it was not worth it. At that time, no post developer would touch it.
With the way today's CAM systems handle NURBS surfaces and/or splines, I'm not sure there is any advantage. Definitely a niche application.

Below is the info Mastercam gives for a NURBS surface. I'm not sure you could get enough info from this to code by hand.

NURBS surface info.jpg
 
the info Mastercam gives for a NURBS surface. I'm not sure you could get enough info from this to code by hand.
Definitely not. You would need the coordinates and weights of all 14 control points to define the untrimmed surface, and you'd need the full detail of the trim curves to know where to stop.

On the other hand, all that detail exists in the CAD file, and it could probably be extracted/dumped without too much trouble.

As someone who has programmed NURBS curves in a non-machining setting, you don't want to even try to convert from NURBS control points to line segments directly by hand. If your controller is NURBS-capable, and if the Gcode command it offers supports the degrees of the surface, you could probably code by hand using that command. I have no idea how you would do trim curves, though, as I have no experience with any NURBS Gcode command. If the command has start/end parameters, I guess you could manually compute where the trim curve(s) intersect with the slice you're about to cut, which might or might not be painful to do by hand. If your controller is not NURBS-capable, you could write a program to take the NURBS data from the CAD file and output line segments. I've done something very similar for generating cross-sections through a NURBS surface for screen display. Perhaps needless to say, it's some industrial-strength applied math.
 
Definitely not. You would need the coordinates and weights of all 14 control points to define the untrimmed surface, and you'd need the full detail of the trim curves to know where to stop.

On the other hand, all that detail exists in the CAD file, and it could probably be extracted/dumped without too much trouble.

As someone who has programmed NURBS curves in a non-machining setting, you don't want to even try to convert from NURBS control points to line segments directly by hand. If your controller is NURBS-capable, and if the Gcode command it offers supports the degrees of the surface, you could probably code by hand using that command. I have no idea how you would do trim curves, though, as I have no experience with any NURBS Gcode command. If the command has start/end parameters, I guess you could manually compute where the trim curve(s) intersect with the slice you're about to cut, which might or might not be painful to do by hand. If your controller is not NURBS-capable, you could write a program to take the NURBS data from the CAD file and output line segments. I've done something very similar for generating cross-sections through a NURBS surface for screen display. Perhaps needless to say, it's some industrial-strength applied math.


The experiment I did was only a rectangular block so the start and end points were easily solvable. I did this based off of the info from Unigraphics at the time. The picture I showed earlier is from Mastercam today. UG (NX) at the time output Nurbs directly if so desired but I still did not have a post. Hence, the hand coding. It worked. The whole idea was to compare NURBS output against conventional output to see if there was any difference in surface finish. This was on a Fanuc 160i with a 100meg hard drive. This negated the file size advantage of NURBS. This control also had a RISC processor, further negating any NURBS advantage. I was working in a mold shop at the time so we saw no advantage in pursuing this. Today, this method is obsolete except in rare circumstances.
 
The OSP control has an option to eat line/arc g-code and produce NURBS motion. I've never used it, I've only seen demos and know that it exists. My understanding is that you don't need to give it NURBS code, simple line/arc code will do.
 
Another example of how control abilities have stagnated ... when cad systems started using nurbs, then it made sense for cam systems to use the same data for creating toolpaths. But since so few control builders picked it up, it went nowhere.
 
What is the benefit of NURBS in modern CNC machining? I can't think of any.
Controls can process lines of code much faster now. Storage space is a non issue.
 
Another example of how control abilities have stagnated ... when cad systems started using nurbs, then it made sense for cam systems to use the same data for creating toolpaths. But since so few control builders picked it up, it went nowhere.


The ability of NURBS to solve ALL programming issues is so limited that I'm not surprised it didn't catch on. At the time it came out it was already behind the curve. The vast majority of machining still relies on lines and circles. The ability of controls to do surfacing escalated quickly in relation to something like NURBS and far surpassed it. Hard drives are a prime example. Functions like AICC and Nano Smoothing are another. NURBS never would have been able to handle geometry features like sharp corners. We realized that way back in the 90's. NURBS could very well been one of those functions that was requested by a single customer and the control engineers went with it. There was also the issue of programming multiple surfaces, each potentially being created in a different way than each adjoining surface. It needs to deal with surface edges and the U, V curves that would be different between adjoining surfaces. Add to all that that the CAM system still needs to offset the path based on cutter type that the result may not directly match the original surfaces. It really had no bearing on the control manufacturers but on the sheer variety of the geometry being cut. The result was probably the best that could be expected.
 
What is the benefit of NURBS in modern CNC machining? I can't think of any.
Controls can process lines of code much faster now. Storage space is a non issue.
The advantage would have been, since the cad program often uses NURBS, then the cam program can take that same data and get the exact curve out of it described by the original design.

But now that controls can do point-to-point really fast, people figure it's not necessary.

Well heck, then neither is circular, helical, or even linear interpolation. Just do high-speed chatter milling everywhere.

It would have been nicer for some parts. Maybe still is, if you happen to have all the pieces put together. But for most people, not an option.
 
But now that controls can do point-to-point really fast, people figure it's not necessary.

Well heck, then neither is circular, helical, or even linear interpolation. Just do high-speed chatter milling everywhere.

If you command a G02 vs hundreds of G01s, its not making the servos do anything different. The servos are still making linear motion. Is it easier for the operator to interpret, yes. Does it result in less code, yes. Does it make a difference in the resulting part, no.

From a useability standpoint, G02 and even helical motion makes sense. Nurbs, not so much. This code would be useless to an operator. Sure, it will result in less lines of code but at what benefit? None that I can see.
 
The OSP control has an option to eat line/arc g-code and produce NURBS motion. I've never used it, I've only seen demos and know that it exists. My understanding is that you don't need to give it NURBS code, simple line/arc code will do.

I tried experimenting with Super-NURBS on an OSP-200/MB-4000H to no avail. But that was 10 years ago when I knew a lot less about the stuff.
 
I think nurbs was the buzzword from days long past. With modern cam, and some of the fantastic controls these days, I would highly doubt anyone could see or measure the difference. Even cutting "circles" with IJK values, is still tiny line segments.
 








 
Back
Top