#emc-devel | Logs for 2006-11-23

[01:59:49] <jmkasunich> evening folks
[02:17:36] <cradek> hi jmk
[02:17:54] <jmkasunich> its been quiet in here the last couple evenings
[02:18:01] <cradek> yep
[02:18:23] <jmkasunich> lots of talk during the day tho - I hear jepler's getting an FPGA to play with
[02:18:52] <cradek> yeah it seems like a really interesting device
[02:19:20] <jmkasunich> I've pretty much decided that when I get paid for the CIM jigs I'm gonna buy a m5i20 and some of the breakout boards
[02:19:54] <cradek> neat
[02:19:55] <jmkasunich> its got a lot more usable pins, a lot more gates, and a lot more bandwidth between it and the PC
[02:20:15] <cradek> for playing with, or for your mill?
[02:20:18] <jmkasunich> yes
[02:20:48] <cradek> neat
[02:20:52] <cradek> I hope you have cnc one of these days
[02:21:01] <jmkasunich> one of these years you mean?
[02:21:09] <cradek> yeah
[02:21:12] <cradek> before the sun burns out
[02:21:57] <jmkasunich> at the moment I'm working on doc drawings again
[02:22:27] <jmkasunich> I'm bummed - I thought ve2web would be able to do the dxf to postscript conversion from the command line (and thus from the makefile)
[02:23:30] <cradek> I take it it doesn't?
[02:23:42] <jmkasunich> did the lines just fine, but no text
[02:24:21] <cradek> yuck
[02:24:48] <cradek> was there still a problem with qcad?
[02:24:52] <jmkasunich> I'm perusing the source now, not that I realisticly think I could make it handle text, but...
[02:25:05] <jmkasunich> prob with qcad is that everything is all clicky clicky
[02:25:40] <jmkasunich> http://cvs.linuxcnc.org/cvs/emc2/docs/src/README?rev=1.1
[02:25:59] <jmkasunich> my stream of conciousness notes from last night
[02:27:29] <jmkasunich> looks like dxflib understands text
[02:27:39] <cradek> I'm happy enough with the state of affairs (source and output in cvs) and your notes are a good tihng
[02:27:43] <cradek> thing
[02:28:01] <jmkasunich> I should probalby just put the rest of the source in cvs and call it done
[02:28:18] <jmkasunich> maybe create ps from the source and commit that too
[02:30:01] <jmkasunich> it would be really nice if vec2web worked better though...
[02:31:02] <jmkasunich> hmm - vec2web is a sourceforge project
[02:31:38] <jmkasunich> an ancient sf project
[02:33:12] <jmkasunich> .cvsignore (dead) 1.2 3 years andrew23 moved cvs away from sf.net
[02:33:14] <jmkasunich> wonder where he moved it
[02:34:19] <cradek> google doesn't immediately tell me
[02:35:25] <jmkasunich> thats not fair - he calls the files .h and .c and gets my hopes up, then I look inside and its got all these nasty classes in it
[02:43:56] <cradek> http://www.ribbonsoft.com/vec2web_downloads.html
[02:44:15] <jmkasunich> yeah - thats where I got it from
[02:44:27] <jmkasunich> I was wondering if there was a cvs somewhere tho
[02:45:37] <jmkasunich> (wondering if he would accept contributions that made it work better for us)
[02:46:00] <cradek> if not, you're the new maintainer of jmkvec2web
[02:46:07] <jmkasunich> heh
[02:46:21] <jmkasunich> that assumes that I can actually do anything usefull with it
[02:46:44] <jmkasunich> there is what appears to be a rather complete dxf lib there, which _does_ look like it could import text
[02:48:03] <cradek> someone needs to rewrite REALIZE so you don't need autocad - I bet dxflib would be a good start
[02:48:15] <jmkasunich> might be
[02:48:28] <cradek> oh it's c++ forget it
[02:48:35] <jmkasunich> both dxflib and qcadlib are GPL
[02:49:06] <jmkasunich> there is a crapload of code in qcadlib
[02:52:43] <jmkasunich> interesting - he has a class called RS_Graphic that can contain a drawing
[02:53:10] <jmkasunich> and "filters" that can import or export various formats to that class
[03:00:18] <jmkasunich> figured out how to turn on debugging info - it definitely is understanding the text entities during import
[03:08:48] <jmkasunich> very interesting:
[03:08:58] <jmkasunich> * Outputs a DXML file (a minimalistic XML representation of the DXF
[03:08:57] <jmkasunich> * file format).
[03:08:57] <jmkasunich> *
[03:08:57] <jmkasunich> * Example:
[03:08:57] <jmkasunich> *
[03:08:58] <jmkasunich> * <draw>
[03:09:00] <jmkasunich> * <point x="123" y="123" \>
[03:09:03] <jmkasunich> * <line x0="123" y0="123" x1="123" y1="123" \>
[03:09:04] <jmkasunich> * <circle x="123" y="123" radius="123" \>
[03:09:06] <jmkasunich> * <arc x="123" y="123" radius="123" angle0="123" angle1="123" \>
[03:09:10] <jmkasunich> * </draw>
[03:10:07] <cradek> hmmm
[03:10:44] <jmkasunich> as soon as I toss a few more printfs in here I'm gonna try running it with that output format and see what I get
[03:14:31] <jmkasunich> the DXML file has lines and arcs, no text
[03:14:47] <jmkasunich> typical format:
[03:14:49] <jmkasunich> <line x1="139.836365" y1="241.581543" x2="138.278717" y2="240.753601" />
[03:14:49] <jmkasunich> <arc x="58.820000" y="43.480000" radius="0.615000" angle1="0.000000" angle2="360.000000" />
[03:15:04] <jmkasunich> seems like just the thing for a dxf to g-code converter don't it?
[03:15:48] <jmkasunich> the arcs look to be in center/radius/startangle/endangle format
[03:16:49] <cradek> well it could be a better arc format... that's not great for gcode is it?
[03:17:08] <jmkasunich> g-code arc format is the weirdest thing I ever heard of
[03:18:02] <jmkasunich> the dxml format clearly defines the arc, the g-code generator would have to decide which direction to traverse it and export in g-code format
[03:18:38] <jmkasunich> the dxml data is just a list of entities - I'm guessing in the order in which they were added to the drawing
[03:18:51] <jmkasunich> a big part of any CAM is turning that into a path
[03:18:52] <cradek> I already did this work for the dxf arc format, and it's already right
[03:19:40] <jmkasunich> to be honest, I don't know what REALIZE is - I'm guessing it make g-code from .dwg or .dxf, but uses acad to do it?
[03:19:43] <cradek> I'd have to start over to begin with this other arc representation
[03:20:01] <cradek> no, it outputs gcode directly from autocad without using dxf files
[03:20:17] <cradek> however the structures you get in are very much like the dxf file
[03:20:40] <cradek> like you might expect, dxf echoes autocad's internal representation of stuff pretty directly
[03:20:47] <jmkasunich> iow, it makes g-code from dwg or dxf, just like I said - you load your dwg or dxf into acad, and invoke realize
[03:21:15] <cradek> well I guess - in general you draw your picture and generate gcode from it
[03:21:22] <cradek> other file formats aren't necessarily involved
[03:21:53] <cradek> but if someone would use the realize code and read dxf in its own native format, it could run outside autocad and be just as right/finished
[03:21:56] <jmkasunich> yeah, but unless you sit down to an empty screen, draw your part, generage g-code, then throw away the drawing, other formats _are_ involved
[03:22:04] <cradek> * cradek shrugs
[03:22:27] <jmkasunich> yeah - semantics
[03:22:57] <jmkasunich> I think in terms of drawing the part, saving it, maybe revising a few times, then genrating g-code, testing, revising, regenerating g-code, etc
[03:23:24] <cradek> sure
[03:23:47] <jmkasunich> what is REALIZE written in?
[03:23:54] <cradek> to me it's describing a machine path directly using a cad drawing
[03:24:13] <cradek> that's different from a simple file format converter, but I can't describe exactly how
[03:24:21] <jmkasunich> ah, you don't sit down to draw the _part_, you sit down and draw the _path_
[03:24:33] <cradek> yes
[03:24:42] <cradek> well you can draw the part first, it's easy to generate a path from it
[03:24:56] <cradek> autocad has a nice "offset" and you can "offset" the part outline a radius and get a path
[03:25:10] <cradek> it's much more powerful than radius comp in emc (deals with all kinds of corners)
[03:26:07] <cradek> realize is written in autolisp, autocad's built in lisp interpreter
[03:26:17] <jmkasunich> I had a feeling that was the case
[03:26:24] <cradek> it's extremely basic lisp, nothing fancy
[03:27:17] <cradek> I meant to show it to everyone at fest, but it didn't happen
[03:30:53] <cradek> sadly it's one of those things I wrote for me, without thinking about how I could make it as useful as possible for everyone
[03:31:32] <cradek> (if (= (boole 1 (cdr (assoc 70 ent)) 1) 1) (setq close-pt (cdr (assoc 10 (entget (entnext (cdr (assoc -1 ent)))))))
[03:31:42] <jmkasunich> if you say do
[03:31:45] <jmkasunich> so
[03:31:45] <cradek> ok maybe it's not so simple to understand for a lisp newbie
[03:32:10] <cradek> forget I said anything :-)
[03:32:51] <jmkasunich> port it to C - you can do that this weekend, right?
[03:33:02] <cradek> but it works for me already
[03:33:20] <jmkasunich> think of the poor _users_ tho ;-)
[03:33:39] <cradek> if they'd learn to program they wouldn't be so poor
[03:33:47] <cradek> :-P
[03:34:14] <jmkasunich> lol
[03:34:37] <jmkasunich> well, now I just have to figure out what gv.drawEntity() does
[03:40:31] <jmkasunich> does this:
[03:40:32] <jmkasunich> class RS_StaticGraphicView: public RS_GraphicView {
[03:40:49] <jmkasunich> mean that StaticGraphicView inherits all the methods of GraphicView?
[03:40:58] <jmkasunich> (or am I asking the wrong person?)
[03:41:16] <cradek> you're asking the wrong person
[03:41:43] <jmkasunich> dang
[03:42:38] <jmkasunich> I'm guessing it does - because the code calls a method of that class that isn't defined in the class StaticGra... declaration, but is defined for the Gra... one
[03:44:37] <cradek> you're probably right
[03:45:00] <jmkasunich> a few printfs will tell the tail
[03:45:05] <jmkasunich> tale
[03:45:41] <jmkasunich> I'm really good at printf
[03:45:52] <jmkasunich> can't use gdb to save my life, but I know how to print!
[03:48:16] <cradek> woo I got an angled entry right
[03:48:23] <jmkasunich> yay!
[03:55:15] <cradek> http://timeguy.com/cradek-files/emc/entry-exit.png
[03:55:32] <jmkasunich> slick
[03:56:04] <jmkasunich> whats the straight pass at the ID?
[03:56:18] <cradek> no angles yet
[03:56:27] <jmkasunich> ?
[03:56:31] <cradek> just not quite finished
[03:57:10] <jmkasunich> is that the spring cut, with angles only implemented on the other cuts so far?
[03:57:20] <cradek> yes, last pass + spring cuts
[03:57:34] <cradek> it's a separate loop in the code
[03:57:42] <jmkasunich> understood
[04:05:25] <cradek> say you have a lathe with a compound slide that can be set to 29 (the normal way) or -29
[04:05:37] <cradek> now imagine you've got your leadscrew turning backward so you can cut a left-hand thread
[04:05:39] <jmkasunich> ok
[04:05:42] <cradek> which one would you set it to?
[04:06:18] <cradek> if you set it to -29, you'll still cut on the leading edge of the tool (good?), but you're pulling on the chuck (bad?)
[04:06:30] <jmkasunich> the angle of the compound should result in it moving the same way the saddle is moving
[04:06:43] <jmkasunich> you want to cut on the leading edge of the tool
[04:06:46] <cradek> ok so -29
[04:06:54] <cradek> that's what I figured
[04:07:01] <jmkasunich> pulling on the chuck is no problem
[04:07:23] <jmkasunich> if you cut on the trailing edge, backlash becomes an issue
[04:07:30] <cradek> right
[04:07:38] <cradek> ok I think I have it right then
[04:08:41] <cradek> brb
[04:13:31] <cradek> going blind... maybe I'll go to bed early
[04:13:37] <jmkasunich> heh
[04:39:09] <jmkasunich> yay - jon e added the extra output bits to his driver
[04:39:43] <cradek> cool
[04:41:03] <jmkasunich> this is getting scary - I'm actually wandering thru c++ code and kinda sorta know what I'm reading
[04:42:28] <jmkasunich> and I finally found what I (wasn't) looking of
[04:42:31] <jmkasunich> for
[04:42:41] <jmkasunich> the RS_Text class has no draw method
[04:44:36] <jmkasunich> I think
[04:51:20] <LawrenceG> cradek: quick question..... how to I get the parallel port back for printing?
[04:51:41] <LawrenceG> cradek: what does emc do to stop cups from using the port?
[04:52:15] <cradek> LawrenceG: http://wiki.linuxcnc.org/cgi-bin/emcinfo.pl?TroubleShooting#Parallel_port_no_longer_works_in_EMC_2_0_1_or_later_hal_parport_Device_or_resource_busy
[04:56:00] <jmkasunich> arg
[04:56:12] <jmkasunich> polymorphic abstract classes....
[04:56:47] <cradek> I wish jon elson would fix or replace his email client - his messages are hard to read
[04:57:15] <jmkasunich> bad wrappage
[05:00:57] <jmkasunich> they probably look fine to him, and he has no clue how messed up they are
[05:07:49] <jmkasunich> I have no idea why I'm doing this - I'll never be able to make it work ;-/
[05:08:00] <jmkasunich> somewhat educational I guess
[05:18:51] <LawrenceG> cradek: many thanks... I now have printing again....
[05:31:24] <jmkasunich> bedtime
[05:38:47] <LawrenceG> cradek: must remember /etc/modprobe.d/emc2 and modprobe parport_pc
[15:51:53] <Lerneaen_Hydra_> Lerneaen_Hydra_ is now known as Lerneaen_Hydra