Talk:ChangeCS
The “ChangeCS?” Boolean returns true when the current operation uses a difference Machining CS than the previous operation. There are some specifications which state that the Machining CS used by a particular operation should not be used in the output, and that the base XY plane CS be used instead. The “ChangeCS?” Boolean cannot be used to detect these situations, but this routine can be. ckChngCS: SetVar#('PrevCS') GetVar#('ThisCS') IF AnyRotaryMoves? OR ABCToolPath? OR RotaryMill? SetVar#('ThisCS') WPXYCS CSListID# ELSE SetVar#('ThisCS') CSListID# END IF Equal? GetVar#('PrevCS') GetVar#('ThisCS') SetFlagF('ChngCS') ELSE SetFlag('ChngCS') END RETURN After calling this routine you can replace the “ChangeCS?” Boolean with “Flag?('ChngCS').
At first glance, you can see that improvements to the GibbsCAM language would allow a Boolean and not require a flag. Something like this for example. chngCS?: IF LastOperation AnyRotaryMoves? OR LastOperation ABCToolPath? OR LastOperation RotaryMill? SetLocalVar#('PrevCS') WPXYCS CSListID# ELSE SetLocalVar#('PrevCS') LastOperation CSListID# END IF AnyRotaryMoves? OR ABCToolPath? OR RotaryMill? SetLocalVar#('ThisCS') WPXYCS CSListID# ELSE SetLocalVar#('ThisCS') CSListID# END IF Equal? SetLocalVar#('PrevCS') SetLocalVar#('ThisCS') ReturnBool FALSE ELSE ReturnBool TRUE END RETURN There are advantages to both. The purpose of this writing is to illuminate the specification that a post processor does not use the Machining CS and a way to detect it.