Revision: 51796
          http://brlcad.svn.sourceforge.net/brlcad/?rev=51796&view=rev
Author:   r_weiss
Date:     2012-08-07 20:37:18 +0000 (Tue, 07 Aug 2012)
Log Message:
-----------
Change function "nmg_model_edge_fuse" to "nmg_edge_fuse" and changed the 1st 
parameter from an NMG model pointer to an NMG object magic number. This allows 
any NMG object type to be fused instead of just NMG models. Changed files 
"include/raytrace.h", "src/libged/bot_fuse.c", "src/libged/wdb_obj.c", 
"src/conv/euclid/euclid-g.c", "src/conv/jack/jack-g.c", 
"src/librt/primitives/nmg/nmg_fuse.c" and "src/librt/primitives/nmg/nmg_bool.c".

Modified Paths:
--------------
    brlcad/trunk/include/raytrace.h
    brlcad/trunk/src/conv/euclid/euclid-g.c
    brlcad/trunk/src/conv/jack/jack-g.c
    brlcad/trunk/src/libged/bot_fuse.c
    brlcad/trunk/src/libged/wdb_obj.c
    brlcad/trunk/src/librt/primitives/nmg/nmg_bool.c
    brlcad/trunk/src/librt/primitives/nmg/nmg_fuse.c

Modified: brlcad/trunk/include/raytrace.h
===================================================================
--- brlcad/trunk/include/raytrace.h     2012-08-07 20:31:06 UTC (rev 51795)
+++ brlcad/trunk/include/raytrace.h     2012-08-07 20:37:18 UTC (rev 51796)
@@ -5127,8 +5127,8 @@
                                            const struct face_g_snurb *snrb,
                                            const struct bu_list *head,
                                            const struct bn_tol *tol);
-RT_EXPORT extern int nmg_model_edge_fuse(struct model *m,
-                                        const struct bn_tol *tol);
+RT_EXPORT extern int nmg_edge_fuse(const uint32_t *magic_p,
+                                  const struct bn_tol *tol);
 RT_EXPORT extern int nmg_edge_g_fuse(const uint32_t *magic_p,
                                           const struct bn_tol  *tol);
 RT_EXPORT extern int nmg_ck_fu_verts(struct faceuse *fu1,

Modified: brlcad/trunk/src/conv/euclid/euclid-g.c
===================================================================
--- brlcad/trunk/src/conv/euclid/euclid-g.c     2012-08-07 20:31:06 UTC (rev 
51795)
+++ brlcad/trunk/src/conv/euclid/euclid-g.c     2012-08-07 20:37:18 UTC (rev 
51796)
@@ -607,7 +607,7 @@
     /* Glue faceuses together. */
     if ( debug )
        bu_log( "Glueing faces\n" );
-    (void)nmg_model_edge_fuse( m, &tol );
+    (void)nmg_edge_fuse( &m->magic, &tol );
 
     /* Compute "geometry" for model, region, and shell */
     if ( debug )

Modified: brlcad/trunk/src/conv/jack/jack-g.c
===================================================================
--- brlcad/trunk/src/conv/jack/jack-g.c 2012-08-07 20:31:06 UTC (rev 51795)
+++ brlcad/trunk/src/conv/jack/jack-g.c 2012-08-07 20:37:18 UTC (rev 51796)
@@ -305,7 +305,7 @@
          empty_model = nmg_kill_zero_length_edgeuses(m);
 
          /* Glue edges of outward pointing face uses together. */
-         if (!empty_model) nmg_model_edge_fuse(m, &tol);
+         if (!empty_model) nmg_edge_fuse(&m->magic, &tol);
        }
     }
 

Modified: brlcad/trunk/src/libged/bot_fuse.c
===================================================================
--- brlcad/trunk/src/libged/bot_fuse.c  2012-08-07 20:31:06 UTC (rev 51795)
+++ brlcad/trunk/src/libged/bot_fuse.c  2012-08-07 20:37:18 UTC (rev 51796)
@@ -131,8 +131,8 @@
     bu_log("%s: %s, %d faces fused\n", argv[0], argv[2], count);
 
     /* Step 3 -- edges */
-    bu_log("%s: running nmg_model_edge_fuse\n", argv[0]);
-    count = nmg_model_edge_fuse(m, tol);
+    bu_log("%s: running nmg_edge_fuse\n", argv[0]);
+    count = nmg_edge_fuse(&m->magic, tol);
     total += count;
 
     bu_log("%s: %s, %d edges fused\n", argv[0], argv[2], count);

Modified: brlcad/trunk/src/libged/wdb_obj.c
===================================================================
--- brlcad/trunk/src/libged/wdb_obj.c   2012-08-07 20:31:06 UTC (rev 51795)
+++ brlcad/trunk/src/libged/wdb_obj.c   2012-08-07 20:37:18 UTC (rev 51796)
@@ -8615,7 +8615,7 @@
            s = BU_LIST_FIRST(shell, &r->s_hd);
            nmg_shell_coplanar_face_merge(s, &wdbp->wdb_tol, 1);
            if (!nmg_kill_cracks(s)) {
-               (void) nmg_model_edge_fuse(m, &wdbp->wdb_tol);
+               (void) nmg_edge_fuse(&m->magic, &wdbp->wdb_tol);
                (void) nmg_edge_g_fuse(&m->magic, &wdbp->wdb_tol);
                (void) nmg_unbreak_region_edges(&r->l.magic);
                if (nmg_to_arb(m, arb_int)) {

Modified: brlcad/trunk/src/librt/primitives/nmg/nmg_bool.c
===================================================================
--- brlcad/trunk/src/librt/primitives/nmg/nmg_bool.c    2012-08-07 20:31:06 UTC 
(rev 51795)
+++ brlcad/trunk/src/librt/primitives/nmg/nmg_bool.c    2012-08-07 20:37:18 UTC 
(rev 51796)
@@ -758,7 +758,7 @@
 
     (void)nmg_model_break_e_on_v(m, tol);
 
-    (void)nmg_model_edge_fuse(m, tol);
+    (void)nmg_edge_fuse(&m->magic, tol);
 
     if (rt_g.NMG_debug & DEBUG_VERIFY) {
        /* Sometimes the tessllations of non-participating regions

Modified: brlcad/trunk/src/librt/primitives/nmg/nmg_fuse.c
===================================================================
--- brlcad/trunk/src/librt/primitives/nmg/nmg_fuse.c    2012-08-07 20:31:06 UTC 
(rev 51795)
+++ brlcad/trunk/src/librt/primitives/nmg/nmg_fuse.c    2012-08-07 20:37:18 UTC 
(rev 51796)
@@ -1029,7 +1029,7 @@
     return coincident;
 }
 
-/* compare function for qsort within function nmg_model_edge_fuse */
+/* compare function for qsort within function nmg_edge_fuse */
 static int
 v_ptr_comp(const void *p1, const void *p2)
 {
@@ -1047,10 +1047,10 @@
 
 
 /**
- * N M G _ M O D E L _ E D G E _ F U S E
+ * N M G _ E D G E _ F U S E
  */
 int
-nmg_model_edge_fuse(struct model *m, const struct bn_tol *tol)
+nmg_edge_fuse(const uint32_t *magic_p, const struct bn_tol *tol)
 {
     typedef size_t (*edgeuse_vert_list_t)[2];
     edgeuse_vert_list_t edgeuse_vert_list;
@@ -1066,7 +1066,7 @@
     register struct vertex *v2;
 
     bu_ptbl_init(&eu_list, 64, "eu1_list1 buffer");
-    nmg_edgeuse_tabulate(&eu_list, &m->magic);
+    nmg_edgeuse_tabulate(&eu_list, magic_p);
 
     nelem = BU_PTBL_END(&eu_list) * 2;
     if (nelem == 0)
@@ -1922,7 +1922,7 @@
     /* Step 3 -- edges */
     if (rt_g.NMG_debug & DEBUG_BASIC)
        bu_log("nmg_model_fuse: edges\n");
-    total += nmg_model_edge_fuse(m, tol);
+    total += nmg_edge_fuse(&m->magic, tol);
 
     /* Step 4 -- edge geometry */
     if (rt_g.NMG_debug & DEBUG_BASIC)

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits

Reply via email to