SharnoaMill: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
Added code from BobS |
||
| (One intermediate revision by one other user not shown) | |||
| Line 1: | Line 1: | ||
{{RemovedCommands|date= | {{RemovedCommands|date=1/1/2010|build=9.5.0}} | ||
==SharnoaMill== | ==SharnoaMill== | ||
{{Description|description=This command was never documented}} | {{Description|description=This command was never documented}} | ||
Bob Stewart says he got the following code from Jeff M to perform the equivalent function: | |||
<pre> | |||
AddPointAngle: | |||
SetVar#('VX') SUB# GetVar#('P2X') GetVar#('P1X') | |||
SetVar#('VY') SUB# GetVar#('P2Y') GetVar#('P1Y') | |||
IF YZPlane? | |||
SetVar#('VX') MUL# GetVar#('VX') Num# ('-1.0') | |||
END | |||
{ATAN2} | |||
IF NOT LessThan? ABS# GetVar#('VX') Num#('0.00000001') | |||
SetVar#('Angle') ATAN# DIV# GetVar#('VY') GetVar#('VX') | |||
IF LessThan? GetVar#('VX') Num#('0') | |||
SetVar#('Angle') ADD# GetVar#('Angle') Num#('180') | |||
END | |||
ELSE | |||
IF LessThan? GetVar#('VY') Num#('0') | |||
SetVar#('Angle') Num#('270') | |||
ELSE | |||
SetVar#('Angle') Num#('90') | |||
END | |||
END | |||
{Normalise Angle} | |||
IF LessThan? GetVar#('Angle') Num#('0') | |||
SetVar#('Angle') ADD# GetVar#('Angle') Num#('360') | |||
END | |||
{Make it wacky for YZ} | |||
IF YZPlane? | |||
SetVar#('Angle') SUB# GetVar#('Angle') Num#('90') | |||
IF LessThan? GetVar#('Angle') Num#('0') | |||
SetVar#('Angle') ADD# GetVar#('Angle') Num#('360') | |||
END | |||
END | |||
IF Flag? ('NegForArcAnglesOver180') | |||
IF GreaterThan? GetVar#('Angle') Num#('180') | |||
SetVar#('Angle') ADD# GetVar#('Angle') Num#('-360') | |||
END | |||
END | |||
FORMAT(GetVar#,2) | |||
' C' GetVar#('Angle') | |||
RETURN | |||
ArcDepth: | |||
IF XYPlane? | |||
MoveZC | |||
ELSE | |||
IF XZPlane? | |||
MoveYC | |||
ELSE | |||
MoveXC | |||
END | |||
END | |||
RETURN | |||
doSharnoaMill: | |||
IF LineFeat? | |||
IF LastFeat? OR NOT NEXT ArcFeat? OR ZMove? | |||
FeedC MoveXYZC {EOL} | |||
END | |||
ELSE | |||
IF RapidFeat? | |||
IF LastFeat? OR NOT NEXT ArcFeat? OR ZMove? | |||
RapidC MoveXYZC {EOL} | |||
END | |||
ELSE | |||
IF ArcFeat? | |||
CalcPSP | |||
ArcI ArcJ ArcR | |||
SetVar#('P1X') ArcI# | |||
SetVar#('P1Y') ArcJ# | |||
SetVar#('P2X') SPX# | |||
SetVar#('P2Y') SPY# | |||
AddPointAngle | |||
EOL | |||
SeqLabC | |||
IF ArcCW? | |||
IF YZPlane? | |||
CCWArc | |||
ELSE | |||
CWArc | |||
END | |||
ELSE | |||
IF YZPlane? | |||
CWArc | |||
ELSE | |||
CCWArc | |||
END | |||
END | |||
SetVar#('P1X') ArcI# | |||
SetVar#('P1Y') ArcJ# | |||
SetVar#('P2X') EPX# | |||
SetVar#('P2Y') EPY# | |||
AddPointAngle | |||
ArcDepth | |||
ELSE | |||
' UnSupported Feature! Please Contact GibbsCAM Post Department ' EOL {Old command did not support these feture types} | |||
END | |||
END | |||
END | |||
RETURN | |||
</pre> | |||
Latest revision as of 21:10, 22 July 2014
Removed Command
This command has Removed as of 1/1/2010 in Build 9.5.0.
SharnoaMill
Description
This command was never documented
Bob Stewart says he got the following code from Jeff M to perform the equivalent function:
AddPointAngle:
SetVar#('VX') SUB# GetVar#('P2X') GetVar#('P1X')
SetVar#('VY') SUB# GetVar#('P2Y') GetVar#('P1Y')
IF YZPlane?
SetVar#('VX') MUL# GetVar#('VX') Num# ('-1.0')
END
{ATAN2}
IF NOT LessThan? ABS# GetVar#('VX') Num#('0.00000001')
SetVar#('Angle') ATAN# DIV# GetVar#('VY') GetVar#('VX')
IF LessThan? GetVar#('VX') Num#('0')
SetVar#('Angle') ADD# GetVar#('Angle') Num#('180')
END
ELSE
IF LessThan? GetVar#('VY') Num#('0')
SetVar#('Angle') Num#('270')
ELSE
SetVar#('Angle') Num#('90')
END
END
{Normalise Angle}
IF LessThan? GetVar#('Angle') Num#('0')
SetVar#('Angle') ADD# GetVar#('Angle') Num#('360')
END
{Make it wacky for YZ}
IF YZPlane?
SetVar#('Angle') SUB# GetVar#('Angle') Num#('90')
IF LessThan? GetVar#('Angle') Num#('0')
SetVar#('Angle') ADD# GetVar#('Angle') Num#('360')
END
END
IF Flag? ('NegForArcAnglesOver180')
IF GreaterThan? GetVar#('Angle') Num#('180')
SetVar#('Angle') ADD# GetVar#('Angle') Num#('-360')
END
END
FORMAT(GetVar#,2)
' C' GetVar#('Angle')
RETURN
ArcDepth:
IF XYPlane?
MoveZC
ELSE
IF XZPlane?
MoveYC
ELSE
MoveXC
END
END
RETURN
doSharnoaMill:
IF LineFeat?
IF LastFeat? OR NOT NEXT ArcFeat? OR ZMove?
FeedC MoveXYZC {EOL}
END
ELSE
IF RapidFeat?
IF LastFeat? OR NOT NEXT ArcFeat? OR ZMove?
RapidC MoveXYZC {EOL}
END
ELSE
IF ArcFeat?
CalcPSP
ArcI ArcJ ArcR
SetVar#('P1X') ArcI#
SetVar#('P1Y') ArcJ#
SetVar#('P2X') SPX#
SetVar#('P2Y') SPY#
AddPointAngle
EOL
SeqLabC
IF ArcCW?
IF YZPlane?
CCWArc
ELSE
CWArc
END
ELSE
IF YZPlane?
CWArc
ELSE
CCWArc
END
END
SetVar#('P1X') ArcI#
SetVar#('P1Y') ArcJ#
SetVar#('P2X') EPX#
SetVar#('P2Y') EPY#
AddPointAngle
ArcDepth
ELSE
' UnSupported Feature! Please Contact GibbsCAM Post Department ' EOL {Old command did not support these feture types}
END
END
END
RETURN