#qi-hardware IRC log for Monday, 2015-03-16

qi-bot[commit] Werner Almesberger: cameo/: new command write_gerber, for Gerber output (master) http://qi-hw.com/p/cae-tools/c7ff02800:14
qi-bot[commit] Werner Almesberger: cameo/lang.l: require all commands followed by file name to end with whitespace (master) http://qi-hw.com/p/cae-tools/096b91e00:14
whitequarkhow do these people come to the channel?..00:19
wpwrakirc --list-channels | grep -i hardware00:56
DocScrutinizer05did I miss something?01:56
DocScrutinizer05ooh, "whice psu is better"01:57
DocScrutinizer05exactly what wpwrak said01:57
DocScrutinizer05wpwrak: btw kudos for the PCB shaping :-)01:58
DocScrutinizer05you already mentioned the root question "can you use it?"01:59
DocScrutinizer05rather " like to know if this is useful for you"02:00
DocScrutinizer05seems DXF is a format eagle could import02:12
wpwraki hope he can handle gerber :) i don't know dxf. i could offer gnuplot, though. that's the easiest of them all :)02:15
whitequarkdxf, not really02:16
whitequarkimporting into eagle is a pain overall02:16
DocScrutinizer05anyway I exported http://wstaw.org/m/2015/03/16/plasma-desktophp1895.png to dxf and got http://paste.opensuse.org/2200030002:16
DocScrutinizer05whitequark: exactly my point02:17
DocScrutinizer05whitequark: how would you import a PCB shape to eagle?02:17
DocScrutinizer05tbh I don't even understand how the shape is defined inside eagle02:19
DocScrutinizer05I mean, I can draw wires and arcs, but how's that becoming the outer edges of the allowed PCB area for eagle?02:20
DocScrutinizer05simply by traces not being allowed to cross wires, arcs etc?02:21
DocScrutinizer05or even simpler by traces only being allowed on background color? then we could import bmp as well prolly02:23
whitequarkum, eagle does not have an allowed PCB area.02:24
whitequarkwhen you export it or process it into gerber, it just uses the widest extent of anything on the board02:24
whitequarkthere's no "background color" and the traces can intersect if you so desire02:25
whitequarkif you mean the autorouter, i think you need to define corresponding keepout areas to make it stay clear.02:26
DocScrutinizer05from eagle "help": >> ==Platinenumrisse und Plazierung festlegen==     Gegebenenfalls die Leerplatine in Größe und Form verändern (MOVE, SPLIT).<<02:26
wpwrakthat sounds quite normal. e.g., in kicad, you have a specific layer for the board outline. eagle must have something very similar.02:26
whitequarki don't speak german02:26
wpwrakwhitequark: weren't you learning that weird language ? :)02:26
whitequarki kinda skipped on it02:26
whitequarkanyway, used GT02:27
DocScrutinizer05wpwrak: I guess "layer" is the key word02:27
whitequarkeagle does have an outline layer and it has a rectangle by default there02:27
whitequarkthe layer doesn't affect anything at all02:27
whitequarksome board houses like oshpark use it internally02:27
whitequarki don't think eagle itself cares02:27
wpwrakwhitequark: you'll be sorry for it when those alternate histories come true :) well, or perhaps for skipping french. can't be so sure about which one will win.02:27
DocScrutinizer05well, the autorouter must have an idea of where the PCB ends, no?02:28
wpwrakthere must be a cut, too .. :)02:28
whitequarkhm, not sure02:28
whitequarkah, yes, the help says autorouter also respects02:28
whitequarkthat02:28
wpwrakthe pcb outline is the only thing that defines the pcb outline. no traces, no pads, etc. so it must be there, somehow :)02:29
whitequarki don't use autorouter, as it's evident02:29
DocScrutinizer05so it's based on "pixels" in PCB outline layer?02:29
whitequarklines02:29
whitequarkit's all vector02:29
wpwrakin kicad, that's just a drawing. lines and arcs02:29
DocScrutinizer05ok02:29
DocScrutinizer05yes, like in eagle02:30
DocScrutinizer05I picked the lines + arcs idea for my example of above from another board that works02:30
DocScrutinizer05eagle help is for the bin02:31
DocScrutinizer05:-S02:32
wpwrakif all else fails, i just look things up in the source ;-)02:32
wpwrakkinda the ultimate "help"02:32
DocScrutinizer05layer 20 "Dimension"02:37
DocScrutinizer05gotta love eagle: http://wstaw.org/m/2015/03/16/plasma-desktopjj1895.png  window switching, it fails on refresh/redraw02:40
DocScrutinizer05sometimes02:40
whitequarkwait02:41
whitequarkis "Golden Delicious" a kind of apples?02:41
DocScrutinizer05yes02:41
whitequarklol02:41
DocScrutinizer05actually green apples02:41
DocScrutinizer05THE apple02:42
whitequarkthey look yellow02:42
whitequark"The Golden Delicious is a cultivar of apple with a yellow color"02:42
DocScrutinizer05yellow-greenish02:42
whitequarknot just me02:42
DocScrutinizer05they're not red as usual apples02:42
DocScrutinizer05guess that's why they#re called/named "golden"02:43
DocScrutinizer05http://en.wikipedia.org/wiki/Golden_Delicious has good pictures02:44
DocScrutinizer05anyway02:47
DocScrutinizer05wpwrak: http://wstaw.org/m/2015/03/16/plasma-desktopPh1895.png02:47
DocScrutinizer05wpwrak: we need to provide a way to actually import the stuff into eagle, otherwise it will again be "please send pencil sketch on napkin"02:48
DocScrutinizer05/whois stallmanu02:55
DocScrutinizer05err02:55
DocScrutinizer05wpwrak: maybe actually just this: http://wstaw.org/m/2015/03/16/plasma-desktopOQ1895.png ;  detail: http://paste.opensuse.org/96310635 ; full file: http://paste.opensuse.org/5026449403:14
DocScrutinizer05wpwrak: added a arc:  <wire x1="82.55" y1="43.18" x2="62.23" y2="22.86" width="0.4064" layer="20" curve="-266.304779"/>   http://wstaw.org/m/2015/03/16/plasma-desktopnt1895.png03:21
DocScrutinizer05I guess that should have been -27003:21
DocScrutinizer05which is actually how I drawn it03:22
whitequarknonono don't modify xml directly03:22
whitequarkwhat you should do is to make a "script"03:22
whitequarkwhich is what's accepted in the bar above the drawing area and also in .scr files03:22
DocScrutinizer05whywhywhy when we have no better API ?  :-)03:22
whitequarkwe do, that's my point03:22
DocScrutinizer05yeah, a script is prolly fine, as long as I can convince wpwrak to learn about the available commands and their syntax03:23
whitequarkthe embedded help describes the scripting commansd pretty well03:23
whitequarki worked extensively with both ulp and scr languages of eagle03:23
whitequarkthey're surprisingly nonhorrible03:24
DocScrutinizer05though non-comprehensive03:24
DocScrutinizer05I completely agree with you, but I'd be willing to "convert" files even manually, for this one-shot03:25
whitequarkit's probably faster to generate the scr03:25
whitequarkfor one, you don't have to parse and serialize xml03:25
DocScrutinizer05lemme try a lil gimmick...03:26
whitequark... don't tell me you're going to inject that as a string using sed03:26
DocScrutinizer05http://paste.opensuse.org/4315689503:29
DocScrutinizer05hehe I already thought about that, but not yet03:29
whitequarkugh you're the worst03:30
DocScrutinizer05but what motivated me for http://paste.opensuse.org/43156895 is pretty close to that and also somewhat related to sed03:30
DocScrutinizer05tbh the xml looks astonishingly similar to what I think the wire command syntax will be03:31
DocScrutinizer05hmm03:33
DocScrutinizer05WIRE ['signal_name'] [width] [ROUND | FLAT] " [curve | @radius] ".. 03:33
DocScrutinizer05" means coords iirc03:33
whitequarkyes03:33
whitequark(1 1)03:33
whitequarkof this form03:34
whitequarksometimes it accepts input in really strange form to make it uniformly fit " format03:34
whitequarkoh, i just remembered how exactly03:34
whitequarkusually " means (x y)03:35
whitequarkbut sometimes " means (major minor) where major is the major grid spacing and minor is the minor (alt) one03:35
DocScrutinizer05ugh03:35
whitequarkit is fucking beyond me who thought it is a good idea to reuse that syntax03:35
whitequarkbut at least i'll save you some time03:35
DocScrutinizer05:-)03:35
DocScrutinizer05btw pre eagle6.x .brd files looked way more nasty ;-)03:38
DocScrutinizer05binary crap03:38
whitequarkyeah03:41
DocScrutinizer05anyway I guess it's rather trivial to convert whatever vector format drawing into eagle WIRE 03:42
whitequarknot always03:42
whitequarkif it uses arcs and lines, yes03:42
whitequarkif it uses B-splines, then no03:43
DocScrutinizer05yes03:43
DocScrutinizer05that's what I assumed03:43
DocScrutinizer05I hope wpwrak didn't use B-splines to describe teh shape of a 2.5D-scan03:43
DocScrutinizer05;-)03:44
whitequarkB-splines are nice03:44
whitequarkrepresenting circles and ellipses exactly03:44
whitequarkespecially NURBS surfaces. otherwise you're left with triangle crap like OpenSCAD03:45
DocScrutinizer05yes, maybe. But I doubt I'll find splines in any vectoriced bmp03:45
DocScrutinizer05I even doubt there will be arcs in there03:46
whitequarkhrm03:46
whitequarkwell, I would probably use splines to avoid the "pixelation" effect03:46
whitequarkit's not like we're living inside minecraft03:47
DocScrutinizer05for the problem at hand: convert http://maemo.cloud-7.de/Gallery-N900-exploded/platine_01.jpeg shape into http://wstaw.org/m/2015/03/16/plasma-desktopJb1895.png03:48
DocScrutinizer05wpwrak alrady did all the heavy lifting03:49
whitequarkdo you even need bitmap tracing?03:49
whitequarkI would use calipers03:49
DocScrutinizer05nah, the shape is pretty irregular03:50
whitequarkhm, maybe03:50
DocScrutinizer05http://neo900.org/stuff/werner/tmp/pcb-outline-visual-comp.jpg03:50
DocScrutinizer05kudos to werner for that03:52
DocScrutinizer05awesome work03:52
whitequarkwhat i would do is to use the edge detector in GIMP and then trace the resulting contour in inkscape03:53
DocScrutinizer05also see latest commits at http://neo900.org/git/?p=misc03:54
whitequarkthe former works surprisingly well, just used it today03:54
DocScrutinizer05yes, that's what I meant by "vectorized bmp"03:56
whitequarkinkscape would produce a B-spline though03:56
DocScrutinizer05anyway we're already there, courtesy wpwrak03:56
whitequarksince that is what svg uses03:56
DocScrutinizer05OUCH!03:56
DocScrutinizer05well, cool for inkscape and SVG, not cool for eagle03:58
DocScrutinizer05I'm pretty sure wpwrak will only shrug about converting whatever thin red line in whatever format he got now, into a loooong sequence of adjacent (staight) WIRE commands aproximating the red line's shape for arbitrary precision04:02
DocScrutinizer05I bet it's not even a question whether or not the length of each vector will be maximized04:03
DocScrutinizer05actually the latter is extremely simple: when (x,y) == (x[-1],y[-1]) * n, simply replace old (x[-1],y[-1]) by new (x,y)04:06
DocScrutinizer05err sorry, of course polar coords apply here04:07
DocScrutinizer05so when (x,y) - (x[-1],y[-1]) == ( (x[-1],y[-1]) - (x[-2],y[-2]) ) * n, simply replace old (x[-1],y[-1]) by new (x,y)04:09
DocScrutinizer05whitequark: ((scripts)) actually that's *exactly* what I suggested as "interchangeable eagle format" for Neo900 project04:13
DocScrutinizer05whitequark: you know there are ULPs that can export whole eagle projects as a single huge script04:14
whitequarkyes04:14
DocScrutinizer05alas these ULP are a tad... bitrotten, would need some revisiting to add a few lacking (new?) command syntax details of eagle604:16
DocScrutinizer05and *really* great would be to directly access and read out the undo/redo buffer - I could bet on it containing complete plaintext commands. What a nice session log as well as obviously also a script04:21
whitequarkunlikely plaintext04:21
DocScrutinizer05hmm, dunno04:22
whitequarksince you can't easily revert them04:22
whitequarknot much point in reparsing and such04:22
DocScrutinizer05aah right04:22
DocScrutinizer05nm04:22
whitequarknote that solvespace does something very similar04:22
whitequarkits savefiles are "forth" programs that recreate the environment from scratch04:22
whitequarkdoesn't quite map to an undo/redo buffer--it just copies the entire savefile (in-memory) when you do anything04:23
whitequarksince it's small04:23
whitequarkbut it's still neat04:23
DocScrutinizer05well, I'm just musing about a theoretical approach: save to .brd/.sh after each single command, do diffs04:23
whitequarkthat'd work. but what for?04:24
DocScrutinizer05.sch04:24
DocScrutinizer05for "patches"04:24
DocScrutinizer05solving the "send a pencil sketch on a napkin please" problem04:25
DocScrutinizer05wpwrak: OOOPS we need BOB too :-o04:28
DocScrutinizer05not to same precision, but anyway we need some 3rd PCB shape04:29
wpwrakDocScrutinizer05: (b-splines) no, it's all list line segments. some 10+ k of them ;-) (either connected or unconnected, depending on where in the process you are)12:55
DocScrutinizer0510+k ? sounds like it could use some "smoothing"13:59
DocScrutinizer05what do you think about providing a "script" that eagle could readily run?14:01
DocScrutinizer05(I guess converting DXF to a script is what needs to get done anyway)14:03
wpwrakdxf is pure horror. my "native" format is gnuplot. plot "foo.gp" with lines14:04
wpwrakbut i suspect that nik would not want to use a generated outline directly anyway, but rather adjust his existing design with it. also because some features depend on component shapes, which in some cases will be different anyway14:06
wpwrakalso, he may have item at a higher layer of abstracion there. arcs, etc.14:06
wpwrakand anyway, what is this doing on #qi-hw ? :)14:06
DocScrutinizer05there are no component dependant shapes. And I'd prefer the thing getting defined without manual tweaking 14:07
DocScrutinizer05(qi) I discussed stuff with whitequark14:08
DocScrutinizer05when the DXF-whatever gets used to do manual shape edits then we have exactly same unfortunate situation we already got14:09
DocScrutinizer05neglecting details since they are "too complicated" and supposedly "not needed" and adjusting dimensions to own expectations14:10
DocScrutinizer05I don't care when instead of arcs a 3000 straight vectors approximate a curve14:11
DocScrutinizer05for the approximation I _know_ about how exact it is. Fitting an arc manually to match whatever mask/template will rsult in arbitrary errors again14:13
DocScrutinizer05prolly I gotta do it myself14:13
DocScrutinizer05convert to a script and import to eagle, that is14:14
whitequarkyou can fit an arc to the same error as those 3000 straight segments14:26
whitequarkand it's not going to make eagle grind to a halt14:26
wpwrakmanual fitting is often remarkably accurate, especially if you have zoom :) also, you can deliberately introduce small deviations, e.g., to fit other patterns you need to consider (grid or such)14:37
whitequarkwpwrak: isn't dxf a fairly simple text based format?14:46
whitequarkor was that dwg?14:47
whitequarki looked at export code for some of those and it was pretty trivial14:47
wpwraktext-based but rather chaotic. not in the xml sense but rather in the "too many punch cards" sense14:47
wpwrakand autocad were busy augmenting it. so the first step would be to find out which of those hundreds of possible commands you really need14:48
whitequarkah, right14:48
DocScrutinizer51hi wolfspraul :)17:22
--- Tue Mar 17 201500:00

Generated by irclog2html.py 2.9.2 by Marius Gedminas - find it at mg.pov.lt!