Code covered by the BSD License  

Highlights from
patch2struct and struct2patch converter

5.0

5.0 | 1 rating Rate this file 6 Downloads (last 30 days) File Size: 4.24 KB File ID: #19862
image thumbnail

patch2struct and struct2patch converter

by Adrian Abordo

 

09 May 2008 (Updated 13 May 2008)

Converts a patch object into a structure and vice-versa.

| Watch this File

File Information
Description

Utility that converts patch objects (or a comma-separated list of patch property/value pairs) into an equivalent structure that encodes all the patch object's properties. Useful for storage of 3D models, especially for animation in Matlab. Also includes a companion function 'struct2patch' which converts the structure back into a patch object.

Note: The command 'get(h)' also produces a structure containing patch settings if 'h' is a handle to an existing patch object, but the conversion to/from structures and patch objects is non-trivial due to the presence of read-only properties and the different ways Matlab's patch command affects the underlying properties based on user input.

MATLAB release MATLAB 7.6 (R2008a)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (1)
12 May 2008 ivan scardanzan

the possibility to exchange/export/import/convert matlab patches or isosurfaces with other packages is highly desirable , for example the communication between matlab and CFD or structurale solvers via pre-processing soft can allow volume mesh.
To date matlab does not allow volume mesh of non convex volumes and this is a matlab limitation

Please login to add a comment or rating.
Updates
13 May 2008

Documentation update.

Tag Activity for this File
Tag Applied By Date/Time
graphics import Adrian Abordo 22 Oct 2008 10:00:26
graphics export Adrian Abordo 22 Oct 2008 10:00:26
patch structure 3d model modelling graphics visualization animat Adrian Abordo 22 Oct 2008 10:00:26
3d Cristina McIntire 07 Nov 2008 12:50:35
patch Per Pemberton 20 Jan 2009 04:53:15
graphics export Benjamin 11 Nov 2011 13:27:21

Contact us at files@mathworks.com