Revision: 55948
          http://sourceforge.net/p/brlcad/code/55948
Author:   phoenixyjll
Date:     2013-07-03 06:50:00 +0000 (Wed, 03 Jul 2013)
Log Message:
-----------
Use BrepForm() to reduce code, and remove an unused variable.

Modified Paths:
--------------
    brlcad/trunk/src/libbrep/intersect.cpp

Modified: brlcad/trunk/src/libbrep/intersect.cpp
===================================================================
--- brlcad/trunk/src/libbrep/intersect.cpp      2013-07-03 06:33:43 UTC (rev 
55947)
+++ brlcad/trunk/src/libbrep/intersect.cpp      2013-07-03 06:50:00 UTC (rev 
55948)
@@ -465,9 +465,8 @@
 
     // We need ON_BrepFace for get_closest_point().
     // TODO: Use routines like SubSurface in SSI to reduce computation.
-    ON_Brep *brep = ON_Brep::New();
-    brep->AddSurface(surfaceB.Duplicate());
-    brep->NewFace(0);
+    ON_Brep *brep = surfaceB.BrepForm();
+    if (!brep) return false;
     ON_2dPoint closest_point_uv;
     bool delete_tree = false;
     if (!tree) {
@@ -1116,10 +1115,8 @@
     // We need ON_BrepFace for get_closest_point().
     // This is used in point-surface intersections, in case we build the
     // tree again and again.
-    ON_Brep *brep = ON_Brep::New();
-    brep->AddSurface(surfaceB->Duplicate());
-    brep->NewFace(0);
-    ON_2dPoint closest_point_uv;
+    ON_Brep *brep = surfaceB->BrepForm();
+    if (!brep) return false;
     brlcad::SurfaceTree *tree = new brlcad::SurfaceTree(brep->Face(0), false, 
MAX_PSI_DEPTH);
 
     Subcurve rootA;

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


------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits

Reply via email to