Commit 14681d5a authored by franjo_j@hotmail.com's avatar franjo_j@hotmail.com
Browse files

Fixed a FTR reader problem with subsets


git-svn-id: https://pl5.projectlocker.com/igui/meshGeneration/svn@11 fdcce57e-7e00-11e2-b579-49867b4cea03
parent 283588a5
......@@ -135,6 +135,10 @@ public:
//- find if the element exists in the subset
inline bool contains(const label) const;
// operators
inline void operator=(const meshSubset&);
// IOstream operators
friend inline Ostream& operator<<(Ostream&, const meshSubset&);
......
......@@ -150,6 +150,13 @@ inline bool meshSubset::contains(const label elmt) const
return data_.found(elmt);
}
inline void meshSubset::operator=(const meshSubset& ms)
{
name_ = ms.name_;
type_ = ms.type_;
data_ = ms.data_;
}
// * * * * * * * * * * * * * * * Ostream Operator * * * * * * * * * * * * * //
inline Ostream& operator<<(Ostream& os, const meshSubset& sel)
......
......@@ -418,8 +418,9 @@ void triSurf::readFromFTR(const fileName& fName)
fStream >> triSurfFacets::triangles_;
char c;
if( !(fStream >> c) )
token c;
fStream >> c;
if( fStream.eof() )
{
return;
}
......@@ -428,9 +429,19 @@ void triSurf::readFromFTR(const fileName& fName)
fStream.putBack(c);
}
fStream >> triSurfPoints::pointSubsets_;
List<meshSubset> subsets;
fStream >> triSurfFacets::facetSubsets_;
//- read point subsets
fStream >> subsets;
forAll(subsets, subsetI)
triSurfPoints::pointSubsets_.insert(subsetI, subsets[subsetI]);
subsets.clear();
//- read facet subsets
fStream >> subsets;
forAll(subsets, subsetI)
triSurfFacets::facetSubsets_.insert(subsetI, subsets[subsetI]);
}
void triSurf::writeToFTR(const fileName& fName) const
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment