selection_marquee
Selects the nodes in the CSS-pixel rect (x0, y0)–(x1, y1), edges inclusive. By default what is drawn and touches it (a pixel counts when its centre is inside); rule: 'window' takes only nodes wholly inside (in f64, with at least one drawn pixel inside), through: true selects through the scene, hidden-behind geometry included. mode ('replace' default, 'add', 'remove', 'toggle'; additive: true is 'add') applies the hit to the node selection; limit caps hit (default 100000). At an element level (level, else the slot's: 'face', 'edge', 'point') the faces, edges or points selected the same ways go to the element selection instead, hit naming their nodes and limit capping the elements. Returns { nodeIds: whole node selection, elements?, hit, truncated? }.
Usage
await surface.executeAsync('selection_marquee', { x0, y0, x1, y1, additive?, mode?, rule?, through?, level?, limit? })Parameters
x0numbery0numberx1numbery1numberadditivebooleanadd 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"
]
}