GeometrySelector: Difference between revisions
No edit summary |
|||
Line 14: | Line 14: | ||
'''Interaction:''' Read and Write | '''Interaction:''' Read and Write | ||
'''Returns:''' (bool) if true selector will allow open vectors in the selection | '''Returns:''' (bool) if true selector will allow open vectors in the selection | ||
Line 21: | Line 21: | ||
'''Interaction:''' Read and Write | '''Interaction:''' Read and Write | ||
'''Returns:''' (bool) if true selector will use .ToolDia field when selecting vectors | '''Returns:''' (bool) if true selector will use .ToolDia field when selecting vectors | ||
Line 28: | Line 28: | ||
'''Interaction:''' Read and Write | '''Interaction:''' Read and Write | ||
'''Returns:'''(double) Diameter of circles we select if .CircleMatchCircleDia and .SelectCircles is true | '''Returns:'''(double) Diameter of circles we select if .CircleMatchCircleDia and .SelectCircles is true | ||
Line 35: | Line 35: | ||
'''Interaction:''' Read and Write | '''Interaction:''' Read and Write | ||
'''Returns:'''(double) tolerance we use when deciding if a circle matches the ToolDia or CircleDia criteria | '''Returns:'''(double) tolerance we use when deciding if a circle matches the ToolDia or CircleDia criteria | ||
Line 42: | Line 42: | ||
'''Interaction:''' Read and Write | '''Interaction:''' Read and Write | ||
'''Returns:''' (bool) if true we select all circles if .SelectCircles is true | '''Returns:''' (bool) if true we select all circles if .SelectCircles is true | ||
Line 49: | Line 49: | ||
'''Interaction:''' Read and Write | '''Interaction:''' Read and Write | ||
'''Returns:''' (bool) if true we select all circles matching .CircleDia if .SelectCircles is true | '''Returns:''' (bool) if true we select all circles matching .CircleDia if .SelectCircles is true | ||
Line 56: | Line 56: | ||
'''Interaction:''' Read and Write | '''Interaction:''' Read and Write | ||
'''Returns:''' (bool) if true we select all circles that match the diameter of the tool used for the toolpath if .SelectCircles is true | '''Returns:''' (bool) if true we select all circles that match the diameter of the tool used for the toolpath if .SelectCircles is true | ||
Line 63: | Line 63: | ||
'''Interaction:''' Read and Write | '''Interaction:''' Read and Write | ||
'''Returns:''' (double) Offset value to add to depth | '''Returns:''' (double) Offset value to add to depth | ||
Line 70: | Line 70: | ||
'''Interaction:''' Read and Write | '''Interaction:''' Read and Write | ||
'''Returns:''' (string) Formula for depth offset from geometry | '''Returns:''' (string) Formula for depth offset from geometry | ||
Line 76: | Line 76: | ||
'''Interaction:''' Read and Write | '''Interaction:''' Read and Write | ||
'''Returns:''' (bool) if true groups which only match some criteria are selected | '''Returns:''' (bool) if true groups which only match some criteria are selected | ||
Line 83: | Line 83: | ||
'''Interaction:''' Read and Write | '''Interaction:''' Read and Write | ||
'''Returns:''' (bool) if true only vectors on the layers added with:AddLayerName are selected. | '''Returns:''' (bool) if true only vectors on the layers added with:AddLayerName are selected. | ||
Line 90: | Line 90: | ||
'''Interaction:''' Read and Write | '''Interaction:''' Read and Write | ||
'''Returns:''' (bool) if true closed vectors are selected | '''Returns:''' (bool) if true closed vectors are selected | ||
Line 97: | Line 97: | ||
'''Interaction:''' Read and Write | '''Interaction:''' Read and Write | ||
'''Returns:''' (bool) if true we are only selecting circles | '''Returns:''' (bool) if true we are only selecting circles | ||
Line 104: | Line 104: | ||
'''Interaction:''' Read and Write | '''Interaction:''' Read and Write | ||
'''Returns:''' (bool) if true open vectors are selected | '''Returns:''' (bool) if true open vectors are selected | ||
Line 111: | Line 111: | ||
'''Interaction:''' Read and Write | '''Interaction:''' Read and Write | ||
'''Returns:''' (bool) if true depth for toolpath is set from selected geometry (which must have been imported from DXF files with depth set) | '''Returns:''' (bool) if true depth for toolpath is set from selected geometry (which must have been imported from DXF files with depth set) | ||
Line 118: | Line 118: | ||
'''Interaction:''' Read and Write | '''Interaction:''' Read and Write | ||
'''Returns:''' (double) Current diameter of circles we select if .CircleMatchToolDia and .SelectCircles is true | '''Returns:''' (double) Current diameter of circles we select if .CircleMatchToolDia and .SelectCircles is true | ||
==Layer List Access== | ==Layer List Access== | ||
Line 125: | Line 125: | ||
'''Interaction:''' Read Only | '''Interaction:''' Read Only | ||
'''Returns:''' (bool) true if the geometry selector has a list of layer names | '''Returns:''' (bool) true if the geometry selector has a list of layer names | ||
Line 132: | Line 132: | ||
'''Interaction:''' Read Only | '''Interaction:''' Read Only | ||
'''Returns:''' (integer) number of layers | '''Returns:''' (integer) number of layers | ||
Line 143: | Line 143: | ||
===:GetAtLayerName(POSITION pos) === | ===:GetAtLayerName(POSITION pos) === | ||
'''Returns:''' the layer name at the current position | '''Returns:''' the layer name at the current position | ||
::''pos (POSTION) current position in list'' | ::''pos (POSTION) current position in list'' | ||
Line 150: | Line 150: | ||
===:GetLayerNameHeadPosition() === | ===:GetLayerNameHeadPosition() === | ||
'''Returns:''' (POSITION) a variable to allow access to the head of the list of layer names | '''Returns:''' (POSITION) a variable to allow access to the head of the list of layer names | ||
===:GetNextLayerName(POSITION pos) === | ===:GetNextLayerName(POSITION pos) === | ||
'''Returns:''' Both the layer name 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 layer name 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'' | ||
Line 160: | Line 160: | ||
===:GetPrevLayerName(POSITION pos) === | ===:GetPrevLayerName(POSITION pos) === | ||
'''Returns:''' Both the layer name 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 layer name 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'' | ||
Line 166: | Line 166: | ||
===:GetLayerNameTailPosition() === | ===:GetLayerNameTailPosition() === | ||
'''Returns:''' (POSITION) a variable to allow access to the tail (end) of the list of layer names | '''Returns:''' (POSITION) a variable to allow access to the tail (end) of the list of layer names | ||
===:FindLayerWithName(string name) === | ===:FindLayerWithName(string name) === | ||
'''Returns:''' the POSITION of layer with passed name or nil if no layer in list with name found | '''Returns:''' the POSITION of layer with passed name or nil if no layer in list with name found | ||
::''name (string) name of layer to find position of'' | ::''name (string) name of layer to find position of'' | ||
Line 178: | Line 178: | ||
===:HasSelectorData(Toolpath toolpath) === | ===:HasSelectorData(Toolpath toolpath) === | ||
'''Returns:''' (bool) true if the passed toolpath has selector data stored with it | '''Returns:''' (bool) true if the passed toolpath has selector data stored with it | ||
::''toolpath (Toolpath) toolpath to check for data'' | ::''toolpath (Toolpath) toolpath to check for data'' |
Revision as of 17:04, 1 May 2024
This object is used to pass data to the various toolpath creation function in the ToolpathManager object to specify automatic selection of geometry for the toolpath when it is calculated. The default constructor for the object will leave the GeometrySelector inactive, and the toolpath will calculate using the currently selected vectors.
Constructor
GeometrySelector() Creates a new GeomterySelector object with default values.
Properties
.AllowOpen
Interaction: Read and Write
Returns: (bool) if true selector will allow open vectors in the selection
.AllowToolDia
Interaction: Read and Write
Returns: (bool) if true selector will use .ToolDia field when selecting vectors
.CircleDia
Interaction: Read and Write
Returns:(double) Diameter of circles we select if .CircleMatchCircleDia and .SelectCircles is true
.CircleTolerance
Interaction: Read and Write
Returns:(double) tolerance we use when deciding if a circle matches the ToolDia or CircleDia criteria
.CircleMatchAll
Interaction: Read and Write
Returns: (bool) if true we select all circles if .SelectCircles is true
.CircleMatchCircleDia
Interaction: Read and Write
Returns: (bool) if true we select all circles matching .CircleDia if .SelectCircles is true
.CircleMatchToolDia
Interaction: Read and Write
Returns: (bool) if true we select all circles that match the diameter of the tool used for the toolpath if .SelectCircles is true
.GeometryDepthOffset
Interaction: Read and Write
Returns: (double) Offset value to add to depth
.GeometryDepthOffset Formula
Interaction: Read and Write
Returns: (string) Formula for depth offset from geometry
.MixedGroupsOk
Interaction: Read and Write
Returns: (bool) if true groups which only match some criteria are selected
.OnlyOnLayers
Interaction: Read and Write
Returns: (bool) if true only vectors on the layers added with:AddLayerName are selected.
.SelectClosed
Interaction: Read and Write
Returns: (bool) if true closed vectors are selected
.SelectCircles
Interaction: Read and Write
Returns: (bool) if true we are only selecting circles
.SelectOpen
Interaction: Read and Write
Returns: (bool) if true open vectors are selected
.SetDepthFromGeometry
Interaction: Read and Write
Returns: (bool) if true depth for toolpath is set from selected geometry (which must have been imported from DXF files with depth set)
.ToolDia
Interaction: Read and Write
Returns: (double) Current diameter of circles we select if .CircleMatchToolDia and .SelectCircles is true
Layer List Access
.HaveLayerNames
Interaction: Read Only
Returns: (bool) true if the geometry selector has a list of layer names
.LayerNameCount
Interaction: Read Only
Returns: (integer) number of layers
:AddLayerhName(string name)
Add passed layer name to list of names selector uses if .OnlyOnLayers is true.
- name (string) name of layer to add to list
:GetAtLayerName(POSITION pos)
Returns: the layer name at the current position
- pos (POSTION) current position in list
:GetLayerNameHeadPosition()
Returns: (POSITION) a variable to allow access to the head of the list of layer names
:GetNextLayerName(POSITION pos)
Returns: Both the layer name at the current position ANDa 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
:GetPrevLayerName(POSITION pos)
Returns: Both the layer name at the current position ANDa 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
:GetLayerNameTailPosition()
Returns: (POSITION) a variable to allow access to the tail (end) of the list of layer names
:FindLayerWithName(string name)
Returns: the POSITION of layer with passed name or nil if no layer in list with name found
- name (string) name of layer to find position of
Methods
:HasSelectorData(Toolpath toolpath)
Returns: (bool) true if the passed toolpath has selector data stored with it
- toolpath (Toolpath) toolpath to check for data
:LoadSelectorData(Toolpath toolpath)
Loads the selector data from passed toolpath into this object data
- toolpath (Toolpath) toolpath to get data from
:SaveSelectorData(Toolpath toolpath)
Saves the selector data to passed toolpath
- toolpath (Toolpath) toolpath to set data on
:RemoveAllLayerNames()
Remove all layer names associated with this selector.
References
Please Note: The base material for the contents found in this WiKi was sourced from Vectric Lua Interface for Gadgets, version 10.0, published August 21, 2019. by Vectric Ltd. Most current document from Vertric can be downloaded at Vertric Developer Information