Convert .obj files exported from RealFlow to a CSV to import to Grasshopper
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
example
export
lib
.gitignore
LICENSE
README.md
config.js
obj_to_csv.js
package.json

README.md

Tracking Objects in RealFlow

A node.js utility to convert .obj files exported from RealFlow to .csv files for importing to Grasshopper.

The scenario

You've got a series of objects that move within a RealFlow scene and you would like to track their coordinates frame by frame so you can import and plot the data in Grasshopper.

The solution

  1. Enable the export of .asc files for each object in RealFlow
  2. Simulate the scene
  3. Download, install & run obj_to_csv on your scene's objects folder (instructions below)
  4. Download & open the Grasshopper Import file
  5. Set the path to the .csv file generated by obj_to_csv.js

Installation

The application requires Node.js and npm to be installed, instructions can be found at nodejs.org. Then follow the following steps:

  • Download the latest zip from GitHub and extract to a clean directory
  • Open the Node.js command prompt and change to the realflow-object-tracking directory using the command:
cd C:\Users\path\to\realflow-object-tracking\
  • Run npm update to install & update realflow-object-tracking's dependencies
npm update

Configuration

Once installed ensure to change the source_directory variable in the ./config.js file to your RealFlow scene objects folder and object_name to match the name of your object.

You may also like to change the other settings:

  • source_directory The objects folder of your RealFlow scene

  • object_name Name of the RealFlow object you wish to track

  • export_directory Directory to export files to

  • track_frames An array of frame numbers to track

  • track_mode Track the object vertices using vert or midpoints with mid

Usage

To run the utility change to the relevant directory and run node obj_to_csv

cd C:\Users\path\to\realflow-object-tracking\
node obj_to_csv

Troubleshooting

Ensure you've followed the installation and configuration instructions precisely. If you're still having issues feel free to create an issue here on GitHub and I'll try and assist you as soon as I can.