changed: no reason to override write in ASMsxDmx
we can just use the ASMsxD implementation
This commit is contained in:
parent
005f8f24b1
commit
53f5d1f830
@ -181,12 +181,14 @@ bool ASMs2D::read (std::istream& is)
|
||||
}
|
||||
|
||||
|
||||
bool ASMs2D::write (std::ostream& os, int) const
|
||||
bool ASMs2D::write (std::ostream& os, int basis) const
|
||||
{
|
||||
if (!surf) return false;
|
||||
if (basis > static_cast<int>(this->getNoBasis())) return false;
|
||||
const Go::SplineSurface* spline = this->getBasis(basis);
|
||||
if (!spline) return false;
|
||||
|
||||
os <<"200 1 0 0\n";
|
||||
os << *surf;
|
||||
os <<"200 1 0 0\n" << *spline;
|
||||
|
||||
return os.good();
|
||||
}
|
||||
|
@ -112,21 +112,6 @@ bool ASMs2Dmx::readBasis (std::istream& is, size_t basis)
|
||||
}
|
||||
|
||||
|
||||
bool ASMs2Dmx::write (std::ostream& os, int basis) const
|
||||
{
|
||||
if (basis == -1)
|
||||
os <<"200 1 0 0\n" << *projB;
|
||||
else if (basis < 1 || basis > (int)m_basis.size())
|
||||
os <<"200 1 0 0\n" << *surf;
|
||||
else if (m_basis[basis-1])
|
||||
os <<"200 1 0 0\n" << *m_basis[basis-1];
|
||||
else
|
||||
return false;
|
||||
|
||||
return os.good();
|
||||
}
|
||||
|
||||
|
||||
void ASMs2Dmx::clear (bool retainGeometry)
|
||||
{
|
||||
// these are managed by shared ptrs, make sure base class do not delete them.
|
||||
|
@ -55,8 +55,6 @@ public:
|
||||
|
||||
//! \brief Reads a basis from the given input stream.
|
||||
virtual bool readBasis(std::istream& is, size_t basis);
|
||||
//! \brief Writes the geometry/basis of the patch to given stream.
|
||||
virtual bool write(std::ostream& os, int basis) const;
|
||||
|
||||
//! \brief Generates the finite element topology data for the patch.
|
||||
//! \details The data generated are the element-to-node connectivity array,
|
||||
|
@ -152,12 +152,14 @@ bool ASMs3D::read (std::istream& is)
|
||||
}
|
||||
|
||||
|
||||
bool ASMs3D::write (std::ostream& os, int) const
|
||||
bool ASMs3D::write (std::ostream& os, int basis) const
|
||||
{
|
||||
if (!svol) return false;
|
||||
if (basis > static_cast<int>(this->getNoBasis())) return false;
|
||||
const Go::SplineVolume* spline = this->getBasis(basis);
|
||||
if (!spline) return false;
|
||||
|
||||
os <<"700 1 0 0\n";
|
||||
os << *svol;
|
||||
os <<"700 1 0 0\n" << *spline;
|
||||
|
||||
return os.good();
|
||||
}
|
||||
|
@ -110,21 +110,6 @@ bool ASMs3Dmx::readBasis (std::istream& is, size_t basis)
|
||||
}
|
||||
|
||||
|
||||
bool ASMs3Dmx::write (std::ostream& os, int basis) const
|
||||
{
|
||||
if (basis == -1)
|
||||
os <<"700 1 0 0\n" << *projB;
|
||||
else if (basis < 1 || basis > (int)m_basis.size())
|
||||
os <<"700 1 0 0\n" << *svol;
|
||||
else if (m_basis[basis-1])
|
||||
os <<"700 1 0 0\n" << *m_basis[basis-1];
|
||||
else
|
||||
return false;
|
||||
|
||||
return os.good();
|
||||
}
|
||||
|
||||
|
||||
void ASMs3Dmx::clear (bool retainGeometry)
|
||||
{
|
||||
// these are managed by shared ptrs, make sure base class do not delete them.
|
||||
|
@ -74,8 +74,6 @@ public:
|
||||
|
||||
//! \brief Reads a basis from the given input stream.
|
||||
virtual bool readBasis(std::istream& is, size_t basis);
|
||||
//! \brief Writes the geometry/basis of the patch to given stream.
|
||||
virtual bool write(std::ostream& os, int basis) const;
|
||||
|
||||
//! \brief Returns the number of bases.
|
||||
virtual size_t getNoBasis() const { return m_basis.size(); }
|
||||
|
Loading…
Reference in New Issue
Block a user