Mesh Import

mesh transfer

Rhino to Processing

This sketch expands on the earlier Half-Edge Mesh sketch, demonstrating how to generate a large HEM class from text files containing the vertex positions and the vertex indices for each face as comma separated lists. (To generate these .txt files from Rhino via Rhinoscript see this post.)

The difference between this sketch and the previous one is in Lines 36-42 where the text files are loaded as String Arrays and then converted to a Float Array and an ArrayList (using an ArrayList permits faces to have different vertex counts) for instantiating the HEM.
(.pde download)

Advertisements
Comments
2 Responses to “Mesh Import”
Trackbacks
Check out what others are saying...
  1. […] Mesh sketch, a function sectionHEM for cutting a planar section through a mesh. It also uses the Mesh Import function to instantiate the topography from a pair of .txt files (included in the .zip file below). The […]

  2. […] might be beyond the capabilities of your computer, you might want to copy the .txt files from the Mesh Import example into your sketch’s data folder and change the file names in Lines 55-56 to match. […]



Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: