Revision: 74889
          http://sourceforge.net/p/brlcad/code/74889
Author:   brlcad
Date:     2020-02-11 08:59:47 +0000 (Tue, 11 Feb 2020)
Log Message:
-----------
this is still no bueno, but seems to show we are successfully walking towards 
the right point (despite 'inverse failed' blather)

Modified Paths:
--------------
    brlcad/trunk/src/librt/primitives/brep/brep.cpp

Modified: brlcad/trunk/src/librt/primitives/brep/brep.cpp
===================================================================
--- brlcad/trunk/src/librt/primitives/brep/brep.cpp     2020-02-11 08:32:23 UTC 
(rev 74888)
+++ brlcad/trunk/src/librt/primitives/brep/brep.cpp     2020-02-11 08:59:47 UTC 
(rev 74889)
@@ -1003,15 +1003,15 @@
     ON_3dPoint p = surf->PointAt(uvpt[0], uvpt[1]);
     double dist_to_surf = p.DistanceTo(los_pnt);
 
-    const int MAX_ITERATIONS = 10;
+    const int MAX_ITERATIONS = 1000;
     const double stepsize = bs.plate_mode_thickness * 0.1;
     int iterations = 0;
     while (!NEAR_EQUAL(dist_to_surf, bs.plate_mode_thickness, stepsize) && 
iterations++ < MAX_ITERATIONS) {
 
        if (dist_to_surf > bs.plate_mode_thickness)
-           los -= stepsize; /* nudge back a full step */
+           los -= (stepsize * 4.0); /* nudge back -400% step */
        else if (dist_to_surf < bs.plate_mode_thickness)
-           los += (stepsize * 0.9); /* nudge forward 90% step */
+           los += (stepsize * 0.4); /* nudge forward 40% step */
 
        /* calculate a new exit point distance to surface */
        VJOIN1(hp, ray.r_pt, hit.dist + los, ray.r_dir);

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



_______________________________________________
BRL-CAD Source Commits mailing list
brlcad-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/brlcad-commits

Reply via email to