mphgeom
Plot a geometry in a MATLAB® figure.
Syntax
mphgeom(model)
mphgeom(model,geomtag,...)
mphgeom(model,geomtag,'workplane',wptag,...)
h = mphgeom(model,geomtag,...)
 
Description
mphgeom(model) plots the model geometry in a MATLAB figure. If the model only contains one geometry then the geomtag can be empty.
mphgeom(model,geomtag,...) plots the model geometry with the tag geomtag in a MATLAB figure.
mphgeom(model,geomtag,'workplane',wptag...) plots the 2D geometry defined in the workplane with the tag wptag in a MATLAB figure.
h = mphgeom(model,geomtag,...) also returns a handle of the plotted entities.
The function mphgeom accepts the following property/value pairs:
on | off | current | string
on | off
on | off
on | off
point | edge | boundary | domain
on | off
on | off
on | off
on | off
The Build property determines if mphgeom build the geometry prior to display it. If the Build property is set with a geometry object tag, the geometry is built up to that object. mphgeom only displays built geometry objects.
Use the Workplane property to show the 2D geometry that is define inside the workplane with specified tag.
Example
Plot the model geometry:
model = mphopen('model_tutorial_llmatlab.mph');
mphgeom(model)
Plot the model geometry with face labels:
mphgeom(model,'geom1','facelabels','on','facelabelscolor','r');
Plot boundaries 7, 8, 9 and 11:
mphgeom(model,'geom1','entity','boundary',...
'selection',[7:9,11]);
The geometry can be plotted with view settings applied. This results in a geometry plot with grid, axes labels, lights, hiding etc. applied to the plot. Usually it is sufficient to use the auto setting, but any valid view can be applied:
mphmesh(model, 'mesh1', 'view', 'auto')t
Plot the model geometry on an existing axis:
figure(2);
mphgeom(model, 'geom1','parent', gca);
See also
mphmesh, mphviewselection