|
From: EBo <eb...@sa...> - 2009-02-02 08:20:26
|
I messed up the search... NURB's are mentioned in a couple of places. Namely /src/emc/nml_intf/canon.hh. The external functions, however, are nowhere to been seen. Johnny, do you think you can spend some time and track this down? I see some references to NURB_KNOT_VECTOR NURB_CONTROL_POINT and NURB_FEED, but no code to implement them. From Proctors paper I see that the implementation is G81, G82, and G83. They are there, but the documentation at the head of the code block implies that it is not a NURB but something else. I sure hope we can either reintegrate this back into the base code, or document it appropriately. Laters, EBo -- EBo <eb...@sa...> said: > Hello Johnny, > > I'll have to poke around and see if my filter is still around and what shape > it is in. It solved some problems for me then, but I have not looked at it > much, if any, since... Either way, this functionality is probably available > on the Inkscape side already. If not, you could write a little Inkscape > module which uses their subdivision primitives and sort it out. If NURBS have > been fully realized within EMC2, then that is the way to go. It would take me > a little while remember and then to explain what transformations assumptions > you need to make to go directly from a Bezier spline to a NURB, but off the > top of my hear, all weights are set to 1, and the knot multiplicity is > something like 3 on both ends and none any where else (not sure about that one > though). Anyway, it would be a simple direct transformation with ***no*** > linearization or "chordal deviation" but an exact solution. > > I found the paper "CAD/CAM INTEGRATION FOR NURBS PATH INTERPOLATION ON PC > BASED REAL-TIME NUMERICAL CONTROL" via a google search, so I know it is out > there, but I am unable to reproduce the search string. It was one of those > fortuitous finger trips... Ah there it is > <http://158.110.28.100/amst08/papers/art837759.pdf> and the following paper by > Proctor et al. should also be helpful > <http://www.isd.mel.nist.gov/documents/proctor/315openarchit.pdf> > > >From the examples shown in Loto at al.'s paper, it looks like there is a fully > working NURBS implementation. What I remember from EMCv1 was only stubs if > that. I will note however that there is no NURBS code in the emc2-trunk > though. Can any one else comment? > > EBo -- > > > Johnny Stenback <em...@js...> said: > > > Hello EBo, > > > > EBo wrote: > > > Jst, > > > > > > That is so cool. I have some pointer on how to solve a couple of problems you > > > either have stumbled against or will soon enough. Also, I missed Jeff Epler's > > > posts on biarcs, etc., otherwise I would have jumped in earlier. > > > > > > First regarding hard coded linearizations, one of the best ways to linearize a > > > spline is to subdivide the spline. Since Jeff's implementation appears to be > > > based on quadratic Bezier splines, we can use the property that all spines are > > > guaranteed to fit with the bounding box of the control polygon. You can > > > simply fit a line between the two end points and calculate the Euclidean > > > distance from the other two control points to determine what the maximum > > > divergence from that line is. From there you can choose some arbitrary > > > epsilon, check to see if the current spline falls out side that and subdivide > > > the spline if the inner control points fall outside this epsilon. That will > > > allow you to generate as many approximation lines to follow the Bezier spline > > > as you need to stay within your chosen epsilon. You can do better than this > > > however by then taking the number of linear segments and resubdivide trying to > > > balance out the positions of the break points so you do not have a relatively > > > short segment always at the end (this improves visual quality). This is all > > > callable from within Inkscape. Back in 2004 I had a filter program which > > > would take the spline output from Inkscape, then linearize it into standard > > > g-code for a 2.5D engraver using this technique. > > > > Yes, I had ran into some of the issues with lineraization, or arcs not > > really representing the curve very well, but so far this project is > > early on enough that I hadn't spent much time figuring out how to > > actually tackle that problem other than by bumping up the number of > > biarcs it creates. But thanks for the pointers! Is your filter program > > from back in those days available anywhere? > > > > > I was just about to make a comment on how Jeff's work could be used as a basis > > > for implementing spline contours, but a quick search came up with a paper > > > "CAD/CAM INTEGRATION FOR NURBS PATH INTERPOLATION ON PC BASED REAL-TIME > > > NUMERICAL CONTROL" by Leto, Licari1, Lo Valvo1, and Piacentini1. Which > > > demonstrates NURBS working within EMC2. HURRAAAYYY! Did you know that it is > > > a relatively trivial issue to get helical interpolation (read point threading > > > in in both milling machines and lathes), and lots of other things besides... > > > > That does sound exciting! Do you know if that paper is publicly > > available anywhere? A quick google search didn't come up with anything > > here... > > > > > Actually, assuming that the NURBS code has been integrated back into EMC2, > > > then you should be able to write a Bezier to NURBS converter and be able to > > > read any PDF or PS image directly into the NURBS -- since Bezier splines is a > > > subclass of B-splines. So, I think this is doable directly in EMC > > > ***provided*** NURBS have been integrated into the core. > > > > > > This, for me at least, is WAY EXCITING NEWS!!!!! > > > > Indeed! Does anyone know what the status of NURBS is EMC2 is? > > > > > > > > EBo -- > > > > > > > > > > > > Johnny Stenback<em...@js...> said: > > > > > >> Hello all, > > >> > > >> I just wanted to share one of my recent late-night hacking outcomes. I > > >> recently started looking into G-code generation of various kinds, and I > > >> stumbled across Inkscape and Jeff Epler's gcode extension, and his work > > >> on biarcs. I started playing around and eventually got the extension to > > >> work in the latest version of Inkscape (0.46). I then made gcode produce > > >> arcs (from circular arcs in Inkscape), and later on got Jeff's biarc.py > > >> incorporated, so now the extension exports curves as biarcs (hard coded > > >> to 5 per curve segment atm)! > > >> > > >> The code is by no means complete, and I'm fairly new to Python, so > > >> there's probably some retarded stuff in there. The Z-axis movement isn't > > >> always quite right (I might have broke that, but that's a detail that'll > > >> work itself out over time here), but I wanted to share the fact that > > >> generating G-code arc commands from biarcs, generated from curves in > > >> inkscape works! > > >> > > >> The code is available to play with here: > > >> > > >> http://dp.jstenback.com/gcode/ > > >> > > >> I'd be interested to hear if anyone has thoughts or suggestions on this. > > >> And a huge thanks to Jeff for his initial extension, and biarc.py! > > >> > > >> (this was sent to the emc-users list as well, but I figured maybe > > >> there's people here who'd have thoughts too) > > >> > > >> -- > > >> jst > > >> > > >> > ------------------------------------------------------------------------------ > > >> This SF.net email is sponsored by: > > >> SourcForge Community > > >> SourceForge wants to tell your story. > > >> http://p.sf.net/sfu/sf-spreadtheword > > >> _______________________________________________ > > >> Emc-developers mailing list > > >> Emc...@li... > > >> https://lists.sourceforge.net/lists/listinfo/emc-developers > > >> > > > > > > > > > > > > > -- > > jst > > > > ------------------------------------------------------------------------------ > > This SF.net email is sponsored by: > > SourcForge Community > > SourceForge wants to tell your story. > > http://p.sf.net/sfu/sf-spreadtheword > > _______________________________________________ > > Emc-developers mailing list > > Emc...@li... > > https://lists.sourceforge.net/lists/listinfo/emc-developers > > > > > > -- > > > > -- |