-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
BUG: Fixes issue where any component shape was allowed for ComputeTri…
…angleGeometrySizes (#1134) * BUG: Fixes issue where any component shape were allowed for ComputeTriangleGeometrySizes.cpp * Fix all instances of "Face Labels" are only allowed to use 2 component input arrays * ComputeTriangleGeomVolumes - fix possible walking off the end of the array. A negative value for the face label when used as an index will cast into an unsigned value and bad things are going to happen. * BUG: Fixes negative volumes produced from calculations --------- Signed-off-by: Michael Jackson <[email protected]>
- Loading branch information
1 parent
b358403
commit f36ca6c
Showing
16 changed files
with
123 additions
and
114 deletions.
There are no files selected for viewing
This file contains 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 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 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
50 changes: 0 additions & 50 deletions
50
src/Plugins/SimplnxCore/src/SimplnxCore/Filters/Algorithms/ComputeTriangleGeomSizes.hpp
This file was deleted.
Oops, something went wrong.
This file contains 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
45 changes: 45 additions & 0 deletions
45
src/Plugins/SimplnxCore/src/SimplnxCore/Filters/Algorithms/ComputeTriangleGeomVolumes.hpp
This file contains 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 |
---|---|---|
@@ -0,0 +1,45 @@ | ||
#pragma once | ||
|
||
#include "SimplnxCore/SimplnxCore_export.hpp" | ||
|
||
#include "simplnx/DataStructure/DataPath.hpp" | ||
#include "simplnx/DataStructure/DataStructure.hpp" | ||
#include "simplnx/Filter/IFilter.hpp" | ||
|
||
namespace nx::core | ||
{ | ||
|
||
struct SIMPLNXCORE_EXPORT ComputeTriangleGeomVolumesInputValues | ||
{ | ||
DataPath TriangleGeometryPath; | ||
DataPath FaceLabelsArrayPath; | ||
DataPath FeatureAttributeMatrixPath; | ||
DataPath VolumesArrayPath; | ||
}; | ||
|
||
/** | ||
* @class | ||
*/ | ||
class SIMPLNXCORE_EXPORT ComputeTriangleGeomVolumes | ||
{ | ||
public: | ||
ComputeTriangleGeomVolumes(DataStructure& dataStructure, const IFilter::MessageHandler& mesgHandler, const std::atomic_bool& shouldCancel, ComputeTriangleGeomVolumesInputValues* inputValues); | ||
~ComputeTriangleGeomVolumes() noexcept; | ||
|
||
ComputeTriangleGeomVolumes(const ComputeTriangleGeomVolumes&) = delete; | ||
ComputeTriangleGeomVolumes(ComputeTriangleGeomVolumes&&) noexcept = delete; | ||
ComputeTriangleGeomVolumes& operator=(const ComputeTriangleGeomVolumes&) = delete; | ||
ComputeTriangleGeomVolumes& operator=(ComputeTriangleGeomVolumes&&) noexcept = delete; | ||
|
||
Result<> operator()(); | ||
|
||
const std::atomic_bool& getCancel(); | ||
|
||
private: | ||
DataStructure& m_DataStructure; | ||
const ComputeTriangleGeomVolumesInputValues* m_InputValues = nullptr; | ||
const std::atomic_bool& m_ShouldCancel; | ||
const IFilter::MessageHandler& m_MessageHandler; | ||
}; | ||
|
||
} // namespace nx::core |
This file contains 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 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 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 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
Oops, something went wrong.