Set Crop Region for 3D Views

Hi everyone,

I have made a script that creates 3D views with an offset and a template for all the rooms of a project.
It works fine, but the only problem is that when a big curtain wall partly belongs to the room cropbox, the crop region of the view take this element into account, even if it is not visible. Then, the zoom of the view is not entirely focused on the room.

Here is the created view, one cant see the curtain wall because of the cropxbox

But when one put the mouse above this wall, we can see it is there and it is the reason why the crop region is so big

Then, I have been focusing on changing the Crop Region boundaries in my script to make them match the room only and to have a nice zoom on the room only.

The 2 nodes from Rhythm and MEPOver (View.SetCropRegion and View.SetCropBoxCurves) packages do not seem to work with 3D views properly…
And finally the node from archi-lab Views.SetCropxBox gives a result and modifies my crop region, but I can’t figure out the right way to match my room. I get a result like below most of the time, with a modified crop region but in the wrong spot:

Thanks to @T_Pover and @john_pierson for their answers on their packages,
if @Konrad_K_Sobon or anyone else has an idea about how I could use his node in the correct way it would be awesooooome !

Kinda old, but may help you get on the path. Try to create 3D crop view from linked rooms, but the nodes returns "null" - #5 by truevis

Thanks for the answer Sean, but actually my crop box is really fine :slight_smile:
We might not see it on the picture but it just exactly around these walls :image (we can see the green dotted lines).

But because of the curtain wall crossing this box, the crop region of the view is too wide. Then I need to change the crop region :slight_smile:

Is it clear ? :slight_smile: I know it is a bit confusing !

I found a solution, kind of a workaroung after having digged in the revit API :slight_smile:
After having created all my room 3D views thanks to their bounding box, I resized the crop region with archi-lab node Views.SetCropBox image with a scaled bounding box for each room (like 5m more). Then it makes the crop region in the wrong place but with the right dimensions. And then I used Rhythm node View.GetCropRegionElement image to get the crop region. And finally I used a Python script to with the property Element.Location and the method Location.Move to move this crop region.
To get the right vector to move this CropRegion Element I projected the room center point to the 3D view plane, and created a vector between the middle of the current crop region and this point.
It works fine !

I attach a picture of the script, before the blue group it just about creating the room 3D view, and after it is about setting the crop regions correctly.

Dont hesitate to ask questions :slight_smile:Room 3D view.dyn (128.7 KB)

1 Like