Mantid
Loading...
Searching...
No Matches
Framework
DataHandling
src
LoadStl.cpp
Go to the documentation of this file.
1
// Mantid Repository : https://github.com/mantidproject/mantid
2
//
3
// Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI,
4
// NScD Oak Ridge National Laboratory, European Spallation Source,
5
// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS
6
// SPDX - License - Identifier: GPL - 3.0 +
7
#include "
MantidDataHandling/LoadStl.h
"
8
#include "
MantidKernel/V3D.h
"
9
#include <functional>
10
11
namespace
Mantid::DataHandling
{
12
13
bool
LoadStl::areEqualVertices
(
Kernel::V3D
const
&v1,
Kernel::V3D
const
&v2)
const
{
14
const
Kernel::V3D
diff = v1 - v2;
15
const
double
nanoMetre = 1e-9;
16
return
diff.
norm
() < nanoMetre;
// This is 1 nanometre for a unit of a metre.
17
}
18
19
void
LoadStl::changeToVector
() {
20
m_vertices
.resize(
vertexSet
.size());
21
for
(
auto
const
&mapValue :
vertexSet
) {
22
m_vertices
[mapValue.second] = mapValue.first;
23
}
24
}
25
26
}
// namespace Mantid::DataHandling
LoadStl.h
V3D.h
Mantid::DataHandling::LoadStl::areEqualVertices
bool areEqualVertices(Kernel::V3D const &v1, Kernel::V3D const &v2) const
Definition
LoadStl.cpp:13
Mantid::DataHandling::LoadStl::changeToVector
void changeToVector()
Definition
LoadStl.cpp:19
Mantid::DataHandling::LoadStl::vertexSet
std::unordered_set< std::pair< Kernel::V3D, uint32_t >, HashV3DPair, V3DTrueComparator > vertexSet
Definition
LoadStl.h:63
Mantid::DataHandling::MeshFileIO::m_vertices
std::vector< Kernel::V3D > m_vertices
Definition
MeshFileIO.h:65
Mantid::Kernel::V3D
Class for 3D vectors.
Definition
V3D.h:34
Mantid::Kernel::V3D::norm
double norm() const noexcept
Definition
V3D.h:269
Mantid::DataHandling
Definition
AlignAndFocusPowderSlim.h:16
Generated by
1.9.8