*copy_feature

Copies a selection of elements and pastes them onto the displayed shell elements at the target location.

Syntax

*copy_feature entity_type mark_id string_array number_of_strings

Type

HyperMesh Tcl Modify Command

Description

Copies a selection of elements and pastes them onto the displayed shell elements at the target location. The neighborhood of the pasted region will be remeshed.

Inputs

entity_type
The type of entity to copy. Valid values are components and elements. The selection may consist of shell or solid elements. Any 1D elements attached to shell elements are automatically included.
mark_id
The ID of the mark of entities. Valid values are 1 and 2.
string_array
The ID of the string array that contains the additional input parameters. The string array is created using the *createstringarray command. This should always be set to 1.
All parameters are case insensitive, order insensitive and optional. If not supplied, the default values will be used. Valid parameters and their syntax are:
NumCopies : <value>
The number of copies to make (default 1).
NumLayers : <value>
The number of layers to remesh (default 2).
MappingMethod : <value>
The method in which the transformed feature's stitch boundary is mapped on to the target mesh:
auto – (default) Decides the best method among extend, morph and none based on the way the selected feature is connected to the the target mesh.
extend – The stitch boundary is extended till it meets the target mesh, or if it already crosses the target mesh, the extended part of the mesh is trimmed out. This is ideal for features that intersects sharply with the target mesh.
morph – The feature is morphed such that the stitch boundary conforms to the target mesh. This is ideal for features that meet the target mesh tangentially.
none - The transformed feature is kept as it is.
Rebuild : <value>
0 - Remesh using size and bias.
1 - Remesh using rebuild (default).
StitchBoundary : <node_id1> <node_id2> … <node_idN-1> <node_idN>
The mesh edges that needs to be extended or trimmed from or morphed to the target mesh, and subsequently be stitched with the target mesh. In most cases the command can deduce which mesh edges are to be extended or morphed. But when it comes to features which already cross the target mesh this needs to supplied so that the command knows where to trim from.
This is a list of node IDs of the involved edges. It expects two node IDs per mesh edge. If there are N edges to be supplied, there should be 2N node IDs in this list. For example:
StitchBoundary: n1 n2 n2 n3 n3 n4.
ToOriginalComponent : <value>
0 - The copied elements are organized in the current component
1 - The copied elements are organized in the original component (default)
TransformByMatrix : <tr11> <tr12> <tr13> <tr14> <tr21> <tr22> <tr23> <tr24> <tr31> <tr32> <tr33> <tr34> <tr41> <tr42> <tr43> <tr44>
The transformation specified as a 4x4 matrix.
TransformByNodes : <sn1> <sn2> <sn3> <tn1> <tn2> <tn3>
The transformation specified between two systems defined at source and target locations. The system at source is defined by three nodes sn1, sn2 and s3. The origin is defined by the node sn1. The x-axis is defined by the vector from sn1 to sn2. The x-y plane is defined as the plane containing all three nodes sn1, sn2 and sn3. Similarly, the system at target is defined by three nodes tn1, tn2 and tn3.
number_of_strings
Integer indicating the size (number of strings) in the string array created using *createstringarray.

Example

To copy elements 5100-5200 into 3 copies along the -y direction with a distance of 1, and remeshing 2 layers with the rebuild algorithm:

*createstringarray 5 "TransformByMatrix : 0 -1 0 0 1 0 0 0 0 0 1 0 0 0 0 1 " "MappingMethod : morph" "NumCopies : 3" "Rebuild : 1" "NumLayers : 2"
*createmark elements 1 5100-5200
*copy_feature elements 1 1 5

Errors

Incorrect usage results in a Tcl error. To detect errors, you can use the catch command:
if { [ catch {command_name...} ] } {
   # Handle error
}

Version History

2019.1

2021 - Added new string_array options MappingMethod, StitchBoundary and ToOriginalComponent. Deprecated string_array option MorphFeatureToBase.