-
Notifications
You must be signed in to change notification settings - Fork 341
[IO] Update MeshVTKLoader so that it can read polydata description of meshes #5821
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
remibessard
wants to merge
3
commits into
sofa-framework:master
Choose a base branch
from
remibessard:VTKLoader-polydata-master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+263
−7
Open
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -72,6 +72,9 @@ class XMLVTKReader : public BaseVTKReader | |||||||||||||||||||||||||||||||
| bool readFile(const char* filename) override; | ||||||||||||||||||||||||||||||||
| protected: | ||||||||||||||||||||||||||||||||
| bool loadUnstructuredGrid(tinyxml2::XMLHandle datasetFormatHandle); | ||||||||||||||||||||||||||||||||
| BaseVTKDataIO* parsePolysIndices(tinyxml2::XMLElement* dataArrayElement, | ||||||||||||||||||||||||||||||||
| VTKDataIO<int>* vtkIO_elemtypes, BaseVTKDataIO* offsetElement); | ||||||||||||||||||||||||||||||||
| BaseVTKDataIO* parsePolysIndices(BaseVTKDataIO* offsetElement, BaseVTKReader::VTKDataIO<int>* vtkIO_elemtypes); | ||||||||||||||||||||||||||||||||
| bool loadPolydata(tinyxml2::XMLHandle datasetFormatHandle); | ||||||||||||||||||||||||||||||||
| bool loadRectilinearGrid(tinyxml2::XMLHandle datasetFormatHandle); | ||||||||||||||||||||||||||||||||
| bool loadStructuredGrid(tinyxml2::XMLHandle datasetFormatHandle); | ||||||||||||||||||||||||||||||||
|
|
@@ -383,7 +386,7 @@ bool MeshVTKLoader::setInputsMesh() | |||||||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||||||||
| numSubPolyLines.push_back(nv); | ||||||||||||||||||||||||||||||||
| std::vector<PointID> points; | ||||||||||||||||||||||||||||||||
| for (int v = 0; v < nv; ++v) | ||||||||||||||||||||||||||||||||
| for (int v = 0; v < dataT[c]; ++v) | ||||||||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||||||||
| points.push_back(unsigned(inFP[i + v])); | ||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||
|
|
@@ -1196,7 +1199,7 @@ bool XMLVTKReader::loadUnstructuredGrid(tinyxml2::XMLHandle datasetFormatHandle) | |||||||||||||||||||||||||||||||
| ///DA - types | ||||||||||||||||||||||||||||||||
| if (currentDataArrayName.compare("types") == 0) | ||||||||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||||||||
| inputCellTypes = loadDataArray(dataArrayElement, numberOfCells, "Int32"); | ||||||||||||||||||||||||||||||||
| inputCellTypes = dynamic_cast<VTKDataIO<int>*>(loadDataArray(dataArrayElement, numberOfCells, "Int32")); | ||||||||||||||||||||||||||||||||
| checkError(inputCellTypes); | ||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||
|
|
@@ -1238,11 +1241,263 @@ bool XMLVTKReader::loadUnstructuredGrid(tinyxml2::XMLHandle datasetFormatHandle) | |||||||||||||||||||||||||||||||
| return true; | ||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| BaseVTKReader::BaseVTKDataIO* XMLVTKReader::parsePolysIndices(tinyxml2::XMLElement* element, BaseVTKReader::VTKDataIO<int>* vtkIO_elemtypes, BaseVTKDataIO* offsetElement) | ||||||||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||||||||
| const char* typeStrTemp; | ||||||||||||||||||||||||||||||||
| typeStrTemp = element->Attribute("type"); | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| const char* rawText = element->GetText(); // Now contains embedded '\n' | ||||||||||||||||||||||||||||||||
| std::istringstream stream(rawText); | ||||||||||||||||||||||||||||||||
| std::string line; | ||||||||||||||||||||||||||||||||
| std::cout << "stream: " << stream.str() << std::endl; | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| std::ostringstream polys2; | ||||||||||||||||||||||||||||||||
| int nb2 = 0; | ||||||||||||||||||||||||||||||||
| std::ostringstream polys3; | ||||||||||||||||||||||||||||||||
| int nb3 = 0; | ||||||||||||||||||||||||||||||||
| std::ostringstream polys4; | ||||||||||||||||||||||||||||||||
| int nb4 = 0; | ||||||||||||||||||||||||||||||||
| std::ostringstream polys5; | ||||||||||||||||||||||||||||||||
| int nb5 = 0; | ||||||||||||||||||||||||||||||||
| std::ostringstream polys6; | ||||||||||||||||||||||||||||||||
| int nb6 = 0; | ||||||||||||||||||||||||||||||||
| std::ostringstream polysX; | ||||||||||||||||||||||||||||||||
| int nbX = 0; | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| //vtkIO_elemtypes = new VTKDataIO<int>; | ||||||||||||||||||||||||||||||||
| int lineCnt = 0; | ||||||||||||||||||||||||||||||||
| while (std::getline(stream, line)) | ||||||||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||||||||
| lineCnt++; | ||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||
| if(lineCnt>2) | ||||||||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||||||||
| vtkIO_elemtypes->resize(lineCnt-2); | ||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||
| else if (lineCnt > 0) | ||||||||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||||||||
| vtkIO_elemtypes->resize(lineCnt); | ||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||
| else | ||||||||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||||||||
| msg_error(this) <<"[VTK] no line found in PolyIndices Element, ABORTING the parsing in VTKLoader"; | ||||||||||||||||||||||||||||||||
| return nullptr; | ||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||
| lineCnt = 0; | ||||||||||||||||||||||||||||||||
| stream.clear(); // Clear EOF or fail flags | ||||||||||||||||||||||||||||||||
| stream.seekg(0, std::ios::beg); | ||||||||||||||||||||||||||||||||
| while (std::getline(stream, line)) | ||||||||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||||||||
| std::istringstream lineStream(line); | ||||||||||||||||||||||||||||||||
| int val; | ||||||||||||||||||||||||||||||||
| std::vector<int> values; | ||||||||||||||||||||||||||||||||
| while (lineStream >> val) values.push_back(val); | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| switch (values.size()) | ||||||||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||||||||
| case 2: | ||||||||||||||||||||||||||||||||
| nb2++; | ||||||||||||||||||||||||||||||||
| for (int v : values) polys2 << v << ' '; | ||||||||||||||||||||||||||||||||
| vtkIO_elemtypes->data[lineCnt] = 3; | ||||||||||||||||||||||||||||||||
| break; | ||||||||||||||||||||||||||||||||
| case 3: | ||||||||||||||||||||||||||||||||
| nb3++; | ||||||||||||||||||||||||||||||||
| for (int v : values) polys3 << v << ' '; | ||||||||||||||||||||||||||||||||
| vtkIO_elemtypes->data[lineCnt] = 5; | ||||||||||||||||||||||||||||||||
| break; | ||||||||||||||||||||||||||||||||
| case 4: | ||||||||||||||||||||||||||||||||
| nb4++; | ||||||||||||||||||||||||||||||||
| for (int v : values) polys4 << v << ' '; | ||||||||||||||||||||||||||||||||
| vtkIO_elemtypes->data[lineCnt] = 9; | ||||||||||||||||||||||||||||||||
| break; | ||||||||||||||||||||||||||||||||
| case 5: | ||||||||||||||||||||||||||||||||
| nb5++; | ||||||||||||||||||||||||||||||||
| for (int v : values) polys5 << v << ' '; | ||||||||||||||||||||||||||||||||
| vtkIO_elemtypes->data[lineCnt] = 4; | ||||||||||||||||||||||||||||||||
| break; | ||||||||||||||||||||||||||||||||
| case 6: | ||||||||||||||||||||||||||||||||
| nb6++; | ||||||||||||||||||||||||||||||||
| for (int v : values) polys6 << v << ' '; | ||||||||||||||||||||||||||||||||
| vtkIO_elemtypes->data[lineCnt] = 4; | ||||||||||||||||||||||||||||||||
| break; | ||||||||||||||||||||||||||||||||
| default: | ||||||||||||||||||||||||||||||||
| nbX+= values.size(); | ||||||||||||||||||||||||||||||||
| for (int v : values) polysX << v << ' '; | ||||||||||||||||||||||||||||||||
| vtkIO_elemtypes->data[lineCnt] = 4; | ||||||||||||||||||||||||||||||||
| //lineCnt--; | ||||||||||||||||||||||||||||||||
| msg_warning(this) << "Cell with " << values.size() << " indices will be parsed as poly_line"; | ||||||||||||||||||||||||||||||||
| break; | ||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||
| lineCnt++; | ||||||||||||||||||||||||||||||||
| //// Process line | ||||||||||||||||||||||||||||||||
| //std::cout << "Line: "; | ||||||||||||||||||||||||||||||||
| //for (int v : values) std::cout << v << " "; | ||||||||||||||||||||||||||||||||
| //std::cout << "\n"; | ||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| BaseVTKDataIO* d = BaseVTKReader::newVTKDataIO(string(typeStrTemp)); | ||||||||||||||||||||||||||||||||
| //VTKDataIO<Vec<3, std::int32_t> >* d = new VTKDataIO<Vec<3, std::int32_t> >; | ||||||||||||||||||||||||||||||||
| //d->read(polys2.str(), 0); | ||||||||||||||||||||||||||||||||
| //BaseVTKDataIO* d = BaseVTKReader::newVTKDataIO(string(typeStrTemp)); | ||||||||||||||||||||||||||||||||
|
Comment on lines
+1340
to
+1342
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||||||||||||||||||
| int nbIndices = 2 * nb2 + 3 * nb3 + 4 * nb4 + 5 * nb5 + 6 * nb6 + nbX; | ||||||||||||||||||||||||||||||||
| d->resize(nbIndices); | ||||||||||||||||||||||||||||||||
| d->read(rawText, nbIndices, 0); | ||||||||||||||||||||||||||||||||
| std::cout << d->getData() << std::endl; | ||||||||||||||||||||||||||||||||
| //BaseVTKDataIO* d = BaseVTKReader::newVTKDataIO(string(typeStrTemp)); | ||||||||||||||||||||||||||||||||
| //d->read(polys4.str(), 0); | ||||||||||||||||||||||||||||||||
| //d->read(polys5.str(), 0); | ||||||||||||||||||||||||||||||||
| //d->read(polys6.str(), 0); | ||||||||||||||||||||||||||||||||
|
Comment on lines
+1347
to
+1350
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| return d; | ||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| BaseVTKReader::BaseVTKDataIO* XMLVTKReader::parsePolysIndices(BaseVTKDataIO* offsetElement, BaseVTKReader::VTKDataIO<int>* vtkIO_elemtypes) | ||||||||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||||||||
| const int* data = static_cast<const int*>(offsetElement->getData()); | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| vtkIO_elemtypes->resize(offsetElement->dataSize); | ||||||||||||||||||||||||||||||||
| int nbIndices = 0; | ||||||||||||||||||||||||||||||||
| int prevOffset = 0; | ||||||||||||||||||||||||||||||||
| for (int dataID = 0; dataID < offsetElement->dataSize; ++dataID) { | ||||||||||||||||||||||||||||||||
| nbIndices += data[dataID]-prevOffset; | ||||||||||||||||||||||||||||||||
| switch (data[dataID]-prevOffset) | ||||||||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||||||||
| case 2: | ||||||||||||||||||||||||||||||||
| vtkIO_elemtypes->data[dataID] = 3; | ||||||||||||||||||||||||||||||||
| break; | ||||||||||||||||||||||||||||||||
| case 3: | ||||||||||||||||||||||||||||||||
| vtkIO_elemtypes->data[dataID] = 5; | ||||||||||||||||||||||||||||||||
| break; | ||||||||||||||||||||||||||||||||
| case 4: | ||||||||||||||||||||||||||||||||
| vtkIO_elemtypes->data[dataID] = 9; | ||||||||||||||||||||||||||||||||
| break; | ||||||||||||||||||||||||||||||||
| default: | ||||||||||||||||||||||||||||||||
| vtkIO_elemtypes->data[dataID] = 4; | ||||||||||||||||||||||||||||||||
| msg_info(this) << "Cell with " << data[dataID]-prevOffset << " indices will be parsed as a polyLine."; | ||||||||||||||||||||||||||||||||
| break; | ||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||
| prevOffset = data[dataID]; | ||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| BaseVTKDataIO* d = BaseVTKReader::newVTKDataIO(string("Int32")); | ||||||||||||||||||||||||||||||||
| d->resize(nbIndices); | ||||||||||||||||||||||||||||||||
| d->read(m_inputIndicesText, nbIndices, 0); | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| return d; | ||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| bool XMLVTKReader::loadPolydata(tinyxml2::XMLHandle datasetFormatHandle) | ||||||||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||||||||
| SOFA_UNUSED(datasetFormatHandle); | ||||||||||||||||||||||||||||||||
| msg_error() << "Polydata dataset not implemented yet" ; | ||||||||||||||||||||||||||||||||
| return false; | ||||||||||||||||||||||||||||||||
| tinyxml2::XMLElement* pieceElem = datasetFormatHandle.FirstChildElement("Piece").ToElement(); | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| checkError(pieceElem); | ||||||||||||||||||||||||||||||||
| for (; pieceElem; pieceElem = pieceElem->NextSiblingElement()) | ||||||||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||||||||
| pieceElem->QueryIntAttribute("NumberOfPoints", &numberOfPoints); | ||||||||||||||||||||||||||||||||
| pieceElem->QueryIntAttribute("NumberOfPolys", &numberOfCells); | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| tinyxml2::XMLNode* dataArrayNode; | ||||||||||||||||||||||||||||||||
| tinyxml2::XMLElement* dataArrayElement; | ||||||||||||||||||||||||||||||||
| tinyxml2::XMLNode* node = pieceElem->FirstChild(); | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| for (; node; node = node->NextSibling()) | ||||||||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||||||||
| string currentNodeName = string(node->Value()); | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| if (currentNodeName.compare("Points") == 0) | ||||||||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||||||||
| /* Points */ | ||||||||||||||||||||||||||||||||
| dataArrayNode = node->FirstChildElement("DataArray"); | ||||||||||||||||||||||||||||||||
| checkError(dataArrayNode); | ||||||||||||||||||||||||||||||||
| dataArrayElement = dataArrayNode->ToElement(); | ||||||||||||||||||||||||||||||||
| checkError(dataArrayElement); | ||||||||||||||||||||||||||||||||
| // Force the points coordinates to be stocked as double | ||||||||||||||||||||||||||||||||
| inputPoints = loadDataArray(dataArrayElement, numberOfPoints, "Float64"); | ||||||||||||||||||||||||||||||||
| checkError(inputPoints); | ||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| if (currentNodeName.compare("Polys") == 0) | ||||||||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||||||||
| /* Polys */ | ||||||||||||||||||||||||||||||||
| dataArrayNode = node->FirstChildElement("DataArray"); | ||||||||||||||||||||||||||||||||
| for (; dataArrayNode; | ||||||||||||||||||||||||||||||||
| dataArrayNode = dataArrayNode->NextSiblingElement("DataArray")) | ||||||||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||||||||
| dataArrayElement = dataArrayNode->ToElement(); | ||||||||||||||||||||||||||||||||
| checkError(dataArrayElement); | ||||||||||||||||||||||||||||||||
| string currentDataArrayName = string(dataArrayElement->Attribute("Name")); | ||||||||||||||||||||||||||||||||
| /// DA - connectivity | ||||||||||||||||||||||||||||||||
| if (currentDataArrayName.compare("connectivity") == 0) | ||||||||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||||||||
| // number of elements in values is not known ; have to guess it | ||||||||||||||||||||||||||||||||
| if(inputCellOffsets) | ||||||||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||||||||
| inputCellTypes = new VTKDataIO<int>; | ||||||||||||||||||||||||||||||||
| inputCells = parsePolysIndices(dataArrayElement, inputCellTypes, inputCellOffsets); | ||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||
| else | ||||||||||||||||||||||||||||||||
| m_inputIndicesText = const_cast<char*>(dataArrayElement->GetText()); | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||
| /// DA - offsets | ||||||||||||||||||||||||||||||||
| if (currentDataArrayName.compare("offsets") == 0) | ||||||||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||||||||
| inputCellOffsets = loadDataArray(dataArrayElement, numberOfCells); | ||||||||||||||||||||||||||||||||
| checkError(inputCellOffsets); | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| if(strlen(m_inputIndicesText)) //parsing connectivity now we have parsed types of cells | ||||||||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||||||||
| inputCellTypes = new VTKDataIO<int>; | ||||||||||||||||||||||||||||||||
| inputCells = parsePolysIndices(inputCellOffsets, inputCellTypes); | ||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||
| /// DA - types | ||||||||||||||||||||||||||||||||
| if (currentDataArrayName.compare("types") == 0) | ||||||||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||||||||
| inputCellTypes = dynamic_cast<VTKDataIO<int>*>(loadDataArray(dataArrayElement, numberOfCells, "Int32")); | ||||||||||||||||||||||||||||||||
| checkError(inputCellTypes); | ||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| if (currentNodeName.compare("PointData") == 0) | ||||||||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||||||||
| dataArrayNode = node->FirstChildElement("DataArray"); | ||||||||||||||||||||||||||||||||
| for (; dataArrayNode; | ||||||||||||||||||||||||||||||||
| dataArrayNode = dataArrayNode->NextSiblingElement("DataArray")) | ||||||||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||||||||
| dataArrayElement = dataArrayNode->ToElement(); | ||||||||||||||||||||||||||||||||
| checkError(dataArrayElement); | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| const string currentDataArrayName = string(dataArrayElement->Attribute("Name")); | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| BaseVTKDataIO* pointdata = loadDataArray(dataArrayElement, numberOfPoints); | ||||||||||||||||||||||||||||||||
| checkError(pointdata); | ||||||||||||||||||||||||||||||||
| pointdata->name = currentDataArrayName; | ||||||||||||||||||||||||||||||||
| inputPointDataVector.push_back(pointdata); | ||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||
| //if (currentNodeName.compare("PolyData") == 0) | ||||||||||||||||||||||||||||||||
| //{ | ||||||||||||||||||||||||||||||||
| // dataArrayNode = node->FirstChildElement("DataArray"); | ||||||||||||||||||||||||||||||||
| // for (; dataArrayNode; | ||||||||||||||||||||||||||||||||
| // dataArrayNode = dataArrayNode->NextSiblingElement("DataArray")) | ||||||||||||||||||||||||||||||||
| // { | ||||||||||||||||||||||||||||||||
| // dataArrayElement = dataArrayNode->ToElement(); | ||||||||||||||||||||||||||||||||
| // checkError(dataArrayElement); | ||||||||||||||||||||||||||||||||
| // const string currentDataArrayName = string(dataArrayElement->Attribute("Name")); | ||||||||||||||||||||||||||||||||
| // BaseVTKDataIO* celldata = loadDataArray(dataArrayElement, numberOfCells); | ||||||||||||||||||||||||||||||||
| // checkError(celldata); | ||||||||||||||||||||||||||||||||
| // celldata->name = currentDataArrayName; | ||||||||||||||||||||||||||||||||
| // inputCellDataVector.push_back(celldata); | ||||||||||||||||||||||||||||||||
| // } | ||||||||||||||||||||||||||||||||
| //} | ||||||||||||||||||||||||||||||||
|
Comment on lines
+1482
to
+1496
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| return true; | ||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| bool XMLVTKReader::loadRectilinearGrid(tinyxml2::XMLHandle datasetFormatHandle) | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.