Current Help System: Tutor Translator (View Core Help)

## Scanning Control

The scanning command in Tutor is:

TFSCAN ("filename", pt1, pt2, dir, mins, maxs, comp, thresh)

Where:

- filename - The name of the file containing the picked points. By specifying the suffix .MEA, the output format is set to Tutor for point elements of the stored points. By specifying any other suffix or omitting the suffix, only the coordinates of the points taken are stored in the file (typical format of scanning files .SCN).

- pt1 - The element with the starting point for the scan.

- pt2 - The element with the end scan point

- dir - The vector that defines the scanning direction. This can be a variable vector.

- mins - The value of the minimum step. This can be a real variable.

- maxs - The value of the maximum step. This can be a real variable.

- comp - The compensation flag (TRUE or FALSE) for the scanning points. This can be a boolean variable.

- thresh - The threshold value for the final point of the scanning. This it can be a real variable.

TFSCAN("SCAN1.SCN,MEMORY[1],MEMORY[2],{0.707,0.707,0},1.0,2.0,TRUE,5.0) translates to è

ASSIGN/MIN_STEP = 1.0
ASSIGN/MAX_STEP = 2.0
ASSIGN/DIR_VECT = UNIT(MPOINT(0.707,0.707,0))
ASSIGN/TRSH = 5.0
ASSIGN/COMP_ONOFF = "YES"

PNT3 =FEAT/POINT,RECT

THEO/<0,0,0>,<0,0,1>
ACTL/<0,0,0>,<0,0,1>
READPOINT/
ASSIGN/INI_VECT = UNIT(PNT3.XYZ-E.MEMORY[1].XYZ)

SCN2 =FEAT/SCAN, LINEAROPEN, SHOWHITS=YES, SHOWALLPARAMS=YES

EXEC MODE=NORMAL, NOMS MODE=MASTER, CLEARPLANE=NO, SINGLEPOINT=NO,THICKNESS=0
FINDNOMS=2,SELECTEDONLY=NO,USEBESTFIT=NO,PROBECOMP=NO,AUTO MOVE=NO,DISTANCE=0
DIR1=LINE,INCR=2.54
HITTYPE=VECTOR
INITVEC=0,0,0
DIRVEC=0,0,0
CUTVEC=0,0,1
POINT1=0,0,0
MEAS/SCAN
BASICSCAN/LINE, SHOWHITS=YES, SHOWALLPARAMS=YES E.MEMORY[1].X,E.MEMORY[1].Y,E.MEMORY[1].Z,E.MEMORY[2].X,E.MEMORY[2].Y,E.MEMORY[2].Z,CutVec=0,0,1,DirVec=DIR_VECT.I,DIR_VECT.J,DIR_VECT.K
InitVec=INI_VECT.I,INI_VECT.J,INI_VECT.K,EndVec=0,0,1,THICKNESS=0
FILTER/DISTANCE, MAX_STEP
EXEC MODE=RELEARN
BOUNDARY/SPHERE,E.MEMORY[2].X,E.MEMORY[2].Y,E.MEMORY[2].Z,EndVec=0,0,1,TRSH,1
HITTYPE/VECTOR
NOMS MODE=MASTER
ENDSCAN
ENDMEAS/

CS1 =CALLSUB/TFSCAN_WRITE, TUTORSUB:"SCAN1.SCN", {SCN2}, "REWRITE",,

The command TFSCAN ("filename", pt1, pt2, dir, mins, maxs, comp) APPEND n executes the scanning of a polygon from the number of the starting scanned line n. If the n values is omitted, the default value is used; n=1. To effect the scanning of a closed line the value of pt2 is omitted.

TFSCAN("SCAN1.SCN,MEMORY[1],,VECT_VAR,1.0,2.0,TRUE,5.0)APPEND 200 translates to è

ASSIGN/MIN_STEP = 1.0
ASSIGN/DIR_VECT = UNIT(VECT_VAR)
ASSIGN/TRSH = 5.0
ASSIGN/COMP_ONOFF = "NO"

PNT4 =FEAT/POINT,RECT

THEO/<0,0,0>,<0,0,1>
ACTL/<10,10,10>,<0,0,1>
READPOINT/
ASSIGN/INI_VECT = UNIT(PNT4.XYZ-E.MEMORY[1].XYZ)

SCN3 =FEAT/SCAN, LINEARCLOSE, SHOWHITS=YES, SHOWALLPARAMS=YES

EXEC MODE=NORMAL, NOMS MODE=MASTER,CLEARPLANE=NO,SINGLEPOINT=NO,THICKNESS=0
FINDNOMS=2, SELECTEDONLY=NO, USEBESTFIT=NO, PROBECOMP=NO, AUTO MOVE=NO,DISTANCE=0
DIR1=LINE,INCR=2.54
HITTYPE=VECTOR
INITVEC=0,0,0
DIRVEC=0,0,0
CUTVEC=0,0,1
PLANEVEC=0,0,0
POINT1=0,0,0
MEAS/SCAN
BASICSCAN/LINE,SHOWHITS=YES,SHOWALLPARAMS=YES
E.MEMORY[1].X,E.MEMORY[1].Y,E.MEMORY[1].Z,E.MEMORY[1].X,E.MEMORY[1].Y,E.MEMORY[1].Z,CutVec=0,0,1,DirVec=DIR_VECT.I,DIR_VECT.J,DIR_VECT.K
InitVec=INI_VECT.I,INI_VECT.J,INI_VECT.K,EndVec=0,0,1,THICKNESS=0
FILTER/DISTANCE,MAX_STEP
EXEC MODE=NORMAL
BOUNDARY/SPHERE,E.MEMORY[1].X,E.MEMORY[1].Y,E.MEMORY[1].Z,EndVec=0,0,1,TRSH,1
HITTYPE/VECTOR
NOMS MODE=MASTER
ENDSCAN
ENDMEAS/

CS2 =CALLSUB/TFSCAN_WRITE, TUTORSUB:"SCAN1.SCN", {SCN3}, "APPEND",200,

If comp is a variable the COMP_ONOFF assignment becomes:
IF/ E.COMP == 0
ASSIGN/ E.COMP_ONOFF = ”r;NO”
END_IF/
ELSE/
ASSIGN/ E.COMP_ONOFF = ”r;YES”
END_ELSE/
In the TFSCAN translation the minimum step is ignored and only .SCN file format is supported.