[brlcad-commits] SF.net SVN: brlcad:[32095] brlcad/branches/pre-7-12-6
Open Source Solid Modeling CAD
Brought to you by:
brlcad
From: <sta...@us...> - 2008-07-29 20:52:14
|
Revision: 32095 http://brlcad.svn.sourceforge.net/brlcad/?rev=32095&view=rev Author: starseeker Date: 2008-07-29 20:52:20 +0000 (Tue, 29 Jul 2008) Log Message: ----------- revert r31046 from trunk, per advice from Sean - needs more testing Modified Paths: -------------- brlcad/branches/pre-7-12-6/regress/gqa.sh brlcad/branches/pre-7-12-6/regress/iges.sh brlcad/branches/pre-7-12-6/regress/lights.sh brlcad/branches/pre-7-12-6/regress/mged.sh brlcad/branches/pre-7-12-6/regress/moss.sh brlcad/branches/pre-7-12-6/regress/shaders.sh brlcad/branches/pre-7-12-6/regress/solids.sh brlcad/branches/pre-7-12-6/regress/spdi.sh brlcad/branches/pre-7-12-6/regress/weight.sh brlcad/branches/pre-7-12-6/src/rt/viewarea.c Modified: brlcad/branches/pre-7-12-6/regress/gqa.sh =================================================================== --- brlcad/branches/pre-7-12-6/regress/gqa.sh 2008-07-29 20:40:25 UTC (rev 32094) +++ brlcad/branches/pre-7-12-6/regress/gqa.sh 2008-07-29 20:52:20 UTC (rev 32095) @@ -1,7 +1,7 @@ #!/bin/sh -LD_LIBRARY_PATH=../src/other/tcl/unix:../src/other/tk/unix:$$LD_LIBRARY_PATH -DYLD_LIBRARY_PATH=../src/other/tcl/unix:../src/other/tk/unix:$$DYLD_LIBRARY_PATH +LD_LIBRARY_PATH=../src/other/tcl/unix:../src/other/tk/unix:$LD_LIBRARY_PATH +DYLD_LIBRARY_PATH=../src/other/tcl/unix:../src/other/tk/unix:$DYLD_LIBRARY_PATH export LD_LIBRARY_PATH DYLD_LIBRARY_PATH rm -f gqa.g density_table.txt gqa.log gqa_mged.log gqa.mged Modified: brlcad/branches/pre-7-12-6/regress/iges.sh =================================================================== --- brlcad/branches/pre-7-12-6/regress/iges.sh 2008-07-29 20:40:25 UTC (rev 32094) +++ brlcad/branches/pre-7-12-6/regress/iges.sh 2008-07-29 20:52:20 UTC (rev 32095) @@ -1,7 +1,7 @@ #!/bin/sh -LD_LIBRARY_PATH=../src/other/tcl/unix:../src/other/tk/unix:$$LD_LIBRARY_PATH -DYLD_LIBRARY_PATH=../src/other/tcl/unix:../src/other/tk/unix:$$DYLD_LIBRARY_PATH +LD_LIBRARY_PATH=../src/other/tcl/unix:../src/other/tk/unix:$LD_LIBRARY_PATH +DYLD_LIBRARY_PATH=../src/other/tcl/unix:../src/other/tk/unix:$DYLD_LIBRARY_PATH export LD_LIBRARY_PATH DYLD_LIBRARY_PATH rm -f iges.log iges.g iges_file.iges iges_stdout_new.g iges_new.g iges_stdout.iges iges_file.iges Modified: brlcad/branches/pre-7-12-6/regress/lights.sh =================================================================== --- brlcad/branches/pre-7-12-6/regress/lights.sh 2008-07-29 20:40:25 UTC (rev 32094) +++ brlcad/branches/pre-7-12-6/regress/lights.sh 2008-07-29 20:52:20 UTC (rev 32095) @@ -1,7 +1,7 @@ #!/bin/sh -LD_LIBRARY_PATH=../src/other/tcl/unix:../src/other/tk/unix:$$LD_LIBRARY_PATH -DYLD_LIBRARY_PATH=../src/other/tcl/unix:../src/other/tk/unix:$$DYLD_LIBRARY_PATH +LD_LIBRARY_PATH=../src/other/tcl/unix:../src/other/tk/unix:$LD_LIBRARY_PATH +DYLD_LIBRARY_PATH=../src/other/tcl/unix:../src/other/tk/unix:$DYLD_LIBRARY_PATH export LD_LIBRARY_PATH DYLD_LIBRARY_PATH rm -f lights.pix Modified: brlcad/branches/pre-7-12-6/regress/mged.sh =================================================================== --- brlcad/branches/pre-7-12-6/regress/mged.sh 2008-07-29 20:40:25 UTC (rev 32094) +++ brlcad/branches/pre-7-12-6/regress/mged.sh 2008-07-29 20:52:20 UTC (rev 32095) @@ -50,6 +50,10 @@ FAILED=0 +LD_LIBRARY_PATH=../src/other/tcl/unix:../src/other/tk/unix:$LD_LIBRARY_PATH +DYLD_LIBRARY_PATH=../src/other/tcl/unix:../src/other/tk/unix:$DYLD_LIBRARY_PATH +export LD_LIBRARY_PATH DYLD_LIBRARY_PATH + # test all commands echo "testing mged commands..." Modified: brlcad/branches/pre-7-12-6/regress/moss.sh =================================================================== --- brlcad/branches/pre-7-12-6/regress/moss.sh 2008-07-29 20:40:25 UTC (rev 32094) +++ brlcad/branches/pre-7-12-6/regress/moss.sh 2008-07-29 20:52:20 UTC (rev 32095) @@ -1,7 +1,7 @@ #!/bin/sh -LD_LIBRARY_PATH=../src/other/tcl/unix:../src/other/tk/unix:$$LD_LIBRARY_PATH -DYLD_LIBRARY_PATH=../src/other/tcl/unix:../src/other/tk/unix:$$DYLD_LIBRARY_PATH +LD_LIBRARY_PATH=../src/other/tcl/unix:../src/other/tk/unix:$LD_LIBRARY_PATH +DYLD_LIBRARY_PATH=../src/other/tcl/unix:../src/other/tk/unix:$DYLD_LIBRARY_PATH export LD_LIBRARY_PATH DYLD_LIBRARY_PATH rm -f moss.pix moss.log moss.png moss2.pix Modified: brlcad/branches/pre-7-12-6/regress/shaders.sh =================================================================== --- brlcad/branches/pre-7-12-6/regress/shaders.sh 2008-07-29 20:40:25 UTC (rev 32094) +++ brlcad/branches/pre-7-12-6/regress/shaders.sh 2008-07-29 20:52:20 UTC (rev 32095) @@ -1,7 +1,7 @@ #!/bin/sh -LD_LIBRARY_PATH=../src/other/tcl/unix:../src/other/tk/unix:$$LD_LIBRARY_PATH -DYLD_LIBRARY_PATH=../src/other/tcl/unix:../src/other/tk/unix:$$DYLD_LIBRARY_PATH +LD_LIBRARY_PATH=../src/other/tcl/unix:../src/other/tk/unix:$LD_LIBRARY_PATH +DYLD_LIBRARY_PATH=../src/other/tcl/unix:../src/other/tk/unix:$DYLD_LIBRARY_PATH export LD_LIBRARY_PATH DYLD_LIBRARY_PATH EAGLECAD=eagleCAD-512x438.pix Modified: brlcad/branches/pre-7-12-6/regress/solids.sh =================================================================== --- brlcad/branches/pre-7-12-6/regress/solids.sh 2008-07-29 20:40:25 UTC (rev 32094) +++ brlcad/branches/pre-7-12-6/regress/solids.sh 2008-07-29 20:52:20 UTC (rev 32095) @@ -1,7 +1,7 @@ #!/bin/sh -LD_LIBRARY_PATH=../src/other/tcl/unix:../src/other/tk/unix:$$LD_LIBRARY_PATH -DYLD_LIBRARY_PATH=../src/other/tcl/unix:../src/other/tk/unix:$$DYLD_LIBRARY_PATH +LD_LIBRARY_PATH=../src/other/tcl/unix:../src/other/tk/unix:$LD_LIBRARY_PATH +DYLD_LIBRARY_PATH=../src/other/tcl/unix:../src/other/tk/unix:$DYLD_LIBRARY_PATH export LD_LIBRARY_PATH DYLD_LIBRARY_PATH rm -f dsp.dat ebm.bw solids.rt solids.g solids.log solids.rt.pix solids.pix.diff solids.mged Modified: brlcad/branches/pre-7-12-6/regress/spdi.sh =================================================================== --- brlcad/branches/pre-7-12-6/regress/spdi.sh 2008-07-29 20:40:25 UTC (rev 32094) +++ brlcad/branches/pre-7-12-6/regress/spdi.sh 2008-07-29 20:52:20 UTC (rev 32095) @@ -1,7 +1,7 @@ #!/bin/sh -LD_LIBRARY_PATH=../src/other/tcl/unix:../src/other/tk/unix:$$LD_LIBRARY_PATH -DYLD_LIBRARY_PATH=../src/other/tcl/unix:../src/other/tk/unix:$$DYLD_LIBRARY_PATH +LD_LIBRARY_PATH=../src/other/tcl/unix:../src/other/tk/unix:$LD_LIBRARY_PATH +DYLD_LIBRARY_PATH=../src/other/tcl/unix:../src/other/tk/unix:$DYLD_LIBRARY_PATH export LD_LIBRARY_PATH DYLD_LIBRARY_PATH rm -f spdi.g spdi.log spdi spdi.pix spdi_mged.log spdi.mged Modified: brlcad/branches/pre-7-12-6/regress/weight.sh =================================================================== --- brlcad/branches/pre-7-12-6/regress/weight.sh 2008-07-29 20:40:25 UTC (rev 32094) +++ brlcad/branches/pre-7-12-6/regress/weight.sh 2008-07-29 20:52:20 UTC (rev 32095) @@ -1,7 +1,8 @@ + #!/bin/sh -LD_LIBRARY_PATH=../src/other/tcl/unix:../src/other/tk/unix:$$LD_LIBRARY_PATH -DYLD_LIBRARY_PATH=../src/other/tcl/unix:../src/other/tk/unix:$$DYLD_LIBRARY_PATH +LD_LIBRARY_PATH=../src/other/tcl/unix:../src/other/tk/unix:$LD_LIBRARY_PATH +DYLD_LIBRARY_PATH=../src/other/tcl/unix:../src/other/tk/unix:$DYLD_LIBRARY_PATH export LD_LIBRARY_PATH DYLD_LIBRARY_PATH TOP_SRCDIR=$1 Modified: brlcad/branches/pre-7-12-6/src/rt/viewarea.c =================================================================== --- brlcad/branches/pre-7-12-6/src/rt/viewarea.c 2008-07-29 20:40:25 UTC (rev 32094) +++ brlcad/branches/pre-7-12-6/src/rt/viewarea.c 2008-07-29 20:52:20 UTC (rev 32095) @@ -157,8 +157,10 @@ cell->assembly = assembly; cell->num_exp_points = cell->num_hit_points = 0; - cell->hit_points = (struct point_list*) NULL; - cell->exp_points = (struct point_list*) NULL; + BU_GETSTRUCT(cell->hit_points, point_list); + BU_LIST_INIT(&(cell->hit_points->l)); + BU_GETSTRUCT(cell->exp_points, point_list); + BU_LIST_INIT(&(cell->exp_points->l)); rp->reg_udata = (genptr_t)cell; } @@ -346,16 +348,9 @@ /* record the exposed points in the area */ temp_point_list = (struct point_list *) bu_malloc(sizeof(struct point_list), "Point list allocation"); VMOVE(temp_point_list->pt_cell, pp->pt_inhit->hit_point); - - if (cell->exp_points) { - BU_LIST_INSERT(&(cell->exp_points->l), &(temp_point_list->l)); - } - else { - BU_GETSTRUCT(cell->exp_points, point_list); - BU_LIST_INIT(&(cell->exp_points->l)); - VMOVE(cell->exp_points->pt_cell, temp_point_list->pt_cell); - } + BU_LIST_INSERT(&(cell->exp_points->l), &(temp_point_list->l)); + cell->num_exp_points++; cell->exposures++; cell->seen++; @@ -396,14 +391,7 @@ temp_point_list = (struct point_list *) bu_malloc(sizeof(struct point_list), "Point list allocation"); VMOVE(temp_point_list->pt_cell, pp->pt_inhit->hit_point); - if (cell->hit_points) { - BU_LIST_INSERT(&(cell->hit_points->l), &(temp_point_list->l)); - } - else { - BU_GETSTRUCT(cell->hit_points, point_list); - BU_LIST_INIT(&(cell->hit_points->l)); - VMOVE(cell->hit_points->pt_cell, temp_point_list->pt_cell); - } + BU_LIST_INSERT(&(cell->hit_points->l), &(temp_point_list->l)); if (!cell->name) { /* get the region name */ @@ -826,7 +814,25 @@ VSETALL(temp_point, 0); - for (BU_LIST_FOR(point_it, point_list, &(ptlist->l))) { + /* This block of code could be replaced with a + * BU_LIST_FOR(), but the first element of the list, + * the one pointed by the exp_points and hit_points + * point_lists (in struct area), are initialized with + * no data, and using the BU_LIST_FOR macro would hurt + * precision. + * + * This for() iterates from the second element of the list + * to the last one that is not head. + * + * In order to use BU_LIST_FOR, the rayhit function must + * be modified so that when the point lists are formed, + * checks are made to ensure that the head element is not + * empty. + */ + for ((point_it) = BU_LIST_PNEXT(point_list, + BU_LIST_FIRST(point_list, &(ptlist->l))); + (point_it) && BU_LIST_NOT_HEAD(point_it, &(ptlist->l)); + (point_it) = BU_LIST_PNEXT(point_list, point_it)) { VSET(temp_point, temp_point[X] + point_it->pt_cell[X], This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |