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 attribute values as a flat array with pagination. |
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, with pagination. |
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
¶
get_attrib_values
async
¶
get_attrib_values(
ctx: Context,
node_path: str,
attrib_name: str,
attrib_class: str = "point",
start: int = 0,
count: int = 200,
) -> dict
Read attribute values as a flat array with pagination.
For spot-checking a few values prefer sample_geometry — it returns a representative spread of points with all their attributes in one call. Use get_attrib_values when you need a specific slice of one attribute.
Values are element-major: for a float3 attribute every 3 consecutive values belong to one element. Check has_more and increment start to read subsequent pages.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
|
str
|
Node path. |
required |
|
str
|
Attribute name. |
required |
|
str
|
"point", "prim", "vertex", or "detail". |
'point'
|
|
int
|
First element index to return. |
0
|
|
int
|
Max elements per page (default 200). |
200
|
get_attribute_info
async
¶
get_attribute_info(
ctx: Context, node_path: str, attrib_name: str, attrib_class: str = "point"
) -> dict
get_bounding_box
async
¶
get_geometry_info
async
¶
get_group_members
async
¶
get_group_members(
ctx: Context,
node_path: str,
group_name: str,
group_type: str = "point",
start: int = 0,
count: int = 5000,
) -> dict
Get element indices in a geometry group, with pagination.
Check has_more and increment start to read subsequent pages.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
|
str
|
Node path. |
required |
|
str
|
Group name. |
required |
|
str
|
"point", "prim", or "edge". |
'point'
|
|
int
|
First element index to return. |
0
|
|
int
|
Max elements per page (default 5 000). |
5000
|
get_groups
async
¶
get_points
async
¶
get_prim_intrinsics
async
¶
get_prim_intrinsics(
ctx: Context, node_path: str, prim_index: int | None = None
) -> dict