Section/Clipped View Geometry List

Section/Clipped View Geometry List

nasip13904
Participant Participant
726 Views
5 Replies
Message 1 of 6

Section/Clipped View Geometry List

nasip13904
Participant
Participant

 Is there a way to get the model list which is present in section/Clipped box not whole model list which we got through oDoc.Models?

 

 

Accepted solutions (2)
727 Views
5 Replies
Replies (5)
Message 2 of 6

timw3333
Contributor
Contributor
Accepted solution

Get JSon text of current clipping box using GetClippingPlanes API. Then define new BoundingBox (oBox).
LINQ search will be something like this (though it's very slow)

 

items = From item In Search.FindAll(oDoc, False) Where item.BoundingBox.Intersects(oBox)

 

 

0 Likes
Message 3 of 6

nasip13904
Participant
Participant

Box Section provides the oriented box value, I understand that but how do I do with just the planes section, as those do not provide any bounding box?

0 Likes
Message 4 of 6

timw3333
Contributor
Contributor
Accepted solution

Define section plane as LcLPlane3f (oPlane)
LINQ search must be something like this;

        items = From item In Search.FindAll(oDoc, False) Where (item.BoundingBox.Contains(oPlane.ClosestPoint(item.BoundingBox.Center)) OrElse oPlane.GetNormal.Dot(item.BoundingBox.Center - oPlane.ClosestPoint(item.BoundingBox.Center)) > 0)

 

0 Likes
Message 5 of 6

alexisDVJML
Collaborator
Collaborator

Since I think this will first build a list of ALL items in the model before applying the LINQ filter, I wonder how long such search would take on even a reasonably sized model?
Interested since this is kind of useful feature

Main Scientist, Full Stack Developer & When Time Permits Director of IDIGO ► On your marks, Set, Go
0 Likes
Message 6 of 6

timw3333
Contributor
Contributor

I'm working plant engineering/construction. Model data file size is several GB.
So LINQ filter to whole model data is not practical at all.
I always use Property filter first to limit the number of target elements before applying LINQ filter.

0 Likes