Class iterator

Class Documentation

class iterator

Public Functions

inline iterator(std::unique_ptr<ifcopenshell::geom::kernels::abstract_kernel> &&geometry_library, const ifcopenshell::geom::settings &settings, ifcopenshell::file *file, const std::vector<ifcopenshell::geom::filter_function> &filters, int num_threads, ifcopenshell::logger &logger = ifcopenshell::logger::root())
inline iterator(std::unique_ptr<ifcopenshell::geom::kernels::abstract_kernel> &&geometry_library, const ifcopenshell::geom::settings &settings, ifcopenshell::file *file, ifcopenshell::logger &logger = ifcopenshell::logger::root())
inline iterator(std::unique_ptr<ifcopenshell::geom::kernels::abstract_kernel> &&geometry_library, const ifcopenshell::geom::settings &settings, ifcopenshell::file *file, int num_threads, ifcopenshell::logger &logger = ifcopenshell::logger::root())
~iterator()
inline std::vector<ifcopenshell::geom::taxonomy::item::ptr> get_task_items() const
inline std::vector<std::vector<express::base>> get_task_products() const
inline const std::string &unit_name() const
inline double unit_magnitude() const
inline bool had_error_processing_elements() const
bool initialize()

Note

  • A true return value does not guarantee successful initialization of all elements. Some elements may have failed to initialize. Check had_error_processing_elements() to see whether there were errors during the initialization.

  • For non-concurrent iterators, a false return may occur if initialization of the first element fails, even if subsequent elements could be initialized successfully.

Returns:

Returns true if the iterator is initialized with any elements, false otherwise.

void process_finished_rep(geometry_conversion_result *rep, ifcopenshell::geom::converter *kernel = nullptr)
void process_concurrently()
void compute_bounds(bool with_geometry)

Computes model’s bounding box (bounds_min and bounds_max).

Note

Can take several minutes for large files.

inline int progress() const
inline std::string getLog() const
inline ifcopenshell::file *file() const
inline const std::vector<ifcopenshell::geom::filter_function> &filters() const
inline std::vector<ifcopenshell::geom::filter_function> &filters()
inline const ifcopenshell::geom::taxonomy::point3 &bounds_min() const
inline const ifcopenshell::geom::taxonomy::point3 &bounds_max() const
express::base next()

Moves to the next shape representation, create its geometry, and returns the associated product. Use get() to retrieve the created geometry.

std::unique_ptr<element> get()

Gets the representation of the current geometrical entity.

inline std::unique_ptr<native_element> get_native()

Gets the native (Open Cascade or CGAL) representation of the current geometrical entity.

std::unique_ptr<element> get_object(int id)
express::base create()

Public Members

std::optional<bool> initialization_outcome_
size_t processed_ = 0