Revision: 64320
http://sourceforge.net/p/brlcad/code/64320
Author: ejno
Date: 2015-03-01 07:30:30 +0000 (Sun, 01 Mar 2015)
Log Message:
-----------
Correctly report model validity status. ONX_Model::Audit() fails to repair UUID
issues on non-Windows/OSX platforms due to ON_CreateUuid() being unimplemented.
Modified Paths:
--------------
brlcad/trunk/src/conv/3dm/conv3dm-g.cpp
Modified: brlcad/trunk/src/conv/3dm/conv3dm-g.cpp
===================================================================
--- brlcad/trunk/src/conv/3dm/conv3dm-g.cpp 2015-02-27 22:06:48 UTC (rev
64319)
+++ brlcad/trunk/src/conv/3dm/conv3dm-g.cpp 2015-03-01 07:30:30 UTC (rev
64320)
@@ -386,7 +386,7 @@
void
RhinoConverter::ObjectManager::add(bool use_uuid, const ON_UUID &uuid,
- const std::string &prefix, const char *
suffix)
+ const std::string &prefix, const char
*suffix)
{
ModelObject object;
@@ -557,7 +557,7 @@
void
RhinoConverter::clean_model()
{
- if (m_model.IsValid(&m_log))
+ if (!m_model.Audit(false, NULL, &m_log, NULL))
return;
m_log.Print("WARNING: Model is NOT valid. Attempting repairs.\n");
@@ -565,18 +565,14 @@
m_model.Polish(); // fill in defaults
int repair_count = 0;
- ON_SimpleArray<int> warnings;
- m_model.Audit(true, &repair_count, &m_log, &warnings); // repair
+ int num_problems = m_model.Audit(true, &repair_count, NULL, NULL); //
repair
- m_log.Print("Repaired %d objects.\n", repair_count);
+ m_log.Print("Repaired %d of %d problems.\n", repair_count, num_problems);
- for (int i = 0; i < warnings.Count(); ++i)
- m_log.Print("WARNING: %s\n", warnings[i]);
-
- if (m_model.IsValid(&m_log))
- m_log.Print("Repair successful, model is now valid.\n");
+ if (!m_model.Audit(false, NULL, &m_log, NULL))
+ m_log.Print("Repair successful; model is now valid.\n");
else
- m_log.Print("WARNING: Repair unsuccessful, model is still NOT
valid.\n");
+ m_log.Print("WARNING: Repair unsuccessful; model is still NOT
valid.\n");
}
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits