Mantid
Loading...
Searching...
No Matches
SaveStl.h
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#pragma once
8
9#include <utility>
10
11#include <utility>
12
15#include "MantidKernel/Logger.h"
16#include "MantidKernel/V3D.h"
17
18namespace Mantid {
19namespace Geometry {
20class MeshObject;
21}
22namespace DataHandling {
23enum class ScaleUnits;
30class MANTID_DATAHANDLING_DLL SaveStl : public MeshFileIO {
31public:
32 SaveStl(const std::string &filename, const std::vector<uint32_t> &triangle, std::vector<Kernel::V3D> vertices,
33 ScaleUnits scaleType)
34 : MeshFileIO(scaleType, triangle, std::move(std::move(vertices))), m_filename(filename) {}
35
36 void writeStl();
37
38private:
39 const std::string m_filename;
40 void writeHeader(Kernel::BinaryStreamWriter streamWriter);
41 void writeTriangle(Kernel::BinaryStreamWriter streamWriter, uint32_t triangle);
42};
43
44} // namespace DataHandling
45} // namespace Mantid
Class to contain functionality for writing out STL files for SaveShapeAndEnvironment.
Definition: SaveStl.h:30
SaveStl(const std::string &filename, const std::vector< uint32_t > &triangle, std::vector< Kernel::V3D > vertices, ScaleUnits scaleType)
Definition: SaveStl.h:32
const std::string m_filename
Definition: SaveStl.h:39
Assists with writing a binary file by providing standard overloads for the ostream operators (<<) to ...
Helper class which provides the Collimation Length for SANS instruments.
STL namespace.