Mesh to Trimesh:
Hy3DMeshToTrimesh converts a ComfyUI mesh into a trimesh object so you can pass its geometry to a workflow step that expects the TRIMESH type. The conversion uses the mesh’s stored vertices, which describe points in 3D space, and faces, which describe how those points connect to form the surface. It takes the first entry from each collection; it does not process additional entries or expose settings for changing the geometry.
Mesh to Trimesh Input Parameters:
mesh
A required MESH object to convert. The node reads mesh.vertices[0] and mesh.faces[0] and passes them to the trimesh constructor. This means the first vertex and face entries determine the result; any later entries are not used. Connect a mesh whose first entries contain compatible geometry. The interface specifies no minimum, maximum, default value, or selectable options for this input.
Mesh to Trimesh Output Parameters:
trimesh
The resulting TRIMESH object, constructed from the first vertex and face entries of the input mesh. Its vertices represent positions in 3D space, while its faces describe connections between those positions. Connect this output to a downstream node that accepts TRIMESH. The node’s tooltip describes the object as containing vertices and faces as NumPy arrays, although the shown method does not explicitly convert the supplied data to NumPy arrays.
Mesh to Trimesh Usage Tips:
- Place this node between a MESH-producing node and a node that requires TRIMESH. It changes the geometry’s container type; the source shows no controls for editing the shape.
- Check that the geometry you want is in the first vertex and face entries. This node selects index
0from both collections and does not provide a batch-selection setting. - If conversion fails, inspect the upstream mesh before adding processing steps: its vertex and face collections must exist, contain a first entry, and describe compatible geometry.
- There are no configuration settings to tune on this node. Prepare or repair the mesh upstream when you need different geometry.
Mesh to Trimesh Common Errors and Solutions:
'NoneType' object has no attribute 'vertices'
- Explanation: The node received no mesh object and could not read its vertices.
- Solution: Connect a node that produces a valid MESH and check that the upstream step completed successfully.
AttributeError: '<type>' object has no attribute 'vertices' or AttributeError: '<type>' object has no attribute 'faces'
- Explanation: The supplied object does not have one of the properties this conversion reads. The exact type name and message depend on the object received.
- Solution: Check that the connection supplies a compatible MESH object, rather than another data type.
IndexError: list index out of range
- Explanation: A vertex or face collection may be empty, so its first entry at index
0cannot be read. The exact error wording depends on the collection type. - Solution: Check the upstream mesh and ensure it contains both vertex and face data before converting it.
NameError: name 'Trimesh' is not defined
- Explanation: This can occur if
Trimeshis unavailable when the node runs. The supplied excerpt does not show how that name is imported or defined, so it does not establish whether this error will occur in a complete installation. - Solution: Check that the node package is installed completely and that its required trimesh-related dependency is available; consult the package’s installation instructions for the correct setup.
Constructor error about invalid vertices or faces
- Explanation: If the first entries exist but have an unsuitable shape, type, or relationship, the trimesh constructor may reject them. The exact message depends on the data and the constructor implementation, which are not shown here.
- Solution: Inspect or regenerate the mesh upstream so its first vertex entry contains usable positions and its first face entry refers to those vertices correctly.
