Mesh to Directshape

I am new to Dynamo but this seems to be a simple topic
a mesh from the meshtoolkit to a DirectShape gives me a warning

“One of the input types is not matching”

You will probably need a string for the name. The warning should give you some clues, as well as the description of the node. You can also use an Object.Type node to check if the type of your element matches the requirements.

nop dosen’t work
It seems that the mesh coming from meshtoolit is the problem
if I plugin a mesh from a native shape it works

Yes, it seems so indeed:

Hi @gerry

Could you please drop your files here. Thanks :slight_smile:

I think the problem here is that DirectShape.ByMesh expects a Dynamo Mesh. MeshToolKit Meshes are a different class of mesh. You need to convert from MeshToolKitMesh to Dynamo Mesh like this :


Yes I tried to do that but my experience with dynamo is so low (started today)
that I was not able to figure how to convert meshes.
I will give a try
In any case shouldn’t we have a “standard” mesh object to simplify this stuff ?

@gerry to know more about mesh toolkit i suggest you look here

Well MeshToolKit’s Mesh class comes with a lot of cool methods that designscript mesh doesn’t have so I wouldn’t complain about it but yeah it would definitely be better to unify meshes in dynamo, or at least provide performant nodes to convert them in both directions.


Perhaps your Material data type is incorrect; Material.ByName takes in a string.