Mantid
Loading...
Searching...
No Matches
ShapeInfo.cpp
Go to the documentation of this file.
1// Mantid Repository : https://github.com/mantidproject/mantid
2//
3// Copyright © 2026 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 +
8#include <boost/python/class.hpp>
9#include <boost/python/enum.hpp>
10
12using namespace boost::python;
13
15 enum_<ShapeInfo::GeometryShape>("GeometryShape")
16 .value("NOSHAPE", ShapeInfo::GeometryShape::NOSHAPE)
17 .value("CUBOID", ShapeInfo::GeometryShape::CUBOID)
18 .value("HEXAHEDRON", ShapeInfo::GeometryShape::HEXAHEDRON)
19 .value("SPHERE", ShapeInfo::GeometryShape::SPHERE)
20 .value("CYLINDER", ShapeInfo::GeometryShape::CYLINDER)
21 .value("CONE", ShapeInfo::GeometryShape::CONE)
22 .value("HOLLOWCYLINDER", ShapeInfo::GeometryShape::HOLLOWCYLINDER)
23 .export_values();
24
25 class_<ShapeInfo>("ShapeInfo", no_init)
26 .def("shape", &ShapeInfo::shape, arg("self"), "Returns the geometry shape type (GeometryShape enum).")
27 .def("radius", &ShapeInfo::radius, arg("self"),
28 "Returns the radius for sphere, cylinder, cone or hollow cylinder.")
29 .def("innerRadius", &ShapeInfo::innerRadius, arg("self"), "Returns the inner radius for a hollow cylinder.")
30 .def("height", &ShapeInfo::height, arg("self"), "Returns the height for cylinder, cone or hollow cylinder.");
31}
void export_ShapeInfo()
Definition ShapeInfo.cpp:14