Set Crop box curves around wall element

Hi,

Trying to set new crop box curves around elevated curtain walls. Offset from these walls. But firstly just around the outside of the curtain wall element. I dont understand how the Boundingbox.PerimeterCurvesOnPlane works yet. Is there a way to extract the curves from a curtain wall using the Element.BoundingBox and use them to set crop box curves? Using the view plane with BoundingBox.PerimeterCruvesOnPlane seemed to make sense to me but that didnt work.

1 Like

https://www.linkedin.com/pulse/methods-fitting-crop-region-elements-revit-using-dynamo-ashwin-kumar-

Did something similar for work.

One method could be to convert an offset polycurve to a surface by patch, then get the permeter curves.
Step one (not pictured) was just selecting the wall face, but a “perimeter” could be obtained through other means.
Does this help?

1 Like

awesome! never saw View.setcropRegion node! Works great setting the crop region around the curtain wall element. However the View.ResizeCropBox isnt working. Just stuffs up the nicely set up element crop views instead of expanding them. Seems to change the far clip offset drastically too

2 Likes

How do I turn the wall into a surface?

try the second method oiffsetting the curve the and then setting curves as crop region bypassing the last step

1 Like

it seems the depth of the bounding box wil be the view range of the crop region

1 Like

A simple way would be to extract the faces, sort them by area and get the largest.
This step could also be applied to extracting bounding box faces :wink:
image

Should work ok for non-rectangular panels also.
image

1 Like

cant get the element faces for some reason…

image

Odd, try getting the geometry then getting the faces from that?

Thanks so much @Ewan_Opie!!!

image

Create Element View is in the BIM4Struc package

Element View Generation Walls2.dyn (38.6 KB)

1 Like

Thanks, can you modify this for elevations?

You wouldn’t know why this one view is at a 90 degree angle would you? Because the area of the curtain wall is small so its picking up another face? There a way to narrow the box? I don’t really know what I’m talking about

image

You may be correct with the area sizing being the same, hence the wrong crop lines. You could filter the faces by their normals to get the correct orientation needed?

I’m sorry I dont know how to do this, not sure what "normals’ are. I wish Element.Faces worked…

I’ve attached example below if you don’t mind helping at all. Or possibly an example?

Filter Faces.dyn (111.3 KB)

Example.rvt (2.8 MB)

Will have a look when I am back at the PC in the morning :+1:

1 Like

Thanks man, you pointed me in the right direction and I’ve managed to solve my own issue. All seems to be working now…

image

1 Like