8#include <boost/python/class.hpp>
9#include <boost/python/dict.hpp>
10#include <boost/python/enum.hpp>
16dict cylinderGeometry(
const ShapeInfo &self) {
18 PyErr_SetString(PyExc_RuntimeError,
19 "cylinderGeometry() is only valid for ShapeInfo objects with shape() == GeometryShape.CYLINDER");
20 throw boost::python::error_already_set();
25 cylGeomDict[
"axis"] = cylGeom.axis;
26 cylGeomDict[
"radius"] = cylGeom.radius;
27 cylGeomDict[
"height"] = cylGeom.height;
31dict cuboidGeometry(
const ShapeInfo &self) {
33 PyErr_SetString(PyExc_RuntimeError,
34 "cuboidGeometry() is only valid for ShapeInfo objects with shape() == GeometryShape.CUBOID");
35 throw boost::python::error_already_set();
40 cubGeomDict[
"leftFrontTop"] = cubGeom.leftFrontTop;
41 cubGeomDict[
"leftBackBottom"] = cubGeom.leftBackBottom;
42 cubGeomDict[
"rightFrontBottom"] = cubGeom.rightFrontBottom;
49 enum_<ShapeInfo::GeometryShape>(
"GeometryShape")
59 class_<ShapeInfo>(
"ShapeInfo", no_init)
60 .def(
"shape", &
ShapeInfo::shape, arg(
"self"),
"Returns the geometry shape type (GeometryShape enum).")
62 "Returns the radius for sphere, cylinder, cone or hollow cylinder.")
63 .def(
"innerRadius", &
ShapeInfo::innerRadius, arg(
"self"),
"Returns the inner radius for a hollow cylinder.")
64 .def(
"height", &
ShapeInfo::height, arg(
"self"),
"Returns the height for cylinder, cone or hollow cylinder.")
65 .def(
"cylinderGeometry", &cylinderGeometry, arg(
"self"),
66 "Returns a CylinderGeometry struct with the geometry information for a cylinder shape. Only valid if "
67 "shape() returns GeometryShape.CYLINDER.")
68 .def(
"cuboidGeometry", &cuboidGeometry, arg(
"self"),
69 "Returns a CuboidGeometry struct with the geometry information for a cuboid shape. Only valid if shape() "
70 "returns GeometryShape.CUBOID.");
@ HOLLOWCYLINDER
HOLLOW CYLINDER.
GeometryShape shape() const
double innerRadius() const
CylinderGeometry cylinderGeometry() const
CuboidGeometry cuboidGeometry() const
const Kernel::V3D & leftFrontBottom
const Kernel::V3D & centreOfBottomBase