Skip to content

geometry

geometry

MCP tools for SOP geometry inspection and manipulation.

Functions:

Name Description
find_nearest_point

Find the nearest point(s) to a given position.

get_attrib_values

Read all values of a single attribute.

get_attribute_info

Get metadata for a geometry attribute.

get_bounding_box

Get the bounding box of a SOP node's geometry.

get_geometry_info

Get geometry summary for a SOP node.

get_group_members

Get element indices in a geometry group.

get_groups

List all geometry groups on a SOP node.

get_points

Read point positions and attributes with pagination.

get_prim_intrinsics

Get intrinsic values for primitives.

get_prims

Read primitive data and attributes with pagination.

sample_geometry

Sample evenly distributed points from a SOP node's geometry.

set_detail_attrib

Set a detail attribute on a SOP node.

Functions

find_nearest_point async

find_nearest_point(
    ctx: Context, node_path: str, position: list[float], max_results: int = 1
) -> dict

Find the nearest point(s) to a given position.

Parameters:

Name Type Description Default
node_path
str

Node path.

required
position
list[float]

Query position as [x, y, z].

required
max_results
int

Max nearest points to return.

1

get_attrib_values async

get_attrib_values(
    ctx: Context, node_path: str, attrib_name: str, attrib_class: str = "point"
) -> dict

Read all values of a single attribute.

Parameters:

Name Type Description Default
node_path
str

Node path.

required
attrib_name
str

Attribute name.

required
attrib_class
str

"point", "prim", "vertex", or "detail".

'point'

get_attribute_info async

get_attribute_info(
    ctx: Context, node_path: str, attrib_name: str, attrib_class: str = "point"
) -> dict

Get metadata for a geometry attribute.

Parameters:

Name Type Description Default
node_path
str

Node path.

required
attrib_name
str

Attribute name.

required
attrib_class
str

"point", "prim", "vertex", or "detail".

'point'

get_bounding_box async

get_bounding_box(ctx: Context, node_path: str) -> dict

Get the bounding box of a SOP node's geometry.

Parameters:

Name Type Description Default
node_path
str

Node path.

required

get_geometry_info async

get_geometry_info(ctx: Context, node_path: str) -> dict

Get geometry summary for a SOP node.

Parameters:

Name Type Description Default
node_path
str

Node path.

required

get_group_members async

get_group_members(
    ctx: Context, node_path: str, group_name: str, group_type: str = "point"
) -> dict

Get element indices in a geometry group.

Parameters:

Name Type Description Default
node_path
str

Node path.

required
group_name
str

Group name.

required
group_type
str

"point", "prim", or "edge".

'point'

get_groups async

get_groups(ctx: Context, node_path: str) -> dict

List all geometry groups on a SOP node.

Parameters:

Name Type Description Default
node_path
str

Node path.

required

get_points async

get_points(
    ctx: Context,
    node_path: str,
    attributes: list[str] | None = None,
    start: int = 0,
    count: int = 1000,
    group: str | None = None,
) -> dict

Read point positions and attributes with pagination.

Parameters:

Name Type Description Default
node_path
str

Node path.

required
attributes
list[str] | None

Attribute names to read.

None
start
int

Start index.

0
count
int

Max points per page.

1000
group
str | None

Point group filter.

None

get_prim_intrinsics async

get_prim_intrinsics(
    ctx: Context, node_path: str, prim_index: int | None = None
) -> dict

Get intrinsic values for primitives.

Parameters:

Name Type Description Default
node_path
str

Node path.

required
prim_index
int | None

Primitive index, or None for a summary.

None

get_prims async

get_prims(
    ctx: Context,
    node_path: str,
    attributes: list[str] | None = None,
    start: int = 0,
    count: int = 1000,
    group: str | None = None,
) -> dict

Read primitive data and attributes with pagination.

Parameters:

Name Type Description Default
node_path
str

Node path.

required
attributes
list[str] | None

Attribute names to read.

None
start
int

Start index.

0
count
int

Max prims per page.

1000
group
str | None

Prim group filter.

None

sample_geometry async

sample_geometry(
    ctx: Context, node_path: str, sample_count: int = 100, seed: int = 0
) -> dict

Sample evenly distributed points from a SOP node's geometry.

Parameters:

Name Type Description Default
node_path
str

Node path.

required
sample_count
int

Number of points to sample.

100
seed
int

Random seed.

0

set_detail_attrib async

set_detail_attrib(
    ctx: Context, node_path: str, attrib_name: str, value: Any
) -> dict

Set a detail attribute on a SOP node.

Parameters:

Name Type Description Default
node_path
str

Node path.

required
attrib_name
str

Attribute name.

required
value
Any

Value to set.

required