selection_lasso
Selects the nodes inside the CSS-pixel polygon points ([x, y] pairs, at least 3, implicitly closed; the even-odd rule, on pixel centres for what is drawn). rule, through, mode and limit as for selection_marquee. Returns { nodeIds: whole node selection, elements?, hit, truncated? }.
Usage
await surface.executeAsync('selection_lasso', { points, additive?, mode?, rule?, through?, level?, limit? })Parameters
pointsnumber[][]additivebooleanadd to the selection instead of replacing it; the same as mode 'add'
mode"replace" | "add" | "remove" | "toggle"how the given ids or targets change the selection (default 'replace'); not with additive
rule"crossing" | "window"'crossing' (default) selects what touches the region, 'window' what lies wholly inside it
throughbooleanselect through the scene, hidden-behind geometry included (default false: what is drawn)
level"object" | "face" | "edge" | "point"what the region selects: nodes ('object') or elements ('face', 'edge', 'point') into the element selection. Omitted, the slot's level
limitintegerthe most ids in hit at the object level, the most elements at an element level (default 100000); truncated: true past it
Returns
object with nodeIds, elements, hit, truncated, in the ok: true envelope.
{
"type": "object",
"properties": {
"nodeIds": {
"type": "array",
"items": {
"type": "string"
}
},
"elements": {
"type": "array",
"items": {
"type": "object",
"properties": {
"nodeId": {
"type": "string"
},
"elements": {
"type": "object",
"properties": {
"domain": {
"type": "string",
"enum": [
"point",
"edge",
"face",
"curve",
"topology-edge"
]
},
"ids": {
"type": "array",
"items": {
"type": "integer",
"minimum": -2147483648,
"maximum": 2147483647
}
},
"from": {
"type": "array",
"items": {
"type": "integer",
"minimum": -2147483648,
"maximum": 2147483647
}
},
"handleId": {
"type": "string"
}
},
"required": [
"domain",
"ids",
"handleId"
]
}
},
"required": [
"nodeId",
"elements"
]
}
},
"hit": {
"type": "array",
"items": {
"type": "string"
}
},
"truncated": {
"type": "boolean"
}
},
"required": [
"nodeIds",
"hit"
]
}