Fix retrieval of native element

This commit is contained in:
Thomas Krijnen
2023-03-31 12:23:31 +02:00
parent 442ba56972
commit ab99a0486d
+3 -11
View File
@@ -602,10 +602,7 @@ namespace IfcGeom {
/// Gets the representation of the current geometrical entity. /// Gets the representation of the current geometrical entity.
Element* get() Element* get()
{ {
// TODO: Test settings and throw auto ret = *task_result_iterator_;
Element* ret = 0;
ret = *task_result_iterator_;
// If we want to organize the element considering their hierarchy // If we want to organize the element considering their hierarchy
if (settings_.get(IteratorSettings::ELEMENT_HIERARCHY)) if (settings_.get(IteratorSettings::ELEMENT_HIERARCHY))
@@ -656,15 +653,10 @@ namespace IfcGeom {
return ret; return ret;
} }
/// Gets the native (Open Cascade) representation of the current geometrical entity. /// Gets the native (Open Cascade or CGAL) representation of the current geometrical entity.
BRepElement* get_native() BRepElement* get_native()
{ {
// TODO: Test settings and throw return *native_task_result_iterator_;
if (num_threads_ != 1) {
return *native_task_result_iterator_;
} else {
return current_shape_model;
}
} }
const Element* get_object(int id) { const Element* get_object(int id) {