mphviewselection
Display a geometric entity selection in a MATLAB® figure.
Syntax
mphviewselection(model,geomtag,number,entity,...)
mphviewselection(model,seltag,...)
Description
mphviewselection(model,geomtag,number,entity,...) displays the geometric entity number of type entity in MATLAB figure including the representation of the geometry geomtag.
mphviewselection(model,seltag,...) displays the geometric entity selection seltag in a MATLAB figure including the representation of the geometry.
The function mphviewselection accepts the following property/value pairs:
on | off
on | off
Domain | boundary | edge | point
on | off
on | off
on | off
Char | RGB array
Opengl | zbuffer
on | off
on | off
on | off
Example
Plot boundary 6 using yellow color:
model = mphopen('model_tutorial_llmatlab');
mphviewselection(model,'geom1',6,'boundary',...
'facecolorselected',[1 1 0],'facealpha',0.5)
Plot edges 1 to 8 using green color:
mphviewselection(model,'geom1',1:8,'edge',...
'edgecolorselected',[0 1 0])
Add an explicit selection for boundaries 7 to 12 and plot the selection in a figure:
model.selection.create('sel1','Explicit').geom(2).set(7:12);
mphviewselection(model,'sel1');
Add a selection to get the vertex indices with the box delimited with the coordinates [-1e-3 11e-3;-1e-3 11e-3;9e-3 11e-3] and plot both the selected entities and the selector:
box = model.selection.create('box1', 'Box');
box.set('entitydim', '0');
box.set('xmin', '-1e-3').set('xmax', '11e-3');
box.set('ymin', '-1e-3').set('ymax', '11e-3');
box.set('zmin', '10e-3').set('zmax', '11e-3');
mphviewselection(model,'box1','facemode','off');
See also
mphgeom, mphselectbox, mphselectcoords