Nice technique! After that would be nice aligning a section box in the 3D view to match exactly one of these resulting bounding boxes, with the correct orientation
I believe it would be better as a different workflow given we have multiple elements here and not one to section box. Section boxes should be able to be enabled and rotated using the Genius Loci package. There is an Element.SetRotation node that should centre a box about a point.
Cheers Sean! Yes I quite like this one, and use it from time to time. I think there are probably some more complex/effective methods such as using edges of geometry to detect the mean rotation (I use that one for rooms) but this one has worked for me in most cases so far.
Nice Video! is there a way of geting the rotation of the cuboid itself? In my project I am trying to get the rotation of ifc-elements, which were not created in revit. Unfortunatly the node in your video only works for revit elements. Thanks
The best way I can think of is to get a horizontally facing edge of the cuboid (Z of direction = 0), then modulo its rotation against the Y axis against 90, of which its remainder will be its rotation.
It's on my list. I've used it before and it's great, although the best features are at enterprise level (paid). PyRevit is also another option to deploy tools to a ribbon, but Orkestra is great for package management and script distribution to an office via cloud. If your company wants to do a free approach I'd use PyRevit but if they're willing to pay I'd go Orkestra.
Thanks Gavin Can you help me for this one? I want to export all sheet to one DWG. So I move all viewports to one sheet and export it to DWG but I still can't do it .
Unfortunately Revit isn't really built to work this way, it exports one sheet at a time. All views on one sheet is more of an AutoCAD oriented way of working. If you have placed multiple viewports on a single sheet is should export the whole thing, but you should make sure that the export to external references is disabled so it exports them all as one.
Great video. Will that work with floors in which all curves were drawn at 45 degrees? It was not rotated, just drawn that way when the floor was created.
Unfortunately floors do not have the rotation property that family instances do. In that case you could rotate it by 45 degrees instead of using a rotation, or if you have multiple floors, get their edges and check their angle to the Y axis down to the lowest interval between 0 and 90 and use that as a rotation instead.
@@AussieBIMGuru Thanks for your answe, I aprreciate it! I think I'm gonna try your second suggestion, as it is intended to work with whatever angle the edges have.
Hi great video, it will very useful thanks. May I ask you how would you proceed to automatically align an element to another one using dynamo? For example aligning an plank to a rotated cube. Thanks 😊
Generally if they are revit families you would need to calculate their needed rotation and location point then use element.setlocation. It would generally take some mathematics and geometry processing to determine the required location based on the object size.
How would you turn your cuboid back to a bounding box ? I need a bounding box to turn it into a section for my 3D views by appartment. My problem is that all my appartments dont have the same orientation... I manage my plans for crop region, that's fine. But the 3D section box orientation is still anoying me Thanks for all your videos by the way, really helpful :)
@@AussieBIMGuru This node doesn't seem to work with bounding box or 3Dviews itself. I'm also trying 3DView Set Orientation by Genius Loci but it doesn't seems to work neither so far
Great video Gavin. I was trying to do it to extract bboxes faces for beams and columns... I Wonder if this script can be applied to objects with a Z axis rotation, like roof trusses.
Thanks Gavin! But there is a big deference between the BooundingBox and the Cuboid(Solid), Try to rotate BooundingBox you will get and Erreur. is there a way to Rotate the BooundingBox ?
Unfortunately the bounding box itself cant be rotated as far as I know as it's always Y axis aligned in dynamo, but a cuboid shares pretty much all the typical properties of a BB.
@@AussieBIMGuru Hi Gavin, this does present an issue as BBoxes can be intersected (clashed) with elements but Cuboids seemingly cannot. Do you know if Cuboids can be used for this function?
@@chrisedwards3272 i believe they can be intersected as solids the way other geometry can be, but not using the specific methods in the Revit API reserved for bounding boxes.
Get the bounding box face with highest z value at its centre and its corners, or you can get min/max point and build the 4 points from that then rotate them back to the element orientation.
@@PANDURANG99 deconstruct the points into their xy values. You can then use them to build the other points, for example the top left point is min X, max Y and max Z. I believe theres a rectangle by 2 points node as well if you move min up to max Z.
@@AussieBIMGuru For example we have min X ,min Y and Max X,max Y Means diagonal end points, if the rectangle is parallel to x or y then we can get easily another two points but if rectangle is tilted at some degrees then having problem to get another two points, then we have length and width of rectangle but example,we take a min point then we don't know at which side is length or width.
@@PANDURANG99 yes if the bounding box is not parallel then you would need to rotate/bound/derotate the geometry first by a rotation if known like i do in this tutorial. Revit does not support bounding boxes on angles, and does not know the rotation of elements unless they have a property that tells them the rotation.
thank you for the very helpful video again ^^ just want to verify... so the last element that was rotated about the centroid is really the cuboid of the bounding box? or is it really possible to rotate the bounding box?
There is a script at the end of this thread which shows how: forum.dynamobim.com/t/create-revit-callout/1024 You will need to generate the extents for dynamo using a rectangle in Dynamo.
Thank you, I really like your video content, I have some questions to ask like how do you use the ALT button with the list, how do I make it show automatically when I use ALT + Click Mouse. Please guide me further. Thanks
Do you mean the ribbon shortcuts? I dont tend to use them as they take too many steps to reach a final command - I usually recommend using actual shortcuts instead which can be configured and imported/exported if customized.
@@nguyenminhhieu440 oh I don't believe it can be disabled. Try checking for its shortcut in the shortcut manager maybe but not sure its assigned that way.
Bounding box by geometry would typically be the way to do this (and you if they aren't joinable as polycurve then you could bound the cuboids of their bounding boxes, joined as a solid union), but if you need the rectangle to be aligned away from the Y axis then it is much harder - and I'm not sure how that would be done. Suggest asking on Dynamo forums. Technically 3 lines could be bound in more than one way depending how they are drawn, so you might need to bound them using brute force, such as testing 360 degrees of bounding box rotation, then taking the smallest area rectangle result. I'd suggest using Grasshopper 3d for that as it is much better at planar aligned bounding boxes and is very quick at bounding.
Nice technique! After that would be nice aligning a section box in the 3D view to match exactly one of these resulting bounding boxes, with the correct orientation
I believe it would be better as a different workflow given we have multiple elements here and not one to section box. Section boxes should be able to be enabled and rotated using the Genius Loci package. There is an Element.SetRotation node that should centre a box about a point.
it reminds me PyRevit section box orientation on face ( you select the face)
It is really helpful. Thank you a lot!!!
You are welcome!
Dude, you are a genius, thank u so much!
You're welcome!
Hi Gavin, what are all these buttons to align that appear around the nodes when you select them? Thanks
These are part of the Monocle package which you can find on package manager.
Very useful graph and explanation Gavin!
Cheers Sean! Yes I quite like this one, and use it from time to time. I think there are probably some more complex/effective methods such as using edges of geometry to detect the mean rotation (I use that one for rooms) but this one has worked for me in most cases so far.
Nice Video! is there a way of geting the rotation of the cuboid itself? In my project I am trying to get the rotation of ifc-elements, which were not created in revit. Unfortunatly the node in your video only works for revit elements. Thanks
The best way I can think of is to get a horizontally facing edge of the cuboid (Z of direction = 0), then modulo its rotation against the Y axis against 90, of which its remainder will be its rotation.
Do you hear about Orkestra add-in? It would be great if you create video about it
It's on my list. I've used it before and it's great, although the best features are at enterprise level (paid). PyRevit is also another option to deploy tools to a ribbon, but Orkestra is great for package management and script distribution to an office via cloud. If your company wants to do a free approach I'd use PyRevit but if they're willing to pay I'd go Orkestra.
Thanks Gavin
Can you help me for this one? I want to export all sheet to one DWG. So I move all viewports to one sheet and export it to DWG but I still can't do it .
Unfortunately Revit isn't really built to work this way, it exports one sheet at a time. All views on one sheet is more of an AutoCAD oriented way of working. If you have placed multiple viewports on a single sheet is should export the whole thing, but you should make sure that the export to external references is disabled so it exports them all as one.
Great video. Will that work with floors in which all curves were drawn at 45 degrees? It was not rotated, just drawn that way when the floor was created.
Unfortunately floors do not have the rotation property that family instances do. In that case you could rotate it by 45 degrees instead of using a rotation, or if you have multiple floors, get their edges and check their angle to the Y axis down to the lowest interval between 0 and 90 and use that as a rotation instead.
@@AussieBIMGuru Thanks for your answe, I aprreciate it! I think I'm gonna try your second suggestion, as it is intended to work with whatever angle the edges have.
@@AussieBIMGuru Just a quick update. The second approach worked. Thank you!
Thanks
You're welcome!
Hi great video, it will very useful thanks. May I ask you how would you proceed to automatically align an element to another one using dynamo? For example aligning an plank to a rotated cube. Thanks 😊
Generally if they are revit families you would need to calculate their needed rotation and location point then use element.setlocation. It would generally take some mathematics and geometry processing to determine the required location based on the object size.
Hi, how do I get the Min and Max point of Element aligned bounding box?
Generally you would need to rotate the axis aligned points by the same angle about the bounding box centre point.
@@AussieBIMGuru Thanks for the quick reply! Appreciate your content.
How would you turn your cuboid back to a bounding box ? I need a bounding box to turn it into a section for my 3D views by appartment.
My problem is that all my appartments dont have the same orientation...
I manage my plans for crop region, that's fine. But the 3D section box orientation is still anoying me
Thanks for all your videos by the way, really helpful :)
I believe the Element.SetRotation node should be able to rotate a section box after it has been made.
@@AussieBIMGuru This node doesn't seem to work with bounding box or 3Dviews itself. I'm also trying 3DView Set Orientation by Genius Loci but it doesn't seems to work neither so far
Great video Gavin. I was trying to do it to extract bboxes faces for beams and columns... I Wonder if this script can be applied to objects with a Z axis rotation, like roof trusses.
It could be applied in such a way but the rotation would need to be measured, probably using the location line of the element against the xy plane.
@@AussieBIMGuru Gotcha!
Thanks Gavin! But there is a big deference between the BooundingBox and the Cuboid(Solid), Try to rotate BooundingBox you will get and Erreur.
is there a way to Rotate the BooundingBox ?
Unfortunately the bounding box itself cant be rotated as far as I know as it's always Y axis aligned in dynamo, but a cuboid shares pretty much all the typical properties of a BB.
@@AussieBIMGuru Hi Gavin, this does present an issue as BBoxes can be intersected (clashed) with elements but Cuboids seemingly cannot. Do you know if Cuboids can be used for this function?
@@chrisedwards3272 i believe they can be intersected as solids the way other geometry can be, but not using the specific methods in the Revit API reserved for bounding boxes.
if I want 4 coordinates of top surface , then it is the only option to get or anything else?
Get the bounding box face with highest z value at its centre and its corners, or you can get min/max point and build the 4 points from that then rotate them back to the element orientation.
Only getting min and Max point, how to get another two points,
I am drawing a rectangle and I want 4 coordinates.
@@PANDURANG99 deconstruct the points into their xy values. You can then use them to build the other points, for example the top left point is min X, max Y and max Z.
I believe theres a rectangle by 2 points node as well if you move min up to max Z.
@@AussieBIMGuru For example we have min X ,min Y and Max X,max Y
Means diagonal end points, if the rectangle is parallel to x or y then we can get easily another two points but if rectangle is tilted at some degrees then having problem to get another two points, then we have length and width of rectangle but example,we take a min point then we don't know at which side is length or width.
@@PANDURANG99 yes if the bounding box is not parallel then you would need to rotate/bound/derotate the geometry first by a rotation if known like i do in this tutorial. Revit does not support bounding boxes on angles, and does not know the rotation of elements unless they have a property that tells them the rotation.
thank you for the very helpful video again ^^ just want to verify... so the last element that was rotated about the centroid is really the cuboid of the bounding box? or is it really possible to rotate the bounding box?
In principle I don't think it is, as bounding boxes are axis aligned in dynamo.
Thanks
Can you explain how to create callout in dynamo?
There is a script at the end of this thread which shows how:
forum.dynamobim.com/t/create-revit-callout/1024
You will need to generate the extents for dynamo using a rectangle in Dynamo.
@@AussieBIMGuru
How can i reach to the script?
@@amrhariri1996 sorry it pasted wrong. Try this link.
forum.dynamobim.com/t/create-revit-callout/1024
@@AussieBIMGuru
I've read this article before... but unfortunately the node doesn't work with the structural view...
@@amrhariri1996 hrm not sure about that one myself. Maybe make a topic on dynamo forums to troubleshoot your script.
Thank you, I really like your video content, I have some questions to ask like how do you use the ALT button with the list, how do I make it show automatically when I use ALT + Click Mouse. Please guide me further. Thanks
Do you mean the ribbon shortcuts? I dont tend to use them as they take too many steps to reach a final command - I usually recommend using actual shortcuts instead which can be configured and imported/exported if customized.
@@AussieBIMGuru thank you, but can you guide me, i would love to learn to disable that command - ALT + Click Left mouse
@@nguyenminhhieu440 oh I don't believe it can be disabled. Try checking for its shortcut in the shortcut manager maybe but not sure its assigned that way.
@@AussieBIMGuru Where is its shortcut, can you show me?
@@nguyenminhhieu440 the keyboard shortcut editor is rightmost on the view tab
Awesome! (or in this case, AUSsome)
Thanks, and a good pun never goes unappreciated by me!
Dear Sir,
I have question.
I want to bound 3 lines by rectangle, try many ways but no hope.
Could you help me some guide?
Many thanks.
Bounding box by geometry would typically be the way to do this (and you if they aren't joinable as polycurve then you could bound the cuboids of their bounding boxes, joined as a solid union), but if you need the rectangle to be aligned away from the Y axis then it is much harder - and I'm not sure how that would be done. Suggest asking on Dynamo forums. Technically 3 lines could be bound in more than one way depending how they are drawn, so you might need to bound them using brute force, such as testing 360 degrees of bounding box rotation, then taking the smallest area rectangle result. I'd suggest using Grasshopper 3d for that as it is much better at planar aligned bounding boxes and is very quick at bounding.
madness but useful
Method to the madness!
😀
:-)
Why multiplied by -1
To countercorrect the rotation of the object and get it aligned to an axis.