#emc-devel | Logs for 2010-10-21

[00:31:54] <skunkworks> wow - nice work andy!
[12:05:01] <Guest819> thanks!
[12:05:02] <CIA-112> EMC: 03jepler 07master * re60e506d6b48 10/src/hal/classicladder/serial_linux.c: classicladder: handle errors in SerialSend
[12:05:03] <CIA-112> EMC: 03jepler 07master * rb73d296ee15e 10/src/emc/usr_intf/emclcd.cc: emclcd: fix copyfiles warnings, error handling. resource leak
[12:05:05] <CIA-112> EMC: 03jepler 07master * r42310e486d13 10/src/emc/usr_intf/ (emclcd.cc sockets.c sockets.h): emclcd: fix compiler warnings
[12:05:07] <CIA-112> EMC: 03jepler 07master * r2c2ca38c0368 10/src/emc/usr_intf/schedrmt.cc: schedrmt: fix compiler warnings
[12:05:08] <CIA-112> EMC: 03jepler 07master * rba439a07cdd4 10/debian/configure: correct values for current debian testing
[12:05:19] <CIA-112> EMC: 03jepler 07master * r46d6d3b3475e 10/src/emc/usr_intf/emcrsh.cc: emcrsh: fix compiler warnings
[12:05:51] <CIA-112> EMC: 03jepler 07master * rd8cf52a9ce5c 10/src/emc/usr_intf/emcrsh.cc: emcrsh: fix many const warnings
[12:07:57] <jepler> now they'll have to review my changes for correctness *bwahaha*
[12:08:44] <Jymmm> jepler: Hey, can I bug ya a moment?
[12:10:08] <jthornton> I think you missed him Jymmm
[12:10:31] <Jymmm> jthornton: story of my life =)
[12:10:38] <jthornton> LOL
[12:10:57] <Jymmm> jthornton: http://www.creativereview.co.uk/cr-blog/2010/march/mark-langan-corrugated-creativity
[12:14:57] <jepler> Jymmm: shoot
[12:15:25] <Jymmm> jepler: =)
[12:16:37] <Jymmm> jepler: I want to apply a colorfill to a pattern, then covert that to a dimension (height). sorta kinda like this, but in only 4 steps in this example http://i55.tinypic.com/wheltx.jpg
[12:16:52] <Jymmm> jepler: Any suggestions?
[12:17:39] <Jymmm> jepler: The idea is to be able to reproduce the cardbaord pieces shown in the background here http://www.creativereview.co.uk/images/uploads/2010/03/international_paper_logo034_1.jpg
[12:18:15] <psha> Jymmm: what exactly you need? algorithm to convert gradient to heights?
[12:19:00] <Jymmm> psha: Just a method to convert the (vector) drawing to a "cut sheet" of sorts.
[12:21:07] <jepler> so your input is a bitmap image with regions, and the output is the boundary of the regions? I'd be tempted to try an edge detection filter (there are several in gimp) followed by a bitmap->vector converter like inkscape, potrace, or autotrace..
[12:21:13] <jepler> but I'm not sure I understand the question yet
[12:21:55] <Jymmm> jepler: Well, that was a crude mockup. It would be all vector.
[12:22:22] <Jymmm> jepler: In that pic, do you see the gradiate fill?
[12:22:56] <psha> Jymmm: and you want to split gradient fill into 'stripes' with constant height?
[12:22:59] <Jymmm> jepler: Consider 100% black the valleys, and the 20% black the peaks (sclaed of course)
[12:23:09] <Jymmm> scaled
[12:23:11] <jepler> oh -- in the first pic the input is the inset "gradient" and the output is the main "3d" image
[12:23:45] <Jymmm> jepler: well, alex make the 3D image, I overlayed the gradient to trry and explain.
[12:24:29] <Jymmm> But the 3D image represents the "pattern" of the background on the cardboard art piece
[12:24:39] <Jymmm> If you were to draw it that is.
[12:25:59] <jepler> the input is an image where brightness represents depth
[12:26:07] <jepler> what is the output?
[12:26:50] <Jymmm> jepler: Basically, If I wanted to reproduce that pattern, I don't want to have to count and dimension every piece when drawing it up. I'd like a way to be able to output to a "cut sheet"
[12:27:13] <Jymmm> jepler: another vector drawing of the cardbaord pieces layed flat
[12:27:20] <psha> so you may cut stripes from it and glue them verticaly?
[12:27:28] <Jymmm> or CSV file
[12:28:03] <Jymmm> psha: basically, yes.
[12:28:06] <jepler> I think I see what you're getting at, but I'm not familiar with any algorithms for doing it
[12:28:30] <psha> so limit number of colors to ~4 or what you need and then find straight constant lines
[12:28:47] <Jymmm> jepler: I guess it's breaking a vector file apart into it's pieces, and applying a height to a color (so to speak)
[12:29:10] <Jymmm> s/a/each/
[12:30:25] <psha> if you already have vector image then finding lines will be easy
[12:30:31] <psha> as you know direction of gradient fill
[12:31:12] <Jymmm> Yeah, I have length and height of each element
[12:31:27] <Jymmm> as the drawing is to scale.
[12:32:00] <Jymmm> I guess it's like drawing a roof truss, and converting to a BOM
[12:32:33] <Jymmm> BLK 2x4, GRN 2x6, BLU 4x4, etc
[12:33:02] <Jymmm> I'm just being lazy and using a 4 to 8 color gradiant for the pattern
[12:44:15] <Jymmm> a VERY crude example (and I screwed up the outside gradient) http://i56.tinypic.com/16c3vbb.jpg
[12:44:37] <Jymmm> But that is suppose to represent this http://www.creativereview.co.uk/images/uploads/2010/03/international_paper_logo034_1.jpg
[16:23:46] <CIA-112> EMC: 03cradek 07segmentqueue * rae2acc2339c3 10/src/emc/kinematics/ (segmentqueue.c segmentqueue.h): finish getting rid of the global feed
[16:23:46] <CIA-112> EMC: 03cradek 07segmentqueue * ra1e63ab10917 10/src/emc/kinematics/segmentqueue.c: fix incorrect linking of tangent arcs
[21:32:07] <jepler> cradek: tangent arcs are the most important arcs!
[21:51:19] <andypugh> <puzzled> I moved all the 8i20-specific functions to a new .c file. (and the 7i64 ones too, though that is currently one empty function). I need to add the new files to the Makefile (and I have) but is anything else required to let the compile find the functions in their new homes? (the function protoypes already appear in hostmot2.h)
[21:52:58] <andypugh> I am getting a rather cryptinc message (error: expected ‘)’ before ‘*’ token) for every function in the new file. I suspect an un-closed bracket in a header, but the offending file has no #includes
[22:00:33] <jepler> do you need a #include that you did not put in the new source file?
[22:01:34] <jepler> or do you mean places in the existing C file that refer to functions in the new C file? if so, you have to add the proper declarations to a header file that is included in both source files (probably the same header where e.g., stepgen related functions are declared)
[22:09:26] <andypugh> I think that is it. The file I pulled the functions out of needs a #include of the new file, of course. That might not help with the odd error though. Lets see.
[22:10:35] <andypugh> Ah, no, wait. Can you #include a .c file?
[22:11:42] <cradek> yes - but you don't want to do that
[22:12:08] <cradek> you want the prototypes in a shared .h file
[22:12:08] <andypugh> It certainly failed to help :-)
[22:12:16] <cradek> then include that in both places
[22:13:46] <andypugh> OK, I now get a whole bunch of errors, but I think that is because is found the file for the first time.
[22:14:12] <cradek> did you add your new file to the build?
[22:14:56] <andypugh> It's in the makefile (as a fictitious .o , I really don't get makefiles at all)
[22:15:48] <cradek> in hostmot2-objs := ?
[22:20:22] <andypugh> Aye
[22:25:41] <cradek> if you can get me a patch I'll try to help you figure out what's wrong
[22:48:02] <andypugh> Thanks, but I think I have it now.
[22:48:16] <andypugh> 'tis a cryptic error, though.:
[22:48:18] <andypugh> error: expected ‘)’ before ‘*’ token
[22:49:04] <andypugh> means "the file that this function is in needs to include the header file that the calling file will use to find it"
[22:56:02] <jepler> there's a very old but not yet forbidden way of declaring function parameters, called "K&R style". It looked something like this:
[22:56:05] <jepler> int g(kandr_style_parameter) int **kandr_style_parameter; {}
[22:56:36] <jepler> probably when you didn't have the right header available (by #including the appropriate header) you had code that looked like this:
[22:56:40] <jepler> int f(undefined_type **p) {}
[22:56:55] <andypugh> Yes, basically.
[22:57:11] <jepler> since the identifier undefined_type didn't correspond to a known type, it meant this current function declaration couldn't be an ANSI C style prototype, which leaves only a K&R style function
[22:57:34] <andypugh> I guessed it was something like that, how else can the very first line in a file be wrong?
[22:57:41] <jepler> but in that case, immediately after undefined_type the next legal tokens are few -- I think basically comma (if another argument follows) or close-paren (if it's the last one)
[22:58:41] <jepler> if for instance you'd misspelled the type -- int f(itn *x) -- the error would be the same
[22:59:07] <jepler> so I wouldn't learn that this error corresponds exactly with "I forgot an include" .. but I'd remember that as an item to check
[22:59:25] <andypugh> The offending line was the first non-coment in the file, vis int hm2_7i64_create(hostmot2_t *hm2);
[23:00:22] <andypugh> There was no possibility of a mismatched brace or ; earlier, so I was looking at headers and includes.