The only difference is the first one has separate meshes the second has all of them joined and welded into one mesh. The first one has the notifications about file size exceeding the second keeps calm. Looks like the second could render more cells but I haven’t counted them.
So the question is what the polygons limit, how to control it and why there is no notification in the second file?
This is strange indeed, your geometry doesn’t seem to be very detailed ie there should be no problem typically. We will review this and answer once we found the reason.
How many faces/vertices are you outputting roughly?
Could you make your models publicly accessible so other users of this forum can see them?
pl-e1 simple.gh (132.0 KB)
Please have a look at it. It’s pretty simple.
As for vertices count, this script restricted with 585936, though I believe the average amount will be around 150000 and less.
I have checked your definition. This is the problem and how to solve it:
Meshes to be displayed using WebGL can not have more than 65536 vertices (2 byte integer limit, which is used for vertex indices). If you output a mesh that has more than 65536 vertices, we have to decimate it, which takes time and therefore will likely cause computation time to exceed the 5s limit.
Solution: output meshes which have less than 65536 vertices. We automatically group such meshes into packages of max 65536 vertices, such that the number of meshes is minimised. In your simple don’t do a global merge of vertices, but just per module.
Other recommendations:
Use the components of the ShapeDiver plugin to display geometry, and switch of Preview for all other components. This will provide you with control on the material settings.
In your example the same module is displayed many times. We have a possibility which allows you to do this in a much more efficient way, similar to block definitions. When using the ShapeDiver display components, you can define transformations. This will radically lower transfer size and time for your example. The details will be documented on our reworked upcoming website, attached you can find a simple example on how to use it. TransformationTest.gh (12.1 KB)
Though I have a question about how to show other objects from the script those without transformation? Or just feed to the ShapeDiver Display Component a zero transformation for those objects?
Many thanks for your feedback!
You can directly attach multiple components to the ShapeDiver display component, with or without setting transformations.
If you want to display geometry using multiple materials, you can supply a list of material and a tree of geometry. Branches of the geometry tree will get mapped to elements of the material list.