dimven / SpringNodes

A collection of Dynamo nodes
MIT License
69 stars 46 forks source link

DirectShape Material request #16

Closed l-schmidt closed 8 years ago

l-schmidt commented 8 years ago

Could you add a material input to DirectShape.ByGeometry? (like the ootb DirectShape node)

dimven commented 8 years ago

Unless something changes dramatically with Revit 2017, the API does not allow for any material changes for imported solids. Right now, you can only specify a material for natively generated objects and only at the time of their creation. :(

The built-in node uses the tessellatedshapebuilder class, which breaks the input geometry into triangles and then creates a new face with a material for each triangle. That's why the resulting geometry is faceted.

l-schmidt commented 8 years ago

Ah, I should have known it was an API limitation... oh well. I guess if I need a material, I'll have to try and get by with FamilyInstance.

dimven commented 8 years ago

Just had a look at the 2017 API last night. They do have quite a few new geometry additions and it looks very promising. I think that one of them permits defining materials on import. Tho I'm not sure when I'll have the chance to study it in more detail.

dimven commented 8 years ago

This has been implemented in the latest version as "Springs.BrepShape.ByGeometry".