Revision: 56194
          http://sourceforge.net/p/brlcad/code/56194
Author:   starseeker
Date:     2013-07-24 04:48:48 +0000 (Wed, 24 Jul 2013)
Log Message:
-----------
This is ugly and probably not the generally correct thing to do, but if a 3dm 
object is not a Brep but has a Brep form, create that Brep form and import it 
into the .g file.

Modified Paths:
--------------
    brlcad/trunk/src/conv/3dm/3dm-g.cpp

Modified: brlcad/trunk/src/conv/3dm/3dm-g.cpp
===================================================================
--- brlcad/trunk/src/conv/3dm/3dm-g.cpp 2013-07-24 04:10:16 UTC (rev 56193)
+++ brlcad/trunk/src/conv/3dm/3dm-g.cpp 2013-07-24 04:48:48 UTC (rev 56194)
@@ -434,6 +434,26 @@
                    brep->Dump(*dump);
            } else if (pGeometry->HasBrepForm()) {
                dump->Print("Type: HasBrepForm\n");
+
+               ON_Brep *new_brep = pGeometry->BrepForm();
+
+               dump->Print("primitive is %s.\n", geom_name.c_str());
+               dump->Print("region created is %s.\n", region_name.c_str());
+
+               mk_brep(outfp, geom_name.c_str(), new_brep);
+
+               unsigned char rgb[3];
+               rgb[RED] = (unsigned char)r;
+               rgb[GRN] = (unsigned char)g;
+               rgb[BLU] = (unsigned char)b;
+               mk_region1(outfp, region_name.c_str(), geom_name.c_str(), 
"plastic", "", rgb);
+
+               (void)mk_addmember(region_name.c_str(), &all_regions.l, NULL, 
WMOP_UNION);
+               if (verbose_mode > 0)
+                   new_brep->Dump(*dump);
+
+               delete new_brep;
+
            } else if ((curve = const_cast<ON_Curve * 
>(ON_Curve::Cast(pGeometry)))) {
                dump->Print("Type: ON_Curve\n");
                if (verbose_mode > 1) curve->Dump(*dump);

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


------------------------------------------------------------------------------
See everything from the browser to the database with AppDynamics
Get end-to-end visibility with application monitoring from AppDynamics
Isolate bottlenecks and diagnose root cause in seconds.
Start your free trial of AppDynamics Pro today!
http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits

Reply via email to