xbim distances between elements in a non axis aligned system

68 views Asked by At

Question on the first answer about collision detection How do I determine whether a 3D coordinate is located within the boundaries of a 3D object in BIM? I'm using Xbim working with IFC-files

In the answer is talked about (axis aligned) bounding box comparison, eventually with use of OctTree. What about a model with a duct system (flow elements 100 meter >) with a kind of elevation or not modeled following the axis XYZ? BB is unreliable in that case. In the second link, XbimSpatialAnalyser.cs, it is unclear for me howto finalize the search after a BB detection occurred. I can retrieve all kinds of info from the model like Matrix3D, faces, verticals but don't know how to use this to calculate distances from point to nearest duct for example. Some advise where to look for knowledge would be great.

I tried a lot of examples

1

There are 1 answers

0
Andy Ward On

Spatial partitioning is a complex area. The example of ducting is a good one - it's about efficiently decomposing the Flow element into its multiple constituent geometry primitives. In reality a 100m duct is going to be multiple distinct IFC elements (DuctSegments, DuctFittings, AirTerminals etc).

Duct System A duct system One Segment One segment in a duct

Segment Mesh/Brep That's actually a single mesh, but you can imagine that determining if it intersects with something is an expensive operation vs an Bounding box.

If we look at the attached Air Terminal it's made of two primitive shapes: enter image description here enter image description here enter image description here enter image description here

AABB OctTrees etc are often a data structure used to determine candidates for clash checking (which is an expensive operation if using the low level Boolean operations against these geometry primitives).

Advice for where to look for more knowledge:

If you want to do IFC clash detection with xbim I should say we have a private Clash library we offer as well as a cloud service that does clash (under a commercial licence). It turns clash into a simple call like this:

IEnumerable<CollisionDetectionResult> collisionResults =  await xbimFlexFlow.GeometryUtils
              .GetDetectedCollisionsAsync<IIfcWall, IIfcFlowSegment>(ifcFilePath);

(along with some more sophisticated filtering overloads)

Go to https://xbim.net if that's appropriate.