aug 2008

ecotect mesh data 2 rhino 2



This tutorial runs you through the process of exporting your rhino geometry into ecotect and then bring the analysis data back into rhino. For this tutorial, you'll need this following Rhinoscript.



IMPORTANT NOTE : This script only works with ordered mesh faces. See the following 3 examples and download this script to see the ordering of your mesh face.



example 1: The mesh faces are ordered here. The numbers runs sequentially from 0 to n with interuption. This is what we want in this tutorial.



example 2: This is a joined mesh. The script will not work with this type of ordering although the faces are ordered within each mesh. You'll still get results it won't be accurate.



example 3: This is another type of joined mesh, the face ordering are even more localized. Once again, this type of meshes will not work with this script, it'll be for another tutorial.



Ok, let's start the tutorial. Start with your nurbs surface. Once again, if it is a polysurface, make sure to explode them first.



Create a quad mesh with these settings. You can adjust the Min Edge Lengh and Maximum Edge Length as you see fit. Again, if you have multiple surfaces, create the mesh as seperate surfaces first, then join them as mesh. Export as .3ds.



Run your favorite ecotect analysis. Export the analysis data as .txt file. Import into Excel and delete the top 6 lines of headers. Read here for detailed instruction.



Run the script provided above. It'll ask you for a mesh and an excel file containing the data. Once the script is finished, you can see the color of the mesh has changed. The script basically uses the mesh's RGB value to store external data.



To recall those RGB values and populate them with different types of mesh componenets, please refer to the other tutorial here.

Technical Notes:

Since ecotect triangulates all mesh input and doubling the number is mesh faces, this script simply skips every other number in the data file to match the quad face in rhino, therefore 50% of the data from ecotect is omitted. If a higher accuracy is required, the script can be easily modified to average out the numbers for the 2 triangulated surface for the quad. In addition, ecotect stores it's analysis data in the mesh's face color. But since rhinoscript does not have a MeshFaceColor function, MeshVertexColor is used instead. This is what causes the discrepency and the reason why more complex mesh objects doesn't work with this script.

Creative Commons License This work is licensed under a Creative Commons Attribution-Share Alike 3.0 United States License.