Mantid
Loading...
Searching...
No Matches
SaveSampleEnvironmentAndShape.h
Go to the documentation of this file.
1// Mantid Repository : https://github.com/mantidproject/mantid
2//
3// Copyright © 2019 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#pragma once
8
10#include "MantidDataHandling/DllConfig.h"
12#include "MantidKernel/Matrix.h"
13
14namespace Mantid {
15namespace Geometry {
16class MeshObject;
17class IObject;
18} // namespace Geometry
19namespace DataHandling {
23class MANTID_DATAHANDLING_DLL SaveSampleEnvironmentAndShape : public Mantid::API::Algorithm {
24public:
26 const std::string name() const override { return "SaveSampleEnvironmentAndShape"; }
28 const std::string summary() const override {
29 return "The algorithm saves the environment and sample shape from the "
30 "instrument of a "
31 "workspace. ";
32 }
34 int version() const override { return 1; }
36 const std::vector<std::string> seeAlso() const override {
37 return {"LoadSampleEnvironment", "SetSampleMaterial", "LoadSampleShape"};
38 }
40 const std::string category() const override { return "DataHandling\\Instrument"; }
41
42private:
43 // Implement abstract Algorithm methods
44 void init() override;
45 void exec() override;
46
47 void addMeshToVector(const Mantid::Geometry::MeshObject &mesh);
48 size_t addMeshToVector(const Mantid::Geometry::MeshObject &mesh, size_t offset);
49 void mergeSampleEnvironmentIntoSingleMesh(const Mantid::Geometry::MeshObject &sample,
50 const std::vector<const Geometry::MeshObject *> &environmentPieces);
51
52 std::vector<Kernel::V3D> m_vertices;
53 std::vector<uint32_t> m_triangle;
54};
56} // end namespace DataHandling
57} // namespace Mantid
Base class from which all concrete algorithm classes should be derived.
Definition: Algorithm.h:85
Save the Shape of the sample and environment into a single binary .stl file.
const std::string summary() const override
Summary of algorithms purpose.
const std::vector< std::string > seeAlso() const override
Related algorithms.
const std::string name() const override
Algorithm's name for identification overriding a virtual method.
const std::string category() const override
Algorithm's category for identification overriding a virtual method.
int version() const override
Algorithm's version for identification overriding a virtual method.
IObject : Interface for geometry objects.
Definition: IObject.h:41
Triangular Mesh Object.
Definition: MeshObject.h:50
const Mantid::Geometry::MeshObject & toMeshObject(const Mantid::Geometry::IObject &object)
Function to convert an IObject to a mesh, and throw if this can't be done.
Helper class which provides the Collimation Length for SANS instruments.