Skip to content

Slow to find all objects inside or near an object #3938

@Amoki

Description

@Amoki

I'm trying to fetch all objects "near" an object.
For example, all objects inside an IfcSpace and walls on its sides, or find spaces and slabs touching a wall.

I'm using geom.tree() and the select() method but if I add an extend parameter to find close objects, the process time is multiplied (from milliseconds to seconds per object).

if ifc_object.is_a("IfcProduct"):
   nearby_instances = [
       i.GlobalId for i in ifcwrap_bvh.select(ifc_object, extend=1.1)
   ]

Is this the right way to do it or am I in the wrong direction?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions