DESIGN.RetagRemovalProject: Difference between revisions

From Compost Wiki
Jump to navigation Jump to search
Jeffm (talk | contribs)
Jeffm (talk | contribs)
No edit summary
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
==Design Document==
None of this data is implemented or live, it is simply a thought exercise. It can not be used in any post.
==Overview==
==Overview==
Retag is not a good way to use line numbers in posts. It requires many special characters and is confusing to many post developers. There are better and more modern ways of handling it.
Retag is not a good way to use line numbers in posts. It requires many special characters and is confusing to many post developers. There are better and more modern ways of handling it.
Line 22: Line 25:
     CloseSub
     CloseSub
      
      
     '''SaveTPEndSeq''' {this will save the last seq number and assoicate it with the op's toolpath end }
     '''SaveTPEndSeq''' {this will save the last seq number and associate it with the op's toolpath end }
      
      
     {output the canned cycle line with the saved seq number if we are doing line nubmers}
     {output the canned cycle line with the saved seq number if we are doing line nubmers}
Line 37: Line 40:
By keeping a stack of saved sequence numbers we can allow the lines that call subroutines to be output AFTER the sub is generated. By allowing the contact process to be overwriten and the items merged right now it lets the code be inline. since the line numbers are a stack this can be used for nested subs. The start and stop line numbers do not need to be a stack since nested subs will use them before then overwrite them.
By keeping a stack of saved sequence numbers we can allow the lines that call subroutines to be output AFTER the sub is generated. By allowing the contact process to be overwriten and the items merged right now it lets the code be inline. since the line numbers are a stack this can be used for nested subs. The start and stop line numbers do not need to be a stack since nested subs will use them before then overwrite them.


==Additional Concerns for Milling Subs==
A command to pop the current stack and save it as the OP TP start will be needed. TP end won't matter since all we care about is the last end from the outermost sub.
The only other thing that may be needed is a version of the get commands that takes an op number so that we can do them for master ops.
The only other thing that may be needed is a version of the get commands that takes an op number so that we can do them for master ops.




[[Category:DevelopmentNotes]]
[[Category:DevelopmentNotes]]

Latest revision as of 15:55, 19 October 2016

Design Document

None of this data is implemented or live, it is simply a thought exercise. It can not be used in any post.

Overview

Retag is not a good way to use line numbers in posts. It requires many special characters and is confusing to many post developers. There are better and more modern ways of handling it.

Uses

Retag is used for 2 things, turning canned cycles and mill sub routines.


Replacement

To replace retag we simply need the ability to push line numbers to a stack and pop them off, as well as the ability to take the last closed sub and merge it into the current output stream.

Turning Canned Cycles Code

 TurnCannedCycle:
   
   PushSeqLabC {Save the current line number so that it can be used before the canned cycle call,and increment like we had called EOL}
   
   SaveTPStartSeq { save the current seq number and associate it with the op's toolpath start}
   
   {throw the toolpath into a sub}
   OpenSub
   Toolpath {this will call Seq for the first and last toolpath line of the canned path }
   CloseSub
   
   SaveTPEndSeq {this will save the last seq number and associate it with the op's toolpath end }
   
   {output the canned cycle line with the saved seq number if we are doing line nubmers}
   PopSeqLabC Lcycle doCycleStart 'L' GetTPStartSeq# 'P' GetTPEndSeq# EOL
   
   {take the last closed sub and output it to the current output stream and remove it from the concat list}
   FlushLastSub
   
   doCycleExitStuff
   
 RETURN

Description

By keeping a stack of saved sequence numbers we can allow the lines that call subroutines to be output AFTER the sub is generated. By allowing the contact process to be overwriten and the items merged right now it lets the code be inline. since the line numbers are a stack this can be used for nested subs. The start and stop line numbers do not need to be a stack since nested subs will use them before then overwrite them.


Additional Concerns for Milling Subs

A command to pop the current stack and save it as the OP TP start will be needed. TP end won't matter since all we care about is the last end from the outermost sub. The only other thing that may be needed is a version of the get commands that takes an op number so that we can do them for master ops.