From: vsv Date: Thu, 6 Apr 2006 10:17:24 +0000 (+0000) Subject: Export UNV X-Git-Tag: T3_2_0b1_pre1~48 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=4d9935e8c4a2a495281150f105bff756b5bded82;p=modules%2Fsmesh.git Export UNV --- diff --git a/src/DriverUNV/DriverUNV_W_SMDS_Mesh.cxx b/src/DriverUNV/DriverUNV_W_SMDS_Mesh.cxx index 9e4fed760..b5b4dc769 100644 --- a/src/DriverUNV/DriverUNV_W_SMDS_Mesh.cxx +++ b/src/DriverUNV/DriverUNV_W_SMDS_Mesh.cxx @@ -224,6 +224,45 @@ Driver_Mesh::Status DriverUNV_W_SMDS_Mesh::Perform() } UNV2412::Write(out_stream,aDataSet2412); } + { + using namespace UNV2417; + cout << "### MyGroups size " << myGroups.size() << endl; + if (myGroups.size() > 0) { + TDataSet aDataSet2417; + TGroupList::const_iterator aIter = myGroups.begin(); + for (; aIter != myGroups.end(); aIter++) { + SMESHDS_GroupBase* aGroupDS = *aIter; + TRecord aRec; + aRec.GroupName = aGroupDS->GetStoreName(); + cout << "### GrName = "< +#include "SMESHDS_GroupBase.hxx" +#include -//typedef std::map TGroupsMap; +typedef std::list TGroupList; class DriverUNV_W_SMDS_Mesh: public Driver_SMDS_Mesh { public: virtual Status Perform(); - // void SetGroups(const TGroupsMap& theGroupsMap) { myGroupsMap = theGroupsMap; } + void AddGroup(SMESHDS_GroupBase* theGroup) { myGroups.push_back(theGroup); } private: - // TGroupsMap myGroupsMap; + TGroupList myGroups; }; diff --git a/src/DriverUNV/UNV2417_Structure.cxx b/src/DriverUNV/UNV2417_Structure.cxx index d52dd1e80..485a81bd4 100644 --- a/src/DriverUNV/UNV2417_Structure.cxx +++ b/src/DriverUNV/UNV2417_Structure.cxx @@ -18,7 +18,7 @@ static int MYDEBUG = 0; static string _group_labels[] = {"2417", "2429", "2430", "2432", "2435", "2452", "2467"}; #define NBGROUP 7 -static string _label_dataset = "2429"; +static string _label_dataset = "2467"; void UNV2417::Read(std::ifstream& in_stream, TDataSet& theDataSet) { @@ -134,21 +134,25 @@ void UNV2417::Write(std::ofstream& out_stream, const TDataSet& theDataSet) int aRow = 0; int i; for (i = 0; i < aNbNodes; i++) { - if (aRow == 4) { + if (aRow == 2) { out_stream<::iterator it = _mapGroup.begin(); it != _mapGroup.end(); it++ ) { + SMESH_Group* aGroup = it->second; + SMESHDS_GroupBase* aGroupDS = aGroup->GetGroupDS(); + if ( aGroupDS ) { + string aGroupName = aGroup->GetName(); + aGroupDS->SetStoreName( aGroupName.c_str() ); + myWriter.AddGroup( aGroupDS ); + } + } myWriter.Perform(); }