/* OCP.IGESData — the IGES model's global section. Not imported by the app, but reached through it: the unit probe walks reader.IGESModel().GlobalSection().UnitName(), so both classes need to be registered for that chain to convert. Only the two unit accessors are bound. UnitName hands back a Handle(TCollection_HAsciiString), which is why that transient is registered here too rather than in mod_TCollection.cpp — it has no other consumer. */ #include "../common/occt_module.h" #include "../common/occt_policies.h" #include #include #include void register_IGESData(nb::module_ &root) { nb::module_ m = ocp_submodule(root, "IGESData"); nb::class_( m, "TCollection_HAsciiString") .def("ToCString", &TCollection_HAsciiString::ToCString) .def("Length", &TCollection_HAsciiString::Length) .def("__str__", &TCollection_HAsciiString::ToCString); nb::class_(m, "IGESData_GlobalSection") .def(nb::init<>()) .def("UnitName", &IGESData_GlobalSection::UnitName) .def("UnitValue", &IGESData_GlobalSection::UnitValue); nb::class_(m, "IGESData_IGESModel") .def("GlobalSection", &IGESData_IGESModel::GlobalSection, OCP_RETURN_COPY); }