Mesh > Mesh Commands > CopyFace

CopyFace
Copy a face mesh.
Syntax
model.mesh(<tag>).create(<ftag>,"CopyFace");
model.mesh(<tag>).feature(<ftag>).selection(property);
model.mesh(<tag>).feature(<ftag>).create(<ftag1>,maptype);
Description
Use model.mesh(<tag>).create(<ftag>,"CopyFace") to copy mesh between faces in a 3D geometry.
If you want to specify the orientation of the source mesh on the destination, use model.mesh(<tag>).feature(<ftag>).create(<ftag1>,maptype) to add an EdgeMap, a OnePointMap, or a TwoPointMap attribute feature.
The following properties are available:
auto | singlecopy | arraycopy
on | off
Use the properties source and destination to specify the source and destination boundaries. The copymethod property determines if many-to-one or many-to-many copying is used.
Compatibility
The following properties from the corresponding COMSOL Multiphysics 3.5a command, meshcopy, have been removed:
Table 4-19: Removed Properties
Example
Mesh Face 1 of a block and copy the mesh to the opposite Face 6.
Code for use with Java
Model model = ModelUtil.create("Model");
GeomSequence g = model.geom().create("geom1", 3);
MeshSequence m= model.mesh().create("mesh1", "geom1");
 
g.create("blk1", "Block");
g.run();
 
m.create("ftri1", "FreeTri");
m.feature("ftri1").selection().set(new int[]{1});
m.create("cpf1", "CopyFace");
m.feature("cpf1").selection("source").set(new int[]{1});
m.feature("cpf1").selection("destination").set(new int[]{6});
m.run();
Code for use with MATLAB
model = ModelUtil.create('Model');
g = model.geom.create('geom1', 3);
m = model.mesh.create('mesh1', 'geom1');
 
g.create('blk1', 'Block');
g.run;
 
m.create('ftri1', 'FreeTri');
m.feature('ftri1').selection().set(1);
m.create('cpf1', 'CopyFace');
m.feature('cpf1').selection('source').set(1);
m.feature('cpf1').selection('destination').set(6);
m.run;
See Also
CopyEdge, CopyDomain, Copy, EdgeMap, OnePointMap, TwoPointMap