Skip to content

Commit

Permalink
BUG: Fix Quick Surface Mesh Crashing bug
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Jackson <mike.jackson@bluequartz.net>
  • Loading branch information
imikejackson committed Apr 7, 2023
1 parent f6ca211 commit b0b1625
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,20 @@ The developers of DREAM.3D maintain a pair of Google Groups for discussions on t

[DREAM.3D Developers List](https://groups.google.com/forum/?hl=en#!forum/dream3d-developers)

## Version 6.5.171 ##

## Version 6.5.XX ##
## Version 6.5.171 ##

### 6.5.XX Fixed DREAM3D Issues ###
### 6.5.171 Fixed DREAM3D Issues ###

+ Adjusted segmentation algorithm in AlignSectionsMutualInformation to remove the random seed value generation. We just start in the 0,0 position and start looking for a viable voxel.
+ Fixed issue validating mu values in `GeneratePrimaryStatsData` filter
+ Fixed crash if user changes phase name in `GeneratePrimaryStatsData` filter
+ Fixed issue in QuickSurfaceMesh which caused a crash for certain microstructures.

### SIMPL Changes ###



## Version 6.5.168 ##

### 6.5.168 Fixed DREAM3D Issues ###
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ using EdgeMap = std::unordered_map<Edge, int64_t, EdgeHasher>;
QuickSurfaceMesh::QuickSurfaceMesh()
: m_SelectedDataArrayPaths(QVector<DataArrayPath>())
, m_SurfaceDataContainerName(SIMPL::Defaults::TriangleDataContainerName)
, m_TripleLineDataContainerName("TripleLines")
//, m_TripleLineDataContainerName("TripleLines")
, m_VertexAttributeMatrixName(SIMPL::Defaults::VertexAttributeMatrixName)
, m_FaceAttributeMatrixName(SIMPL::Defaults::FaceAttributeMatrixName)
, m_FeatureIdsArrayPath(SIMPL::Defaults::ImageDataContainerName, SIMPL::Defaults::CellAttributeMatrixName, SIMPL::CellData::FeatureIds)
Expand Down Expand Up @@ -1572,11 +1572,11 @@ void QuickSurfaceMesh::execute()
{
return;
}
DataContainer::Pointer tripleLineDC = getDataContainerArray()->getDataContainer(getTripleLineDataContainerName());
if(getErrorCondition() < 0)
{
return;
}
// DataContainer::Pointer tripleLineDC = getDataContainerArray()->getDataContainer(getTripleLineDataContainerName());
// if(getErrorCondition() < 0)
// {
// return;
// }
IGeometryGrid::Pointer grid = m->getGeometryAs<IGeometryGrid>();

size_t udims[3] = {0, 0, 0};
Expand Down Expand Up @@ -1611,12 +1611,13 @@ void QuickSurfaceMesh::execute()

createNodesAndTriangles(m_NodeIds, nodeCount, triangleCount);

#if 0
int64_t* triangle = triangleGeom->getTriPointer(0);

FloatArrayType::Pointer vertices = triangleGeom->getVertices();
SharedEdgeList::Pointer edges = EdgeGeom::CreateSharedEdgeList(0);
EdgeGeom::Pointer edgeGeom = EdgeGeom::CreateGeometry(edges, vertices, SIMPL::Geometry::EdgeGeometry);
tripleLineDC->setGeometry(edgeGeom);
// SharedEdgeList::Pointer edges = EdgeGeom::CreateSharedEdgeList(0);
// EdgeGeom::Pointer edgeGeom = EdgeGeom::CreateGeometry(edges, vertices, SIMPL::Geometry::EdgeGeometry);
// tripleLineDC->setGeometry(edgeGeom);

int64_t edgeCount = 0;
for(int64_t i = 0; i < triangleCount; i++)
Expand Down Expand Up @@ -1665,8 +1666,9 @@ void QuickSurfaceMesh::execute()
edgeCount++;
}
}
#endif
}

#if 0
// -----------------------------------------------------------------------------
//
// -----------------------------------------------------------------------------
Expand Down Expand Up @@ -1885,6 +1887,7 @@ void QuickSurfaceMesh::generateTripleLines()
dca->addDataContainer(dc);
dc->setGeometry(tripleLineEdge);
}
#endif

// -----------------------------------------------------------------------------
//
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ class SurfaceMeshing_EXPORT QuickSurfaceMesh : public AbstractFilter
SIMPL_FILTER_PARAMETER(QString, SurfaceDataContainerName)
Q_PROPERTY(QString SurfaceDataContainerName READ getSurfaceDataContainerName WRITE setSurfaceDataContainerName)

SIMPL_FILTER_PARAMETER(QString, TripleLineDataContainerName)
Q_PROPERTY(QString TripleLineDataContainerName READ getTripleLineDataContainerName WRITE setTripleLineDataContainerName)
// SIMPL_FILTER_PARAMETER(QString, TripleLineDataContainerName)
// Q_PROPERTY(QString TripleLineDataContainerName READ getTripleLineDataContainerName WRITE setTripleLineDataContainerName)

SIMPL_FILTER_PARAMETER(QString, VertexAttributeMatrixName)
Q_PROPERTY(QString VertexAttributeMatrixName READ getVertexAttributeMatrixName WRITE setVertexAttributeMatrixName)
Expand Down Expand Up @@ -233,10 +233,12 @@ class SurfaceMeshing_EXPORT QuickSurfaceMesh : public AbstractFilter
*/
void updateVertexInstancePointers();

#if 0
/**
* @brief generateTripleLines
*/
void generateTripleLines();
#endif

public:
QuickSurfaceMesh(const QuickSurfaceMesh&) = delete; // Copy Constructor Not Implemented
Expand Down

0 comments on commit b0b1625

Please sign in to comment.