File Exchange

image thumbnail

intersectPlaneSurf II

version 1.2 (34.3 KB) by Mehmet OZTURK
Intersection of a plane with an arbitrary surface

6 Downloads

Updated 20 Nov 2014

View License

Intersection of a plane with an arbitrary surface data. The surface must be in the form of faces and vertices strcture such as patch function and the faces of the surface must be defined with triangles. fv =
fv =
faces: [number of faces x 3 double]
vertices: [number of vertices x 3 double]
"p0" and "n" is used to define the plane. "p0" is a point that lies on
the plane and "n" is the normal vector of the plane.
The function actually calculates intersection segments of triangels of
the surface with the plane and finally all the calculated segments is
linked to each other to form a continuous intersection region

Note: You must compile provided mex file firstly

Comments and Ratings (7)

x!lef

Thank you! If the segments which are distiguished within your code are not "closed", are they given then also as a seperate segment (as an output entry in the cell)?

Nan Luo

Niklas

Error: Could not detect a compiler on local system
which can compile the specified input file(s)

what compiler do I need for this to work?

Fritz

You have to compile the mex-file:
mex('IntersectPlaneTriangle.cpp','-v');

Bart

Thank you very much for the script. I've installed the toolbox on my machine with Matlab R2015a, but when I run the function I get the error 'Undefined function or variable 'IntersectPlaneTriangle'. How can I solve this?

Ben

Nice function, thanks!

Updates

1.2

Will be available as a Toolbox file

1.1.0.0

Not an update, a small correction has been made in the name of the function.

MATLAB Release Compatibility
Created with R14
Compatible with any release
Platform Compatibility
Windows macOS Linux
Acknowledgements

Inspired by: geom3d