import { PluginCommAPI, type Geometry } from 'sn-plugin-lib';/** * Example: modify the lasso-selected geometry. */export async function exampleModifyLassoGeometry() { const listRes = await PluginCommAPI.getLassoGeometries(); if (!listRes.success) { throw new Error(listRes.error?.message ?? 'getLassoGeometries call failed'); } const geometries = (listRes.result ?? []) as Geometry[]; if (geometries.length !== 1) { throw new Error('Make sure the current lasso selection includes exactly one geometry'); } const first = geometries[0]; if (!first) { return false; } const res = await PluginCommAPI.modifyLassoGeometry(first); if (!res.success) { throw new Error(res.error?.message ?? 'modifyLassoGeometry call failed'); } return res.result;}