Create Floor from Mesh , Dynamo Script!

Hello everyone,

I need help about creating a floor from a mesh, I linked my Mesh file to DWG, I created this script, the points are correct but the Floor.slabShapeByPoint node does not work with this type of points.
In fact, I don’t know where the error is!
If anyone can help me I would be grateful


SOUS COUCHE.dwg (558.6 KB)

Thank you for helping

1 Like

Hi, @Asma_LA

  1. Your floor is not flat, did you notice?
  2. There’s some errors in mesh (see red colored group).
  3. Used MeshToolkit and Springs packages.

Mesh_to_floor.dyn (83.9 KB)

2 Likes

@Vladimir
thanks for reply,
Yes, I know that the floor is not flat, and that’s the point, here’s one I want to achieve.

It is a family system floor from the mesh

and then I tried with another script with the OBJ mesh format. but still errors it doesn’t manage to draw the whole shape on the floor


And did you test my dyn file?

@Vladimir

Yes, and it didnt work

@Vladimir

With the first mesh it work, i tried with an other wich it didnt work

1 Like

Black lines are from new floor. Revit triangulates differently.
And new floor is not flat, according to initial mesh.

2 Likes

@Vladimir
thank you for the script
Yes it worked very well with the mesh wich i posted here, but i tried with an other mesh, i have different mesh form in the project but i think that i have a problem with my mech, i was imported it from 3ds max

1 Like

I see, sloped edges now. We’ll try to solve it, share your new mesh.

1 Like

@Vladimir

Thank you for your helpin
here is the second mesh

BALLAST02.dwg (93.8 KB)

@Asma_LA , the mesh is bad. Check it in 3ds max with STL check modifier.

@Vladimir
Thank u for reply, if i check with 3ds Mas i didint had any errors.

Export as DXF and try this (not final, quick version):
Mesh_floor.dyn (13.0 KB)

@Vladimir
Thank you so much for your help, I already tried this node “ꟿ BrepShape.ByGeometry” with this script, but in the end my element will be in a system family “DirecteShape” and I will need to have it as a system family "Floor



and I don’t know if I can use it like that in my project, because in the end I will have to export it to IFC

Thanks for the script, I tested it and it gave me a “generic model” family.

Try to override category:

  1. Export directshape to ifc.
  2. (actually not needed) Open ifc with override to floor: How to change or apply Revit category to imported IFC elements created in Civil 3D | Revit | Autodesk Knowledge Network


P.S. I just exported simple rectangle floor and our floor. They both good and are “Floors” in IFC data terms.

1 Like