I want to create a script/procedure for importing the Freesurface mesh output from 3rd Party CFD software, to use with the rest of my Rhino model to make some impressive renders!
Im sure many yacht designer/Rhino users out there would appreciate the same function.
So I decided to ‘think out loud’ in this post to try create something simple and useful.
To start, Im thinking the process may go as follows:
*initital assumption, your Rhino model and CFD simulations share the same Datum point.
- Select STL freesurface mesh for import
- Prompt user for Trim, Sinkage, Heel inputs (these should be known from the Results of the CFDsim)
- Rotates and translates freesurface accordingly to align with your existing Rhino model
- Apply some sort of smoothing to the freesurface mesh, does anyone know how to do this?
- Measure the Max and Min height of the freesurface on Z-axis.
- Apply a gradiant Texture, similar to what happens in CFD post-processing, that is scaled to match the freesurface max and min Z values. The texture should be planar, mapped normal to the model Y or X axis, and not tiled in the Z-axis.
- Prompt user for number of sections.
- Slice freesurface along Z axis into specified number of sections to create contour lines.
What do people think? Grasshopper the best way to acheive this? Or can this be acheived with a simple excel sheet of commands which is pasted into the command bar?