hm_ce_getprojectiondata
Returns newly created component projection information for a given set of connectors, points, or nodes.
Syntax
hm_ce_getprojectiondata entType1 mark1 entType2 mark2 numprojs tolerance order output projFlag1 projFlag2
Type
HyperMesh Tcl Query
Description
The returned data is organized into a single master list. Each element of this master list is a sublist that contains the requested connector ID, point ID, or node ID, and a list of the successfully created projections (the proj_list) for the given ID. The format of a single sublist is given as follows:
{ {connector/point/node_id} $proj_list }
Where proj_list for 2 projections = {{comp1_id}{elem1_id}{x1 y1 z1}{u1 v1}} {{comp_2_id}{elem2_id}{x2 y2 z2}{u2 v2}}
The potentially large list this function may return, may not be the best-suited data format for most processing cases. Therefore, it is highly recommended that you use the ::CE::GetProjectionData Tclwrapper function instead. This function accepts the same set of parameters that the hm_ce_getprojectiondata function requires, but instead of returning a single large master list, it returns a randomly accessible array. The array is accessible through its use of the connector/point/node ID as the index, and at this index is the $proj_list.
Inputs
- entType1
- Entity type on mark 1 for which projection is sought.
- mark1
- Mark of connectors/points/nodes that define the locations of interest.
- entType2
- Entity type on mark 2 to which the connectors/points/nodes are to be projected (comps only).
- mark2
- Mark of components to be projected onto.
- numproj
- Number of projections requested at the specified points (>0).
- tolerance
- Tolerance value for filtering projections (will be used with "numprojs").
- order
- 0 = ordered by closest
- output
- Parameter to obtain desired output (specific projection data).
- projFlag
- Parameter used for projecting to COMPS (current value is zero).
- projFlag2
- Parameter used for non-normal projections (normal = 0, non-normal = 1).
Example
*createmark points 1 "displayed";
*createmark components 1 "displayed";
set num_projs 2;
To get the projection data for displayed points on displayed components as a list of list:
set proj_data_list [ hm_ce_getprojectiondata points 1 comps 1 $num_projs 0.0 0 0 0 0];
This function is optimized for the case where the projection data is required for a number of different connectors, points, or nodes, and the components that they need to be projected onto are unknown. It is especially useful for close quarter welding scenarios.
A proj_list consists of 0 or more projections in a list, with each projection having some or all of the following information:
{ {comp_id} {elem_id} {x y z} {u v} }
- 0 = ALL (data shown above)
- 1 = comp_id and elem_id
- 2 = comp_id, elem_id, and x y z
- 3 = comp_id, elem_id, face and x y z
- 4 = comp_id, elem_id, face, x y z and u v
- The number of projections can be found from using "llength" on the proj_list (which is especially easy to do when the ::CE::GetProjectionData function is used).
- The "order" parameter returns the projection data in the requested ordering based on the closest distance to the projected connector/point/node (0) or ordered as a line (1).
- The "projFlag2" parameter (value of 1) is used for obtaining non-normal projections useful for MIG-Welds. By default, it has a value of 0, which will return normal projections.
Errors
None.