Revision: 70663
          http://sourceforge.net/p/brlcad/code/70663
Author:   brlcad
Date:     2018-02-03 04:55:28 +0000 (Sat, 03 Feb 2018)
Log Message:
-----------
remove dead code (some debugging, some wip)

Modified Paths:
--------------
    brlcad/trunk/src/libbrep/boolean.cpp
    brlcad/trunk/src/libbrep/shape_recognition_pipeline.cpp
    brlcad/trunk/src/libbrep/shape_recognition_planar.cpp
    brlcad/trunk/src/libbrep/shape_recognition_torus.cpp

Modified: brlcad/trunk/src/libbrep/boolean.cpp
===================================================================
--- brlcad/trunk/src/libbrep/boolean.cpp        2018-02-03 04:43:16 UTC (rev 
70662)
+++ brlcad/trunk/src/libbrep/boolean.cpp        2018-02-03 04:55:28 UTC (rev 
70663)
@@ -519,47 +519,7 @@
     return (point_loop_location(pt, loop) == OUTSIDE_OR_ON_LOOP) && 
!is_point_on_loop(pt, loop);
 }
 
-#if 0
-HIDDEN ON_Interval
-union_intervals(const ON_SimpleArray<ON_Interval> &intervals)
-{
-    ON_Interval union_interval;
-    for (int i = 0; i < intervals.Count(); ++i) {
-       union_interval.Union(intervals[i]);
-    }
-    if (!union_interval.IsValid()) {
-       throw IntervalGenerationError("union_intervals() created invalid 
interval\n");
-    }
-    return union_interval;
-}
 
-
-HIDDEN ON_Interval
-intersect_intervals(const ON_Interval &interval1, const ON_Interval &interval2)
-{
-    ON_Interval intersection_interval;
-    if (!intersection_interval.Intersection(interval1, interval2)) {
-       throw IntervalGenerationError("intersect_intervals() failed to 
intersect intervals\n");
-    }
-    return intersection_interval;
-}
-
-
-HIDDEN void
-replace_curve_with_subcurve(ON_Curve *&curve, const ON_Interval &interval)
-{
-    try {
-       ON_Curve *subcurve = sub_curve(curve, interval.Min(), interval.Max());
-       delete curve;
-       curve = subcurve;
-    } catch (InvalidInterval &) {
-       throw GeometryGenerationError("replace_curve_with_subcurve(): NULL "
-                                     "subcurve\n");
-    }
-}
-#endif
-
-
 HIDDEN ON_SimpleArray<ON_Interval>
 get_curve_intervals_inside_or_on_face(
     ON_Curve *curve2D,
@@ -650,15 +610,7 @@
     return final_intervals;
 }
 
-#if 0
-HIDDEN int
-compare_interval(const ON_Interval *a, const ON_Interval *b)
-{
-    return a->Compare(*b);
-}
-#endif
 
-
 struct IntervalPoints {
     ON_3dPoint min;
     ON_3dPoint mid;

Modified: brlcad/trunk/src/libbrep/shape_recognition_pipeline.cpp
===================================================================
--- brlcad/trunk/src/libbrep/shape_recognition_pipeline.cpp     2018-02-03 
04:43:16 UTC (rev 70662)
+++ brlcad/trunk/src/libbrep/shape_recognition_pipeline.cpp     2018-02-03 
04:55:28 UTC (rev 70663)
@@ -218,14 +218,6 @@
        if (flipped) shoal_planes[i].Flip();
     }
 
-#if 0
-    // Planes should be oriented correctly now
-    for (int i = 0; i < shoal_planes.Count(); i++) {
-       ON_Plane p = shoal_planes[i];
-       bu_log("plane %d origin: %f, %f, %f\n", i, p.origin.x, p.origin.y, 
p.origin.z);
-       bu_log("plane %d normal: %f, %f, %f\n", i, p.Normal().x, p.Normal().y, 
p.Normal().z);
-    }
-#endif
     if (implicit_plane_ind != -1) {
        //bu_log("have implicit plane\n");
        ON_Plane shoal_implicit_plane = shoal_planes[implicit_plane_ind];

Modified: brlcad/trunk/src/libbrep/shape_recognition_planar.cpp
===================================================================
--- brlcad/trunk/src/libbrep/shape_recognition_planar.cpp       2018-02-03 
04:43:16 UTC (rev 70662)
+++ brlcad/trunk/src/libbrep/shape_recognition_planar.cpp       2018-02-03 
04:55:28 UTC (rev 70663)
@@ -101,11 +101,6 @@
        int old_ind = (*ffaces)[i];
        (*ffaces)[i] = verts_map[old_ind];
     }
-#if 0
-    for (int i = 0; i < num_faces; i++) {
-       bu_log("face %d: %d, %d, %d\n", i, (*ffaces)[i*3], (*ffaces)[i*3+1], 
(*ffaces)[i*3+2]);
-    }
-#endif
 
     bu_free(verts2d, "free verts2d");
     bu_free(pt_ind, "free verts2d");
@@ -129,13 +124,6 @@
        V2MOVE(verts2d[i], on2dpts[i]);
     }
 
-#if 0
-    for (int i = 0; i < 8; i++) {
-       ON_3dPoint p = brep->m_V[verts_map[i]].Point();
-       bu_log("vert(%d): %f, %f, %f\n", verts_map[i], p.x, p.y, p.z);
-    }
-#endif
-
     // Outer loop first
     size_t outer_npts = loop_starts[1] - loop_starts[0];
     int *outer_pt_ind = (int *)bu_calloc(outer_npts, sizeof(int), "pt_ind");
@@ -208,11 +196,6 @@
        int old_ind = (*ffaces)[i];
        (*ffaces)[i] = verts_map[old_ind];
     }
-#if 0
-    for (int i = 0; i < num_faces; i++) {
-       bu_log("face %d: %d, %d, %d\n", i, (*ffaces)[i*3], (*ffaces)[i*3+1], 
(*ffaces)[i*3+2]);
-    }
-#endif
 
     bu_free(verts2d, "free verts2d");
 

Modified: brlcad/trunk/src/libbrep/shape_recognition_torus.cpp
===================================================================
--- brlcad/trunk/src/libbrep/shape_recognition_torus.cpp        2018-02-03 
04:43:16 UTC (rev 70662)
+++ brlcad/trunk/src/libbrep/shape_recognition_torus.cpp        2018-02-03 
04:55:28 UTC (rev 70663)
@@ -48,14 +48,6 @@
 
     data->type = TORUS;
 
-#if 0
-    data->params->bool_op= 'u';  // TODO - not always union
-    VMOVE(data->params->origin, torus.Center());
-    VMOVE(data->params->hv, torus.Axis());
-    data->params->radius = torus.major_radius;
-    data->params->r2 = torus.minor_radius;
-#endif
-
     return 1;
 }
 
@@ -69,19 +61,6 @@
     ON_Surface *cs = surf->Duplicate();
     cs->IsTorus(&torus, torus_tol);
     delete cs;
-#if 0
-    ON_3dPoint pnt;
-    ON_3dVector normal;
-    double u = surf->Domain(0).Mid();
-    double v = surf->Domain(1).Mid();
-    if (!surf->EvNormal(u, v, pnt, normal)) return 0;
-
-    ON_3dVector vect = pnt - torus.Center();
-    double dotp = ON_DotProduct(vect, normal);
-
-    if (NEAR_ZERO(dotp, 0.000001)) return 0;
-    if (dotp < 0) return 1;
-#endif
     return -1;
 }
 

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


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
BRL-CAD Source Commits mailing list
brlcad-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/brlcad-commits

Reply via email to