Path: news.mathworks.com!not-for-mail
From: "Sven " <sven.holcombe@gmail.deleteme.com>
Newsgroups: comp.soft-sys.matlab
Subject: Intersect an isosurface?
Date: Thu, 27 Mar 2008 08:10:22 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 29
Message-ID: <fsfkpe$4p7$1@fred.mathworks.com>
Reply-To: "Sven " <sven.holcombe@gmail.deleteme.com>
NNTP-Posting-Host: webapp-02-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1206605422 4903 172.30.248.37 (27 Mar 2008 08:10:22 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Thu, 27 Mar 2008 08:10:22 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1326470
Xref: news.mathworks.com comp.soft-sys.matlab:459412



Hi there,

Is it possible to intersect a 3d patch object (created by
isosurface) with a plane, and return the intersecting curve(s)?

For example,

[x,y,z,v] = flow;
[faces,verts,colors] = isosurface(x,y,z,v,-3,x);
p = patch('Vertices', verts, 'Faces', faces, ...
'FaceVertexCData', colors, ...
'FaceColor','interp', ...
'edgecolor', 'interp');

This returns p, the isosurface patch object.  I now want to
cut this object along the plane, say, X=5 and return the
intersection curve(s) in some format.

I understand that I could use contourslice on the original
volumetric data as follows:
contourslice(x,y,z,v,5,[],[],[-3 -3])

However, I want to avoid referencing this volumetric data,
and think that the surface mesh should be cuttable in some
way (I just don't know how yet). My eventual goal is to try
and slice an stl volume or nurbs surface, neither of which
would have any underlying volume data.

Any help would be much appreciated