Mantid
Loading...
Searching...
No Matches
Framework
PythonInterface
mantid
geometry
src
Exports
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 +
7
#include "
MantidGeometry/Rendering/ShapeInfo.h
"
8
#include <boost/python/class.hpp>
9
#include <boost/python/enum.hpp>
10
11
using
Mantid::Geometry::detail::ShapeInfo
;
12
using namespace
boost::python
;
13
14
void
export_ShapeInfo
() {
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
}
export_ShapeInfo
void export_ShapeInfo()
Definition
ShapeInfo.cpp:14
ShapeInfo.h
Mantid::Geometry::detail::ShapeInfo
Definition
ShapeInfo.h:26
Mantid::Geometry::detail::ShapeInfo::GeometryShape::NOSHAPE
@ NOSHAPE
Mantid::Geometry::detail::ShapeInfo::GeometryShape::SPHERE
@ SPHERE
SPHERE.
Mantid::Geometry::detail::ShapeInfo::GeometryShape::HEXAHEDRON
@ HEXAHEDRON
HEXAHEDRON.
Mantid::Geometry::detail::ShapeInfo::GeometryShape::CONE
@ CONE
CONE.
Mantid::Geometry::detail::ShapeInfo::GeometryShape::CUBOID
@ CUBOID
CUBOID.
Mantid::Geometry::detail::ShapeInfo::GeometryShape::CYLINDER
@ CYLINDER
CYLINDER.
Mantid::Geometry::detail::ShapeInfo::GeometryShape::HOLLOWCYLINDER
@ HOLLOWCYLINDER
HOLLOW CYLINDER.
Mantid::Geometry::detail::ShapeInfo::shape
GeometryShape shape() const
Definition
ShapeInfo.cpp:27
Mantid::Geometry::detail::ShapeInfo::innerRadius
double innerRadius() const
Definition
ShapeInfo.cpp:25
Mantid::Geometry::detail::ShapeInfo::height
double height() const
Definition
ShapeInfo.cpp:23
Mantid::Geometry::detail::ShapeInfo::radius
double radius() const
Definition
ShapeInfo.cpp:21
boost::python
Definition
NDArray.h:50
Generated by
1.9.8