Revision: 48398
          http://brlcad.svn.sourceforge.net/brlcad/?rev=48398&view=rev
Author:   r_weiss
Date:     2012-01-11 16:43:59 +0000 (Wed, 11 Jan 2012)
Log Message:
-----------
Updated file 'nmg_extrude.c' function 'nmg_break_crossed_loops'. Removed 
potential use of 'pt' before it is initialized. Presently 
'nmg_break_crossed_loops' is not being called.

Modified Paths:
--------------
    brlcad/trunk/src/librt/primitives/nmg/nmg_extrude.c

Modified: brlcad/trunk/src/librt/primitives/nmg/nmg_extrude.c
===================================================================
--- brlcad/trunk/src/librt/primitives/nmg/nmg_extrude.c 2012-01-11 16:43:09 UTC 
(rev 48397)
+++ brlcad/trunk/src/librt/primitives/nmg/nmg_extrude.c 2012-01-11 16:43:59 UTC 
(rev 48398)
@@ -749,19 +749,25 @@
                    VSUB2(v2, eu2->eumate_p->vu_p->v_p->vg_p->coord ,
                          eu2->vu_p->v_p->vg_p->coord);
 
+                   /* The logic below needs to be changed, the meaning of 
+                     * dist[1] is different depending on if the result is '0'
+                     * or '1'. Presently this function is not called.
+                     */
                    if (bn_isect_lseg3_lseg3(dist, eu1->vu_p->v_p->vg_p->coord, 
v1 ,
                                             eu2->vu_p->v_p->vg_p->coord, v2, 
tol) >= 0) {
-                       point_t pt;
+                       point_t pt = VINIT_ZERO;
                        struct edgeuse *new_eu;
                        struct vertex *v=(struct vertex *)NULL;
 
                        if (dist[0]>0.0 && dist[0]<1.0 &&
                            dist[1]>=0.0 && dist[1]<=1.0) {
-                           if (ZERO(dist[1]))
+                           if (ZERO(dist[1])) {
                                v = eu2->vu_p->v_p;
-                           else if (ZERO(dist[1] - 1.0)) /* i.e., == 1.0 */
+                               VMOVE(pt, v->vg_p->coord);
+                           } else if (ZERO(dist[1] - 1.0)) { /* i.e., == 1.0 */
                                v = eu2->eumate_p->vu_p->v_p;
-                           else {
+                               VMOVE(pt, v->vg_p->coord);
+                           } else {
                                VJOIN1(pt, eu1->vu_p->v_p->vg_p->coord ,
                                       dist[0], v1);
                                v = nmg_find_pt_in_shell(is, pt, tol);
@@ -778,11 +784,13 @@
                        if (dist[1] > 0.0 && dist[1] < 1.0 &&
                            dist[0]>=0.0 && dist[0]<=1.0)
                        {
-                           if (ZERO(dist[0]))
+                           if (ZERO(dist[0])) {
                                v = eu1->vu_p->v_p;
-                           else if (ZERO(dist[0] - 1.0)) /* i.e., == 1.0 */
+                               VMOVE(pt, v->vg_p->coord);
+                           } else if (ZERO(dist[0] - 1.0)) { /* i.e., == 1.0 */
                                v = eu1->eumate_p->vu_p->v_p;
-                           else {
+                               VMOVE(pt, v->vg_p->coord);
+                           } else {
                                VJOIN1(pt, eu2->vu_p->v_p->vg_p->coord, 
dist[1], v2);
                                v = nmg_find_pt_in_shell(is, pt, tol);
                            }

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


------------------------------------------------------------------------------
Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a complex
infrastructure or vast IT resources to deliver seamless, secure access to
virtual desktops. With this all-in-one solution, easily deploy virtual 
desktops for less than the cost of PCs and save 60% on VDI infrastructure 
costs. Try it free! http://p.sf.net/sfu/Citrix-VDIinabox
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits

Reply via email to