IRC log for #brlcad on 20081004

00:24.51 *** join/#brlcad elite01 (n=elite01@unaffiliated/elite01)
01:59.08 CIA-4 BRL-CAD: 03johnranderson * r32825 10/brlcad/trunk/src/librt/primitives/bspline/bspline.c:
01:59.08 CIA-4 BRL-CAD: rt_nurb_plot() calls rt_nurb_s_refine() with a "refined" knot vector. However,
01:59.08 CIA-4 BRL-CAD: if the refined knot vector is smaller than the original knot vector, the oslo
01:59.08 CIA-4 BRL-CAD: calculation will fail. This modification checks for that condition, and does
01:59.09 CIA-4 BRL-CAD: not call rt_nurb_s_refine() in that situation.
02:27.28 *** join/#brlcad pacman87 (n=Timothy@resnet-45-219.dorm.utexas.edu) [NETSPLIT VICTIM]
02:27.28 *** join/#brlcad quentusrex (n=quentusr@c-71-197-244-228.hsd1.or.comcast.net) [NETSPLIT VICTIM]
04:20.54 *** join/#brlcad Twingy (n=justin@74.92.144.217)
07:38.09 *** join/#brlcad clock_ (n=clock@77-56-94-82.dclient.hispeed.ch)
07:46.24 *** join/#brlcad Bariton (n=Bary@p5B14E5CC.dip.t-dialin.net)
08:17.31 *** join/#brlcad Ralith (n=Ralith@216.162.199.202)
08:26.59 *** join/#brlcad clock__ (n=clock@77-56-94-82.dclient.hispeed.ch)
10:52.57 *** join/#brlcad elite01 (n=elite01@unaffiliated/elite01)
12:08.51 *** join/#brlcad geocalc (n=geocalc@91-171-193-121.rev.libertysurf.net)
12:37.28 *** join/#brlcad CIA-4 (n=CIA@208.69.182.149)
14:09.45 *** join/#brlcad geocalc (n=geocalc@91-171-193-121.rev.libertysurf.net) [NETSPLIT VICTIM]
14:09.45 *** join/#brlcad clock__ (n=clock@77-56-94-82.dclient.hispeed.ch) [NETSPLIT VICTIM]
14:09.45 *** join/#brlcad ``Erik (i=erik@c-68-54-174-162.hsd1.md.comcast.net) [NETSPLIT VICTIM]
14:09.45 *** join/#brlcad SWPadnos (n=Me@emc/developer/SWPadnos) [NETSPLIT VICTIM]
14:09.46 *** join/#brlcad poolio (n=poolio@bz.bzflag.bz) [NETSPLIT VICTIM]
14:09.46 *** join/#brlcad archivist_ub (n=archivis@host81-149-119-172.in-addr.btopenworld.com) [NETSPLIT VICTIM]
15:17.14 *** join/#brlcad SWPadnos (n=Me@emc/developer/SWPadnos) [NETSPLIT VICTIM]
17:38.09 *** join/#brlcad tony-h (n=aeheathc@bambi.csl.mtu.edu)
17:48.28 tony-h Hello. I'm looking at the Tcl code for mged... how can I add a new command that the command-line will recognize?
18:27.42 brlcad tony-h: you can just create a new tcl proc
18:28.28 brlcad tony-h: you can register a C function as a tcl command as well for compile-time additions
18:30.01 brlcad if you just want something scripted and quick to iterate on as a tcl script, you can just write up a proc, put it in a file, and source that file within mged and it'll be available -- you can get auto-sourcing by adding the source to any of mged's tclscript dirs and rebuilding the tclIndex for that directory
18:30.50 tony-h Ah. That sounds like what I was trying to do, but how do I rebuild the tclIndex?
18:31.04 brlcad if you're making a proper patch/contribution/enhancement that'll get committed to svn, that'll all happens fairly automatically
18:34.04 brlcad the easiest way to rebuild the index if you built/installed brl-cad yourself is to put your file into src/tclscripts/mged, add it to src/tclscripts/mged/Makefile.am, mv tclIndex tclIndex.backup, make, make install
18:34.36 brlcad OR .. just edit the tclIndex file directly where brl-cad is installed with a line to source your script
18:35.56 brlcad something like "set auto_index(test) [list source [file join / path to your test.tcl]]" .. if you had a proc named 'test' in a /path/to/your/test.tcl directory
18:36.37 brlcad make sense?
18:37.12 brlcad it's usually much easier to just "source test.tcl" while you're developing the proc, resourcing after each edit
18:40.33 tony-h Sounds simple enough. I'm not familiar with what 'source' does though
18:40.54 brlcad it just loads the file
18:41.43 brlcad tcl is a rather pure command interpreter -- sourcing a file in is no different than if you typed that in on the command prompt
18:41.58 brlcad creating a new command in tcl is very trivial, example:
18:42.05 brlcad proc howdy {} {
18:42.09 brlcad <PROTECTED>
18:42.10 brlcad }
18:42.19 brlcad now you have a new command
18:44.15 brlcad src/tclscripts/mged/get_regions.tcl has a fairly simple example of a "get_regions" command that searches geometry objects of a particular type (regions) by recursively walking the geometry hierarchy
18:44.54 tony-h Okay. So if I take the file with my new command in it, and add it to src/tclscripts/mged/Makefile.am and run make again, it will be an available command in mged?
18:46.06 brlcad you'll have to move/remove the tclIndex in that directory, make, and make install, butyes
18:46.59 brlcad src/tclscripts/mged/remat.tcl is a "remat" command that uses "get_regions" to set a material property on a set of objects (as just another example)
18:47.08 *** join/#brlcad jjsimon-mtu (n=8ddb99a7@bz.bzflag.bz)
18:47.17 brlcad howdy jjsimon-mtu
18:47.23 jjsimon-mtu hello
18:49.35 tony-h jjsimon and myself are in the lab right now working on the acoustic project
18:49.49 brlcad presumed as much ;)
19:17.23 *** join/#brlcad Bariton (n=Bary@p5B14E5CC.dip.t-dialin.net)
19:18.36 *** join/#brlcad naroth (n=naroth@dumbo.csl.mtu.edu)
19:19.29 naroth Hi, I'm looking to include a new .c file into the make process for brlcad. Where in the makefile should I be making changes?
19:21.37 tony-h naroth is making the raytrace program that gets called by our tcl script
19:21.56 CIA-4 BRL-CAD: 03brlcad * r32826 10/brlcad/trunk/NEWS:
19:21.56 CIA-4 BRL-CAD: john fixed a bug in the bspline/nurbs surface where plot would fail. the
19:21.56 CIA-4 BRL-CAD: problem as he tracked it down was that the Oslo calculation was failing because
19:21.56 CIA-4 BRL-CAD: the refinement knot vector was smaller than the original knot vector. this was
19:21.56 CIA-4 BRL-CAD: a condition not being tested for, causing a crash. now it correctly halts
19:21.59 CIA-4 BRL-CAD: refinement.
19:25.30 brlcad naroth: you would do that by adding it to the mged_SOURCES directive in src/mged/Makefile.am
19:26.13 naroth thanks, I'll look around there for a bit then
19:34.38 naroth are new files that I create and want to make with the rest of the program supposed to have a main function?
19:39.33 tony-h make is giving him an error for multiple definitions of main, but the example rt_example.c has one.
19:44.36 brlcad it depends what you're compiling
19:45.09 jjsimon-mtu he pretty much copied rtexample.c, changed a few lines, and wants to build it now
19:45.22 brlcad if you're wanting to add a new application to the build system, it has to be listed under a PROGRAMS line and have a SOURCES variable for just that application
19:45.49 brlcad ah, then you should replicate what rtexample.c has in src/rt/Makefile.am in src/rt
19:47.06 brlcad i.e. list your 'yourapp' application under bin_PROGRAMS, then have a yourapp_SOURCES declaration
19:48.50 jjsimon-mtu ok, thanks we're trying that now
19:58.06 jjsimon-mtu so do we change lines in /src/rt/Makefile.am or /src/mged/Makefile.am? In other words, which file do we add 'yourapp' to the bin_PROGRAMS and yourapp_SOURCES lines?
20:02.16 brlcad you can add it whereever you want really
20:02.45 brlcad just affects where/when it gets compiled in the build tree
20:04.14 naroth looks like make worked, running make install now. Thanks for help
20:05.57 brlcad this does a decent job at explaining a standard gnu build system setup: http://www.seul.org/docs/autotut/
20:06.15 brlcad particularly relevant, the 5. Write a Makefile.am section
20:18.07 *** part/#brlcad naroth (n=naroth@dumbo.csl.mtu.edu)
20:26.52 tony-h I'm looking at the way a tcl script invokes a C binary. I think understand the form -- set result [catch { exec $cmd $x $y } error] -- but when result is inspected, it looks like all that you get back is a return code. How do you get more information from the binary command? Is there a way to grab its standard-out?
20:50.44 ``Erik http://www.freakingnews.com/Inverted-Celebrities-Pictures--1754-0.asp o.O
20:51.16 *** part/#brlcad tony-h (n=aeheathc@bambi.csl.mtu.edu)
22:16.41 *** join/#brlcad tony-h (n=zolcos@aeheathe.resnet.mtu.edu)
22:53.02 *** join/#brlcad Ralith (n=ralith@216.162.199.202)
23:39.23 brlcad tony-h: puts $error
23:39.55 brlcad when you catch an exec, the output goes to the variable
23:40.41 brlcad (stderr and stdout)
23:47.00 tony-h Oh! The reference material I was looking at made it sound like catch only collected stderr. I was starting to think I would have to deal with file redirection >_>
23:52.59 brlcad fyi, bu_log() outputs to stderr

Generated by irclog2html.pl Modified by Tim Riker to work with infobot.