From 3abeab4c5a7a2d1bd72a046882ae3b72d63889cf Mon Sep 17 00:00:00 2001 From: ageay Date: Fri, 8 Feb 2013 12:39:48 +0000 Subject: [PATCH] VTK writing of curve linear mesh --- .../MEDCouplingCurveLinearMesh.cxx | 24 ++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/src/MEDCoupling/MEDCouplingCurveLinearMesh.cxx b/src/MEDCoupling/MEDCouplingCurveLinearMesh.cxx index f14a85e3a..2794f4025 100644 --- a/src/MEDCoupling/MEDCouplingCurveLinearMesh.cxx +++ b/src/MEDCoupling/MEDCouplingCurveLinearMesh.cxx @@ -520,7 +520,29 @@ void MEDCouplingCurveLinearMesh::unserialization(const std::vector& tiny void MEDCouplingCurveLinearMesh::writeVTKLL(std::ostream& ofs, const std::string& cellData, const std::string& pointData) const throw(INTERP_KERNEL::Exception) { - throw INTERP_KERNEL::Exception("MEDCouplingCurveLinearMesh::writeVTKLL : not implemented yet !"); + std::ostringstream extent; + int meshDim=(int)_structure.size(); + if(meshDim<=0 || meshDim>3) + throw INTERP_KERNEL::Exception("MEDCouplingCurveLinearMesh::writeVTKLL : meshDim invalid ! must be in [1,2,3] !"); + for(int i=0;i<3;i++) + { int val=i\n"; + ofs << " \n"; + ofs << " \n" << pointData << std::endl; + ofs << " \n"; + ofs << " \n" << cellData << std::endl; + ofs << " \n"; + ofs << " \n"; + if(getSpaceDimension()==3) + _coords->writeVTK(ofs,8,"Points"); + else + { + MEDCouplingAutoRefCountObjectPtr coo=_coords->changeNbOfComponents(3,0.); + coo->writeVTK(ofs,8,"Points"); + } + ofs << " \n"; + ofs << " \n"; + ofs << " \n"; } std::string MEDCouplingCurveLinearMesh::getVTKDataSetType() const throw(INTERP_KERNEL::Exception) -- 2.39.2