Revision: 41297 http://brlcad.svn.sourceforge.net/brlcad/?rev=41297&view=rev Author: brlcad Date: 2010-11-09 12:25:44 +0000 (Tue, 09 Nov 2010)
Log Message: ----------- this fixes an infinite loop that was getting hit when fusing vertices due to some faulty iteration logic. instead of continuing if they are not equal, which was causing it to stay in the same processing state, check if they are equal so we can fuse and break. it was stuck endlessly fusing. affects most NMG and BOT conversion tools and facetize. Modified Paths: -------------- brlcad/trunk/NEWS brlcad/trunk/src/librt/primitives/nmg/nmg_fuse.c Modified: brlcad/trunk/NEWS =================================================================== --- brlcad/trunk/NEWS 2010-11-09 11:11:38 UTC (rev 41296) +++ brlcad/trunk/NEWS 2010-11-09 12:25:44 UTC (rev 41297) @@ -20,6 +20,7 @@ easy-to-use interface. The new GUI grealy simplifies BoT processing steps and can save modelers considerable time. +* fixed infinite loop bug converting to NMG and BoT - Sean Morrison * improved Windows installer desktop shortcut creation - Bob Parker * fixed running mged external tools (e.g., rt) after 'cd' - Bob Parker * fixed 'pnts' point cloud primitive memory access bug - Richard Weiss Modified: brlcad/trunk/src/librt/primitives/nmg/nmg_fuse.c =================================================================== --- brlcad/trunk/src/librt/primitives/nmg/nmg_fuse.c 2010-11-09 11:11:38 UTC (rev 41296) +++ brlcad/trunk/src/librt/primitives/nmg/nmg_fuse.c 2010-11-09 12:25:44 UTC (rev 41297) @@ -190,14 +190,15 @@ register struct vertex *vj; vj = (struct vertex *)BU_PTBL_GET(t, j); NMG_CK_VERTEX(vj); - if (!vj->vg_p) continue; - if (!bn_pt3_pt3_equal(vi->vg_p->coord, vj->vg_p->coord, tol)) - continue; - /* They are the same, fuse vi into vj */ - nmg_jv(vj, vi); - bu_ptbl_rm(t, (long *)vi); - count++; - break; + if ( !vj->vg_p) continue; + + if (vi->vg_p==vj->vg_p || bn_pt3_pt3_equal(vi->vg_p->coord, vj->vg_p->coord, tol)) { + /* They are the same, fuse vi into vj */ + nmg_jv(vj, vi); + bu_ptbl_rm(t, (long *)vi); + count++; + break; + } } } return count; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ------------------------------------------------------------------------------ The Next 800 Companies to Lead America's Growth: New Video Whitepaper David G. Thomson, author of the best-selling book "Blueprint to a Billion" shares his insights and actions to help propel your business during the next growth cycle. Listen Now! http://p.sf.net/sfu/SAP-dev2dev _______________________________________________ BRL-CAD Source Commits mailing list brlcad-commits@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/brlcad-commits