We need to create rvt file using mesh data, triangles (indices, vertices, normals, texture uv). So does revit design automation apis supports create mesh with texture and texture uvs? Any examples would be great help.
Thanks.
We need to create rvt file using mesh data, triangles (indices, vertices, normals, texture uv). So does revit design automation apis supports create mesh with texture and texture uvs? Any examples would be great help.
Thanks.
I would suggest you research the DirectShape functionality of the Revit API: DirectShape. It includes some ability to apply a Revit material (which is a color and/or texture) to the shapes you create. I don't know if texture UV can be specified for DirectShape faces.
If you have your own textures to create in Revit, then you'll want to read about Revit materials and Google how to create them.
Best, Michael
Design Automation API for Revit (DA4R) could be considered as a Revit runs on the cloud, you can upload your own app bundle that contains your Revit exporter IEXternalDBAppplication Addin to help you export mesh data from the Revit models. Here is an example demonstrating how to export Revit elements into three.js meshes and scene:
https://github.com/va3c/RvtVa3c
But it came with UI, you have to convert it to pure IEXternalDBAppplication (remove UI codes) before uploading to Forge server as DA4R activity.
Hope it helps!
Cheers,