torsdag 3. mars 2016

Ammo: LandXML surfaces to Revit

LandXML to Revit really took a huge step forward with the introduction of the Site Designer for Revit, However this converts the surfaces from the LandXML file to a toposurface, and that is not always the best solution. It can be altogether wrong actually as I will show you later.

The workflow beneath converts a LandXML to a directshape in Revit. I guess you can further develop this to solids and whatnot, but unnecessary in my context.

Overall script:

Close up of meaty part:



I've used a combination of Lunchbox' XML nodes and regular string handling to get to the desired results. That being creating a mesh from the extracted points and index groups.

Digression.
I may put my head on the block here now, but I've never fully understood what the index groups really is. All of a sudden it just struck me?.. a list of indexgroups always corresponds to a seperate list of points and the numbers contained in each index group is the index of points in the separate list that that together makes one mesh face! Hah, so easy! Dynamo is educating me I guess..


Digression end.


Notice the python script which uses regex in python to find all the names of the surfaces. Somehow this can also be done with the Clockwork regex nodes, but I'm not sure of the input syntax to those. Please notify me if you get it to work with the Lunchbox XML nodes or with Clockworks regex nodes! :)

Output:

And the result:
And here you can see the difference. Direct Shape on the left, Topography generated with Site Designer on the right. As you can see the result from site designer is unusable. I'm not familiar with the causes, but Revit topo tools are really bad when points have the same XY value in different heights, so I'm guessing it has something to do with that fact.

I haven't tested this 100% through and through, but I'll give you the link for the script (0.9.0) and let you take it for a spin. Please feel free to comment and maybe we can make the script better together! :)



3 kommentarer:

  1. Hi! Awesome script, I´ve been trying it with a file this days, but I keep getting out of range indexes. Points from the xml seem to be coming through alright, but i can´t figure why indexes might be off. Are there different landxml formats that maybe could affect the indexes? Here is my file just in case https://www.dropbox.com/s/f92mt5vw5jrjhsn/FloresDise%C3%B1o13-04-16.xml?dl=0

    SvarSlett
  2. Hi Rodrigo and the author of the script,

    I have the same issue as you, Rodrigo. Have you found the way to resolve it?

    SvarSlett
  3. THANK YOU FOR THE INFORMATION
    PLEASE VISIT US
    autocad drafting services








    SvarSlett