Convert
Convert a mesh to a simplex mesh.
Syntax
model.component(<ctag>).mesh(<tag>).create(<ftag>,"Convert");
model.component(<ctag>).mesh(<tag>).feature(<ftag>).selection();
model.component(<ctag>).mesh(<tag>).feature(<ftag>).set(property,<value>);
model.component(<ctag>).mesh(<tag>).feature(<ftag>).getType(property);
Description
Use model.component(<ctag>).mesh(<tag>).create(<ftag>,"Convert") to convert non-simplex elements in a 2D or 3D mesh to simplex elements, that is, triangles and tetrahedra. The convert feature is also available for imported meshing sequences.
Use model.component(<ctag>).mesh(<tag>).feature(<ftag>).selection() to specify the domain or face selection. If you do not specify the selection the feature converts all quadrilateral, pyramidal, prismatic, and hexahedral elements in the mesh.
The following properties are available:
diagonal | center
Use the property splitmethod to specify how to split quadrilateral and hexahedral elements into triangular and tetrahedral elements, respectively. Use the diagonal option to split each quadrilateral element into two triangular elements and each hexahedral element into five tetrahedral element. Use the center option to split each quadrilateral element into four triangular elements and each hexahedral element into 28 tetrahedral elements. The conversion also affects quadrilateral elements on the boundaries of the specified domains in 3D, which are converted into two triangular elements (when the option diagonal is used) or four triangular elements (when the option center is used).
Examples
Create a mapped quad mesh on a unit rectangle and convert each quadrilateral element into four triangular elements:
Code for Use with Java
Model model = ModelUtil.create("Model");
model.component().create("comp1");
GeomSequence g = model.component("comp1").geom().create("geom1", 2);
MeshSequence m = model.component("comp1").mesh().create("mesh1", "geom1");
 
g.create("r1", "Rectangle");
g.run();
 
m.create("map1", "Map");
m.create("conv1", "Convert");
m.run();
Code for Use with MATLAB
model = ModelUtil.create('Model');
model.component.create('comp1');
g = model.component('comp1').geom.create('geom1', 2);
m = model.component('comp1').mesh.create('mesh1', 'geom1');
 
g.create('r1', 'Rectangle');
g.run;
 
m.create('map1', 'Map');
m.create('conv1', 'Convert');
m.run;
Create a prism mesh and then convert each prism into three tetrahedral elements:
Code for Use with Java
Model model = ModelUtil.create("Model");
model.component().create("comp1");
GeomSequence g = model.component("comp1").geom().create("geom1", 3);
MeshSequence m = model.component("comp1").mesh().create("mesh1", "geom1");
 
g.create("blk1", "Block");
g.run();
 
m.create("ftri1", "FreeTri");
m.feature("ftri1").selection().set(new int[]{1});
m.create("swe1", "Sweep");
m.create("conv1", "Convert");
m.run();
Code for Use with MATLAB
model = ModelUtil.create('Model');
model.component.create('comp1');
g = model.component('comp1').geom.create('geom1', 3);
m = model.component('comp1').mesh.create('mesh1', 'geom1');
 
g.create('blk1', 'Block');
g.run;
 
m.create('ftri1', 'FreeTri');
m.feature('ftri1').selection().set(1);
m.create('swe1', 'Sweep');
m.create('conv1', 'Convert');
m.run;
See Also
BndLayer, Map, Refine, Sweep