Own iterator geometry results

Return independent geometry copies with unique ownership, preserve parent lifetimes, and teach the Python wrapper to own derived results. Keep serializer inputs non-owning and replace Collada's deferred object with copied triangulation elements.\n\nGenerated with the assistance of an AI coding tool.
This commit is contained in:
Thomas Krijnen
2026-08-08 15:18:51 +02:00
parent c30841aad6
commit 4e49b640a7
14 changed files with 134 additions and 134 deletions
+6 -5
View File
@@ -44,7 +44,7 @@
* at least a single representation will process successfully *
* *
* ifcopenshell::geom::iterator::get() *
* returns a pointer to the current ifcopenshell::geom::element *
* returns an owned copy of the current ifcopenshell::geom::element *
* *
* ifcopenshell::geom::iterator::next() *
* returns true iff a following entity is available for a successive call to *
@@ -291,15 +291,16 @@ namespace ifcopenshell::geom {
express::base next();
/// Gets the representation of the current geometrical entity.
element* get();
std::unique_ptr<element> get();
/// Gets the native (Open Cascade or CGAL) representation of the current geometrical entity.
brep_element* get_native()
std::unique_ptr<brep_element> get_native()
{
return *native_task_result_iterator_;
validate_iterator_state();
return std::make_unique<brep_element>(**native_task_result_iterator_);
}
const element* get_object(int id);
std::unique_ptr<element> get_object(int id);
express::base create();
};