SectionBox intersect with other elements

SectionBox intersect with other elements

Ning_Zhou
Advocate Advocate
849 Views
5 Replies
Message 1 of 6

SectionBox intersect with other elements

Ning_Zhou
Advocate
Advocate

is there a way to get intersection point between "4 edges" of SectionBox, and other elements, say a lined based family instance, or simply a model curve?

 

seems SectionBox don't have any geometry info., the only useful workaround is BoundingBoxXYZ, but again, how can you get "4 edges" of BoundingBoxXYZ?

 

any hint will be very much appreciated.

0 Likes
Accepted solutions (2)
850 Views
5 Replies
Replies (5)
Message 2 of 6

Ning_Zhou
Advocate
Advocate
just find that section box on specific view cannot be retrieved correctly using the following code, if there're multiple 3D views w/ section box on:
List<Element> sbs = new FilteredElementCollector(doc, v3d.Id).OfCategory(BuiltInCategory.OST_Section).ToList();

seems that v3d.Id filter doesn't make any difference!? so how can you get specific section box on specific view?

i'm still using 2014.
0 Likes
Message 3 of 6

Ning_Zhou
Advocate
Advocate
well, seems section box can be directly retrieved from 3d view, overthinking again!
0 Likes
Message 4 of 6

Joe.Ye
Alumni
Alumni
Accepted solution

 

Hi Ning,

 

BoundingBoxXYZ.Max and BoundingBoxXYZ.Min can return the maximum and minimum points coordinates of the box.

And then you can compose the 4 edges's curve from the above two coordinates.

 

 

 



Joe Ye
Contractor
Developer Technical Services
Autodesk Developer Network
0 Likes
Message 5 of 6

jeremytammik
Autodesk
Autodesk
Accepted solution

Hi Ning,

 

Shall we consider this resolved for the moment, then?

 

Can you start a new thread if anything else crops up?

 

Thank you!

 

Cheers,

 

Jeremy



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

0 Likes
Message 6 of 6

Ning_Zhou
Advocate
Advocate
thanks Joe, that's what i'm going to use for now even though i'm not quite sure the case of rotated section box.
0 Likes