Revision: 51732
          http://brlcad.svn.sourceforge.net/brlcad/?rev=51732&view=rev
Author:   r_weiss
Date:     2012-07-31 19:38:38 +0000 (Tue, 31 Jul 2012)
Log Message:
-----------
Changed function nmg_model_vertex_fuse to nmg_vertex_fuse. This allows this 
function to fuse vertices within nmg objects other than just models. Files 
updated were raytrace.h viewpoint-g.c obj-g.c patch-g.c euclid-g.c trimsurf.c 
jack-g.c nmg_fuse.c nmg_bool.c fix_polysolids.c 

Modified Paths:
--------------
    brlcad/trunk/include/raytrace.h
    brlcad/trunk/src/conv/euclid/euclid-g.c
    brlcad/trunk/src/conv/iges/trimsurf.c
    brlcad/trunk/src/conv/jack/jack-g.c
    brlcad/trunk/src/conv/obj-g.c
    brlcad/trunk/src/conv/patch/patch-g.c
    brlcad/trunk/src/conv/viewpoint-g.c
    brlcad/trunk/src/librt/primitives/nmg/nmg_bool.c
    brlcad/trunk/src/librt/primitives/nmg/nmg_fuse.c
    brlcad/trunk/src/util/fix_polysolids.c

Modified: brlcad/trunk/include/raytrace.h
===================================================================
--- brlcad/trunk/include/raytrace.h     2012-07-31 18:32:14 UTC (rev 51731)
+++ brlcad/trunk/include/raytrace.h     2012-07-31 19:38:38 UTC (rev 51732)
@@ -5083,10 +5083,10 @@
                                    const struct bn_tol *tol);
 RT_EXPORT extern int   nmg_region_both_vfuse(struct bu_ptbl *t1,
                                              struct bu_ptbl *t2,
-                                             const struct bn_tol       *tol);
-/* nmg_two_region_vertex_fuse replaced with nmg_model_vertex_fuse */
-RT_EXPORT extern int nmg_model_vertex_fuse(struct model *m,
-                                          const struct bn_tol *tol);
+                                             const struct bn_tol *tol);
+/* nmg_two_region_vertex_fuse replaced with nmg_vertex_fuse */
+RT_EXPORT extern int nmg_vertex_fuse(const uint32_t *magic_p,
+                                    const struct bn_tol *tol);
 RT_EXPORT extern int nmg_cnurb_is_linear(const struct edge_g_cnurb *cnrb);
 RT_EXPORT extern int nmg_snurb_is_planar(const struct face_g_snurb *srf,
                                         const struct bn_tol *tol);

Modified: brlcad/trunk/src/conv/euclid/euclid-g.c
===================================================================
--- brlcad/trunk/src/conv/euclid/euclid-g.c     2012-07-31 18:32:14 UTC (rev 
51731)
+++ brlcad/trunk/src/conv/euclid/euclid-g.c     2012-07-31 19:38:38 UTC (rev 
51732)
@@ -555,8 +555,8 @@
     }
 
     if ( debug )
-       bu_log( "Calling nmg_model_vertex_fuse()\n" );
-    (void)nmg_model_vertex_fuse( m, &tol );
+       bu_log( "Calling nmg_vertex_fuse()\n" );
+    (void)nmg_vertex_fuse(&m->magic, &tol );
 
     /* Break edges on vertices */
     if ( debug )

Modified: brlcad/trunk/src/conv/iges/trimsurf.c
===================================================================
--- brlcad/trunk/src/conv/iges/trimsurf.c       2012-07-31 18:32:14 UTC (rev 
51731)
+++ brlcad/trunk/src/conv/iges/trimsurf.c       2012-07-31 19:38:38 UTC (rev 
51732)
@@ -1479,7 +1479,7 @@
        bu_mem_barriercheck();
 
     if (convsurf) {
-       (void)nmg_model_vertex_fuse(m, &tol);
+       (void)nmg_vertex_fuse(&m->magic, &tol);
 
        if (!BU_STR_EMPTY(curr_file->obj_name))
            mk_nmg(fdout, curr_file->obj_name, m);

Modified: brlcad/trunk/src/conv/jack/jack-g.c
===================================================================
--- brlcad/trunk/src/conv/jack/jack-g.c 2012-07-31 18:32:14 UTC (rev 51731)
+++ brlcad/trunk/src/conv/jack/jack-g.c 2012-07-31 19:38:38 UTC (rev 51732)
@@ -272,7 +272,7 @@
                        jfile, i+1);
     }
 
-    nmg_model_vertex_fuse(m, &tol);
+    nmg_vertex_fuse(&m->magic, &tol);
 
     /* Associate the face geometry. */
     for (i = 0, fail = 0; i < face; i++)

Modified: brlcad/trunk/src/conv/obj-g.c
===================================================================
--- brlcad/trunk/src/conv/obj-g.c       2012-07-31 18:32:14 UTC (rev 51731)
+++ brlcad/trunk/src/conv/obj-g.c       2012-07-31 19:38:38 UTC (rev 51732)
@@ -2979,7 +2979,7 @@
            bu_log("Fused (%d) entities in obj file face grouping name (%s), 
obj file face grouping index (%zu)\n", num_entities_fused, 
bu_vls_addr(gfi->raw_grouping_name), gfi->grouping_index + 1);
        }
 
-       /* run nmg_gluefaces, run nmg_model_vertex_fuse before nmg_gluefaces */
+       /* run nmg_gluefaces, run nmg_vertex_fuse before nmg_gluefaces */
        if ((verbose > 1) || debug) {
            bu_log("Running nmg_gluefaces on (%ld) faces from obj file face 
grouping name (%s), obj file face grouping index (%zu)\n", BU_PTBL_END(&faces), 
bu_vls_addr(gfi->raw_grouping_name), gfi->grouping_index + 1);
        }
@@ -3023,7 +3023,7 @@
            if ((verbose > 1) || debug) {
                bu_log("Completed nmg_rebound for obj file face grouping name 
(%s), obj file face grouping index (%zu)\n", 
bu_vls_addr(gfi->raw_grouping_name), gfi->grouping_index + 1);
            }
-           /* run nmg_model_vertex_fuse before nmg_check_closed_shell */
+           /* run nmg_vertex_fuse before nmg_check_closed_shell */
            if ((verbose > 1) || debug) {
                bu_log("Running nmg_check_closed_shell with approx (%ld) faces 
from obj file face grouping name (%s), obj file face grouping index (%zu)\n", 
BU_PTBL_END(&faces), bu_vls_addr(gfi->raw_grouping_name), gfi->grouping_index + 
1);
            }

Modified: brlcad/trunk/src/conv/patch/patch-g.c
===================================================================
--- brlcad/trunk/src/conv/patch/patch-g.c       2012-07-31 18:32:14 UTC (rev 
51731)
+++ brlcad/trunk/src/conv/patch/patch-g.c       2012-07-31 19:38:38 UTC (rev 
51732)
@@ -641,7 +641,7 @@
     bu_free((char *)verts, "build_solid: verts");
 
     /* fuse vertices */
-    (void)nmg_model_vertex_fuse(m, tol);
+    (void)nmg_vertex_fuse(&m->magic, tol);
 
     /* FASTGEN targets may have vertices that should be part of an
      * adjoining edge. Use nmg_break_long_edges to fix this

Modified: brlcad/trunk/src/conv/viewpoint-g.c
===================================================================
--- brlcad/trunk/src/conv/viewpoint-g.c 2012-07-31 18:32:14 UTC (rev 51731)
+++ brlcad/trunk/src/conv/viewpoint-g.c 2012-07-31 19:38:38 UTC (rev 51732)
@@ -325,7 +325,7 @@
            }
        }
 
-       (void)nmg_model_vertex_fuse(m, &tol);
+       (void)nmg_vertex_fuse(&m->magic, &tol);
 
        /* calculate plane equations for faces */
        NMG_CK_SHELL(s);

Modified: brlcad/trunk/src/librt/primitives/nmg/nmg_bool.c
===================================================================
--- brlcad/trunk/src/librt/primitives/nmg/nmg_bool.c    2012-07-31 18:32:14 UTC 
(rev 51731)
+++ brlcad/trunk/src/librt/primitives/nmg/nmg_bool.c    2012-07-31 19:38:38 UTC 
(rev 51732)
@@ -716,7 +716,7 @@
        nmg_pr_s_briefly(sB, 0);
     }
 
-    (void)nmg_model_vertex_fuse(m, tol);
+    (void)nmg_vertex_fuse(&m->magic, tol);
 
     (void)nmg_kill_anti_loops(sA);
     (void)nmg_kill_anti_loops(sB);

Modified: brlcad/trunk/src/librt/primitives/nmg/nmg_fuse.c
===================================================================
--- brlcad/trunk/src/librt/primitives/nmg/nmg_fuse.c    2012-07-31 18:32:14 UTC 
(rev 51731)
+++ brlcad/trunk/src/librt/primitives/nmg/nmg_fuse.c    2012-07-31 19:38:38 UTC 
(rev 51732)
@@ -186,7 +186,7 @@
  * Working from the end to the front, scan for geometric duplications
  * within a single list of vertex structures.
  *
- * Exists primarily as a support routine for nmg_model_vertex_fuse().
+ * Exists primarily as a support routine for nmg_vertex_fuse().
  */
 int
 nmg_ptbl_vfuse(struct bu_ptbl *t, const struct bn_tol *tol)
@@ -304,21 +304,20 @@
 
 
 /**
- * N M G _ M O D E L _ V E R T E X _ F U S E
+ * N M G _ V E R T E X _ F U S E
  *
- * Fuse together any vertices in the nmgmodel that are geometricly
+ * Fuse together any vertices that are geometrically
  * identical, within the tolerance.
  */
 int
-nmg_model_vertex_fuse(struct model *m, const struct bn_tol *tol)
+nmg_vertex_fuse(const uint32_t *magic_p, const struct bn_tol *tol)
 {
     struct bu_ptbl t1;
     int total = 0;
 
-    NMG_CK_MODEL(m);
     BN_CK_TOL(tol);
 
-    nmg_vertex_tabulate(&t1, &m->magic);
+    nmg_vertex_tabulate(&t1, magic_p);
 
     /* if there are no vertex, do nothing */
     if (!BU_PTBL_END(&t1)) {
@@ -330,7 +329,7 @@
     bu_ptbl_free(&t1);
 
     if (rt_g.NMG_debug & DEBUG_BASIC && total > 0)
-       bu_log("nmg_model_vertex_fuse() %d\n", total);
+       bu_log("nmg_vertex_fuse() %d\n", total);
     return total;
 }
 
@@ -1718,7 +1717,7 @@
     /* Step 1 -- the vertices. */
     if (rt_g.NMG_debug & DEBUG_BASIC)
        bu_log("nmg_model_fuse: vertices\n");
-    total += nmg_model_vertex_fuse(m, tol);
+    total += nmg_vertex_fuse(&m->magic, tol);
 
     /* Step 1.5 -- break edges on vertices, before fusing edges */
     if (rt_g.NMG_debug & DEBUG_BASIC)

Modified: brlcad/trunk/src/util/fix_polysolids.c
===================================================================
--- brlcad/trunk/src/util/fix_polysolids.c      2012-07-31 18:32:14 UTC (rev 
51731)
+++ brlcad/trunk/src/util/fix_polysolids.c      2012-07-31 19:38:38 UTC (rev 
51732)
@@ -150,7 +150,7 @@
                }
                nmg_rebound(m, &tol);
                (void)nmg_break_long_edges(s, &tol);
-               (void)nmg_model_vertex_fuse(m, &tol);
+               (void)nmg_vertex_fuse(&m->magic, &tol);
                nmg_gluefaces((struct faceuse **)BU_PTBL_BASEADDR(&faces), 
BU_PTBL_END(&faces), &tol);
                nmg_fix_normals(s, &tol);
 

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