Added FileVersion attribute to XML format to distinguish legacy float binary files from new double binary files

This commit is contained in:
jrheinlaender
2013-03-27 11:47:18 +04:30
parent 4dcc5eb6cb
commit fdc3e50811
39 changed files with 119 additions and 78 deletions

View File

@@ -297,7 +297,7 @@ void MeshObject::Restore(Base::XMLReader &reader)
// this is handled by the property class
}
void MeshObject::RestoreDocFile(Base::Reader &reader)
void MeshObject::RestoreDocFile(Base::Reader &reader, const int FileVersion)
{
load(reader);
}
@@ -1154,8 +1154,8 @@ void MeshObject::removeSelfIntersections(const std::vector<unsigned long>& indic
for (it = indices.begin(); it != indices.end(); ) {
unsigned long id1 = *it; ++it;
unsigned long id2 = *it; ++it;
selfIntersections.push_back(std::make_pair
<unsigned long, unsigned long>(id1,id2));
selfIntersections.push_back(std::make_pair
<unsigned long, unsigned long>(id1,id2));
}
if (!selfIntersections.empty()) {
@@ -1171,12 +1171,12 @@ void MeshObject::removeFoldsOnSurface()
MeshCore::MeshEvalFoldsOnSurface s_eval(_kernel);
MeshCore::MeshEvalFoldOversOnSurface f_eval(_kernel);
f_eval.Evaluate();
std::vector<unsigned long> inds = f_eval.GetIndices();
s_eval.Evaluate();
f_eval.Evaluate();
std::vector<unsigned long> inds = f_eval.GetIndices();
s_eval.Evaluate();
std::vector<unsigned long> inds1 = s_eval.GetIndices();
// remove duplicates
inds.insert(inds.end(), inds1.begin(), inds1.end());
std::sort(inds.begin(), inds.end());
@@ -1188,8 +1188,8 @@ void MeshObject::removeFoldsOnSurface()
// do this as additional check after removing folds on closed area
for (int i=0; i<5; i++) {
MeshCore::MeshEvalFoldsOnBoundary b_eval(_kernel);
if (b_eval.Evaluate())
break;
if (b_eval.Evaluate())
break;
inds = b_eval.GetIndices();
if (!inds.empty())
deleteFacets(inds);