The MESHCADBF command allows you to perform a best fit alignment of the mesh data with the CAD data.
Below is an example code snippet for a MESHCADBF alignment:
A1 =ALIGNMENT/START,RECALL:STARTUP,LIST=YES
MESHCADBF/REFINE=n1,n2,n3,SHOWALLPARAMS=TOG1,
ROUGH ALIGNPAIR/
THEO/<x,y,z>,<i,j,k>,
MEAS/<x1,y1,z1>
REF,TOG2,,
ALIGNMENT/END
n1 represents the offset value for applying a thickness.
n2 represents the maximum standard deviation value.
n3 represents the maximum distance value.
TOG1 lets you show or hide the parameters used for the rough alignment. It can be set to YES or NO.
ROUGH ALIGNPAIR/
THEO/x,y,z,i,j,k,
MEAS/x1,y1,z1
These rough alignment pairs of points are defined/selected using the Graphic Display window. The values next to THEO/ represent the point on the CAD. The values next to MEAS/ represent the corresponding point on the Mesh. These pairs are used to determine a rough transformation between the CAD and the Mesh which allows the Mesh to come close enough to the CAD to allow further refinements of the alignment.
TOG2 lets you choose the mesh to use for the alignment.