All we ever wanted was everything…

I want to flatten a list in Dynamo from the right to the l;eft – not the left to the right.

OK – OOTB Dynamo will allow you to use the List.Flatten node to flatten a list for a specific amount.

dontwant

But what if you don’t want to have it that way, you want to have the list flattened at the @L2 level 1nstead of the @L4 level.

First attempt – use a negative number at the amt input of List.Flatten

notworking

Not working – the list completely lost it’s structure and is now flat – like a smorgasbord…

In order to get to the desired effect – kudos to Ben Osborne dynamobim.org – you got to do this:

working

And life is good…

 

Advertisements

Bela Lugosi just died…

So – for matters explained further in the coming days – I was on the search for some manufacturers content to fill in a gap in my BIM…. I ended up on the Schöck website and after frantically clicking all options I ended up with

Capture

Duh… no Model, and even getting the lame 2D requires a PHD…

Is this BIM?

Yours truly (and yes, Herr Schöck, call me if you want to make it right) Manufacturers Content is Fake – IMHO

Yours truly grumpy ole’….

 

Always Crashing In The Same Car

OK – another song another story – let’s talk clash detection for minute. Aim is to clash walls from one file – basement of a rather handsomely large structure with sitework.

Files are OpenBIM and Revit and you know what, so first approach was to use IFC based tools to figure out what (t** f***) is going on.

Take Tekla BIMSight as an example – what you get is:Noname.png

Oh well – now I know more – does that help me how to track down real clashes?

After a few experiments in Navisworks I came back to good ole’ Revit, probably because I know the tool best.

So – how we get the IFCs into Revit? ArchiCAD to the rescue – their Export to Revit nails it (don’t even bother to directly open those IFCs in Revit – but that is another blogpost so stay tuned). Workflow is to open the IFC in ArchiCAD and the export to Revit – cool isn’t it (caution – sarcasm ahead)

Noname

By that workflow two Revit files got created – so the smaller one gets linked into the bigger one and – bang – here we are, visibility settings adjusted:

Noname

Now we put Dynamo into place

Noname

Next we have a dedicated 3D view of each clash to apply human eye scrutiny

Noname

And life inches in to be good – next step is to actually get the clash geometry to clean up false positives but that is stuff for some other day…

Brown Paper Bag

As you might agree – stairs in Revit as – sometimes – a bit tricky…

Capture

Now that we have in-place stairs, we could amend a situation like that utilize them but – wouldn’t it be greater to have a loadable component family instead?

Here is the Dynamo that does the magic…

Capture

And here is the result:Capture

Looks better – now here is the family:

Capture

All editable geometry glory…

Capture

And life is good…

Wow, the engine’s really load

Another day, another challenge – we’re on a quite interesting model right now that we need to get computing in a structural analysis package. The analytical model looks like this:

Noname

It looks like a steam cooker and for the sake of the conversation let’s refer to it as a steam cooker. Challenge is that we have some walls in there that we don’t want to have in the analysis package but still we’ll want to have their weight represented as loads in the analytical model.

Turing of the analytical model for those guys – nope. They just fade away.

 

So the idea is – and stay with us here – this is ongoing – is to analyse all walls with the analytical model being turned off and get their Start-/Endpoints, calculate the load from their volume and generate a line load in the model using Dynamo.

The prototype to this looks like this:

Noname

The code in the Python:

import clr
clr.AddReference(‘RevitAPI’)
from Autodesk.Revit.DB import *
from Autodesk.Revit.DB.Structure import *

clr.AddReference(“RevitNodes”)
import Revit
clr.ImportExtensions(Revit.GeometryConversion)
clr.ImportExtensions(Revit.Elements)

clr.AddReference(“RevitServices”)
import RevitServices
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager

doc = DocumentManager.Instance.CurrentDBDocument

dataEnteringNode = IN
startPs = IN[0].ToXyz()
endPs = IN[1].ToXyz()
force = IN[2].ToXyz()
moment = IN[3].ToXyz()
LLType = UnwrapElement(IN[4])
plane = IN[5]

TransactionManager.Instance.EnsureInTransaction(doc)
lineloads = LineLoad.Create(doc,startPs,endPs,force,moment,LLType[0],plane)
TransactionManager.Instance.TransactionTaskDone()

OUT = lineloads

And that is not my wisdom, I am referring to other brilliant minds work here.

But we got the picture, next sequel is how to replace the code block with actual values from the model – so stay tuned.

And life is good…