mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-09 13:52:23 +00:00
Make Base::data() private, file::add(..., id)
This commit is contained in:
@@ -864,7 +864,7 @@ struct ShapeRTTI : public boost::static_visitor<PyObject*>
|
||||
|
||||
template <typename Schema>
|
||||
static std::variant<IfcGeom::Element*, IfcGeom::Representation::Representation*, IfcGeom::Transformation*> helper_fn_create_shape(const std::string& geometry_library, ifcopenshell::geometry::Settings& st, const express::Base& instance, const express::Base& representation = express::Base()) {
|
||||
IfcParse::IfcFile* file = instance.data()->file();
|
||||
IfcParse::IfcFile* file = instance.file();
|
||||
|
||||
ifcopenshell::geometry::Converter kernel(ifcopenshell::geometry::kernels::construct(file, geometry_library, st), file, st);
|
||||
|
||||
@@ -1034,7 +1034,7 @@ ifcopenshell::geometry::taxonomy::item::ptr try_upcast(PyObject* obj0, swig_type
|
||||
|
||||
%inline %{
|
||||
ifcopenshell::geometry::taxonomy::item::ptr map_shape(ifcopenshell::geometry::Settings& settings, const express::Base& instance) {
|
||||
std::unique_ptr<ifcopenshell::geometry::abstract_mapping> mapping(ifcopenshell::geometry::impl::mapping_implementations().construct(instance.data()->file(), settings));
|
||||
std::unique_ptr<ifcopenshell::geometry::abstract_mapping> mapping(ifcopenshell::geometry::impl::mapping_implementations().construct(instance.file(), settings));
|
||||
return mapping->map(instance);
|
||||
}
|
||||
%}
|
||||
|
||||
@@ -1,21 +1,3 @@
|
||||
%typemap(out) aggregate_of_instance::ptr {
|
||||
const unsigned size = $1 ? $1->size() : 0;
|
||||
$result = PyTuple_New(size);
|
||||
for (unsigned i = 0; i < size; ++i) {
|
||||
PyTuple_SetItem($result, i, pythonize((*$1)[i]));
|
||||
}
|
||||
}
|
||||
|
||||
%typemap(out) aggregate_of_aggregate_of_instance::ptr {
|
||||
const unsigned size = $1 ? $1->size() : 0;
|
||||
$result = PyTuple_New(size);
|
||||
for (unsigned i = 0; i < size; ++i) {
|
||||
const auto& r_i = *(result->begin() + i);
|
||||
PyTuple_SetItem($result, i, pythonize_vector(r_i));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
%typemap(out) IfcUtil::ArgumentType {
|
||||
$result = SWIG_Python_str_FromChar(IfcUtil::ArgumentTypeToString($1));
|
||||
}
|
||||
@@ -97,6 +79,7 @@
|
||||
}
|
||||
%enddef
|
||||
|
||||
CREATE_VECTOR_TYPEMAP_OUT(express::Base)
|
||||
CREATE_VECTOR_TYPEMAP_OUT(bool)
|
||||
CREATE_VECTOR_TYPEMAP_OUT(int)
|
||||
CREATE_VECTOR_TYPEMAP_OUT(unsigned int)
|
||||
|
||||
Reference in New Issue
Block a user