Week 9 Challenge
TCL FOR REFLECTING MULTI COMPONENTS
OBJECTIVE:
To create a TCL command which reflects multi-component in same-origin irrespective of solver selected by the user.
PROBLEM STATEMENT:
In the regular method, reflecting a single component with a single property is an easy job. But reflecting multi-components is a tedious process. It is done by reflecting components, creating new properties and components finally assigning each entity to the con-current component.
This is a lot more time-consuming methods.
SOLUTION:
Step done in the manual method has a proper order which makes the path to an automation solution. By using the TCL command, components that need to be reflected are got as input from the user. Then the center plane is created using centroids from master and target geometries, new components created with properties. Finally, live entities duplicated in new components and reflected. This will be done for each component selected by the user
PROCEDURE:
- USER INPUT:
- Geometries to be reflected, Target geometry, and entities to be reflected are get as input from the user.
- CREATE CENTER PLANE:
- Centroids for master and target geometries are got by command
- Then using this data new nodes created at the center of geometries and midpoints to those geometries.
- Then plan has been created by command *createplane.
- CREATE NEW COMPONENTS:
- The name for components gets as an input from a user, thickness for the components is get by entities to be reflected.
- A procedure named with solver names will create components for the current solver and assign thickness to it.
- By entering the solver name, Component name, and thickness new components are created.
- REFLECT:
- Entities to be reflected are get duplicated to newly created components.
- These entities are reflected by command *reflectmarkwithoption.
- Finally created entities equalized and ensure connections.
TCL COMMAND:
hm_getcentroid - Get a centroid position for selected surfaces.
*reflectmarkwithoption - Reflect entities for mark plane and mark plane.
*createplane - Create planes.
hm_getcollectorname - Return component name.
*createentity - Create new entities.
*setvalue - Assign values for entities.
hm_getdistance - Return distance between nodes.
hm_nodevalue - Return co-ordinate of nodes.
hm_getthickness - Return thickness for components selected.
*duplicatemark - Create duplicate entities.
SAMPLE IMAGES:
INITIAL PAGE:

INPUT FROM USER:

FINAL OUTPUT

RESULT:
TCL command file is created and assigned to a keyboard shortcut. While executing the command file asks the user to input a new component name and components. And command creates new components and reflect entities.