ToolpathList: Difference between revisions

From SDK
Jump to navigation Jump to search
(Created page with "right|50px|link=Toolpaths Category:SDK This object holds a list of toolpaths for another object. ==Properties== ===.Count=== '''Interaction:''' Read...")
 
No edit summary
 
Line 11: Line 11:
'''Interaction:''' Read Only  
'''Interaction:''' Read Only  


'''Returns:'''(integer) the number of toolpaths in the list
'''Returns:'''(integer) the number of toolpaths in the list




Line 19: Line 19:
'''Interaction:''' Read Only
'''Interaction:''' Read Only


'''Returns:''' (bool) true if the toolpath list is empty
'''Returns:''' (bool) true if the toolpath list is empty


==Methods==
==Methods==
Line 27: Line 27:


===:GetAt( POSITION pos)===
===:GetAt( POSITION pos)===
'''Returns:''' the toolpath at the current position    
'''Returns:''' the toolpath at the current position  
 
pos (POSTION) current position in list
::''pos (POSTION) current position in list''






===:GetHeadPosition()===
===:GetHeadPosition()===
'''Returns:''' (POSITION) a variable to allow access to the head of the list of toolpaths
'''Returns:''' (POSITION) a variable to allow access to the head of the list of toolpaths




Line 40: Line 39:


===:GetNext( POSITION pos)===
===:GetNext( POSITION pos)===
'''Returns:''' Both the toolpath at the current position '''AND''' a new value for position pointing to the next item in the list (or nil if at end of list)
'''Returns:''' Both the toolpath at the current position '''AND''' a new value for position pointing to the next item in the list (or nil if at end of list)
 
pos (POSTION) current position in list
::''pos (POSTION) current position in list''


'''Example Code:'''   
'''Example Code:'''   
Line 54: Line 52:


===:GetPrev( POSITION pos)===
===:GetPrev( POSITION pos)===
'''Returns:''' Both the toolpath at the current position '''AND''' a new value for position, pointing to the previous item in the list (or nil if at start of list)
'''Returns:''' Both the toolpath at the current position '''AND''' a new value for position, pointing to the previous item in the list (or nil if at start of list)
 
pos (POSTION) current position in list
::''pos (POSTION) current position in list''




===:GetTailPosition()===
===:GetTailPosition()===
'''Returns:''' (POSITION) a variable to allow access to the tail (end) of the list toolpaths
'''Returns:''' (POSITION) a variable to allow access to the tail (end) of the list toolpaths





Latest revision as of 18:43, 1 May 2024

Back.jpg

This object holds a list of toolpaths for another object.


Properties

.Count

Interaction: Read Only

Returns:(integer) the number of toolpaths in the list



.IsEmpty

Interaction: Read Only

Returns: (bool) true if the toolpath list is empty

Methods

:GetAt( POSITION pos)

Returns: the toolpath at the current position 
pos (POSTION) current position in list


:GetHeadPosition()

Returns: (POSITION) a variable to allow access to the head of the list of toolpaths



:GetNext( POSITION pos)

Returns: Both the toolpath at the current position AND a new value for position pointing to the next item in the list (or nil if at end of list)
pos (POSTION) current position in list

Example Code:

 Note: GetNext(pos) is returning two values
    local pos = uuid_list:GetHeadPosition()
	local id
	while pos ~= nil do
	  id, pos = uuid_list:GetNext(pos)
          DO SOMETHING WITH ID
	end

:GetPrev( POSITION pos)

Returns: Both the toolpath at the current position AND a new value for position, pointing to the previous item in the list (or nil if at start of list)
pos (POSTION) current position in list


:GetTailPosition()

Returns: (POSITION) a variable to allow access to the tail (end) of the list toolpaths


Back.jpg

References

Please Note: The base material for the contents found in this WiKi was sourced from Vectric Lua Interface for Gadgets, version 2.05, published September 12, 2018. by Vectric Ltd. Most current document from Vertric can be downloaded at Vertric Developer Information