|
|
global mom_kin_machine_type, W6 t- p( I7 o. ]
global mom_kin_4th_axis_type mom_kin_4th_axis_plane
. F3 Z. E9 K7 S9 L- V: ^5 H global mom_kin_5th_axis_type3 {! |' t6 `" S$ O0 W
global mom_tool_axis mom_sys_spindle_axis mom_kin_spindle_axis' I" ~" f) e' F) G3 R) S7 c
global mom_pos! s3 k- m% Q& }$ p; A n
global mom_cycle_spindle_axis mom_cutcom_plane mom_pos_arc_plane
1 N+ X- ~- \3 O. {, {" T0 j: y
9 L0 i7 g1 M6 B4 F/ ~; o4 y7 V- t) s$ z7 }# [. m2 f% p+ u
# Default cycle spindle axis to Z
. F# O/ g; l0 W& r9 h set mom_cycle_spindle_axis 2
* `- w1 L% ~* d' T/ ]; j5 A! x. R7 {( ~3 q
9 b; O' W( H; T0 Z& P- r if { ![string match "*3_axis_mill*" $mom_kin_machine_type] } {( v v8 v8 q6 J4 a' ~+ }; P9 K
5 V, C0 q* |) j e3 b' f
if { $mom_kin_4th_axis_type == "Head" } {
9 s) s+ P4 L( \4 d" c6 L) N' ]/ {( F/ T) c5 G- Y. r
if [EQ_is_equal [expr abs($mom_tool_axis(0))] 1.0] {+ t; K- b% ~: e, D1 {6 }, @
set mom_cycle_spindle_axis 0
; x& h8 L- G/ i1 h6 @; y$ f }
! ~( {5 F1 M. M- A+ }* I6 u0 d3 e- ^6 E+ L3 E7 M5 P
if [EQ_is_equal [expr abs($mom_tool_axis(1))] 1.0] {
4 n) _' ~, ^% n6 r' l set mom_cycle_spindle_axis 1
0 G% }1 k( G/ h" n( j }( j. ?+ Q5 h G( Q9 d- `- m7 D
" g! D. ]/ q! x- s9 z0 i* d7 H if { $mom_kin_5th_axis_type == "Table" } {
5 A, e& M; J) R( p0 t
4 v% E+ c2 v+ w' f* W if { [EQ_is_equal [expr abs($mom_pos(3))] 90.0] || [EQ_is_equal [expr abs($mom_pos(3))] 270.0] } {
" ?$ S+ |, I. Q" W! L5 N" s- [# R$ Z9 ^& d; O( _0 p. ~* |# M
switch $mom_kin_4th_axis_plane {* a% {" F5 ^% b& w; l7 r- m# N( I3 M- @
"YZ" {
/ p2 s2 Y" J2 b7 ~7 W) o set mom_cycle_spindle_axis 1; f9 r; n7 }7 H K1 ~7 o
}: V- M4 Y+ X) t7 O9 V
"ZX" {
4 k. F9 I! _. x& G1 [4 V set mom_cycle_spindle_axis 06 o% U: p! T) ?1 S& }
}
1 k, U/ Y, K5 S r9 h. z( U0 M5 q9 ~ }
! i- i$ r4 }, s: b# f }
! n# M- a* E* i& A4 ^- J% c }
) r" [! o; \) m7 C: d' T }' t6 O) H: O; {/ T, s K& `
}, H6 m: Z" r3 l: ?4 N8 @( |
8 e# F) n6 U h$ U1 Y; v$ x; N
- C* ^" t$ A( h K0 U% D switch $mom_cycle_spindle_axis {
3 |5 P% g5 P! y0 B 0 {
7 g! b! Z9 K6 X4 P( U set mom_cutcom_plane YZ
* Q: b. @9 Z! Z5 ^9 }7 } set mom_pos_arc_plane YZ3 w% n( ~; {( K+ N/ Y$ E, ^0 E( z- P
set principal_axis X9 z7 q. n# Z5 k
}
$ j9 v$ L3 w+ @$ I4 | 1 {
% p. x9 v7 G4 e$ I; ^ h0 C set mom_cutcom_plane ZX
/ b: m# N0 l) ^, {8 J# e set mom_pos_arc_plane ZX
( e8 ]: q+ `# n set principal_axis Y
" H" i* v" s {2 x2 _0 A }& d# N% b1 M5 l
2 {' I1 A# l6 N; B2 _
set mom_cutcom_plane XY% l0 }; J0 k6 h. U
set mom_pos_arc_plane XY
/ z# A e( c' o# K' m1 a set principal_axis Z% m4 R0 j+ g8 O9 k# _4 U
}: l( I. K0 M! F/ Q' P* N R
default {
6 c t, ^# J# N* @7 Q, |% Z/ n set mom_cutcom_plane UNDEFINED
; f: y% I1 t: }. y/ L0 r set mom_pos_arc_plane UNDEFINED. l- P3 q0 |5 I( U, n: |
set principal_axis ""8 z7 ?1 e3 H2 a+ I
}
6 h# I# y/ L, f! U* U* p5 Z. { }
: t- z L2 g; i; Z) z( f- ~) r
) e. h/ o7 M: m
' l; e4 A7 X3 g, z if { $suppress_principal_axis && [string length $principal_axis] > 0 } {6 p/ P' O* H, t% U/ u6 @
MOM_suppress once $principal_axis
( b# v# x2 l4 Q% V }
" K. }% a( j m( z1 q5 I; u2 ~4 E- R: ^6 F
$ m- ]1 r' U& _$ I0 B x6 `- _
if { $force_plane_code } {6 [' F- a* W3 U: E3 e# f
global cycle_init_flag
9 d1 E/ Y# Y3 E1 ~: a/ n. P; B1 o
if { [info exists cycle_init_flag] && [string match "TRUE" $cycle_init_flag] } {
4 J9 r! B% G' C3 a3 }2 T MOM_force once G_plane0 A$ y# x7 t! U0 v$ @: s
}
& x0 B) q3 @9 D& G* f4 k$ G3 I } |
|